Giter Site home page Giter Site logo

alanwilter / acpype Goto Github PK

View Code? Open in Web Editor NEW
178.0 8.0 45.0 294.5 MB

OFFICIAL: AnteChamber PYthon Parser interfacE

Home Page: https://alanwilter.github.io/acpype/

License: GNU General Public License v3.0

Python 93.16% Shell 4.52% Batchfile 0.03% Jupyter Notebook 2.07% Dockerfile 0.22%
python3 ambertools gromacs ambermd charmm cns xplor topologies

acpype's Introduction

ACPYPE

Maintenance GitHub python GitHub release (latest by date) GitHub Release Docker Pulls Docker Image Size (tag) Conda Version Conda Downloads PyPI PyPI - Downloads GitHub Workflow Status (with event) Poetry Ruff pre-commit Commits since release Codecov Documentation Status Citations Badge

AnteChamber PYthon Parser interfacE

A tool based in Python to use Antechamber to generate topologies for chemical compounds and to interface with others python applications like CCPN and ARIA.

acpype is pronounced as ace + pipe

Topologies files to be generated so far: CNS/XPLOR, GROMACS, CHARMM and AMBER.

NB: Topologies generated by acpype/Antechamber are based on General Amber Force Field (GAFF) and should be used only with compatible forcefields like AMBER and its variant.

Several flavours of AMBER FF are ported already for GROMACS (see ffamber) as well as to XPLOR/CNS (see xplor-nih) and CHARMM.

This code is released under GNU General Public Licence V3.

See online documentation for more.

NO WARRANTY AT ALL

It was inspired by:

  • amb2gmx.pl (Eric Sorin, David Mobley and John Chodera) and depends on Antechamber and OpenBabel

  • YASARA Autosmiles (Elmar Krieger)

  • topolbuild (Bruce Ray)

  • xplo2d (G.J. Kleywegt)

For Non-uniform 1-4 scale factor conversion (e.g. if using GLYCAM06), please cite:

BERNARDI, A., FALLER, R., REITH, D., and KIRSCHNER, K. N. ACPYPE update for nonuniform 1–4 scale factors: Conversion of the GLYCAM06 force field from AMBER to GROMACS. SoftwareX 10 (2019), 100241. Doi: 10.1016/j.softx.2019.100241

For Antechamber, please cite:

  1. WANG, J., WANG, W., KOLLMAN, P. A., and CASE, D. A. Automatic atom type and bond type perception in molecular mechanical calculations. Journal of Molecular Graphics and Modelling 25, 2 (2006), 247–260. Doi: 10.1016/j.jmgm.2005.12.005
  1. WANG, J., WOLF, R. M., CALDWELL, J. W., KOLLMAN, P. A., and CASE, D. A. Development and testing of a General Amber Force Field. Journal of Computational Chemistry 25, 9 (2004), 1157–1174. Doi: 10.1002/jcc.20035

If you use this code, I am glad if you cite:

SOUSA DA SILVA, A. W. & VRANKEN, W. F. ACPYPE - AnteChamber PYthon Parser interfacE. BMC Research Notes 5 (2012), 367 Doi: 10.1186/1756-0500-5-367

and (optionally)

BATISTA, P. R.; WILTER, A.; DURHAM, E. H. A. B. & PASCUTTI, P. G. Molecular Dynamics Simulations Applied to the Study of Subtypes of HIV-1 Protease. Cell Biochemistry and Biophysics 44 (2006), 395-404. Doi: 10.1385/CBB:44:3:395

Alan Silva, DSc

alanwilter at gmail dot com

How To Use ACPYPE

Introduction

We now have an up-to-date web service at Bio2Byte (but it does not have the amb2gmx functionality).

To run acpype, locally, with its all functionalities, you need ANTECHAMBER from package AmberTools and Open Babel if your input files are of PDB format.

However, if one wants acpype just to emulate amb2gmx.pl, one needs nothing at all but Python.

There are several ways of obtaining acpype:

  1. Via CONDA:

    (It should be wholesome, fully functional, all batteries included)

    conda install -c conda-forge acpype
  2. Via PyPI:

    If you're using Linux with Intel processors then

    pip install acpype

    is enough and you should have a complete solution. Oterwise ...

    (Make sure you have AmberTools and, optionally but highly recommended, OpenBabel)

    # You can use conda to get the needed 3rd parties for example
    conda create -n acpype --channel conda-forge ambertools openbabel
    
    # Or for Ubuntu 20:
    apt-get install -y openbabel python3-openbabel libarpack++2-dev libgfortran5
    
    pip install acpype
    
    # or if you feel daring
    
    pip install git+https://github.com/alanwilter/acpype.git

    NB: If using OpenBabel python module, it's really CRITICAL to have it installed in the same Python environment of acpype.

  3. By downloading it via git:

    (Make sure you have AmberTools and, optionally but highly recommended, OpenBabel)

    # You can use conda to get the needed 3rd parties for example
    conda create -n acpype --channel conda-forge ambertools openbabel
    
    # Or for Ubuntu 20:
    apt-get install -y openbabel python3-openbabel libarpack++2-dev libgfortran5
    
    git clone https://github.com/alanwilter/acpype.git

    NB: Using this mode, CHARMM topology files will not be generated.

  4. Via Docker:

    (It should be wholesome, fully functional, all batteries included)

    If you have Docker installed, you can run acpype_docker.sh by:

    NOTE: first time may take some time as it pulls the acpype docker image.

    On Linux / macOS:

    ln -fsv "$PWD/acpype_docker.sh" /usr/local/bin/acpype_docker

    On Windows: Using Command Prompt:

    In the directory where the acpype_docker.bat file is found:

    setx /M path "%path%;%cd%"

    Commands:

    acpype_docker -i CCCC
    
    acpype_docker -i tests/DDD.pdb -c gas

