Commit 561b8d26 authored by cmaffeo2's avatar cmaffeo2
Browse files

Made an option for specifying a frame range for readAvgArbdCoords

parent 45bbc767
......@@ -163,17 +163,17 @@ def readArbdCoords(fname):
coords.append([float(x) for x in line.split()[1:]])
return np.array(coords)
def readAvgArbdCoords(psf,pdb,dcd,rmsdThreshold=3.5):
def readAvgArbdCoords(psf,pdb,dcd,rmsdThreshold=3.5, first_frame=0, last_frame=-1, stride=1):
import MDAnalysis as mda
usel = mda.Universe(psf, dcd)
sel = usel.select_atoms("name D*")
# r0 = ref.xyz[0,ids,:]
ts = usel.trajectory[-1]
ts = usel.trajectory[last_frame]
r0 = sel.positions
pos = []
for t in range(ts.frame-1,-1,-1):
for t in range(ts.frame-1,first_frame-1,-stride):
usel.trajectory[t]
R,comA,comB = minimizeRmsd(sel.positions,r0)
r = np.array( [(r-comA).dot(R)+comB for r in sel.positions] )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment