Changeset 6374 for vmdshow/branches/0.1
- Timestamp:
- Jun 6, 2016, 1:15:52 PM (8 years ago)
- Location:
- vmdshow/branches/0.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vmdshow/branches/0.1
- Property svn:mergeinfo changed
/vmdshow/trunk merged: 6196,6373
- Property svn:mergeinfo changed
-
vmdshow/branches/0.1/vmdserver.tcl
r6186 r6374 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 2 # ---------------------------------------------------------------------- 2 3 # HUBZERO: server for VMD … … 103 104 translate 104 105 user 105 106 106 vecadd 107 107 veccross … … 120 120 vecsum 121 121 veczero 122 123 122 vmdcollab 124 123 vmdcon … … 280 279 switch -- $key { 281 280 -rotate { 282 molinfo top set rotate_matrix [list $val] 281 foreach mol [molinfo list] { 282 molinfo $mol set rotate_matrix [list $val] 283 } 283 284 } 284 285 -scale { 285 molinfo top set scale_matrix [list $val] 286 foreach mol [molinfo list] { 287 molinfo $mol set scale_matrix [list $val] 288 } 286 289 } 287 290 -center { 288 molinfo top set center_matrix [list $val] 291 foreach mol [molinfo list] { 292 molinfo $mol set center_matrix [list $val] 293 } 289 294 } 290 295 -global { 291 molinfo top set global_matrix [list $val] 296 foreach mol [molinfo list] { 297 molinfo $mol set global_matrix [list $val] 298 } 292 299 } 293 300 default { … … 317 324 display shadows off 318 325 319 if 0 { 326 # gah: turn off rep change 327 if 0 { 320 328 foreach nmol [molinfo list] { 321 329 set max [molinfo $nmol get numreps] … … 324 332 } 325 333 } 326 334 } 327 335 } 328 336 end { … … 332 340 display shadows $DisplayProps(shadows) 333 341 334 if 0 { 342 # gah: turn off rep change 343 if 0 { 335 344 # restore rendering methods for all representations 336 345 foreach nmol [molinfo list] { … … 340 349 } 341 350 } 342 351 } 343 352 } 344 353 default { … … 457 466 continue 458 467 } 459 460 461 462 463 464 468 if { $tmpDir != "" } { 469 set tmpFile [file join $tmpDir [file tail $file]] 470 if { [file exists $tmpFile] } { 471 set file $tmpFile 472 } 473 } 465 474 mol $op $file waitfor all 466 467 468 475 if { ![info exists name] } { 476 puts stderr "can't find name file=$file" 477 } 469 478 if {$op eq "new"} { 470 479 set newnum [lindex [molinfo list] end] … … 777 786 } 778 787 max { 779 set nmol [lindex [molinfo list] 0] 780 if {$nmol ne ""} { 781 return [molinfo $nmol get numframes] 782 } 783 return 0 788 set maxFrames 0 789 foreach mol [molinfo list] { 790 set n [molinfo $mol get numframes] 791 if { $n > $maxFrames } { 792 set maxFrames $n 793 } 794 } 795 return $maxFrames 796 # gah: fix to return max correct max frames. 797 if 0 { 798 set nmol [lindex [molinfo list] 0] 799 if {$nmol ne ""} { 800 return [molinfo $nmol get numframes] 801 } 802 return 0 803 } 784 804 } 785 805 default { … … 804 824 805 825 if { [llength [molinfo list]] == 0 } { 806 826 return "" 807 827 } 808 828 if { $Scenes(@CURRENT) eq "" } { 809 829 return "" 810 830 } 811 831 … … 825 845 826 846 foreach arg $args { 827 828 829 847 if { $arg == "writepdb" } { 848 error "autoselect \"writepdb\" option is disallowed" 849 } 830 850 } 831 851 set cmd [eval atomselect $args] … … 890 910 } else { 891 911 server_oops $cout $result 892 912 if { [string match "invalid command*" $result] } { 893 913 bgerror "server received invalid command: $result" 894 895 914 server_exit $cin $cout 1 915 } 896 916 } 897 917 } … … 980 1000 animate goto $item(frame) 981 1001 } elseif {[info exists item(rotate)]} { 982 molinfo top set rotate_matrix [list $item(rotate)] 1002 foreach mol [molinfo list] { 1003 molinfo $mol set rotate_matrix [list $item(rotate)] 1004 } 983 1005 # send rotation matrix back to the client so we can pause later 984 1006 server_send_latest $client [list nv>rotatemtx $item(num) $item(rotate)] … … 990 1012 if {[info exists item(defview)] && $item(defview)} { 991 1013 if {[info exists Views($item(frame))]} { 992 eval molinfo top set $Views($item(frame)) 1014 foreach mol [molinfo list] { 1015 eval molinfo $mol set $Views($item(frame)) 1016 } 993 1017 } 994 1018 }
Note: See TracChangeset
for help on using the changeset viewer.