NB:

  • By installing via conda or using via docker you get AmberTools v.21.11 and OpenBabel v3.1.1. Our AmberTools v.21.11 is a stripped version from the original containing only the necessary binaries and libraries and comes with the charmmgen binary from AmberTools17 in order to generate CHARMM topologies.
  • By installing via pip you get AmberTools (as described above) embedded. However, the included binaries may not work in your system (library dependencies issues) and with only provide binaries for Linux (Ubuntu20) and macOS (Intel).
To Test, if doing via git

At folder acpype/, type:

./run_acpype.py -i tests/FFF.pdb

It'll create a folder called FFF.acpype, and inside it one may find topology files for GROMACS and CNS/XPLOR.

Or using a molecule in SMILES notation:

./run_acpype.py -i CCCC # smiles for C4H6 1,3-Butadiene compound

It'll create a folder called smiles_molecule.acpype.

To get help and more information, type:

./run_acpype.py -h
To Install

At folder acpype/, type:

  ln -fsv "$PWD/run_acpype.py" /usr/local/bin/acpype

Then re-login or start another shell session.

If via conda or pip, acpype should be in your $PATH.

To Verify with GMX

GROMACS < v.5.0

cd FFF.acpype/
grompp -c FFF_GMX.gro -p FFF_GMX.top -f em.mdp -o em.tpr
mdrun -v -deffnm em
# And if you have VMD
vmd em.gro em.trr

GROMACS > v.5.0

cd FFF.acpype/
gmx grompp -c FFF_GMX.gro -p FFF_GMX.top -f em.mdp -o em.tpr
gmx mdrun -v -deffnm em
# And if you have VMD
vmd em.gro em.trr
For MD, do

GROMACS < v.5.0

grompp -c em.gro -p FFF_GMX.top -f md.mdp -o md.tpr
mdrun -v -deffnm md
vmd md.gro md.trr

GROMACS > v.5.0

gmx grompp -c em.gro -p FFF_GMX.top -f md.mdp -o md.tpr
gmx mdrun -v -deffnm md
vmd md.gro md.trr

To Emulate amb2gmx.pl

For any given prmtop and inpcrd files (outputs from AMBER LEaP), type:

acpype -p FFF_AC.prmtop -x FFF_AC.inpcrd

The output files FFF_GMX.gro and FFF_GMX.top will be generated inside folder FFF_GMX.amb2gmx

To Verify with CNS/XPLOR

At folder FFF.acpype, type:

cns < FFF_CNS.inp

To Verify with NAMD

acpype's People

Contributors

9527567 avatar alanwilter avatar austenb28 avatar boneta avatar dependabot[bot] avatar g-vykhodtsev avatar ivopr avatar lkagami avatar sotanengel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acpype's Issues

more water models from Amber

Hi Alan,

Wondering if there are any plans to be able to handle more water models, such as Tip4pew, Tip4p, Tip5p, OPC, etc.? Currently, acpype can only handle conversion of the 3 point water models, if I'm not mistaken. Thanks!

Unable to achieve self consistency to the tolerances specified

I am receiving the following error for my molecules, here I am requesting to provide valuable suggestions to solve this issue.

acpype -i UNK.mol2


QMMM: ERROR!
QMMM: Unable to achieve self consistency to the tolerances specified
QMMM: No convergence in SCF after 1000 steps.
-------------------------input file

@MOLECULE

UNK.pdb
48 51 0 0 0
SMALL
GASTEIGER

