Usage of tor.xyz for a trajectory file
Issue #899
resolved
I would like to calculate the dihedrals of selective residues across a MD trajectory.I came across Issue #745 and have been following it till I came across the part where a FOR loop is required to iterate the tor.xyz function for all frames of the trajectory.I am not entirely proficient in R yet. Do you think one can help me figure this out?
Comments (2)
-
-
reporter - changed status to resolved
- Log in to comment
Hi,
The example in #745 is not using a “FOR” loop. Instead, it uses a more efficient type of loop called “apply”. The following code is from the original post:
phi <- apply(xyz[, inds$xyz], 1, torsion.xyz)
Check
?apply
for more detail.