Closed GoogleCodeExporter closed 9 years ago
This issue was closed by revision 4a0b2e5f7fc0.
Original comment by orbeckst
on 3 Sep 2012 at 6:57
I tested the development version after this fix. Now i am able to write the
fitted trajectory with ncdf format. However there still lies some problem if i
try to write the trajectory as multi-frame pdb. The error is pasted below.
Thanks once again,
Bala
Writing pdb gives me the following error.
Traceback (most recent call last):
File "MDAL_FIT-REF.py", line 17, in <module>
rms_fit_trj(tar,ref,select=sel,filename='rmsfit.pdb')
File "/home/cbala/.local/lib/python2.7/site-packages/MDAnalysis-0.7.7_devel-py2.7-linux-x86_64.egg/MDAnalysis/analysis/align.py",
line 380, in rms_fit_trj
writer = frames.OtherWriter(filename)
File "/home/cbala/.local/lib/python2.7/site-packages/MDAnalysis-0.7.7_devel-py2.7-linux-x86_64.egg/MDAnalysis/coordinates/base.py",
line 423, in OtherWriter
return core.writer(filename, **kwargs)
File "/home/cbala/.local/lib/python2.7/site-packages/MDAnalysis-0.7.7_devel-py2.7-linux-x86_64.egg/MDAnalysis/coordinates/core.py",
line 183, in writer
return Writer(filename, numatoms=numatoms, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'delta'
Original comment by bala.bio...@gmail.com
on 4 Sep 2012 at 7:27
Hi Bala,
I only just saw your comment at the end of Issue 116 that you're unable to
write a multi-PDB. You are not showing the exact commands that you're using but
my suspicion is that you simply forgot to set the multiframe=True flag on the
writer as in the following (see
http://packages.python.org/MDAnalysis/documentation_pages/coordinates/PDB.html
):
from MDAnalysis.tests.datafiles import *; import MDAnalysis
u = MDAnalysis.Universe(PRMncdf, NCDF)
p = u.selectAtoms("not resname WAT")
W = MDAnalysis.Writer("foo.pdb", numatoms=p.numberOfAtoms(), multiframe=True)
for ts in u.trajectory:
W.write(p.atoms)
W.close()
Unfortunately we need the hack with multiframe=True because there is no other
way to find out if the user just wants to write a snapshot or a whole
trajectory.
If this does not do what you want then please file a new issue – comments
attached to fixed issues are esily ignored.
Oliver
Original comment by orbeckst
on 18 Sep 2012 at 6:56
Original issue reported on code.google.com by
obeck...@asu.edu
on 30 Aug 2012 at 12:55