annotate hbonds/hbonds.tcl @ 0:e87db04251df 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 06:59:31 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
2 #
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
3 # Authors:
e87db04251df "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)
e87db04251df "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)
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
7 #
e87db04251df "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 $
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
9 #
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
10
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
11 #
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
12 # TODO:
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
13 #
e87db04251df "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?
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
15 #
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
16
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
18
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
19 namespace eval ::hbonds:: {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
20 namespace export hbonds
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
21
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
22 variable defaultAng 20
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
24 variable defaultWrite 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
25 variable defaultFrames "all"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
26 variable defaultOutdir
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
27 variable defaultLogFile ""
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
28 variable defaultUpdateSel 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
29 variable defaultPlot 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
30 variable defaultPolar 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
31 variable debug 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
32 variable currentMol none
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
33 variable atomselectText1 "protein"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
34 variable atomselectText2 ""
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
36 variable statusMsg ""
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
37
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
39 variable defaultDetailType none
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
40 variable defaultDA both
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
41 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
42
e87db04251df "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 {} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
44 variable defaultDist
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
45 variable defaultAng
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
46 variable defaultWrite
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
47 variable defaultPlot
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
48 variable defaultFrames
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
49 variable defaultLogFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
50 variable defaultUpdateSel
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
51 variable defaultDatFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
52 variable defaultDetailFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
53 variable defaultDetailType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
54 variable defaultPolar
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
55 variable w
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
56 variable defaultDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
57
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
58 variable nullMolString "none"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
59 variable currentMol
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
60 variable molMenuButtonText
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
61
e87db04251df "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 {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
63 variable currentMol
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
64 variable molMenuButtonText
e87db04251df "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 ] } {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
67 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
68 set molMenuButtonText $currentMol
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
69 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
70 # } ]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
71 set currentMol $nullMolString
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
72 variable usableMolLoaded 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
73
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
74 variable atomselectText1 "protein"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
75 variable atomselectText2 ""
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
76
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
78 # appropriately
e87db04251df "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} {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
81 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
82
e87db04251df "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} {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
85 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
86
e87db04251df "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} {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
89 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
90
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
91
e87db04251df "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
e87db04251df "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] } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
94 wm deiconify $w
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
95 return
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
96 }
e87db04251df "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"]
e87db04251df "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"
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
100
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
101 variable statusMsg "Ready."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
102 variable guiDist $defaultDist
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
103 variable guiAng $defaultAng
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
104 variable guiWrite $defaultWrite
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
105 variable guiPlot $defaultPlot
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
106 variable guiFrames $defaultFrames
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
107 variable guiLogFile $defaultLogFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
108 variable guiUpdateSel $defaultUpdateSel
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
109 variable guiDatFile $defaultDatFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
110 variable guiPolar $defaultPolar
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
111 variable guiType $defaultDetailType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
112 variable guiDetailFile $defaultDetailFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
113 variable guiOutdir [pwd]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
114 variable guiDA $defaultDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
115
e87db04251df "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
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
119
e87db04251df "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
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
123
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
124 # Help menu
e87db04251df "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
e87db04251df "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" \
e87db04251df "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" \
e87db04251df "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."}
e87db04251df "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..." \
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
131
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
133
e87db04251df "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 #################
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
136
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
138 set row 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
139
e87db04251df "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: "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
146 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
147
e87db04251df "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
e87db04251df "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 "
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
151 # " ]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
152
e87db04251df "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): "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
158 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
159
e87db04251df "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): "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
165 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
166
e87db04251df "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!"] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
169 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
170
e87db04251df "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: "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "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)"] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
178 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
179
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
181
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
183
e87db04251df "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 \
e87db04251df "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?" \
e87db04251df "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] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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)?" \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
192 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
193
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
195
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
197 set row 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
198
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
199 #### donor/acceptor check ####
e87db04251df "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: "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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"] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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"] \
e87db04251df "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
e87db04251df "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" \
e87db04251df "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"] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
211 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
212
e87db04251df "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): "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
218 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
219
e87db04251df "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): "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
225 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
226
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
227 #### hbonds type define ####
e87db04251df "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: "] \
e87db04251df "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
e87db04251df "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" \
e87db04251df "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"] \
e87db04251df "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
e87db04251df "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" \
e87db04251df "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"] \
e87db04251df "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
e87db04251df "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" \
e87db04251df "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"] \
e87db04251df "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
e87db04251df "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" \
e87db04251df "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"] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
242 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
243
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
245
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
247
e87db04251df "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 #################
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
250
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
252 set row 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
253
e87db04251df "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 \
e87db04251df "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?" \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
258 incr row
e87db04251df "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: "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "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"] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
266 incr row
e87db04251df "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? "] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
272 incr row
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
273
e87db04251df "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 \
e87db04251df "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?" \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
278 incr row
e87db04251df "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] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
284 incr row
e87db04251df "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] \
e87db04251df "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
e87db04251df "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 \
e87db04251df "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] \
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
290
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
291
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
294
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
295 ############## frame for status #################
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
297
e87db04251df "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]
e87db04251df "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
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
302
e87db04251df "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]
e87db04251df "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 \
e87db04251df "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 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
306
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
308
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
309 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
310
e87db04251df "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
e87db04251df "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} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
313
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
314 variable usableMolLoaded
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
315 variable currentMol
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
316 variable nullMolString
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
318
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
319 set molList ""
e87db04251df "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] {
e87db04251df "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} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
322 lappend molList $mm
e87db04251df "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 \
e87db04251df "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]"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
325 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
326 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
327
e87db04251df "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
e87db04251df "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} {
e87db04251df "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} {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
332 set usableMolLoaded 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
333 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
334 set currentMol $nullMolString
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
335 set usableMolLoaded 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
336 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
337 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
338
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
339 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
340
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
341 proc ::hbonds::getoutdir {} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
342 variable guiOutdir
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
343
e87db04251df "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 \
e87db04251df "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" \
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
347
e87db04251df "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} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
349 set guiOutdir $newdir
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
350 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
351 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
352
e87db04251df "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] }
e87db04251df "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] }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
355
e87db04251df "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 { } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
357
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
358 variable defaultDist
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
359 variable defaultAng
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
360 variable defaultWrite
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
361 variable defaultPlot
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
362 variable defaultFrames
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
363 variable defaultDatFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
364 variable defaultDetailType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
365 variable defaultDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
366
e87db04251df "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> ..."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
368 puts "Options:"
e87db04251df "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)"
e87db04251df "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!"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
371 if $defaultWrite {
e87db04251df "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)"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
373 } else {
e87db04251df "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)"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
375 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
376
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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)?"
e87db04251df "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)"
e87db04251df "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)"
e87db04251df "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"
e87db04251df "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"
e87db04251df "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"
e87db04251df "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"
e87db04251df "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)"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
394 return
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
395 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
396
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
398
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
399 global tk_version
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
400 variable hbondcount
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
401 variable hbondallframes
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
402 variable multichain
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
403 variable molid
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
404 variable detailType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
405
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
406 variable defaultDist
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
407 variable defaultAng
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
408 variable defaultFrames
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
409 variable defaultWrite
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
410 variable defaultPlot
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
411 variable defaultFrames
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
412 variable defaultUpdateSel
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
413 variable defaultDatFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
414 variable defaultPolar
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
415 variable defaultDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
416 variable currentMol
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
417 variable atomselectText1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
418 variable atomselectText2
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
419 variable debug
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
420 variable log
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
421 variable statusMsg
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
422 variable plotHbonds
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
423
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
424 variable defaultOutdir [pwd]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
425
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
426 variable defaultDetailFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
427 variable defaultDetailType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
428
e87db04251df "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]
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
431 if { $nargs == 0 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
432 hbonds_usage
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
433 error ""
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
434 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
435 if { $nargs % 2 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
436 hbonds_usage
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
438 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
439 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
440
e87db04251df "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 {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
442 switch -- $name {
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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}
e87db04251df "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}
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
460
e87db04251df "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" }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
462 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
463 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
464
e87db04251df "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?
e87db04251df "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)] {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
467 set gui 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
468 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
469 set gui 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
470 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
471
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
472 # debug flag
e87db04251df "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)] {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
474 set debug 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
475 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
476
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
477 # outdir
e87db04251df "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)] {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
480 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
481 set outdir $defaultOutdir
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
482 }
e87db04251df "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] } {
e87db04251df "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."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
485 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
486
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
487 # log file
e87db04251df "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) != "" } {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
490 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
491 set log "stdout"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
492 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
493
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
494 # polar atoms only?
e87db04251df "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)] {
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
497 set polar 0
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
499 set polar 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
500 } else {
e87db04251df "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'"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
502 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
503 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
504 set polar $defaultPolar
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
505 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
506
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
507 # donor/acceptor?
e87db04251df "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)] {
e87db04251df "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" } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
510 set DA "D"
e87db04251df "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" } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
512 set DA "A"
e87db04251df "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" } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
514 set DA "both"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
515 } else {
e87db04251df "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'"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
517 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
518 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
519 set DA $defaultDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
520 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
521
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
522 # get selection
e87db04251df "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)] {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
525 if { $polar } {
e87db04251df "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)"]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
527 } else {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
529 }
e87db04251df "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)] {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
531 if { $polar } {
e87db04251df "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)"]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
533 } else {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
535 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
536 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
537
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
538 } elseif $gui {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
539 if { $currentMol == "none" } {
e87db04251df "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."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
541 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
542 set molid $currentMol
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
543 if { $polar } {
e87db04251df "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)"]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
545 } else {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
547 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
548 if {$atomselectText2 != ""} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
549 if { $polar } {
e87db04251df "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)"]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
551 } else {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
553 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
554 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
555 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
556 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
557 hbonds_usage
e87db04251df "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."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
559 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
560
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
561 # update selections?
e87db04251df "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)] {
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
564 set updateSel 0
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
566 set updateSel 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
567 } else {
e87db04251df "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'"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
569 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
570 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
571 set updateSel $defaultUpdateSel
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
572 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
573
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
574 # SETTING FRAMES
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
575
e87db04251df "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]
e87db04251df "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]
e87db04251df "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 }
e87db04251df "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)] {
e87db04251df "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) :]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
581 switch -- [llength $fl] {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
582 1 {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
583 switch -- $fl {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
584 all {
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
587 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
588 now {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
590 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
591 last {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
593 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
594 default {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
596 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
597 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
598 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
599 2 {
e87db04251df "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]
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
602 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
603 3 {
e87db04251df "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]
e87db04251df "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]
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
607 }
e87db04251df "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)" }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
609 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
610 } else {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
612 }
e87db04251df "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 }
e87db04251df "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 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
615 switch -- $frames_end {
e87db04251df "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 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
617 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
618 if { [ catch {
e87db04251df "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 } {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
621 }
e87db04251df "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 } {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
624 }
e87db04251df "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] && \
e87db04251df "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 ) && \
e87db04251df "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] && \
e87db04251df "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 ) && \
e87db04251df "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 ) && \
e87db04251df "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 ) ) } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
631 error
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
632 }
e87db04251df "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)" }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
634 if $debug {
e87db04251df "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"
e87db04251df "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"
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
638 flush $log
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
639 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
640
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
641 # DONE SETTING FRAMES
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
642
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
643 # get Dist
e87db04251df "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)] {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
646 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
647 set dist $defaultDist
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
648 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
649
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
650 # get Ang
e87db04251df "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)] {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
653 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
654 set ang $defaultAng
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
655 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
656
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
657 # write files?
e87db04251df "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)] {
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
660 set writefile 0
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
662 set writefile 1
e87db04251df "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)] {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
664 if {$arg(outfile) != ""} {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
666 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
667 set datfile $defaultDatFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
668 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
669 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
670 set datfile $defaultDatFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
671 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
672
e87db04251df "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)] {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
674 if {$arg(detout) != ""} {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
676 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
677 set detailFile $defaultDetailFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
678 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
679 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
680 set detailFile $defaultDetailFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
681 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
682
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
683 } else {
e87db04251df "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'"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
685 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
686
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
687 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
688 set writefile $defaultWrite
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
689 set datfile $defaultDatFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
690 set detailFile $defaultDetailFile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
691 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
692
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
693 # Plot?
e87db04251df "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)] {
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
696 set plotHbonds 0
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
698 set plotHbonds 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
699 } else {
e87db04251df "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'"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
701 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
702 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
703 set plotHbonds $defaultPlot
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
704 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
705
e87db04251df "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
e87db04251df "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]} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
708 set plotHbonds 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
709 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
710
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
711 # calculate details?
e87db04251df "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)] {
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
714 set detailType "none"
e87db04251df "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" } {
e87db04251df "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)
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
717 } else {
e87db04251df "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'"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
719 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
720 } else {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
721 set detailType $defaultDetailType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
722 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
723
e87db04251df "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
e87db04251df "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"
e87db04251df "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"
e87db04251df "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:"
e87db04251df "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]"
e87db04251df "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] {
e87db04251df "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]"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
731 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
732 if $updateSel {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
734 } else {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
736 }
e87db04251df "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"
e87db04251df "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"
e87db04251df "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"
e87db04251df "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"
e87db04251df "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"
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
743 if $writefile {
e87db04251df "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"
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
746 if {$detailType != "none"} {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
748 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
749 } else {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
751 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
752 puts $log ""
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
753 flush $log
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
754
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
755 ### CALCULATES HBONDS HERE
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
756
e87db04251df "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
e87db04251df "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]
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
760 set multichain 0
e87db04251df "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 }
e87db04251df "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]} {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
764 }
e87db04251df "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} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
766 set multichain 0
e87db04251df "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 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
768
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
769 set hbondallframes {}
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
770 set hbondcount {}
e87db04251df "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 }]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
772
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
773
e87db04251df "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 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
775
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
776 $sel1 frame $f
e87db04251df "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]} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
778 $sel2 frame $f
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
779 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
780
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
781 if $updateSel {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
782 $sel1 update
e87db04251df "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]} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
784 $sel2 update
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
785 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
786 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
787
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
788 ### CHECK DA HERE!!!
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
789
e87db04251df "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]} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
791
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
792 set count1 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
793 set count2 0
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
794
e87db04251df "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"} {
e87db04251df "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]
e87db04251df "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]]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
798 }
e87db04251df "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"} {
e87db04251df "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]
e87db04251df "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]]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
802 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
803
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
804 lappend framecount $f
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
806
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
807 if {$detailType != "none"} {
e87db04251df "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"} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
809 hbonds::hbonddetails $hbondsingleframe1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
810 }
e87db04251df "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"} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
812 hbonds::hbonddetails $hbondsingleframe2
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
813 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
814 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
815 } else {
e87db04251df "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]
e87db04251df "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]]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
818
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
819 lappend framecount $f
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
820 lappend numHbonds $count1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
821
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
822 if {$detailType != "none"} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
823 hbonds::hbonddetails $hbondsingleframe1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
824 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
825
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
826 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
827 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
828
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
829
e87db04251df "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
e87db04251df "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)] } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
832 $sel1 delete
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
833 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
834
e87db04251df "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]} {
e87db04251df "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)] } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
837 $sel2 delete
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
838 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
839 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
840
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
841 if { $writefile } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
842
e87db04251df "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... "
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
844 update
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
846 flush $log
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
847
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
849 if $debug {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
851 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
852
e87db04251df "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 {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
855 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
856 unset fr hb
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
857 close $outfile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
858
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
859 append statusMsg "Done."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
860 update
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
861 puts $log "Done."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
862 flush $log
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
863 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
864
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
865 if {$detailType != "none"} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
866 if { $writefile } {
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
868 if $debug {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
870 }
e87db04251df "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" }
e87db04251df "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 ... "
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
873 update
e87db04251df "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."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
875 if { $multichain } {
e87db04251df "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 "
e87db04251df "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 " }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
878 if { $multichain } {
e87db04251df "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"
e87db04251df "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" }
e87db04251df "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 {
e87db04251df "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) } ]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
883 set i -1
e87db04251df "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]]-" }
e87db04251df "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]]-" }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
886 if { $detailType != "unique" } {
e87db04251df "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 " \
e87db04251df "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]]]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
889 } else {
e87db04251df "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 " \
e87db04251df "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]]]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
892 }
e87db04251df "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]]-" }
e87db04251df "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]]-" }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
895 if { $detailType != "unique" } {
e87db04251df "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%%" \
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
898 } else {
e87db04251df "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%%" \
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
901 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
902 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
903 if { $outfile != "stdout" } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
904 close $outfile
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
905 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
906
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
907
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
908
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
909 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
910
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
911
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
912 if { $plotHbonds } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
913
e87db04251df "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"]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
915
e87db04251df "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
e87db04251df "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"]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
918
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
920 $plothandle replot
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
921 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
922
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
923 if { $log != "stdout" } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
924 close $log
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
925 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
926
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
927 set statusMsg "Done."
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
928 update
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
929
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
930 return
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
931
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
932 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
933
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
934
e87db04251df "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.
e87db04251df "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 {} {
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
938 return $::hbonds::w
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
939 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
940
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
941
e87db04251df "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} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
943 variable w
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
944 variable atomselectText2
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
945 variable guiDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
946 variable defaultDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
947
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
949 if {$atomselectText2 == ""} {
e87db04251df "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]} {
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
953 set guiDA $defaultDA
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
954 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
955 } else {
e87db04251df "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]} {
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
959 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
960 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
961
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
962 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
963
e87db04251df "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} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
965 variable w
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
966 variable guiWrite
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
967 variable guiType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
968
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
970 if {$guiWrite == 0} {
e87db04251df "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]} {
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
974 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
975 } else {
e87db04251df "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]} {
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
979 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
980 }
e87db04251df "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"} {
e87db04251df "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]} {
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
985 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
986 } else {
e87db04251df "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]} {
e87db04251df "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
e87db04251df "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
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
990 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
991 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
992
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
993 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
994
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
995
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
996
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
997
e87db04251df "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} {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
999
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1000 variable molid
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1001 variable hbondcount
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1002 variable hbondallframes
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1003 variable multichain
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1004 variable detailType
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1005
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1006 set framehbond {}
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1007
e87db04251df "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] {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1009 set newhbond_donor {}
e87db04251df "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"]
e87db04251df "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] }
e87db04251df "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] }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1013
e87db04251df "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]
e87db04251df "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]
e87db04251df "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 } {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1018 } else {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1020 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1021 if { $detailType == "unique" } {
e87db04251df "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 } {
e87db04251df "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]"
e87db04251df "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" }
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1026 }
e87db04251df "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
e87db04251df "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" } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1029 set newhbond_donor {}
e87db04251df "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" }
e87db04251df "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 "
e87db04251df "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 " " }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1033 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1034 $donor delete
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1035
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1036 set newhbond_acceptor {}
e87db04251df "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"]
e87db04251df "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] }
e87db04251df "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] }
e87db04251df "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]
e87db04251df "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]
e87db04251df "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 } {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1044 } else {
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1046 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1047 if { $detailType == "unique" } {
e87db04251df "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 } {
e87db04251df "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]"
e87db04251df "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" }
e87db04251df "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"
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1052 }
e87db04251df "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
e87db04251df "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" } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1055 set newhbond_acceptor {}
e87db04251df "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" }
e87db04251df "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 "
e87db04251df "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 " " }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1059 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1060 $acceptor delete
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1061
e87db04251df "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]
e87db04251df "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 } {
e87db04251df "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 }
e87db04251df "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]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1066 if { $hbondexist == -1 } {
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1067 lappend hbondallframes $newhbond
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1068 lappend hbondcount 1
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1069 } else {
e87db04251df "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 } ]
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1071 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1072 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1073 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1074 return
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1075
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1076 }
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1077
e87db04251df "planemo upload for repository https://github.com/thatchristoph/vmd-cvs-github/tree/master/vmd commit a48d8046b8d9c8093daaa35bfedafa62fc5c5fd9"
chemteam
parents:
diff changeset
1078