@ATOM
1 C1 91.8720 86.3490 101.7550 C.3 900 UNK900 0.1680
2 O1 92.8720 86.4820 102.7180 O.3 900 UNK900 -0.3456
3 C2 94.0700 86.9280 102.0880 C.3 900 UNK900 0.1133
4 C3 94.0690 86.2010 100.7410 C.3 900 UNK900 0.1135
5 C4 92.6100 85.7470 100.5280 C.3 900 UNK900 0.1286
6 C5 95.2870 86.6800 102.9920 C.3 900 UNK900 0.0836
7 O2 94.4630 87.1190 99.7350 O.3 900 UNK900 -0.3864
8 O3 92.5130 84.3190 100.5360 O.3 900 UNK900 -0.3847
9 O4 95.8940 87.9200 103.2940 O.3 900 UNK900 -0.3246
10 N1 91.2350 87.7150 101.5010 N.ar 900 UNK900 -0.2689
11 C6 90.2010 87.8410 100.5180 C.ar 900 UNK900 0.3525
12 N2 89.6240 89.1100 100.3190 N.ar 900 UNK900 -0.1726
13 C7 89.9820 90.1130 101.0330 C.ar 900 UNK900 0.1739
14 C8 90.9680 89.9820 102.0930 C.ar 900 UNK900 0.0744
15 C9 91.5450 88.7970 102.3150 C.ar 900 UNK900 0.0294
16 O5 89.8350 86.8500 99.8870 O.2 900 UNK900 -0.2444
17 N3 89.5020 91.4690 100.9360 N.ar 900 UNK900 -0.2242
18 C10 90.0490 92.2450 101.7840 C.ar 900 UNK900 0.0844
19 S1 91.2330 91.4950 102.9060 S.2 900 UNK900 -0.0687
20 P1 97.1970 88.5220 102.3830 P.3 900 UNK900 0.2182
21 O6 96.8800 88.3190 100.9360 O.2 900 UNK900 -0.5170
22 O7 97.4810 89.8910 102.8550 O.co2 900 UNK900 -0.4371
23 O8 98.4290 87.4420 102.8400 O.3 900 UNK900 -0.2702
24 P2 99.5330 87.1520 104.1140 P.3 900 UNK900 0.2206
25 O9 100.9760 87.9480 103.6900 O.3 900 UNK900 -0.3141
26 O10 99.0310 87.7560 105.3750 O.co2 900 UNK900 -0.4370
27 O11 99.8220 85.6890 104.1360 O.co2 900 UNK900 -0.5169
28 P3 102.0060 88.3390 102.4860 P.3 900 UNK900 -0.0068
29 O12 101.4170 89.5190 101.7380 O.co2 900 UNK900 -0.5767
30 O13 102.1570 87.1190 101.5950 O.co2 900 UNK900 -0.6374
31 O14 103.3130 88.7190 103.1710 O.co2 900 UNK900 -0.5767
32 C11 89.7780 93.7350 101.8610 C.3 900 UNK900 0.0079
33 C12 88.3670 94.2730 101.9150 C.3 900 UNK900 -0.0437
34 C13 89.2720 94.4120 103.1160 C.3 900 UNK900 -0.0437
35 H 91.0559 85.7160 102.0346 H 900 UNK900 0.0867
36 H 94.1245 87.9834 101.9206 H 900 UNK900 0.0647
37 H 94.7399 85.3681 100.7084 H 900 UNK900 0.0647
38 H 92.2052 86.0644 99.5898 H 900 UNK900 0.0665
39 H 95.9885 86.0508 102.4851 H 900 UNK900 0.0591
40 H 94.9750 86.1998 103.8958 H 900 UNK900 0.0591
41 H 93.8678 87.8848 99.7450 H 900 UNK900 0.2100
42 H 92.8687 83.9754 101.3705 H 900 UNK900 0.2101
43 H 92.2188 88.6863 103.0888 H 900 UNK900 0.0824
44 H 90.6277 93.8747 101.2259 H 900 UNK900 0.0369
45 H 87.5379 93.5973 101.9456 H 900 UNK900 0.0272
46 H 87.7930 94.9509 101.3184 H 900 UNK900 0.0272
47 H 89.6485 95.3743 103.3938 H 900 UNK900 0.0272
48 H 89.2062 94.1398 104.1487 H 900 UNK900 0.0272
@BOND
1 7 4 1
2 16 11 2
3 12 11 ar
4 12 13 ar
5 11 10 ar
6 5 8 1
7 5 4 1
8 5 1 1
9 4 3 1
10 21 20 2
11 17 13 ar
12 17 18 ar
13 13 14 ar
14 10 1 1
15 10 15 ar
16 30 28 2
17 29 28 1
18 1 2 1
19 18 32 1
20 18 19 ar
21 32 33 1
22 32 34 1
23 33 34 1
24 3 2 1
25 3 6 1
26 14 15 ar
27 14 19 ar
28 20 23 1
29 20 22 1
30 20 9 1
31 28 31 1
32 28 25 1
33 23 24 1
34 6 9 1
35 25 24 1
36 24 27 2
37 24 26 1
38 1 35 1
39 3 36 1
40 4 37 1
41 5 38 1
42 6 39 1
43 6 40 1
44 7 41 1
45 8 42 1
46 15 43 1
47 32 44 1
48 33 45 1
49 33 46 1
50 34 47 1
51 34 48 1

Is there a way to control the threads?

Hi there,

I am using acpype to parameterize the small molecules on a HPC cluster. It seems that acpype uses all threads on a computational node automatically when doing the QM calculation. Is there a way to control the numer of threads used by acpype?

Thanks

Set atom/bond type judge option

There are several options in Antechamber to guess atom and bond types (using the -j flag). Some of these only work with certain charge methods, such as bcc will change prediction types <4 to 4 (but 5 will still work).

I have seen Antechamber "fail" with some charged species because of some of the atom/bond assignments. Since mol2 files contain bond types, these don't necessarily need to be guessed, so the option -j 5 has worked for me in these cases. This will still do partial bond type assignment, but should honor the mol2 bond types for the most part.

Reference for -j:

  • 0: No judgement
  • 1: Atom type
  • 2: Full bond type
  • 3: Partial bond type
  • 4: Atom and full bond type
  • 5: Atom and partial bond type

Separation of non-water solvent in the topology file.

I am using the acpype 2020-07-25 from conda, and grateful for continuous development.
I tried to solve a protein with a methanol box (MEOHBOX) using tleap.

After conversion from amber to gromacs by acpype, MOH molecules were as a part of the solute in the topology file. The original order and residue index of molecule was [protein, Na+, Cl-, MOH]. Then residue index is not continuous between protein and MOH by removal of ions, and mismatches occurred.
Also the parameters of MOH were found as the solute in [ bonds ], [ pairs ], [ angles ], [ dihedrals ], but not in [ atoms ].

The problems are (1) parameter is not found in [atoms], and (2) non-water solvent should be separated from the solute.

Water and ions defined in ionsDict (Na+, Cl-, K+) are skipped and directly written in the last of topology file.
It is helpful that non-water solvent like MOH and NMA is treated like water solvent or ions.

As a solution for the problem (1).
In acpype.py,

if not self.direct:
    if resname in list(ionsDict) + ["WAT"]:
        break

Here, I can add parameters in [atoms] using "continue" instead of "break".
However, as mentioned above, the order of atoms is not continuous.

To solve the problem (2), we might take pains in implementation. And this problem might have less priority for most users.
I am trying to extract any molecules as an individual object in the topology file.

