Skip to content

Instantly share code, notes, and snippets.

@mpharrigan
Created October 21, 2014 19:17
Show Gist options
  • Save mpharrigan/e73692fbb27380aaf650 to your computer and use it in GitHub Desktop.
Save mpharrigan/e73692fbb27380aaf650 to your computer and use it in GitHub Desktop.
VMD User
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