annotate hbonds/hbonds.tcl @ 0:8aa5e465b043 draft default tip

"planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
author chemteam
date Thu, 24 Oct 2019 07:00:24 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1 # hbonds - finds hydrogen bonds in a trajectory
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
2 #
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
3 # Authors:
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
4 # JC Gumbart (gumbart@ks.uiuc.edu)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
5 # with the detailed hbond calculations contributed by Dong Luo (us917@yahoo.com)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
6 # also with thanks to Leo Trabuco and Elizabeth Villa whose salt bridge plugin provided the foundation for this one
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
7 #
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
8 # $Id: hbonds.tcl,v 1.9 2013/04/15 15:50:16 johns Exp $
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
9 #
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
10
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
11 #
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
12 # TODO:
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
13 #
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
14 # - show hbonds in the gui?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
15 #
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
16
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
17 package provide hbonds 1.2
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
18
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
19 namespace eval ::hbonds:: {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
20 namespace export hbonds
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
21
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
22 variable defaultAng 20
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
23 variable defaultDist 3.0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
24 variable defaultWrite 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
25 variable defaultFrames "all"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
26 variable defaultOutdir
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
27 variable defaultLogFile ""
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
28 variable defaultUpdateSel 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
29 variable defaultPlot 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
30 variable defaultPolar 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
31 variable debug 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
32 variable currentMol none
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
33 variable atomselectText1 "protein"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
34 variable atomselectText2 ""
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
35 variable defaultDatFile "hbonds.dat"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
36 variable statusMsg ""
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
37
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
38 variable defaultDetailFile "hbonds-details.dat"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
39 variable defaultDetailType none
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
40 variable defaultDA both
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
41 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
42
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
43 proc ::hbonds::hbonds_gui {} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
44 variable defaultDist
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
45 variable defaultAng
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
46 variable defaultWrite
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
47 variable defaultPlot
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
48 variable defaultFrames
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
49 variable defaultLogFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
50 variable defaultUpdateSel
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
51 variable defaultDatFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
52 variable defaultDetailFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
53 variable defaultDetailType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
54 variable defaultPolar
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
55 variable w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
56 variable defaultDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
57
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
58 variable nullMolString "none"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
59 variable currentMol
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
60 variable molMenuButtonText
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
61
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
62 trace add variable [namespace current]::currentMol write [namespace code {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
63 variable currentMol
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
64 variable molMenuButtonText
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
65 if { ! [catch { molinfo $currentMol get name } name ] } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
66 set molMenuButtonText "$currentMol: $name"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
67 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
68 set molMenuButtonText $currentMol
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
69 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
70 # } ]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
71 set currentMol $nullMolString
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
72 variable usableMolLoaded 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
73
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
74 variable atomselectText1 "protein"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
75 variable atomselectText2 ""
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
76
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
77 # Add traces to the checkboxes, so various widgets can be disabled
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
78 # appropriately
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
79 if {[llength [trace info variable [namespace current]::atomselectText2]] == 0} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
80 trace add variable [namespace current]::atomselectText2 write ::hbonds::sel2_state
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
81 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
82
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
83 if {[llength [trace info variable [namespace current]::guiWrite]] == 0} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
84 trace add variable [namespace current]::guiWrite write ::hbonds::write_state
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
85 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
86
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
87 if {[llength [trace info variable [namespace current]::guiType]] == 0} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
88 trace add variable [namespace current]::guiType write ::hbonds::write_state
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
89 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
90
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
91
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
92 # If already initialized, just turn on
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
93 if { [winfo exists .hbonds] } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
94 wm deiconify $w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
95 return
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
96 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
97 set w [toplevel ".hbonds"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
98 wm title $w "Hydrogen Bonds"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
99 wm resizable $w 0 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
100
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
101 variable statusMsg "Ready."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
102 variable guiDist $defaultDist
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
103 variable guiAng $defaultAng
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
104 variable guiWrite $defaultWrite
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
105 variable guiPlot $defaultPlot
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
106 variable guiFrames $defaultFrames
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
107 variable guiLogFile $defaultLogFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
108 variable guiUpdateSel $defaultUpdateSel
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
109 variable guiDatFile $defaultDatFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
110 variable guiPolar $defaultPolar
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
111 variable guiType $defaultDetailType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
112 variable guiDetailFile $defaultDetailFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
113 variable guiOutdir [pwd]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
114 variable guiDA $defaultDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
115
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
116 # Add a menu bar
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
117 frame $w.menubar -relief raised -bd 2
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
118 pack $w.menubar -padx 1 -fill x
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
119
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
120 menubutton $w.menubar.help -text Help -underline 0 -menu $w.menubar.help.menu
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
121 # XXX - set menubutton width to avoid truncation in OS X
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
122 $w.menubar.help config -width 5
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
123
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
124 # Help menu
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
125 menu $w.menubar.help.menu -tearoff no
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
126 $w.menubar.help.menu add command -label "About" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
127 -command {tk_messageBox -type ok -title "About Hbonds" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
128 -message "The H Bonds plugin searches for hydrogen bonds (subject to user criteria) within one selection or between two selections and then outputs the number of bonds as a function of time."}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
129 $w.menubar.help.menu add command -label "Help..." \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
130 -command "vmd_open_url [string trimright [vmdinfo www] /]/plugins/hbonds"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
131
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
132 pack $w.menubar.help -side right
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
133
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
134 ############## frame for input options #################
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
135 labelframe $w.in -bd 2 -relief ridge -text "Input options" -padx 1m -pady 1m
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
136
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
137 set f [frame $w.in.all]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
138 set row 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
139
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
140 grid [label $f.mollable -text "Molecule: "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
141 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
142 grid [menubutton $f.mol -textvar [namespace current]::molMenuButtonText \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
143 -menu $f.mol.menu -relief raised] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
144 -row $row -column 1 -columnspan 3 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
145 menu $f.mol.menu -tearoff no
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
146 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
147
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
148 fill_mol_menu $f.mol.menu
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
149 trace add variable ::vmd_initialize_structure write [namespace code "
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
150 fill_mol_menu $f.mol.menu
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
151 # " ]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
152
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
153 grid [label $f.sellabel1 -text "Selection 1 (Required): "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
154 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
155 grid [entry $f.sel1 -width 50 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
156 -textvariable [namespace current]::atomselectText1] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
157 -row $row -column 1 -columnspan 3 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
158 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
159
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
160 grid [label $f.sellabel2 -text "Selection 2 (Optional): "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
161 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
162 grid [entry $f.sel2 -width 50 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
163 -textvariable [namespace current]::atomselectText2] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
164 -row $row -column 1 -columnspan 3 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
165 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
166
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
167 grid [label $f.selwarning -text "NOTE: if sel1 and sel2 overlap, hbonds output is unreliable!"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
168 -row $row -column 1 -columnspan 2 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
169 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
170
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
171 grid [label $f.frameslabel -text "Frames: "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
172 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
173 grid [entry $f.frames -width 10 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
174 -textvariable [namespace current]::guiFrames] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
175 -row $row -column 1 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
176 grid [label $f.framescomment -text "(now, all, b:e, or b:s:e)"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
177 -row $row -column 2 -columnspan 2 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
178 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
179
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
180 ### -row $row -column 0 -columnspan 4 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
181
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
182 ## -row $row -column 1 -columnspan 4 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
183
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
184 grid [checkbutton $f.check -text \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
185 "Update selections every frame?" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
186 -variable [namespace current]::guiUpdateSel] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
187 -row $row -column 0 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
188 grid [checkbutton $f.check2 -text \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
189 "Only polar atoms (N, O, S, F)?" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
190 -variable [namespace current]::guiPolar] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
191 -row $row -column 1 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
192 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
193
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
194 pack $f -side top -padx 0 -pady 0 -expand 1 -fill none
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
195
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
196 set f [frame $w.in.cutoffs]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
197 set row 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
198
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
199 #### donor/acceptor check ####
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
200 grid [label $f.typelabel1 -text "Selection 1 is the: "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
201 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
202 grid [radiobutton $f.type11 -text "Donor" -state disabled \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
203 -variable [namespace current]::guiDA -value "D"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
204 -row $row -column 1 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
205 grid [radiobutton $f.type12 -text "Acceptor" -state disabled \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
206 -variable [namespace current]::guiDA -value "A"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
207 -row $row -column 2 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
208 grid [radiobutton $f.type13 -text "Both" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
209 -variable [namespace current]::guiDA -value "both"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
210 -row $row -column 3 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
211 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
212
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
213 grid [label $f.ondistlabel -text "Donor-Acceptor distance (A): "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
214 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
215 grid [entry $f.ondist -width 5 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
216 -textvariable [namespace current]::guiDist] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
217 -row $row -column 1 -columnspan 3 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
218 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
219
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
220 grid [label $f.comdistlabel -text "Angle cutoff (degrees): "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
221 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
222 grid [entry $f.comdist -width 5 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
223 -textvariable [namespace current]::guiAng] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
224 -row $row -column 1 -columnspan 3 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
225 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
226
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
227 #### hbonds type define ####
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
228 grid [label $f.typelabel -text "Calculate detailed info for: "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
229 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
230 grid [radiobutton $f.type1 -text "None" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
231 -variable [namespace current]::guiType -value "none"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
232 -row $row -column 1 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
233 grid [radiobutton $f.type2 -text "All hbonds" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
234 -variable [namespace current]::guiType -value "all"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
235 -row $row -column 2 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
236 grid [radiobutton $f.type3 -text "Residue pairs" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
237 -variable [namespace current]::guiType -value "pair"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
238 -row $row -column 3 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
239 grid [radiobutton $f.type4 -text "Unique hbond" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
240 -variable [namespace current]::guiType -value "unique"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
241 -row $row -column 4 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
242 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
243
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
244 pack $f -side top -padx 0 -pady 5 -expand 1 -fill x
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
245
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
246 pack $w.in -side top -pady 5 -padx 3 -fill x -anchor w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
247
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
248 ############## frame for output options #################
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
249 labelframe $w.out -bd 2 -relief ridge -text "Output options" -padx 1m -pady 1m
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
250
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
251 set f [frame $w.out.all]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
252 set row 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
253
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
254 grid [checkbutton $f.check1 -text \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
255 "Plot the data with MultiPlot?" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
256 -variable [namespace current]::guiPlot] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
257 -row $row -column 0 -columnspan 2 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
258 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
259 grid [label $f.label -text "Output directory: "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
260 -row $row -column 0 -columnspan 1 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
261 grid [entry $f.entry -textvariable [namespace current]::guiOutdir \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
262 -width 35 -relief sunken -justify left -state readonly] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
263 -row $row -column 1 -columnspan 1 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
264 grid [button $f.button -text "Choose" -command "::hbonds::getoutdir"] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
265 -row $row -column 2 -columnspan 1 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
266 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
267 grid [label $f.loglabel -text "Log file? "] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
268 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
269 grid [entry $f.logname -width 30 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
270 -textvariable [namespace current]::guiLogFile] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
271 -row $row -column 1 -columnspan 2 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
272 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
273
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
274 grid [checkbutton $f.check2 -text \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
275 "Write output to files?" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
276 -variable [namespace current]::guiWrite] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
277 -row $row -column 0 -columnspan 3 -sticky w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
278 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
279 grid [label $f.fbdata -text "Frame/bond data? " -state disabled] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
280 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
281 grid [entry $f.datname -width 30 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
282 -textvariable [namespace current]::guiDatFile -state disabled] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
283 -row $row -column 1 -columnspan 2 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
284 incr row
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
285 grid [label $f.detdata -text "Detailed hbond data? " -state disabled] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
286 -row $row -column 0 -sticky e
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
287 grid [entry $f.detname -width 30 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
288 -textvariable [namespace current]::guiDetailFile -state disabled] \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
289 -row $row -column 1 -columnspan 2 -sticky ew
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
290
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
291
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
292 pack $f -side left -padx 0 -pady 5 -expand 1 -fill x
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
293 pack $w.out -side top -pady 5 -padx 3 -fill x -anchor w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
294
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
295 ############## frame for status #################
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
296 labelframe $w.status -bd 2 -relief ridge -text "Status" -padx 1m -pady 1m
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
297
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
298 set f [frame $w.status.all]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
299 label $f.label -textvariable [namespace current]::statusMsg
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
300 pack $f $f.label
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
301 pack $w.status -side top -pady 5 -padx 3 -fill x -anchor w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
302
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
303 set f [frame $w.control]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
304 button $f.button -text "Find hydrogen bonds!" -width 20 \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
305 -command {::hbonds::hbonds -gui 1 -dist $::hbonds::guiDist -ang $::hbonds::guiAng -writefile $::hbonds::guiWrite -outdir $::hbonds::guiOutdir -frames $::hbonds::guiFrames -log $::hbonds::guiLogFile -upsel $::hbonds::guiUpdateSel -plot $::hbonds::guiPlot -outfile $::hbonds::guiDatFile -polar $::hbonds::guiPolar -type $::hbonds::guiType -detailout $::hbonds::guiDetailFile -DA $::hbonds::guiDA }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
306
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
307 pack $f $f.button
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
308
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
309 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
310
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
311 # Adapted from pmepot gui
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
312 proc ::hbonds::fill_mol_menu {name} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
313
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
314 variable usableMolLoaded
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
315 variable currentMol
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
316 variable nullMolString
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
317 $name delete 0 end
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
318
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
319 set molList ""
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
320 foreach mm [array names ::vmd_initialize_structure] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
321 if { $::vmd_initialize_structure($mm) != 0} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
322 lappend molList $mm
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
323 $name add radiobutton -variable [namespace current]::currentMol \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
324 -value $mm -label "$mm [molinfo $mm get name]"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
325 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
326 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
327
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
328 #set if any non-Graphics molecule is loaded
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
329 if {[lsearch -exact $molList $currentMol] == -1} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
330 if {[lsearch -exact $molList [molinfo top]] != -1} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
331 set currentMol [molinfo top]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
332 set usableMolLoaded 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
333 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
334 set currentMol $nullMolString
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
335 set usableMolLoaded 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
336 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
337 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
338
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
339 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
340
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
341 proc ::hbonds::getoutdir {} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
342 variable guiOutdir
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
343
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
344 set newdir [tk_chooseDirectory \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
345 -title "Choose output directory" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
346 -initialdir $guiOutdir -mustexist true]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
347
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
348 if {[string length $newdir] > 0} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
349 set guiOutdir $newdir
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
350 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
351 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
352
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
353 proc hbonds { args } { return [eval ::hbonds::hbonds $args] }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
354 proc hbondsgui { } { return [eval ::hbonds::hbonds_gui] }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
355
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
356 proc ::hbonds::hbonds_usage { } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
357
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
358 variable defaultDist
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
359 variable defaultAng
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
360 variable defaultWrite
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
361 variable defaultPlot
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
362 variable defaultFrames
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
363 variable defaultDatFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
364 variable defaultDetailType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
365 variable defaultDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
366
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
367 puts "Usage: hbonds -sel1 <atom selection> <option1> <option2> ..."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
368 puts "Options:"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
369 puts " -sel2 <atom selection> (default: none)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
370 puts " NOTE: if sel1 and sel2 overlap, hbonds output is unreliable!"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
371 if $defaultWrite {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
372 puts " -writefile <yes|no> (default: yes)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
373 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
374 puts " -writefile <yes|no> (default: no)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
375 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
376
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
377 puts " -upsel <yes|no> (update atom selections every frame? default: yes)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
378 puts " -frames <begin:end> or <begin:step:end> or all or now (default: $defaultFrames)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
379 puts " -dist <cutoff distance between donor and acceptor> (default: $defaultDist)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
380 puts " -ang <angle cutoff> (default: $defaultAng)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
381 puts " -plot <yes|no> (plot with MultiPlot, default: yes)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
382 puts " -outdir <output directory> (default: current)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
383 puts " -log <log filename> (default: none)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
384 puts " -outfile <dat filename> (default: $defaultDatFile)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
385 puts " -polar <yes|no> (consider only polar atoms (N, O, S, F)? default: no)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
386 puts " -DA <D|A|both> (sel1 is the donor (D), acceptor (A), or donor and acceptor (both)?"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
387 puts " Only valid when used with two selections, default: $defaultDA)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
388 puts " -type: (default: $defaultDetailType)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
389 puts " none--no detailed bonding information will be calculated"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
390 puts " all--hbonds in the same residue pair type are all counted"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
391 puts " pair--hbonds in the same residue pair type are counted once"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
392 puts " unique--hbonds are counted according to the donor-acceptor atom pair type"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
393 puts " -detailout <details output file> (default: stdout)"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
394 return
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
395 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
396
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
397 proc ::hbonds::hbonds { args } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
398
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
399 global tk_version
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
400 variable hbondcount
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
401 variable hbondallframes
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
402 variable multichain
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
403 variable molid
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
404 variable detailType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
405
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
406 variable defaultDist
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
407 variable defaultAng
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
408 variable defaultFrames
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
409 variable defaultWrite
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
410 variable defaultPlot
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
411 variable defaultFrames
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
412 variable defaultUpdateSel
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
413 variable defaultDatFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
414 variable defaultPolar
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
415 variable defaultDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
416 variable currentMol
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
417 variable atomselectText1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
418 variable atomselectText2
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
419 variable debug
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
420 variable log
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
421 variable statusMsg
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
422 variable plotHbonds
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
423
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
424 variable defaultOutdir [pwd]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
425
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
426 variable defaultDetailFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
427 variable defaultDetailType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
428
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
429 set nargs [llength $args]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
430 if { $nargs == 0 || $nargs % 2 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
431 if { $nargs == 0 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
432 hbonds_usage
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
433 error ""
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
434 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
435 if { $nargs % 2 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
436 hbonds_usage
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
437 error "error: odd number of arguments $args"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
438 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
439 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
440
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
441 foreach {name val} $args {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
442 switch -- $name {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
443 -sel1 { set arg(sel1) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
444 -sel2 { set arg(sel2) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
445 -upsel { set arg(upsel) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
446 -frames { set arg(frames) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
447 -dist { set arg(dist) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
448 -ang { set arg(ang) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
449 -writefile { set arg(writefile) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
450 -outdir { set arg(outdir) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
451 -log { set arg(log) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
452 -gui { set arg(gui) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
453 -debug { set arg(debug) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
454 -plot {set arg(plot) $val}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
455 -outfile {set arg(outfile) $val}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
456 -type { set arg(type) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
457 -detailout { set arg(detout) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
458 -polar {set arg(polar) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
459 -DA { set arg(DA) $val }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
460
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
461 default { error "unknown argument: $name $val" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
462 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
463 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
464
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
465 # was I called by the gui?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
466 if [info exists arg(gui)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
467 set gui 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
468 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
469 set gui 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
470 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
471
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
472 # debug flag
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
473 if [info exists arg(debug)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
474 set debug 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
475 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
476
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
477 # outdir
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
478 if [info exists arg(outdir)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
479 set outdir $arg(outdir)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
480 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
481 set outdir $defaultOutdir
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
482 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
483 if { ![file isdirectory $outdir] } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
484 error "$outdir is not a directory."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
485 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
486
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
487 # log file
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
488 if { [info exists arg(log)] && $arg(log) != "" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
489 set log [open [file join $outdir $arg(log)] w]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
490 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
491 set log "stdout"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
492 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
493
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
494 # polar atoms only?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
495 if [info exists arg(polar)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
496 if { $arg(polar) == "no" || $arg(polar) == 0 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
497 set polar 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
498 } elseif { $arg(polar) == "yes" || $arg(polar) == 1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
499 set polar 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
500 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
501 error "error: bad argument for option -polar $arg(polar): acceptable arguments are 'yes' or 'no'"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
502 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
503 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
504 set polar $defaultPolar
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
505 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
506
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
507 # donor/acceptor?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
508 if [info exists arg(DA)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
509 if { $arg(DA) == "D" || $arg(DA) == "donor" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
510 set DA "D"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
511 } elseif { $arg(DA) == "A" || $arg(DA) == "acceptor" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
512 set DA "A"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
513 } elseif { $arg(DA) == "both" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
514 set DA "both"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
515 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
516 error "error: bad argument for option -DA $arg(DA): acceptable arguments are 'D', 'A', or 'both'"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
517 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
518 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
519 set DA $defaultDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
520 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
521
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
522 # get selection
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
523 if [info exists arg(sel1)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
524 set molid [$arg(sel1) molid]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
525 if { $polar } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
526 set sel1 [atomselect $molid "([$arg(sel1) text]) and (name \"N.*\" \"O.*\" \"S.*\" FA F1 F2 F3)"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
527 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
528 set sel1 $arg(sel1)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
529 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
530 if [info exists arg(sel2)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
531 if { $polar } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
532 set sel2 [atomselect $molid "([$arg(sel2) text]) and (name \"N.*\" \"O.*\" \"S.*\" FA F1 F2 F3)"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
533 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
534 set sel2 $arg(sel2)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
535 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
536 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
537
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
538 } elseif $gui {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
539 if { $currentMol == "none" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
540 error "No molecules were found."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
541 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
542 set molid $currentMol
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
543 if { $polar } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
544 set sel1 [atomselect $currentMol "($atomselectText1) and (name \"N.*\" \"O.*\" \"S.*\" FA F1 F2 F3)"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
545 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
546 set sel1 [atomselect $currentMol $atomselectText1]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
547 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
548 if {$atomselectText2 != ""} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
549 if { $polar } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
550 set sel2 [atomselect $currentMol "($atomselectText2) and (name \"N.*\" \"O.*\" \"S.*\" FA F1 F2 F3)"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
551 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
552 set sel2 [atomselect $currentMol $atomselectText2]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
553 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
554 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
555 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
556 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
557 hbonds_usage
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
558 error "No atomselection was given."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
559 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
560
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
561 # update selections?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
562 if [info exists arg(upsel)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
563 if { $arg(upsel) == "no" || $arg(upsel) == 0 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
564 set updateSel 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
565 } elseif { $arg(upsel) == "yes" || $arg(upsel) == 1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
566 set updateSel 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
567 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
568 error "error: bad argument for option -upsel $arg(upsel): acceptable arguments are 'yes' or 'no'"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
569 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
570 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
571 set updateSel $defaultUpdateSel
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
572 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
573
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
574 # SETTING FRAMES
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
575
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
576 set nowframe [molinfo $molid get frame]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
577 set lastframe [expr [molinfo $molid get numframes] - 1]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
578 if { ! [info exists arg(frames)] } { set arg(frames) $defaultFrames }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
579 if [info exists arg(frames)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
580 set fl [split $arg(frames) :]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
581 switch -- [llength $fl] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
582 1 {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
583 switch -- $fl {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
584 all {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
585 set frames_begin 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
586 set frames_end $lastframe
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
587 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
588 now {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
589 set frames_begin $nowframe
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
590 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
591 last {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
592 set frames_begin $lastframe
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
593 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
594 default {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
595 set frames_begin $fl
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
596 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
597 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
598 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
599 2 {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
600 set frames_begin [lindex $fl 0]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
601 set frames_end [lindex $fl 1]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
602 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
603 3 {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
604 set frames_begin [lindex $fl 0]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
605 set frames_step [lindex $fl 1]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
606 set frames_end [lindex $fl 2]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
607 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
608 default { error "bad -frames arg: $arg(frames)" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
609 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
610 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
611 set frames_begin 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
612 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
613 if { ! [info exists frames_step] } { set frames_step 1 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
614 if { ! [info exists frames_end] } { set frames_end $lastframe }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
615 switch -- $frames_end {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
616 end - last { set frames_end $lastframe }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
617 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
618 if { [ catch {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
619 if { $frames_begin < 0 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
620 set frames_begin [expr $lastframe + 1 + $frames_begin]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
621 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
622 if { $frames_end < 0 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
623 set frames_end [expr $lastframe + 1 + $frames_end]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
624 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
625 if { ! ( [string is integer $frames_begin] && \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
626 ( $frames_begin >= 0 ) && ( $frames_begin <= $lastframe ) && \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
627 [string is integer $frames_end] && \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
628 ( $frames_end >= 0 ) && ( $frames_end <= $lastframe ) && \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
629 ( $frames_begin <= $frames_end ) && \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
630 [string is integer $frames_step] && ( $frames_step > 0 ) ) } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
631 error
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
632 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
633 } ok ] } { error "bad -frames arg: $arg(frames)" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
634 if $debug {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
635 puts $log "frames_begin: $frames_begin"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
636 puts $log "frames_step: $frames_step"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
637 puts $log "frames_end: $frames_end"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
638 flush $log
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
639 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
640
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
641 # DONE SETTING FRAMES
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
642
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
643 # get Dist
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
644 if [info exists arg(dist)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
645 set dist $arg(dist)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
646 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
647 set dist $defaultDist
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
648 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
649
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
650 # get Ang
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
651 if [info exists arg(ang)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
652 set ang $arg(ang)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
653 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
654 set ang $defaultAng
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
655 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
656
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
657 # write files?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
658 if [info exists arg(writefile)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
659 if { $arg(writefile) == "no" || $arg(writefile) == 0 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
660 set writefile 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
661 } elseif { $arg(writefile) == "yes" || $arg(writefile) == 1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
662 set writefile 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
663 if [info exists arg(outfile)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
664 if {$arg(outfile) != ""} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
665 set datfile $arg(outfile)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
666 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
667 set datfile $defaultDatFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
668 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
669 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
670 set datfile $defaultDatFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
671 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
672
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
673 if [info exists arg(detout)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
674 if {$arg(detout) != ""} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
675 set detailFile $arg(detout)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
676 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
677 set detailFile $defaultDetailFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
678 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
679 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
680 set detailFile $defaultDetailFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
681 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
682
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
683 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
684 error "error: bad argument for option -writefile $arg(writefile): acceptable arguments are 'yes' or 'no'"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
685 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
686
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
687 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
688 set writefile $defaultWrite
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
689 set datfile $defaultDatFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
690 set detailFile $defaultDetailFile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
691 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
692
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
693 # Plot?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
694 if [info exists arg(plot)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
695 if { ($arg(plot) == "no" || $arg(plot) == 0) && $writefile } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
696 set plotHbonds 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
697 } elseif { ($arg(plot) == "yes" || $arg(plot) == 1) || !$writefile } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
698 set plotHbonds 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
699 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
700 error "error: bad argument for option -plot $arg(plot): acceptable arguments are 'yes' or 'no'"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
701 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
702 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
703 set plotHbonds $defaultPlot
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
704 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
705
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
706 # Don't call multiplot in text mode
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
707 if {![info exists tk_version]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
708 set plotHbonds 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
709 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
710
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
711 # calculate details?
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
712 if [info exists arg(type)] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
713 if { $arg(type) == "none" || $arg(type) == 0 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
714 set detailType "none"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
715 } elseif { $arg(type) == "unique" || $arg(type) == "all" || $arg(type) == "pair" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
716 set detailType $arg(type)
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
717 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
718 error "error: bad argument for option -type $arg(type): acceptable arguments are 'none', 'all', 'pair', or 'unique'"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
719 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
720 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
721 set detailType $defaultDetailType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
722 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
723
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
724 # print name, version and date of plugin
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
725 puts $log "H-Bonds Plugin, Version 1.1"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
726 puts $log "[clock format [clock scan now]]\n"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
727 puts $log "Parameters used in the calculation of hydrogen bonds:"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
728 puts $log "- Atomselection 1: [$sel1 text]"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
729 if [info exists sel2] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
730 puts $log "- Atomselection 2: [$sel2 text]"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
731 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
732 if $updateSel {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
733 puts $log "- Update selections every frame: yes"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
734 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
735 puts $log "- Update selections every frame: no"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
736 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
737 puts $log "- Initial frame: $frames_begin"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
738 puts $log "- Frame step: $frames_step"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
739 puts $log "- Final frame: $frames_end"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
740 puts $log "- Donor-Acceptor distance: $dist"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
741 puts $log "- Angle cutoff: $ang"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
742 puts $log "- Type: $detailType"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
743 if $writefile {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
744 puts $log "- Write a file with H bond/frame data: yes"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
745 puts $log "- Filename: $datfile"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
746 if {$detailType != "none"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
747 puts $log "- Details output file: $detailFile"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
748 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
749 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
750 puts $log "- Write a file with H bond/frame data: no"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
751 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
752 puts $log ""
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
753 flush $log
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
754
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
755 ### CALCULATES HBONDS HERE
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
756
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
757 # check if multiple chains/molecules exist in the two selections
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
758 set chainlist [$sel1 get chain]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
759 if { [lsearch -not $chainlist [lindex $chainlist 0]] == -1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
760 set multichain 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
761 } else { set multichain 1 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
762 if {[info exists sel2]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
763 set chainlist [$sel2 get chain]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
764 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
765 if { [lsearch -not $chainlist [lindex $chainlist 0]] == -1 && $multichain == 0} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
766 set multichain 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
767 } else { set multichain 1 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
768
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
769 set hbondallframes {}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
770 set hbondcount {}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
771 set numberofframes [expr { ($frames_end - $frames_begin) / $frames_step + 1 }]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
772
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
773
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
774 for { set f $frames_begin } { $f <= $frames_end } { incr f $frames_step } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
775
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
776 $sel1 frame $f
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
777 if {[info exists sel2]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
778 $sel2 frame $f
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
779 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
780
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
781 if $updateSel {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
782 $sel1 update
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
783 if {[info exists sel2]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
784 $sel2 update
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
785 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
786 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
787
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
788 ### CHECK DA HERE!!!
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
789
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
790 if {[info exists sel2]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
791
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
792 set count1 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
793 set count2 0
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
794
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
795 if {$DA == "D" || $DA == "both"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
796 set hbondsingleframe1 [measure hbonds $dist $ang $sel1 $sel2]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
797 set count1 [llength [lindex $hbondsingleframe1 0]]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
798 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
799 if {$DA == "A" || $DA == "both"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
800 set hbondsingleframe2 [measure hbonds $dist $ang $sel2 $sel1]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
801 set count2 [llength [lindex $hbondsingleframe2 0]]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
802 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
803
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
804 lappend framecount $f
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
805 lappend numHbonds [expr $count1 + $count2]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
806
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
807 if {$detailType != "none"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
808 if {$DA == "D" || $DA == "both"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
809 hbonds::hbonddetails $hbondsingleframe1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
810 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
811 if {$DA == "A" || $DA == "both"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
812 hbonds::hbonddetails $hbondsingleframe2
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
813 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
814 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
815 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
816 set hbondsingleframe1 [measure hbonds $dist $ang $sel1]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
817 set count1 [llength [lindex $hbondsingleframe1 0]]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
818
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
819 lappend framecount $f
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
820 lappend numHbonds $count1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
821
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
822 if {$detailType != "none"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
823 hbonds::hbonddetails $hbondsingleframe1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
824 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
825
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
826 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
827 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
828
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
829
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
830 # delete the selection if it was created here
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
831 if { ![info exists arg(sel1)] } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
832 $sel1 delete
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
833 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
834
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
835 if {[info exists sel2]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
836 if { ![info exists arg(sel2)] } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
837 $sel2 delete
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
838 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
839 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
840
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
841 if { $writefile } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
842
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
843 set statusMsg "Printing frame/hbond data to file... "
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
844 update
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
845 puts -nonewline $log $statusMsg
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
846 flush $log
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
847
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
848 set outfile [open [file join $outdir $datfile] w]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
849 if $debug {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
850 puts $log "Printing to file $datfile"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
851 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
852
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
853 foreach fr $framecount hb $numHbonds {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
854 puts $outfile "$fr $hb"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
855 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
856 unset fr hb
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
857 close $outfile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
858
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
859 append statusMsg "Done."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
860 update
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
861 puts $log "Done."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
862 flush $log
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
863 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
864
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
865 if {$detailType != "none"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
866 if { $writefile } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
867 set outfile [open [file join $outdir $detailFile] w]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
868 if $debug {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
869 puts $log "Printing detailed hbond info to file $detailFile"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
870 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
871 } else { set outfile "stdout" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
872 set statusMsg "Printing results ... "
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
873 update
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
874 puts $outfile "Found [llength $hbondcount] hbonds."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
875 if { $multichain } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
876 puts -nonewline $outfile "donor \t\t\t "
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
877 } else { puts -nonewline $outfile "donor \t\t " }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
878 if { $multichain } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
879 puts $outfile "acceptor \t\t occupancy"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
880 } else { puts $outfile "acceptor \t occupancy" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
881 foreach { h } $hbondallframes { o } $hbondcount {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
882 set occupancy [expr { 100*$o/($numberofframes+0.0) } ]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
883 set i -1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
884 if { $multichain } { puts -nonewline $outfile "Seg[lindex $h [incr i]]-" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
885 ### if { $multichain } { puts -nonewline $outfile "Chain[lindex $h [incr i]]-" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
886 if { $detailType != "unique" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
887 puts -nonewline $outfile [format "%s%s%s \t " \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
888 [lindex $h [incr i]] [lindex $h [incr i]] [lindex $h [incr i]]]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
889 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
890 puts -nonewline $outfile [format "%s%s%s%s \t " \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
891 [lindex $h [incr i]] [lindex $h [incr i]] [lindex $h [incr i]] [lindex $h [incr i]]]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
892 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
893 if { $multichain } { puts -nonewline $outfile "Seg[lindex $h [incr i]]-" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
894 ### if { $multichain } { puts -nonewline $outfile "Chain[lindex $h [incr i]]-" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
895 if { $detailType != "unique" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
896 puts $outfile [format "%s%s%s \t %.2f%%" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
897 [lindex $h [incr i]] [lindex $h [incr i]] [lindex $h [incr i]] $occupancy]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
898 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
899 puts $outfile [format "%s%s%s%s \t %.2f%%" \
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
900 [lindex $h [incr i]] [lindex $h [incr i]] [lindex $h [incr i]] [lindex $h [incr i]] $occupancy]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
901 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
902 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
903 if { $outfile != "stdout" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
904 close $outfile
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
905 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
906
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
907
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
908
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
909 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
910
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
911
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
912 if { $plotHbonds } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
913
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
914 set title [format "%s %s %s: %s" Molecule $molid, [molinfo $molid get name] "H-Bonds vs. Frame"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
915
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
916 # feed everything to the plotter
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
917 set plothandle [multiplot -title $title -xlabel "Frame " -ylabel "No. Bonds"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
918
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
919 $plothandle add $framecount $numHbonds -lines -linewidth 1 -linecolor black -marker none
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
920 $plothandle replot
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
921 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
922
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
923 if { $log != "stdout" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
924 close $log
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
925 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
926
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
927 set statusMsg "Done."
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
928 update
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
929
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
930 return
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
931
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
932 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
933
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
934
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
935 # This gets called by VMD the first time the menu is opened.
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
936 proc hbonds_tk_cb {} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
937 hbondsgui ;# start the PDB Tool
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
938 return $::hbonds::w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
939 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
940
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
941
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
942 proc ::hbonds::sel2_state {args} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
943 variable w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
944 variable atomselectText2
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
945 variable guiDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
946 variable defaultDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
947
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
948 # Disable the prefix file field
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
949 if {$atomselectText2 == ""} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
950 if {[winfo exists $w.in.cutoffs]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
951 $w.in.cutoffs.type11 configure -state disabled
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
952 $w.in.cutoffs.type12 configure -state disabled
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
953 set guiDA $defaultDA
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
954 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
955 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
956 if {[winfo exists $w.in.cutoffs]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
957 $w.in.cutoffs.type11 configure -state normal
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
958 $w.in.cutoffs.type12 configure -state normal
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
959 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
960 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
961
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
962 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
963
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
964 proc ::hbonds::write_state {args} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
965 variable w
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
966 variable guiWrite
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
967 variable guiType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
968
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
969 # Disable the prefix file field
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
970 if {$guiWrite == 0} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
971 if {[winfo exists $w.out.all]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
972 $w.out.all.fbdata configure -state disabled
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
973 $w.out.all.datname configure -state disabled
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
974 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
975 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
976 if {[winfo exists $w.out.all]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
977 $w.out.all.fbdata configure -state normal
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
978 $w.out.all.datname configure -state normal
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
979 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
980 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
981 if {$guiWrite == 0 || $guiType == "none"} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
982 if {[winfo exists $w.out.all]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
983 $w.out.all.detdata configure -state disabled
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
984 $w.out.all.detname configure -state disabled
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
985 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
986 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
987 if {[winfo exists $w.out.all]} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
988 $w.out.all.detdata configure -state normal
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
989 $w.out.all.detname configure -state normal
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
990 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
991 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
992
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
993 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
994
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
995
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
996
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
997
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
998 proc hbonds::hbonddetails {hbondlist} {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
999
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1000 variable molid
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1001 variable hbondcount
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1002 variable hbondallframes
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1003 variable multichain
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1004 variable detailType
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1005
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1006 set framehbond {}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1007
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1008 foreach { d } [lindex $hbondlist 0] { a } [lindex $hbondlist 1] {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1009 set newhbond_donor {}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1010 set donor [atomselect $molid "index $d"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1011 if $multichain { lappend newhbond_donor [$donor get segname] }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1012 ### if $multichain { lappend newhbond_donor [$donor get chain] }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1013
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1014 lappend newhbond_donor [$donor get resname] [$donor get resid]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1015 set atomname [$donor get name]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1016 if { [ lsearch { "N" "CA" "C" "O" } $atomname ] != -1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1017 lappend newhbond_donor "-Main"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1018 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1019 lappend newhbond_donor "-Side"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1020 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1021 if { $detailType == "unique" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1022 # if { [lsearch { "OD1" "OD2" "OE1" "OE2" "OT1" "OT2" "NH1" "NH2" } $atomname] != -1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1023 # lappend newhbond_donor "-[string range $atomname 0 1]"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1024 # } else { lappend newhbond_donor "-$atomname" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1025 lappend newhbond_donor "-$atomname"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1026 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1027 # add support for water molecule here
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1028 if { [$donor get chain] == "W" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1029 set newhbond_donor {}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1030 if $multichain { lappend newhbond_donor "W" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1031 lappend newhbond_donor "water" "" "-O "
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1032 if { $detailType == "unique" } { lappend newhbond_donor " " }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1033 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1034 $donor delete
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1035
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1036 set newhbond_acceptor {}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1037 set acceptor [atomselect $molid "index $a"]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1038 if $multichain { lappend newhbond_acceptor [$acceptor get segname] }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1039 ### if $multichain { lappend newhbond_acceptor [$acceptor get chain] }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1040 lappend newhbond_acceptor [$acceptor get resname] [$acceptor get resid]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1041 set atomname [$acceptor get name]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1042 if { [ lsearch { "N" "CA" "C" "O" } $atomname ] != -1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1043 lappend newhbond_acceptor "-Main"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1044 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1045 lappend newhbond_acceptor "-Side"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1046 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1047 if { $detailType == "unique" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1048 # if { [lsearch { "OD1" "OD2" "OE1" "OE2" "OT1" "OT2" "NH1" "NH2" } $atomname] != -1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1049 # lappend newhbond_acceptor "-[string range $atomname 0 1]"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1050 # } else { lappend newhbond_acceptor "-$atomname" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1051 lappend newhbond_acceptor "-$atomname"
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1052 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1053 # add support for water molecule here
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1054 if { [$acceptor get chain] == "W" } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1055 set newhbond_acceptor {}
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1056 if $multichain { lappend newhbond_acceptor "W" }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1057 lappend newhbond_acceptor "water" "" "-O "
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1058 if { $detailType == "unique" } { lappend newhbond_acceptor " " }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1059 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1060 $acceptor delete
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1061
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1062 set newhbond [concat $newhbond_donor $newhbond_acceptor]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1063 if { [lsearch $framehbond $newhbond] == -1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1064 if { $detailType != "all" } { lappend framehbond $newhbond }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1065 set hbondexist [lsearch $hbondallframes $newhbond]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1066 if { $hbondexist == -1 } {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1067 lappend hbondallframes $newhbond
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1068 lappend hbondcount 1
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1069 } else {
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1070 lset hbondcount $hbondexist [expr { [lindex $hbondcount $hbondexist] + 1 } ]
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1071 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1072 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1073 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1074 return
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1075
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1076 }
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1077
8aa5e465b043 "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1078