Planarity of the benzene ring not maintained in dynamics.

Hi,

I have a small molecule with benzene ring, and generated parameters using the command acpype -i file.pdb -n 0, but in the Dynamics it is loosing its planarity, I am using Amberr99sb ff in gromacs 2021.3.

Is there any way it can be resolved?

Thank you

How to run the program | possible typo in README.md

Thanks for this program. I have this question:

After git cloning the repository, how can you run the program?

Is just by simply running the executable located in ./acpype/acpype_lib/acpype.py ?

Or does it require extra installation steps?

As far as I can read in the README.md:

To Install

At folder acpype, type:

ln -s $PWD/acpype.py /usr/local/bin/acpype

where it should be:

At folder acpype_lib, type:

different atom types | `-water` flag

Thanks for this program.
I would like to model in water, the following molecule: 4-nitrophenolate (PNP1):

pnp1
Since it is charged, I'm utilizing the -n -1 flag.

I'm also using gaff2 and the default charge method (bcc, i.e. -c bcc):

In summary:

]$ acpype -a gaff2 -i PNP1.pdb -c bcc -n -1 -b PNP1

Three files are generated (see them here: https://github.com/DavidCdeB/Files , uploaded as well the PNP1.pdb ):

PNP1_GMX.gro
PNP1_GMX.top
PNP1_GMX.itp
PNP1.pdb

Since there are several carbon(atom) types, i.e.
a) C bonded to nitro group,
b) and C-Sp2,

as well as several oxygen(atom) types:
a) O bonded to Csp2
b) and O bonded to =N

1. I'm wondering whether those quite different carbon and oxygen (atom) types have been correctly interpreted in PNP1_GMX.itp ?

2. I'm wondering whether there's a way of acpype-ing -water tip3p so that the PNP1_GMX.top contains the solvent information, as well as generating the tip3p.itp in the current working directory ?

Many thanks.

atom type does not exist in parmchk.dat

Hi,

Im getting error with parmchk2 step.

Atom type of 12 does not exist in PARMCHK.DAT

Is it something to do with atom typing or input (charged molecule? : i have specified -nc option). Can you please suggest how to i rectify this issue?

Problem generating prm and itp

Hi i'am using acpype :
acpype -p lig.prmtop -x lig.inpcrd

and only generating *gro and *top, please can say me as use this files correctly?

missing dihedral param in CNS params for cyclopropyl

I am using acpype 2020.05.27.16.15 from conda-forge.

I have some issues with CNS param file generated for the small molecule containing cyclopropyl, see e.g. 4YY in https://www.rcsb.org/structure/5nvx

Adding manually the line for DIHEdral cxY cxY cxY cxY seems to solve the issue.

Not sure if it is missed by acpype, antechamber doesn't deal with it or there is a reason to not to include it?

conversion of Amber files to gromacs

I am converting the two files that is UNL.parm7 and UNL.rst7 , which I got from ambertools, to gromacs using acpype. But the gro file which I got from this conversion has some bond missing in it when I am opening it in VMD .I want to know the reason ,why this is happening . .

Error atom type IP

Hi,
I was trying to convert a prmtop and inpcrd to top and gro files

I got this error when i tried to use the generated files in gromacs
Program gmx grompp, VERSION 5.1.4
Source code file: /scratch1/gromacs51/gromacs-5.1.4/src/gromacs/gmxpreprocess/toppush.c, line: 1345

Fatal error:
Atomtype IP not found

How much time is expected to complete an instalation using conda?

Well, as the title says, how much time should I expect to leave it running? Yesterday I gave up when it was about 13000 seconds.

Just to be sure, these are my pc specs:

Ryzen 5 4600G (6 cores, 12 threads)
24GB (16GB usable) DDR4 at 3200Mhz

Also, I was trying it on docker, with the continuumio/miniconda3 image

multiple chain protein

I successfully prepared the amber topology for the complex 1A0Q (https://www.rcsb.org/structure/1A0Q). However, when I used acpype to generate the Gromacs topology, it seemed that two chains in my protein are merged into one. It seemed weird. So could you please take a look at it? Thank you.

'1-4 pairs were missing' warning when parsing the converted topology with ParmED

Hi,

I am using acpype to convert my amber topologies to GROMACS format with the command acpype -x <.rst7> -p <.prmtop> -d -a amber. The conversion runs successfully.

But when I tried to parse the generated GROMACS topology file using ParmED with commands like parmed.load_file(top_file, xyz = gro_file), the parser warns about 'GromacsWarning: 114447 1-4 pairs were missing from the [ pairs ] section and were set to zero; make sure you know what you're doing!'.

After a manual check of the <.top> file and the source code of the parser, I found that there are exactly 114447 rows of pair interactions under the section [ pairs_nb ], but there is no [ pairs ] section in my converted <.top> file. Therefore, the ParmED parser neglects the [ pairs_nb ] section and finds no [ pairs ] section, which leads to such a warning. After renaming the [ pairs_nb ] to [ pairs ] and rerunning the parser, the warning is no longer prompted.

So my questions are,

  1. Is it an intentional behavior to name the 1-4 pair interactions under section [ pairs_nb ], but not [ pairs ]? Will this section of topology still be used in the GROMACS MD engine?
  2. If I want ParmED to read my <.top> file correctly, is it necessary to rename the section [ pairs_nb ] to [ pairs ]?

Thanks for providing this convenient and powerful tool!
Yuyang

Error while generating topologies

Hi,

I am getting an error after generating topology. While topology is generated without any error but it encounters error in next step while generating complex (protein + ligand) topology. The error is as follows:

Error! For atom (.R<IRE 301>.A<CAO 1>) could not find vdW (or other) parameters for type (c6)

IMO acpype is not adding vdW parameters for atom type c6. The ligand I'm using is IRE.

Can you please guide me in right direction?

Regards,
Abdullah

Tutorial needs update

For git intruction it says:
when in acapype/test
../acpype.py -i FFF.pdb

but acpype is in acpype/acpype/lib, so the path is wrong right now

Can't encode character in citation

Currently in line 4038 of acpype.py there is a weird character for the hyphen "-" in the citation string. I'd guess is a product of copying it from a PDF or similar directly into the code. So when the data has nonuniform 1-4 scale factors it crashes with the following error using the docker container:

# acpype -x ../test/Data/CSA.inpcrd -p ../test/Data/CSA.prmtop -o gmx -d
=========================================================================================
| ACPYPE: AnteChamber PYthon Parser interfacE v. 2020-07-25T09:06:13CEST (c) 2020 AWSdS |
=========================================================================================
DEBUG: Python Version 3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0]
Converting Amber input files to Gromacs ...
DEBUG: prmtop and inpcrd files loaded
DEBUG: basename defined = 'CSA'
DEBUG: getCoords done
DEBUG: getABCOEFs done
DEBUG: charge to be balanced: total -0.8370000000
DEBUG: balanceCharges done
DEBUG: Balanced TotalCharge -1.0000000000
DEBUG: PBC = None
DEBUG: getAtoms done
DEBUG: getBonds done
DEBUG: getAngles done
DEBUG: getDihedrals done
DEBUG: prmtop and inpcrd files parsed
==> Writing GROMACS files

