-
Notifications
You must be signed in to change notification settings - Fork 826
Closed
Description
Original started on discussion board
It would be nice if we could add arbitrary data to run alongside a trajectory, so..
u = mda.Universe('this', 'that')
u.trajectory.add_auxiliary('some.file')
for ts in u.trajectory:
print ts.stuff_from_fileI think the best route might be adding in the hooks after a Timestep has been read, so
def _read_next_timestep(self):
ts = self._read_timestep()
for aux in self._auxiliaries:
aux.read_next(ts)
return tsSo each aux object is like a mini Reader object, which augments a trajectory Reader.
In the longer term, it would be cool if u.trajectory.add_auxiliary(PullForce('pull.xvg')), then made AtomGroup.pullforce a viable attribute, this should be possible with the new dynamic classes + transplant system.
Reactions are currently unavailable