You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using trajectories modified by strip or append, I get errors for later analysis (e.g. dssp, sander, pca) due to some type mismatch. This can be worked around either by using a deep-copy or saving and loading the trajectory to file.
Here is a snippet of code you can use for and example, in this case I have a dictionary of trajectories but this setup should work with any trajectory constructed with append, strip, or selections (i.e., traj["@ca"]):
`
Create an empty trajectory
combine = pytraj.Trajectory()
Parse the dictionary of trajectories
for item in traj_dict:
if(combine.n_atoms < 1):
combine = traj_dict[item].copy()
else:
combine.append(traj_dict[iem])
This is a work-around to some bug, I should forward it to pytraj team with love
combine = combine.copy()
Getting the delicious data
data = pytraj.pca(combine, mask="@ca", n_vecs=2)
`
The text was updated successfully, but these errors were encountered:
When using trajectories modified by strip or append, I get errors for later analysis (e.g. dssp, sander, pca) due to some type mismatch. This can be worked around either by using a deep-copy or saving and loading the trajectory to file.
Here is a snippet of code you can use for and example, in this case I have a dictionary of trajectories but this setup should work with any trajectory constructed with append, strip, or selections (i.e., traj["@ca"]):
`
Create an empty trajectory
combine = pytraj.Trajectory()
Parse the dictionary of trajectories
for item in traj_dict:
if(combine.n_atoms < 1):
combine = traj_dict[item].copy()
else:
combine.append(traj_dict[iem])
This is a work-around to some bug, I should forward it to pytraj team with love
combine = combine.copy()
Getting the delicious data
data = pytraj.pca(combine, mask="@ca", n_vecs=2)
`
The text was updated successfully, but these errors were encountered: