Unwrap function is making the iterations take way too long time. Help! #4641
-
Greetings!
Sorry for my english, it isn't my first language. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The unwrap transformation is applied every time you go to a new trajectory frame and unwrap is currently a slow operation. If you go back to a frame, the data are again read from disk, and the unwrap transformation is applied. If you need to repeatedly analyze your trajectory I would save an unwrapped one. This will take time, but only once u = mda.Universe(TOPOL, "traj.xtc")
atoms = u.select_atoms('protein and name CA and backbone')
transform = trans.unwrap(atoms)
u.trajectory.add_transformations(transform)
u.atoms.write("unwrapped.xtc", frames="all") Then load If you have other tools at hand that can do unwrap faster (e.g. GROMACS |
Beta Was this translation helpful? Give feedback.
`if unwrap_switch == 'y':
transform = [trans.NoJump(protein),
trans.center_in_box(protein, wrap= True)]
u.trajectory.add_transformations(*transform)
print('Transformation preparated.')`
The
transformation.NoJump
was able to resolve our issue. Thank you for the discussion, have a great day!