-
Notifications
You must be signed in to change notification settings - Fork 14
/
pbctools.tcl
61 lines (51 loc) · 1.45 KB
/
pbctools.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
##
## PBC Tools
##
## A plugin for the handling of periodic boundary conditions.
##
## Authors:
## Toni Giorgino <toni.giorgino _at_ isib.cnr.it>
## Jerome Henin <Jerome.Henin _at_ edam.uhp-nancy.fr>
## Olaf Lenz <olenz _at_ icp.uni-stuttgart.de>
## Cameron Mura <cmura _at_ mccammon.ucsd.edu>
## Jan Saam <saam _at_ charite.de>
##
## The pbcbox procedure copies a lot of the ideas of Axel Kohlmeyer's
## script vmd_draw_unitcell.
##
## $Id$
##
package provide pbctools 3.1
###################################################
# Main namespace procedures
###################################################
# Main UI
proc pbc { args } {
proc usage {} {
vmdcon -info {usage: pbc <command> [args...]
Setting/getting PBC information:
set cell [options...]
get [options...]
Reading/writing an XST file:
readxst $xstfile [options...]
writexst $xstfile [options...]
Drawing a box:
box [options...]
box_draw [options...]
(Un)Wrapping atoms:
wrap [options...]
unwrap [options...]
}
return
}
if { [llength $args] < 1 } then { usage; return }
set command [ lindex $args 0 ]
set args [lrange $args 1 end]
set fullcommand "::PBCTools::pbc$command"
# vmdcon -info "command=$command"
# vmdcon -info "fullcommand=$fullcommand"
# vmdcon -info "args=$args"
if { [ string length [namespace which -command $fullcommand]] } then {
eval "$fullcommand $args"
} else { usage; return }
}