DEBUG: writing GRO file
DEBUG: Box size estimated
DEBUG: atomTypes 13
DEBUG: GMX atomtypes done
DEBUG: atoms 52
DEBUG: GMX atoms done
DEBUG: bonds 53
DEBUG: GMX bonds done
DEBUG: atomPairs 135
DEBUG: GMX pairs done
DEBUG: angles 96
DEBUG: GMX angles done
DEBUG: setProperDihedralsCoef done
DEBUG: properDihedralsCoefRB 141
DEBUG: properDihedralsAlphaGamma 0
DEBUG: properDihedralsGmx45 156
==> Writing GMX dihedrals for GMX 4.5 and higher.

DEBUG: GMX special proper dihedrals done
DEBUG: improperDihedrals 2
DEBUG: GMX improper dihedrals done
ACPYPE FAILED: 'ascii' codec can't encode character '\u2013' in position 185: ordinal not in range(128)
  File "/usr/local/bin/acpype", line 4998, in init_main
    system.writeGromacsTopolFiles(amb2gmx=True)
  File "/usr/local/bin/acpype", line 3222, in writeGromacsTopolFiles
    self.writeGromacsTop(amb2gmx=amb2gmx)
  File "/usr/local/bin/acpype", line 4044, in writeGromacsTop
    self.printMess(msg)
  File "/usr/local/bin/acpype", line 1678, in printMess
    print("==> %s" % text)
Total time of execution: less than a second

The solution is just rewriting the hyphen with a correct ascii one. It's now a somewhat stylized unicode version although it looks very similar.

OpenBabel 3 compatibility?

Hi, it seems acpype is not compatible with the newest version of OpenBabel. When I try and create a topology from a PDB file the initial conversion to mol2 fails with ERROR: no 'babel' executable; you need it if input is PDB. I am installing with conda and it works fine if I pin openbabel==2.4.1.

Thanks a lot for your work on this very useful tool.

charmm input format

Hi developer, I'm trying to use acpype to generate charmm input files .rtp and .prm. I can only output CNS and GMX using your sample files, but not charmm. In the acpype.log file it says "charmmgen not found ". I installed acpype through conda. I am looking forward to receiving your response!

Atomtype IP not found

Hello,

I am using ACPYPE v. 2020-10-24T12:16:34CEST to convert Amber topology containing Na+/Cl- ions into GMX topology. Upon running grompp I receive error:

ERROR 1 [file try1_GMX.top, line 19895]: Atomtype IP not found

When I go to the line 19895 it looks like this:

[ atoms ] ; id_ at type res nr residu name at name cg nr charge mass 1 IP 1 NA+ NA+ 1 1 22.9898

Question: what did go wrong? Is this something with my files, or with my current version installation?

Thanks!!!

A question about the content of md.mdp file

ACPYPE script generates, among others, a file md.mdp containg the parameters for testing GROMACS. It contains, for example, force-switching function for van der Waals interactions, as well as the cut-off for PME:

vdw-modifier = force-switch
rlist = 1.0
rvdw = 1.0
rvdw-switch = 0.9
rcoulomb = 1.1

A similar treatment was recommended for CHARMM36 force field, however the cut-off distances were slightly different.
Therefore, I wonder if there is some kind of recommendation to use this particular cut-offs written in the file md.mdp, or there is a freedom in choosing cut-offs suing General Amber Force Field?

Some errors in the resulting topologies after conversion to gmx

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

wrong converted charge

Hello,

Yesterday, I used acpype (installed via conda) to convert amber topology to gmx one,
and I found one wrong charge for NE2 (GLN).
(| ACPYPE: AnteChamber PYthon Parser interfacE v. 2022.6.6 (c) 2022 AWSdS |)

In Amber 14SB force field, the charge (NE2, GLN) is -0.9407, but the converted one is -0.947455.

However, the charge is correct with run_acpype.py from github.

I don't know what went wrong.

All the best,
Qinghua

Value of qConv in acpype.py is too precise compared with that in AmberTools

Typically, I create gromacs topologies using a combination of antechamber, tleap, and then acpype.py for the final step. In generaly, the topology will be determined for a single, small (<100 atom), uncharged molecule before I combine a few hundred of them into a simulation box for a condensed-phase simulation. Occasionally, a small amount of charge creeps in and gromacs complains.

I eventually tracked this down to the value of qConv. I forget whether it is antechamber or tleap (I originally worked this out several months back and submitted it to what I thought was the "official" github repository for acpype, before the owner pointed me at this one, after deleting my issue!) but atomic charges are converted from units of "e" to kCal, and then acpype.py converts these charges back into "e" units.

Within AmberTools, the conversion factor is exactly 18.2223; in acpype.py, the conversion factor used is the more precise:
qConv = 18.222281775 # 18.2223
(line 129).

More precision would normally be "better" but in this case, conversion in one direction is less precise than in the other, and this difference can sometimes give a change in the 5th or 6th decimal place (again, I forget which) that is too small for the total charge cutoff value checked for by gromacs (1e-4). However, once a few hundred of these molecules are added to the system, the cutoff value is exceeded and gromacs gives a warning about the system having an overall charge.

Changing qConv to be 18.2223 completely removes this issue.

Not able to generate charmm output

Hello there,

According to the documentation, this code should be able to generate charmm files. However, I am not able to see any charmm related file in the .acpype folder. Are there any dependencies needed to generate charmm output?

P.S. This is an excellent tool to extract amber ff parameters and it would be even more awesome if it could output lammps related data. Thanks for your efforts.

No Charge value given and wrong assigned bond types

Hello,
First thank for this useful package. secondly I was dealing with a ligand but I got
this Error message:
(gmx) hicham@DESKTOP-E3HV849:~/gmxNew/01-29$ acpype -i LO3.pdb

| ACPYPE: AnteChamber PYthon Parser interfacE v. 2023.10.27 (c) 2024 AWSdS |

WARNING: no charge value given, trying to guess one...
ERROR: guessCharge failed
ERROR: ++++++++++start_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Welcome to antechamber 19.0: molecular input file processor.

---Judge bond type for Residue 1 with ID of 1 and Name of LO3 ---
Warning: The assigned bond types may be wrong, please :
(1) double check the structure (the connectivity) and/or
(2) adjust atom valence penalty parameters in APS.DAT, and/or
(3) increase PSCUTOFF in define.h and recompile bondtype.c
(be cautious, using a large value of PSCUTOFF (>100) will
significantly increase the computation time).

---Judge bond type for Residue 2 with ID of 2 and Name of LO3 ---
/home/hicham/miniconda3/envs/gmx/bin/to_be_dispatched/antechamber: Fatal Error!
No Gasteiger parameter for atom (ID: 131, Name: H62, Type: DU).
ERROR: ++++++++++end_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
==> Trying with net charge = 0 ...
==> ... charge set to 0
==> ... converting pdb input file to mol2 input file
==> * Babel OK *
==> Executing Antechamber...
ERROR: ++++++++++start_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR:
Welcome to antechamber 19.0: molecular input file processor.

Info: Finished reading file (LO3.mol2); atoms read (134), bonds read (131).
Running: /home/hicham/miniconda3/envs/gmx/bin/bondtype -j full -i ANTECHAMBER_BOND_TYPE.AC0 -o ANTECHAMBER_BOND_TYPE.AC -f ac

---Judge bond type for Residue 1 with ID of 1 and Name of LO3 ---
Warning: The assigned bond types may be wrong, please :
(1) double check the structure (the connectivity) and/or
(2) adjust atom valence penalty parameters in APS.DAT, and/or
(3) increase PSCUTOFF in define.h and recompile bondtype.c
(be cautious, using a large value of PSCUTOFF (>100) will
significantly increase the computation time).

---Judge bond type for Residue 2 with ID of 2 and Name of LO3 ---

Running: /home/hicham/miniconda3/envs/gmx/bin/atomtype -i ANTECHAMBER_AC.AC0 -o ANTECHAMBER_AC.AC -p gaff2
Info: Total number of electrons: 512; net charge: 0

Running: /home/hicham/miniconda3/envs/gmx/bin/sqm -O -i sqm.in -o sqm.out
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
/home/hicham/miniconda3/envs/gmx/bin/to_be_dispatched/antechamber: Fatal Error!
Unable to find sqm charges in file (sqm.out).
Verify the filename and the file contents.

ERROR: ++++++++++end_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Antechamber failed
ERROR: ++++++++++start_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Cannot open file (LO3_bcc_gaff2.mol2) with mode (r).
No such file or directory
ERROR: ++++++++++end_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Parmchk failed
ERROR: Tleap failed
==> Removing temporary files...
ERROR: ACPYPE FAILED: [Errno 2] No such file or directory: 'LO3_AC.prmtop'
Traceback (most recent call last):
File "/home/hicham/miniconda3/envs/gmx/lib/python3.8/site-packages/acpype/cli.py", line 138, in init_main
molecule.createMolTopol()
File "/home/hicham/miniconda3/envs/gmx/lib/python3.8/site-packages/acpype/topol.py", line 1115, in createMolTopol
self.topFileData = open(self.acTopFileName).readlines()
FileNotFoundError: [Errno 2] No such file or directory: 'LO3_AC.prmtop'
Total time of execution: 17s

Commit tag on new releases

Hello,

I'm writing an acpype recipe currently for conda-forge (I know you have a conda package already, but it's useful to have it in conda-forge as well.) Do you plan to make releases over time? If so, could you tag them with the relevant commit?

