set allatoms [atomselect top all] $allatoms set beta 0 set fixedatom [atomselect top "resid 1 and name N"] $fixedatom set beta 1 $allatoms set occupancy 0 set smdatom [atomselect top "resid 153 and name CA"] $smdatom set occupancy 1 $allatoms writepdb newmyo.ref set smdpos [lindex [$smdatom get {x y z}] 0] set fixedpos [lindex [$fixedatom get {x y z}] 0] vecnorm [vecsub $smdpos $fixedpos]
Output is three numbers, which are x, y, and z components of end to end unit vector. These will be used in the NAMD configuration file. The relevant part of configuration file(myo_cve.namd) is given below.
#fix one atom fixedAtoms on fixedAtomsFile newmyo.ref fixedAtomsCol B #SMD SMD on SMDFile newmyo.ref SMDk 5.0 ; # approx 350pN/A SMDVel 0.001 ; # 1 A /ps SMDDir -0.561 -0.566 -0.605 ; # dirn of endtoend vec SMDOutputFreq 500 ; # every 1 ps
Issue the command
mpirun -np 16 /usr/local/namd/namd2mpi/ myo_cvp.namd > cvp.log &to run the simulation. Quick analysis of the log file is done using smdanaly
./smdanaly cvp.log.