Created
October 21, 2014 19:17
-
-
Save mpharrigan/e73692fbb27380aaf650 to your computer and use it in GitHub Desktop.
VMD User
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set mol [mol new {traj_fn} waitfor all] | |
mol addfile {top_fn} waitfor all | |
# Open data file | |
set sel [atomselect $mol all] | |
set nf [molinfo $mol get numframes] | |
set fp [open {dat_fn} r] | |
set line "" | |
# Each line of the data file corresponds to a frame | |
for {set i 0} {$i < $nf} {incr i} { | |
gets $fp line | |
$sel frame $i | |
$sel set user $line | |
} | |
close $fp | |
$sel delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment