shirtsgroup / InterMol

Conversion tool for molecular simulations
MIT License
186 stars 53 forks source link

Amber to Desmond #332

Closed yiannisgaldadas closed 5 years ago

yiannisgaldadas commented 7 years ago

Dear users,

I am trying to generate a Desmond input file starting from Amber files . Specifically, I run the following command in a python 2.7 environment:

python ~/Downloads/InterMol/intermol/convert.py --amb_in x.prmtop x.inpcrd --desmond -e

but I get the following error:

File "/usr/local/amber16/lib/python3.5/site-packages/parmed/formats/registry.py", line 197, in load_file return cls.parse(filename, *args, *kwargs) File "/usr/local/amber16/lib/python3.5/site-packages/parmed/amber/amberformat.py", line 353, in parse return LoadParm(filename, args, **kwargs) File "/usr/local/amber16/lib/python3.5/site-packages/parmed/amber/readparm.py", line 76, in LoadParm parm.coordinates = f.coordinates File "/usr/local/amber16/lib/python3.5/site-packages/parmed/structure.py", line 1710, in coordinates coords = coords.reshape((-1, len(self.atoms), 3)) ValueError: total size of new array must be unchanged

Did anyone have a similar issue and if yes, how did you solve it?

Best, Yiannis

ctk3b commented 7 years ago

Hi Yiannis, looks like there's a problem reading in the amber files.

Would it be possible to share the files with us? Or a slimmed down version of those files that exhibits the same problem?

yiannisgaldadas commented 7 years ago

Dear Cristoph,

Thank you so much for your swift response. Yes, sure! Please find attached the files (I have put a .txt suffix just to be able to upload them here).

Best, Yiannis x.inpcrd.txt x .prmtop.txt

mrshirts commented 7 years ago

Actually, I'm realizing this may be a ParmEd problem. It's failing in a ParmEd function when amb_structure = pmd.load_file(prmtop_in, xyz=crd_in), not in the InterMol call.

Can you try writing a simple program that is essentially just the below:

import parmed as pmd
amb_structure = pmd.load_file('x.prmtop', xyz='x.inpcrd')

And if it fails, file an issue report with https://github.com/ParmEd/ParmEd? It may be that there's just something wrong with the prmtop and inpcrd files as well - you should try running them in sander to make sure they are valid.

swails commented 5 years ago

I think this issue can be closed (it's very old, anyway). If you look at the top of the two files, they are incompatible.

The prmtop has 27780 atoms, and the inpcrd file has 28899 atoms. The error message should have been better from ParmEd, but they are not compatible files.