This would allow the conda-forge updater bot to rebuild the package automatically for new versions.

See here: conda-forge/staged-recipes#8499. Thanks!

ERROR: ACPYPE FAILED: No module named 'openbabel'

=========================================================================== ERROR: ACPYPE FAILED: No module named 'openbabel' Traceback (most recent call last): File "/mnt/c/Users/ADesktop/gromac_trail/acpype/acpype/cli.py", line 109, in init_main molecule = ACTopol( File "/mnt/c/Users/A/Desktop/gromac_trail/acpype/acpype/topol.py", line 3271, in init if self.checkSmiles(): File "/mnt/c/Users/A/Desktop/gromac_trail/acpype/acpype/topol.py", line 352, in checkSmiles if checkOpenBabelVersion() >= 300: File "/mnt/c/Users/A/Desktop/gromac_trail/acpype/acpype/utils.py", line 18, in checkOpenBabelVersion import openbabel as obl ModuleNotFoundError: No module named 'openbabel' Total time of execution: less than a second Log tmp location: /tmp/tmp__19q4ap

I have installed acpype with git in ubuntu . and I also installed openbabel with sudo.
still I am getting this error.
i am trying the example only .
$ ./run_acpype.py -i CCCC

please help.

Acpype -I gives error `ACPYPE FAILED: Only ONE Residue is allowed for ACPYPE to work`

I have the was trying a ligand pub file with acpype
It's downloadable here.

But I get the following error

 $ acpype -i my_ligand.pdb
============================================================================
| ACPYPE: AnteChamber PYthon Parser interfacE v. 2021.12.14 (c) 2021 AWSdS |
============================================================================
ERROR: more than one residue detected '{'PRO', 'GLN', 'LYS', 'TYR', 'THR', 'HIS', 'GLU', 'ASN', 'SER', 'CYS', 'ASP', 'GLY', 'PHE', 'MET', 'VAL', 'ALA', 'ARG'}'
ERROR: verify your input file 'my_ligand.pdb'. Aborting ...
ACPYPE FAILED: Only ONE Residue is allowed for ACPYPE to work
Total time of execution: less than a second

How can I resolve it?

-GV

ACPYPE fails with "Substring not found" error

Hi,

I have a .prm and a .crd file for use in AMBER that I would like to convert to gromacs, however when I run the following command:

acpype.py -x mol_coord.crd -p mol-tor.prm -n 0 -o gmx

I get the following error in the output:

========================================================================================
| ACPYPE: AnteChamber PYthon Parser interfacE v. 2018-09-20T16:44:17UTC (c) 2019 AWSdS |
========================================================================================
Converting Amber input files to Gromacs ...
ACPYPE FAILED: substring not found
Total time of execution: less than a second

I subsequently ran the same command using the -d flag to get more details and got the following:

========================================================================================
| ACPYPE: AnteChamber PYthon Parser interfacE v. 2018-09-20T16:44:17UTC (c) 2019 AWSdS |
========================================================================================
DEBUG: Python Version 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
Converting Amber input files to Gromacs ...
ACPYPE FAILED: substring not found
  File "./acpype/acpype.py", line 3690, in <module>
    is_sorted=args.sorted, chiral=args.chiral)
  File "./acpype/acpype.py", line 3478, in __init__
    self.topo14Data.read_amber_topology(''.join(self.topFileData))
  File "./acpype/acpype.py", line 605, in read_amber_topology
    setattr(self, attributes[i], self.p7_array_read(buff, flag_strings[i]))
  File "./acpype/acpype.py", line 618, in p7_array_read
    i = buff.index(flag_string)
Total time of execution: less than a second

Could you provide any insight into why this might be happening and what the fix is?

Thanks!
-Sukrit

Does Acpype perform Ligand Restraint?

Hi Alan,

This is not an issue, but general question on this great tool.

I can successfully execute the excellent Tutorial Using ACPYPE for GROMACS.

I wonder if ACPYPE as executed in that tutorial also performs Ligand Restraint.
The Ligand Restraint I refer to is as described in GROMACS Protein-Ligand equilibration tutorial.

However, I noticed that under Ligand.acpype/ directory, one can find posre_Ligand.itp file.
I'm not sure if it is the one and if it's actually used in final output.

Thanks and hope to hear from you again.

G.V.

acpype error

Hi guys
I have this problem,
anyone can help me please?

ACPYPE: AnteChamber PYthon Parser interfacE v. 2022.8.25 (c) 2022 AWSdS |

WARNING: no charge value given, trying to guess one...
==> ... charge set to 0
==> ... converting pdb input file to mol2 input file
==> * Babel OK *
==> Executing Antechamber...
ERROR: ++++++++++start_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR:
Welcome to antechamber 21.0: molecular input file processor.

The atom type is set to gaff2; the options available to the -at flag are
gaff, gaff2, amber, bcc, and sybyl.
Info: Finished reading file (Lig70.mol2); atoms read (120), bonds read (130).
Info: Determining atomic numbers from atomic symbols which are case sensitive.
Running: /home/sajad/acpype/acpype/amber21-11_linux/bin/bondtype -j full -i ANTECHAMBER_BOND_TYPE.AC0 -o ANTECHAMBER_BOND_TYPE.AC -f ac
Warning: The assigned bond types may be wrong, please :
(1) double check the structure (the connectivity) and/or
(2) adjust atom valence penalty parameters in APS.DAT, and/or
(3) increase PSCUTOFF in define.h and recompile bondtype.c
(be cautious, using a large value of PSCUTOFF (>100) will
significantly increase the computation time).

