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 creating an aligned trajectory which is written to a file rather than stored in memory, I want to be able to pass in kwargs to the writer like I normally would when creating a writer object, but AlignTraj doesn't allow this.
Actual behavior
AlignTraj's init method creates a writer for the provided filename like this:
self._writer=mda.Writer(self.filename, natoms)
Code to reproduce the behavior
Example use case, when writing to h5md and you want the output file to be compressed.
fromMDAnalysisTests.datafilesimportCOORDINATES_TOPOLOGY, COORDINATES_H5MDfromMDAnalysis.analysisimportrms, alignimporth5pyaligner=align.AlignTraj(u, ref,
select='protein and name CA',
filename='aligned_traj.h5md',
compression='gzip', compression_opts=9,
in_memory=False).run()
withh5py.File('aligned_traj.h5md', 'r') asf:
print(f"{f["particles"]["trajectory"]["position"]["value"].compression}")
Current version of MDAnalysis
Which version are you using? (run python -c "import MDAnalysis as mda; print(mda.__version__)")
2.8.0
The text was updated successfully, but these errors were encountered:
Expected behavior
When creating an aligned trajectory which is written to a file rather than stored in memory, I want to be able to pass in kwargs to the writer like I normally would when creating a writer object, but AlignTraj doesn't allow this.
Actual behavior
AlignTraj's init method creates a writer for the provided filename like this:
Code to reproduce the behavior
Example use case, when writing to h5md and you want the output file to be compressed.
Current version of MDAnalysis
python -c "import MDAnalysis as mda; print(mda.__version__)"
)2.8.0
The text was updated successfully, but these errors were encountered: