forked from giorginolab/vmd_diffusion_coefficient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiffusion_coefficient_gui_ui.tcl
executable file
·578 lines (570 loc) · 18.2 KB
/
diffusion_coefficient_gui_ui.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# diffusion_coefficient_gui_ui.tcl --
#
# UI generated by GUI Builder Build 146 on 2019-09-18 20:38:53 from:
# /Users/toni/compile/vmd_diffusion_coefficient/diffusion_coefficient_gui.ui
# THIS IS AN AUTOGENERATED FILE AND SHOULD NOT BE EDITED.
# The associated callback file should be modified instead.
#
# Declare the namespace for this dialog
namespace eval diffusion_coefficient_gui {}
package require Tk
# diffusion_coefficient_gui::ui --
#
# Create the UI for this dialog.
#
# ARGS:
# root the parent window for this form
# args a catch-all for other args, but none are expected
#
proc diffusion_coefficient_gui::ui {root args} {
# this handles '.' as a special case
set base [expr {($root == ".") ? "" : $root}]
variable ROOT $root
variable BASE $base
variable SCRIPTDIR ; # defined in main script
# Widget Initialization
variable _frame_1 [frame $BASE._frame_1]
variable _frame_3 [frame $BASE._frame_3]
variable _frame_4 [frame $BASE._frame_4]
variable _frame_6 [frame $BASE._frame_6]
variable _frame_5 [frame $BASE._frame_5]
variable _label_1 [label $BASE._label_1 \
-font {Helvetica 13 bold} \
-pady 6 \
-text "VMD Diffusion Coefficient Tool"]
variable _label_2 [label $BASE._label_2 \
-font {helvetica 10} \
-text "Compute one, two or three-dimensional mean squared displacements (MSD) of a molecular species, and associated diffusion coefficients" \
-wraplength 450]
variable _label_3 [label $BASE._label_3 \
-font {helvetica 10} \
-text "Selection (one atom per molecule)"]
variable _entry_1 [entry $BASE._entry_1 \
-invalidcommand [namespace code [list _entry_1_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(selection)" \
-validatecommand [namespace code [list _entry_1_validatecommand]] \
-width 30 \
-xscrollcommand [namespace code [list _entry_1_xscrollcommand]]]
variable _label_4 [label $BASE._label_4 \
-font {helvetica 10} \
-text "Real time between frames (ns)"]
variable _entry_2 [entry $BASE._entry_2 \
-invalidcommand [namespace code [list _entry_2_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(dt)" \
-validatecommand [namespace code [list _entry_2_validatecommand]] \
-width 12 \
-xscrollcommand [namespace code [list _entry_2_xscrollcommand]]]
variable _label_5 [label $BASE._label_5 \
-font {helvetica 10} \
-text "Diffusion along"]
variable _checkbutton_1 [checkbutton $BASE._checkbutton_1 \
-command [namespace code [list _checkbutton_1_command]] \
-font {helvetica 10} \
-text " x" \
-variable "diffusion_coefficient::arg(alongx)"]
variable _checkbutton_2 [checkbutton $BASE._checkbutton_2 \
-command [namespace code [list _checkbutton_2_command]] \
-font {helvetica 10} \
-text " y" \
-variable "diffusion_coefficient::arg(alongy)"]
variable _checkbutton_3 [checkbutton $BASE._checkbutton_3 \
-command [namespace code [list _checkbutton_3_command]] \
-font {helvetica 10} \
-takefocus 1 \
-text " z" \
-variable "diffusion_coefficient::arg(alongz)"]
variable plot_msd_button [button $BASE.plot_msd_button \
-command [namespace code [list plot_msd_button_command]] \
-font {helvetica 10 bold} \
-text "MSD displacement"]
variable plot_d_button [button $BASE.plot_d_button \
-command [namespace code [list plot_d_button_command]] \
-font {helvetica 10 bold} \
-text "Diffusion coefficient"]
variable _label_6 [label $BASE._label_6 \
-font {helvetica 10} \
-text "Compute MSD at lag times \u03C4 from"]
variable _entry_3 [entry $BASE._entry_3 \
-invalidcommand [namespace code [list _entry_3_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(from)" \
-validatecommand [namespace code [list _entry_3_validatecommand]] \
-width 6 \
-xscrollcommand [namespace code [list _entry_3_xscrollcommand]]]
variable _label_8 [label $BASE._label_8 \
-font {helvetica 10} \
-text "to"]
variable _entry_4 [entry $BASE._entry_4 \
-invalidcommand [namespace code [list _entry_4_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(to)" \
-validatecommand [namespace code [list _entry_4_validatecommand]] \
-width 6 \
-xscrollcommand [namespace code [list _entry_4_xscrollcommand]]]
variable _entry_5 [entry $BASE._entry_5 \
-invalidcommand [namespace code [list _entry_5_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(step)" \
-validatecommand [namespace code [list _entry_5_validatecommand]] \
-width 6 \
-xscrollcommand [namespace code [list _entry_5_xscrollcommand]]]
variable _label_9 [label $BASE._label_9 \
-font {helvetica 10} \
-text "step"]
variable _label_10 [label $BASE._label_10 \
-font {helvetica 10} \
-text "frames "]
variable _label_11 [label $BASE._label_11 \
-font {helvetica 10} \
-text "Analysis interval from"]
variable _label_12 [label $BASE._label_12 \
-font {helvetica 10} \
-text "frames "]
variable _entry_6 [entry $BASE._entry_6 \
-invalidcommand [namespace code [list _entry_6_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(interval_from)" \
-validatecommand [namespace code [list _entry_6_validatecommand]] \
-width 6 \
-xscrollcommand [namespace code [list _entry_6_xscrollcommand]]]
variable _label_13 [label $BASE._label_13 \
-font {helvetica 10} \
-text "Ready" \
-textvariable "diffusion_coefficient::status_text"]
variable _label_14 [label $BASE._label_14 \
-font {helvetica 10} \
-text "to"]
variable _entry_7 [entry $BASE._entry_7 \
-invalidcommand [namespace code [list _entry_7_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(interval_to)" \
-validatecommand [namespace code [list _entry_7_validatecommand]] \
-width 6 \
-xscrollcommand [namespace code [list _entry_7_xscrollcommand]]]
variable _label_15 [label $BASE._label_15 \
-font {helvetica 10} \
-text "step"]
variable _entry_8 [entry $BASE._entry_8 \
-invalidcommand [namespace code [list _entry_8_invalidcommand]] \
-justify "center" \
-textvariable "diffusion_coefficient::arg(interval_stride)" \
-validatecommand [namespace code [list _entry_8_validatecommand]] \
-width 6 \
-xscrollcommand [namespace code [list _entry_8_xscrollcommand]]]
variable _checkbutton_4 [checkbutton $BASE._checkbutton_4 \
-command [namespace code [list _checkbutton_4_command]] \
-font {helvetica 10} \
-text " Subtract center of mass drift" \
-variable "diffusion_coefficient::arg(remove_drift)"]
variable reset_lags_button [button $BASE.reset_lags_button \
-command [namespace code [list reset_lags_button_command]] \
-font {helvetica 10} \
-text "Defaults"]
variable reset_interval_button [button $BASE.reset_interval_button \
-command [namespace code [list reset_interval_button_command]] \
-font {helvetica 10} \
-text "Defaults"]
variable _label_7 [label $BASE._label_7 \
-font {helvetica 10} \
-justify "right" \
-text "Plot..."]
variable button_help [button $BASE.button_help \
-bitmap "questhead" \
-borderwidth 1 \
-command [namespace code [list button_help_command]] \
-font {helvetica 10 bold} \
-text "?"]
variable _label_16 [label $BASE._label_16 \
-font {Helvetica 13} \
-text "Documentation"]
variable abort_button [button $BASE.abort_button \
-bitmap "error" \
-command [namespace code [list abort_button_command]] \
-foreground "#ff0000" \
-state "disabled" \
-text "_button_6"]
variable save_button [button $BASE.save_button \
-bitmap "gray50" \
-command [namespace code [list save_button_command]] \
-text "_button_7"]
variable menu [menu $BASE.menu]
variable menuitem1 [menu $BASE.menuitem1 \
-tearoff 0]
$BASE.menu add cascade \
-label "Help" \
-menu $BASE.menuitem1
$BASE.menuitem1 add command \
-command "diffusion_coefficient_gui::help_docs" \
-compound "right" \
-label "Documentation..."
$BASE.menuitem1 add command \
-command "diffusion_coefficient_gui::help_about" \
-label "About"
# Geometry Management
grid $BASE._frame_1 -in $root -row 4 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._frame_3 -in $root -row 5 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "news"
grid $BASE._frame_4 -in $root -row 6 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "news"
grid $BASE._frame_6 -in $root -row 11 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._frame_5 -in $root -row 9 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "news"
grid $BASE._label_1 -in $root -row 1 -column 1 \
-columnspan 2 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._label_2 -in $root -row 2 -column 1 \
-columnspan 2 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._label_3 -in $root -row 3 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "e"
grid $BASE._entry_1 -in $root -row 3 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._label_4 -in $root -row 7 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "e"
grid $BASE._entry_2 -in $root -row 7 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "w"
grid $BASE._label_5 -in $root -row 4 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "e"
grid $BASE._checkbutton_1 -in $base._frame_1 -row 1 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._checkbutton_2 -in $base._frame_1 -row 1 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._checkbutton_3 -in $base._frame_1 -row 1 -column 3 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE.plot_msd_button -in $base._frame_5 -row 1 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "nsew"
grid $BASE.plot_d_button -in $base._frame_5 -row 1 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "nsew"
grid $BASE._label_6 -in $root -row 5 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "e"
grid $BASE._entry_3 -in $base._frame_3 -row 1 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._label_8 -in $base._frame_3 -row 1 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._entry_4 -in $base._frame_3 -row 1 -column 3 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._entry_5 -in $base._frame_3 -row 1 -column 5 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._label_9 -in $base._frame_3 -row 1 -column 4 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._label_10 -in $base._frame_3 -row 1 -column 6 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "w"
grid $BASE._label_11 -in $root -row 6 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "e"
grid $BASE._label_12 -in $base._frame_4 -row 1 -column 6 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "w"
grid $BASE._entry_6 -in $base._frame_4 -row 1 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._label_13 -in $root -row 11 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._label_14 -in $base._frame_4 -row 1 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._entry_7 -in $base._frame_4 -row 1 -column 3 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._label_15 -in $base._frame_4 -row 1 -column 4 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._entry_8 -in $base._frame_4 -row 1 -column 5 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "ew"
grid $BASE._checkbutton_4 -in $base._frame_1 -row 1 -column 4 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE.reset_lags_button -in $base._frame_3 -row 1 -column 7 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE.reset_interval_button -in $base._frame_4 -row 1 -column 7 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE._label_7 -in $root -row 9 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "e"
grid $BASE.button_help -in $base._frame_6 -row 1 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "nsew"
grid $BASE._label_16 -in $base._frame_6 -row 1 -column 2 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky "w"
grid $BASE.abort_button -in $base._frame_5 -row 1 -column 4 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
grid $BASE.save_button -in $base._frame_5 -row 1 -column 3 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky ""
# Resize Behavior
grid rowconfigure $root 1 -weight 0 -minsize 16 -pad 0
grid rowconfigure $root 2 -weight 1 -minsize 24 -pad 0
grid rowconfigure $root 3 -weight 0 -minsize 42 -pad 0
grid rowconfigure $root 4 -weight 0 -minsize 12 -pad 0
grid rowconfigure $root 5 -weight 0 -minsize 4 -pad 0
grid rowconfigure $root 6 -weight 0 -minsize 2 -pad 0
grid rowconfigure $root 7 -weight 0 -minsize 21 -pad 0
grid rowconfigure $root 8 -weight 1 -minsize 15 -pad 0
grid rowconfigure $root 9 -weight 0 -minsize 2 -pad 0
grid rowconfigure $root 10 -weight 1 -minsize 13 -pad 0
grid rowconfigure $root 11 -weight 1 -minsize 18 -pad 0
grid columnconfigure $root 1 -weight 0 -minsize 40 -pad 0
grid columnconfigure $root 2 -weight 1 -minsize 40 -pad 0
grid rowconfigure $base._frame_1 1 -weight 0 -minsize 4 -pad 0
grid columnconfigure $base._frame_1 1 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_1 2 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_1 3 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_1 4 -weight 1 -minsize 40 -pad 0
grid rowconfigure $base._frame_3 1 -weight 0 -minsize 3 -pad 0
grid columnconfigure $base._frame_3 1 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_3 2 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_3 3 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_3 4 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_3 5 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_3 6 -weight 1 -minsize 40 -pad 0
grid columnconfigure $base._frame_3 7 -weight 0 -minsize 40 -pad 0
grid rowconfigure $base._frame_4 1 -weight 0 -minsize 2 -pad 0
grid columnconfigure $base._frame_4 1 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_4 2 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_4 3 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_4 4 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_4 5 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_4 6 -weight 1 -minsize 40 -pad 0
grid columnconfigure $base._frame_4 7 -weight 0 -minsize 40 -pad 0
grid rowconfigure $base._frame_5 1 -weight 0 -minsize 2 -pad 0
grid columnconfigure $base._frame_5 1 -weight 1 -minsize 16 -pad 0
grid columnconfigure $base._frame_5 2 -weight 1 -minsize 2 -pad 0
grid columnconfigure $base._frame_5 3 -weight 0 -minsize 2 -pad 0
grid columnconfigure $base._frame_5 4 -weight 0 -minsize 2 -pad 0
grid rowconfigure $base._frame_6 1 -weight 0 -minsize 2 -pad 0
grid columnconfigure $base._frame_6 1 -weight 0 -minsize 40 -pad 0
grid columnconfigure $base._frame_6 2 -weight 1 -minsize 40 -pad 0
$ROOT configure -menu $BASE.menu
}