Running: /home/sajad/acpype/acpype/amber21-11_linux/bin/atomtype -i ANTECHAMBER_AC.AC0 -o ANTECHAMBER_AC.AC -p gaff2
Info: Total number of electrons: 721; net charge: 0
Info: The number of electrons is odd (721).
Please check the total charge (-nc flag) and spin multiplicity (-m flag).

Running: /home/sajad/acpype/acpype/amber21-11_linux/bin/sqm -O -i sqm.in -o sqm.out
/home/sajad/acpype/acpype/amber21-11_linux/bin/wrapped_progs/antechamber: Fatal Error!
Cannot properly run "/home/sajad/acpype/acpype/amber21-11_linux/bin/sqm -O -i sqm.in -o sqm.out".

ERROR: ++++++++++end_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Antechamber failed
ERROR: ++++++++++start_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Cannot open file (Lig70_bcc_gaff2.mol2) with mode (r).
No such file or directory
ERROR: ++++++++++end_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Parmchk failed
ERROR: Tleap failed
==> Removing temporary files...
ERROR: ACPYPE FAILED: [Errno 2] No such file or directory: 'Lig70_AC.prmtop'
Traceback (most recent call last):
File "/home/sajad/acpype/acpype/cli.py", line 140, in init_main
molecule.createMolTopol()
File "/home/sajad/acpype/acpype/topol.py", line 1116, in createMolTopol
self.topFileData = open(self.acTopFileName).readlines()
FileNotFoundError: [Errno 2] No such file or directory: 'Lig70_AC.prmtop'
Total time of execution: 1s

Conda installs "full" ambertools, no writing of CHARMM ff files

Hey!

I'm trying to generate CHARMM ff files alongside the rest of the output; however, my conda installation, performed as:
conda create -n acpype
conda install -c conda-forge acpype
Installs version 23.3 of ambertools, not the "stripped back" version (I see the explanation in Issue #14)
Any suggestions on how to modify the version of AmberTools without breaking the rest of the dependencies?

All the best, cheers!

Adding atoms on top of existing atoms

I have had this issue with a few molecules that I have tried passing into ACPYPE. Even a small test case generates these errors. The

Generate input file with obabel -:"[Li+]" -o mol2 -O li.mol2 --gen3D. The contents are:

@<TRIPOS>MOLECULE
*****
 1 0 0 0 0
SMALL
GASTEIGER

@<TRIPOS>ATOM
      1 LI          1.0009    0.0999    0.0039 Li      1  UNL1        0.0000
@<TRIPOS>UNITY_ATOM_ATTR
1 1
charge 1
@<TRIPOS>BOND

When I try to run ACPYPE via acpype -i li.mol2 -n 1 (since +1 charge), it gives the following output:

=========================================================================================
| ACPYPE: AnteChamber PYthon Parser interfacE v. 2020-10-24T12:16:34CEST (c) 2021 AWSdS |
=========================================================================================
ERROR: more than one residue detected '{'MOL', 'UNL'}'
ERROR: verify your input file 'li.mol2'. Aborting ...

By simply renaming the residue in the li.mol2 file, it gets a little farther. However, then I get the following:

=========================================================================================
| ACPYPE: AnteChamber PYthon Parser interfacE v. 2020-10-24T12:16:34CEST (c) 2021 AWSdS |
=========================================================================================
ERROR: Atoms with same coordinates in 'li.mol2'!
++++++++++start_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ATOM 1 Li 1.001 0.100 0.004
ATOM 2 Li1 1.001 0.100 0.004
ATOM 3 Li2 1.001 0.100 0.004
ATOM 4 Li3 1.001 0.100 0.004
++++++++++end_quote+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR: Use '-f' option if you want to proceed anyway. Aborting ...

This looks like it made it into a Li4 complex, but all the atoms are in the same location. With some other cases I was trying, it added 3 H atoms on top of an existing one, or added some F atoms on top of an existing one.

ModuleNotFoundError: No module named 'openbabel'

Hi Alan, I have upgraded my conda, and I get this error to running acpype,

| ACPYPE: AnteChamber PYthon Parser interfacE v. 2022.1.3 (c) 2022 AWSdS |

WARNING: no charge value given, trying to guess one...
==> ... charge set to 0
==> ... converting pdb input file to mol2 input file
==> * Babel OK *
==> Executing Antechamber...
==> AC output file present... doing nothing
==> * Antechamber OK *
==> * Parmchk OK *
==> Topologies files already present... doing nothing
==> * Tleap OK *
==> Removing temporary files...
ERROR: ACPYPE FAILED: No module named 'openbabel'
Traceback (most recent call last):
File "/home/renoir/anaconda3/lib/python3.9/site-packages/acpype/cli.py", line 141, in init_main
molecule.createMolTopol()
File "/home/renoir/anaconda3/lib/python3.9/site-packages/acpype/topol.py", line 1108, in createMolTopol
self.molTopol = MolTopol(
File "/home/renoir/anaconda3/lib/python3.9/site-packages/acpype/topol.py", line 3419, in init
self.getChirals()
File "/home/renoir/anaconda3/lib/python3.9/site-packages/acpype/topol.py", line 1446, in getChirals
if checkOpenBabelVersion() >= 300:
File "/home/renoir/anaconda3/lib/python3.9/site-packages/acpype/utils.py", line 18, in checkOpenBabelVersion
import openbabel as obl
ModuleNotFoundError: No module named 'openbabel'
Total time of execution: less than a second
Do you know solved this problem?
I can run obabel with terminal but getting eror when i run acpype -i Ligand.pdb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.