## set fp [open "VdWUserTimeline.txt" r] set fpEl [open "ElecDDDFUserTimeline.txt" r] fconfigure $fp -buffering line gets $fp numAtoms fconfigure $fpEl -buffering line gets $fpEl numAtoms puts "Reading User data for $numAtoms" puts $numAtoms set numframes [molinfo top get numframes] gets $fp data gets $fpEl dataE1 while {$data != ""} { for {set iFrame 0} {$iFrame<$numframes} {incr iFrame} { puts "reading frame $iFrame" for {set iAtom 0} {$iAtom<$numAtoms} {incr iAtom} { # puts $data #animate goto $iFrame set sel [atomselect top "index $iAtom"] $sel frame $iFrame $sel set user $data $sel set user2 $dataE1 $sel delete # $sel set user2 # puts $iAtom #$sel delete gets $fp data gets $fpEl dataE1 } } } puts "finished reading" close $fp close $fpEl ## ## change the "color by" and "trajectory" tab settings so that ## the new color values, and start it animating... ## mol modcolor 0 0 User mol colupdate 0 0 1 mol scaleminmax 0 0 -2.0 2.0 mol modcolor 0 0 User2 mol colupdate 0 0 1 mol scaleminmax 0 0 -6.0 6.0 # animate forward