mol new ionized.psf type psf mol addfile ionized.pdb type pdb mol addfile output.dcd type dcd first 0 last -1 step 30 waitfor all set outfile [open rmsdLig.dat w]; set nf [molinfo top get numframes] set frame0 [atomselect top "resid 3941 to 3970" frame 0] set sel [atomselect top "resid 3941 to 3970"] # rmsd calculation loop for {set i 1 } {$i < $nf } { incr i } { $sel frame $i $sel move [measure fit $sel $frame0] puts $outfile "[measure rmsd $sel $frame0]" } close $outfile #calculation of RMSF of CA atom using superposition #works when pdb and dcd files are preloaded using GUI(no psf #needed) set num_frames [molinfo top get numframes] set kk [expr $num_frames - 1] set a [atomselect top "resid 3941 to 3970"] set c [atomselect top "resid 3941 to 3970" frame $kk] for {set i 0} {$i<$num_frames} {incr i} { $a frame $i $a move [measure fit $a $c] } set outfile [open "rmsf_CALig.dat" "w"] puts $outfile "Residue \t RMSF" for {set i 0} {$i < [$a num] } {incr i} { set rmsf [measure rmsf $a first 1 last $kk step 10] puts $outfile "[expr {$i+1}] \t [lindex $rmsf $i]" } close $outfile