- Timestamp:
- Mar 5, 2015 2:46:40 AM (9 years ago)
- Location:
- vmdshow/branches/0.1
- Files:
-
- 3 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
vmdshow/branches/0.1
- Property svn:mergeinfo changed
/vmdshow/trunk (added) merged: 4978,5050,5065-5067
- Property svn:mergeinfo changed
-
vmdshow/branches/0.1/INSTALL.txt
r4152 r5081 5 5 Follow instructions in INSTALL.txt there. You'll need the vmdserver.tcl 6 6 script from here. 7 8 9 10 -
vmdshow/branches/0.1/vmdserver.tcl
r4453 r5081 76 76 color 77 77 gettimestep 78 graphics 78 79 imd 79 80 label … … 147 148 148 149 # ---------------------------------------------------------------------- 150 # USAGE: queryinfo <x> <y> ?-add? 151 # 152 # Resizes the visualization window to the given width <w> and height 153 # <h>. The next image sent should be this size. 154 # ---------------------------------------------------------------------- 155 proc cmd_queryinfo {x y args} { 156 global DisplayProps MolNames MolInfo 157 158 # be careful -- VMD uses coordinates from LOWER-left corner of window 159 set vmdy [expr {$DisplayProps(frameh)-$y}] 160 161 set vals [pick $x $vmdy] 162 if {$vals ne ""} { 163 array set data $vals 164 165 # map the molecule ID back to the name used within MD Showcase 166 foreach molname $MolNames { 167 if {$MolInfo($molname) == $data(mol)} { 168 set data(molname) $molname 169 break 170 } 171 } 172 173 # pass back the click coord on screen so we know where this came from 174 set data(screenx) $x 175 set data(screeny) $y 176 177 set vals [array get data] 178 } 179 return $vals 180 } 181 $parser alias queryinfo cmd_queryinfo 182 183 # ---------------------------------------------------------------------- 149 184 # USAGE: resize <w> <h> 150 185 # … … 327 362 # ---------------------------------------------------------------------- 328 363 proc cmd_load {args} { 329 global MolInfo 364 global MolInfo MolNames 330 365 331 366 # clear all existing molecules … … 334 369 } 335 370 catch {unset MolInfo} 371 set MolNames "" 336 372 337 373 # load new files … … 351 387 if {$op eq "new"} { 352 388 set newnum [lindex [molinfo list] end] 389 if {[lsearch -exact MolNames $name] < 0} { 390 lappend MolNames $name 391 } 353 392 set MolInfo($name) $newnum 354 393 set MolInfo($slot) $newnum … … 751 790 server_oops $cout $result 752 791 if { [string match "invalid command*" $result] } { 753 bgerror " I got ainvalid command: $result"792 bgerror "server received invalid command: $result" 754 793 exit 1 755 794 }
Note: See TracChangeset
for help on using the changeset viewer.