alanwilter / acpype

OFFICIAL: AnteChamber PYthon Parser interfacE
https://alanwilter.github.io/acpype/
GNU General Public License v3.0
201 stars 46 forks source link

Some errors in the resulting topologies after conversion to gmx #24

Open kaplajon opened 3 years ago

kaplajon commented 3 years ago

Hi,

I'm preparing a glycoprotein using tleap and glycam06j/ff14SB. Since I want to simulate in gromacs I used ACPYPE (the :latest docker image recipe built with Singularity last week). I also used tleap from the same image. Unfortunately I found some errors in the generated output that I had to fix before gromacs would run, that I thought you might want to know about.

  1. In the CL- [moleculetype] the atom type is IM, but in [atomtypes] the type is Cl-. Changing IM to Cl- seems to be the fix for getting the topology through grompp.
  2. In the output gro-file, the box vectors were written in Ångström, but the coordinates in nm. This made gromacs die with a segfault since it couldn't allocate enough memory for the resulting huge box. Dividing the box vectors by 10 fixed the segfault issue.

Thanks for a very nice python tool! Cheers

alanwilter commented 3 years ago

Hi, thanks for using ACPYPE and for your report. About 1), can you please see #22. It's a similar issue which was addressed recently so you see it in the latests acpype.py.

I know a collaborator mentioned ACPYPE in a docker but where exactly did you get it? Thanks.

kaplajon commented 3 years ago

Hi, yes I saw that a similar issue with the sodium ion topology was fixed after I posted here. Thanks!

the docker image comes from the lpkagami/acpype:latest as mentioned in the acpype.sh from this repo. I thought it was the "official" one, but maybe I'm mistaken (I just wanted a quick way of using acpype together with ambertools)? Apart from the issues I've mentioned, it seems to work well for my purposes (amber2gmx functionality).

From the log file: | ACPYPE: AnteChamber PYthon Parser interfacE v. 2020-07-25T09:06:13CEST (c) 2021 AWSdS

So it's a bit old it seems, maybe the issue has been fixed. I scanned the commits quickly, so I may have missed something important. :)

alanwilter commented 3 years ago

Hi, yes, it's our Docker, but we didn't advertise it yet because it not fully functional.

For using as "amber2gmx", just the acpype.py file should do the trick.

And yes, that version is a bit "old".

Nevertheless, I'm still puzzled with you topic (2) and I need to investigate the 10 off factor you spotted. Do you mind sending your input files so I can run some tests here? Thanks again.

kaplajon commented 3 years ago

Hi,

I'm not sure I'm allowed to share the topologies just yet, but I think it may be this line in acpype.py. I'm not adding solvent or setting any box with tleap, so acpype is guessing the box info from the coordinates and then multiplying with 20 it seems. I guess it can be counted as somewhat of a corner case.

My protein system has over 1000 residues, and increasing the box times 20 in each direction apparently became too much for gromacs to handle (and I tried it on two machines, one with 50 GB RAM and the other one with 300 GB). :)

alanwilter commented 3 years ago

Yes, this is the bit of code that does is, I looked there as well and originally I applied our heuristic rules, besides, historically, Amber always used Angstroms (0.1 nm) and Gromacs nm.

The thing here is, probably, my code is not addressing your scenario correctly because I used to work with PDB files, which uses Angs as well and usually have a PBC values, so still, I don't see why I put 20. I don't need your example anymore, I just created one, now I need a PDBs with different PBCs (rhombic, triclinic, octa etc.) test the "common" usage, working on it.

My guess is I just need to add the amb2gmx flag so multiply by 2 and 20 in this scenario. Anyway, I need to review it.