ACPYPE
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 onAntechamberandOpenBabel -
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:
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
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
What ACPYPE does in one command
acpype has two modes, and both are a single command.
Starting from a small molecule — a .mol2, .pdb, .mdl/.mol file, or even a
SMILES string — acpype drives the whole AmberTools pipeline for you:
acpype -i molecule.mol2 -b MOL -c bcc -n 0 -a gaff2
That one line does the work of three separate AmberTools runs:
| Step | Tool | What it does |
|---|---|---|
| 1 | antechamber |
assigns GAFF/GAFF2 atom types and computes partial charges |
| 2 | parmchk2 |
fills in any missing force field parameters (the frcmod) |
| 3 | tleap |
builds the AMBER topology and coordinates |
and then converts the result into GROMACS, CNS/XPLOR and CHARMM formats as
well, all into a single MOL.acpype/ folder. There is no need to run antechamber,
parmchk2 and tleap yourself, or to convert between formats afterwards.
Starting from existing AMBER files — if you already have a prmtop/inpcrd pair
from LEaP, acpype converts them to GROMACS without needing AmberTools at all:
acpype -p FFF_AC.prmtop -x FFF_AC.inpcrd
Useful options for the first mode: -c charge method (bcc, abcg2, gas, user
— abcg2 is AmberTools' newer method, recommended for GAFF2), -n net
charge, -a atom types (gaff2, gaff, amber, amber2), -o which topologies to
write (all, gmx, cns, charmm), and -r the antechamber atom/bond type
prediction index if the default perception struggles with your molecule. Run
acpype -h for the full list and for what every output file is.
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:
-
Via CONDA:
(It should be wholesome, fully functional, all batteries included)
conda install -c conda-forge acpype
-
Via PyPI:
pip install acpype
acpypeships theAmberToolsbinaries it needs (currently AmberTools 26) as platform-specific wheels:Platform Wheel Batteries included Linux x86_64, glibc >= 2.35 (Ubuntu 22.04+, Debian 12+)manylinux_2_35_x86_64yes macOS Apple Silicon, macOS 11+ macosx_11_0_arm64yes anything else (Intel macOS, Linux aarch64, Windows)source distribution no -- supply your own AmberToolsOn a platform with no wheel,
pipfalls back to the source distribution, which is the same ACPYPE without the bundled binaries. It works fine against anAmberToolsyou install yourself; if none is found, ACPYPE says so and points you atconda.On those two platforms
pip install acpypeis a complete solution. A handful of common system libraries are deliberately left to the host on Linux:# Ubuntu 22.04 / 24.04, Debian 12+ -- needed by the bundled AmberTools apt-get install -y libgfortran5 libstdc++6 libgomp1 libblas3 liblapack3 libcurl4 # needed by the openbabel wheel that `pip install acpype` pulls in apt-get install -y libxrender1 libxext6 libsm6
Anywhere else, install
AmberToolsyourself 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 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
Pythonenvironment ofacpype. -
By downloading it via
git:(Make sure you have
AmberToolsand, 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 22.04 / 24.04: apt-get install -y openbabel python3-openbabel libgfortran5 libblas3 liblapack3 git clone https://github.com/alanwilter/acpype.git
NB: Using this mode, CHARMM topology files will not be generated.
-
Via Docker:
(It should be wholesome, fully functional, all batteries included)
If you have Docker installed, you can run
acpype_docker.shby:NOTE: first time may take some time as it pulls the
acpypedocker 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.batfile is found:setx /M path "%path%;%cd%"
Commands:
acpype_docker -i CCCC acpype_docker -i tests/DDD.pdb -c gas
NB: what you get depends on how you install:
-
Via
pipand viadockeryou get a strippedAmberTools 26embedded -- only the binaries and librariesacpypeneeds -- so CHARMM topologies work out of the box. That applies to the Linuxx86_64and macOS Apple Silicon wheels (see the table above) and to thedockerimage. Elsewherepipinstalls the source distribution, which carries no binaries and needs anAmberToolsof your own. -
Via
condathe build comes from the conda-forge feedstock, which lags this repository and so still carries the older embeddedAmberTools. It also pullsambertoolsandopenbabelas conda packages, and it is thatantechamberwhich ends up on yourPATH. -
OpenBabelis3.1.1viaconda/docker, and3.1.0viapip(from theopenbabel-wheeldependency). -
charmmgenis not part of modernAmberTools, and conda-forge'sambertoolsdoes not ship it, soacpypebuilds its own from the source still maintained in AmberClassic: universalarm64+x86_64on macOS,x86_64on Linux. Seescripts/build_charmmgen.sh. If CHARMM output fails because theantechamberon yourPATHcannot find it, copy the bundled one next to thatantechamber:sys=$(python3 -c "import sys; print('macos' if sys.platform == 'darwin' else 'linux')") acp=$(python3 -c "import acpype, os; print(os.path.dirname(acpype.__file__))") cp "${acp}/amber_${sys}/bin/charmmgen" "$(dirname "$(which antechamber)")"
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
- see TutorialNAMD
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acpype-2026.9.2.tar.gz.
File metadata
- Download URL: acpype-2026.9.2.tar.gz
- Upload date:
- Size: 74.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36cae956f1137a6013eab7131802ce1cfe64fd37da1b12784a7e940ce3b55aea
|
|
| MD5 |
a88224c9cbf96dcd592953b9aad8ae29
|
|
| BLAKE2b-256 |
20e9369e6ad1cc899ceaf0a7cbfb925b628075965f82490868e0763f8f3ba2b3
|
Provenance
The following attestation bundles were made for acpype-2026.9.2.tar.gz:
Publisher:
check_acpype.yml on alanwilter/acpype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acpype-2026.9.2.tar.gz -
Subject digest:
36cae956f1137a6013eab7131802ce1cfe64fd37da1b12784a7e940ce3b55aea - Sigstore transparency entry: 2689243492
- Sigstore integration time:
-
Permalink:
alanwilter/acpype@d75e5b2e1ece0254869f9fe7313606d2067e69c8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alanwilter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
check_acpype.yml@d75e5b2e1ece0254869f9fe7313606d2067e69c8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file acpype-2026.9.2-py3-none-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: acpype-2026.9.2-py3-none-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 48.7 MB
- Tags: Python 3, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df2f4c951dedb96f32b674cb12eb54b59b8676afdb7a2cec6faf338e9d1e822c
|
|
| MD5 |
0b1d2eb05194ab841579f5a6f36df9df
|
|
| BLAKE2b-256 |
17f0615526d2a1db24cdf45fa2313b6d9854da0b8a5a443d46152f0044311506
|
Provenance
The following attestation bundles were made for acpype-2026.9.2-py3-none-manylinux_2_35_x86_64.whl:
Publisher:
check_acpype.yml on alanwilter/acpype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acpype-2026.9.2-py3-none-manylinux_2_35_x86_64.whl -
Subject digest:
df2f4c951dedb96f32b674cb12eb54b59b8676afdb7a2cec6faf338e9d1e822c - Sigstore transparency entry: 2689244598
- Sigstore integration time:
-
Permalink:
alanwilter/acpype@d75e5b2e1ece0254869f9fe7313606d2067e69c8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alanwilter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
check_acpype.yml@d75e5b2e1ece0254869f9fe7313606d2067e69c8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file acpype-2026.9.2-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: acpype-2026.9.2-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 69.1 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5282ce4910a0026baf13ac8a8f710a74e5abaf60f1921007124f1121a15310e1
|
|
| MD5 |
f54ba3625e3bc2b5b9fa04a84166a213
|
|
| BLAKE2b-256 |
e018bbe73253ca5d1caf0a02107d4dad6a781b09b84a127e712ded291d12c86e
|
Provenance
The following attestation bundles were made for acpype-2026.9.2-py3-none-macosx_11_0_arm64.whl:
Publisher:
check_acpype.yml on alanwilter/acpype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acpype-2026.9.2-py3-none-macosx_11_0_arm64.whl -
Subject digest:
5282ce4910a0026baf13ac8a8f710a74e5abaf60f1921007124f1121a15310e1 - Sigstore transparency entry: 2689244074
- Sigstore integration time:
-
Permalink:
alanwilter/acpype@d75e5b2e1ece0254869f9fe7313606d2067e69c8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alanwilter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
check_acpype.yml@d75e5b2e1ece0254869f9fe7313606d2067e69c8 -
Trigger Event:
push
-
Statement type: