I am trying to load a .crd
file from Amber, but this fails because it's not in the format MDAnalysis expect (see error at the end):
topology = 'top.prmtop'
trajectory = 'amberOut.crd'
u = MDAnalysis.Universe(topology, trajectory)
I saw this thread and also this library which I don't want to use if I can read Amber .crd file using MDAnalysis.
Any ideas why it doesn't work? If I load the trajectory in VMD I am using this command (and it works):
vmd -parm7 top.prmtop -crdbox amberOut.crd
Traceback (most recent call last):
File "analysis.py", line 5, in <module>
u = MDAnalysis.Universe(topology, trajectory)
File "/anaconda3/envs/mdaenv/lib/python2.7/site-packages/MDAnalysis/core/universe.py", line 305, in __init__
self.load_new(coordinatefile, **kwargs)
File "/anaconda3/envs/mdaenv/lib/python2.7/site-packages/MDAnalysis/core/universe.py", line 535, in load_new
self.trajectory = reader(filename, **kwargs)
File "/anaconda3/envs/mdaenv/lib/python2.7/site-packages/MDAnalysis/coordinates/base.py", line 1943, in __init__
self._read_first_frame()
File "/anaconda3/envs/mdaenv/lib/python2.7/site-packages/MDAnalysis/coordinates/CRD.py", line 73, in _read_first_frame
natoms = int(fields[0])
ValueError: invalid literal for int() with base 10: '96.380'