GROMACS version:2021.5
GROMACS modification: No
Hi,
I have a library of peptides for which I would like to generate topology files by calling pdb2gmx from within a python script. curiously, when I call the program from the UNIX terminal, it works properly and generates the desired output. however, when I call the very same command from python, using subprocess.call, i get a very specific error - the program complains about a missing CB atom in a glycine residue (??!!!) and aborts.
the minimal file required to reproduce the error is (test.pdb) :
ATOM 1 N GLY B 1 12.178 -32.873 -9.077 1.00 61.97 N
ATOM 2 CA GLY B 1 12.502 -32.090 -7.895 1.00 61.97 C
ATOM 3 C GLY B 1 11.588 -30.895 -7.702 1.00 61.97 C
ATOM 4 O GLY B 1 11.601 -30.261 -6.644 1.00 61.97 O
the normal output of pdb2gmx, run from the console, is :
echo ‘9’ | gmx pdb2gmx -f test.pdb -o protein.gro -p protein.top -ignh -water tip3p
:-) GROMACS - gmx pdb2gmx, 2021.5 (-:
GROMACS is written by:
Andrey Alekseenko Emile Apol Rossen Apostolov
Paul Bauer Herman J.C. Berendsen Par Bjelkmar
Christian Blau Viacheslav Bolnykh Kevin Boyd
Aldert van Buuren Rudi van Drunen Anton Feenstra
Gilles Gouaillardet Alan Gray Gerrit Groenhof
Anca Hamuraru Vincent Hindriksen M. Eric Irrgang
Aleksei Iupinov Christoph Junghans Joe Jordan
Dimitrios Karkoulis Peter Kasson Jiri Kraus
Carsten Kutzner Per Larsson Justin A. Lemkul
Viveca Lindahl Magnus Lundborg Erik Marklund
Pascal Merz Pieter Meulenhoff Teemu Murtola
Szilard Pall Sander Pronk Roland Schulz
Michael Shirts Alexey Shvetsov Alfons Sijbers
Peter Tieleman Jon Vincent Teemu Virolainen
Christian Wennberg Maarten Wolf Artem Zhmurov
and the project leaders:
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2019, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.
GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
GROMACS: gmx pdb2gmx, version 2021.5
Executable: /usr/local/gromacs/bin/gmx
Data prefix: /usr/local/gromacs
Working dir: /mnt/NAS/AlphaFold/EUVEN/V1/Alpha/_P00006/Model_0
Command line:
gmx pdb2gmx -f test.pdb -o protein.gro -p protein.top -ignh -water tip3p
Select the Force Field:
From ‘/usr/local/gromacs/share/gromacs/top’:
1: AMBER03 protein, nucleic AMBER94 (Duan et al., J. Comp. Chem. 24, 1999-2012, 2003)
2: AMBER94 force field (Cornell et al., JACS 117, 5179-5197, 1995)
3: AMBER96 protein, nucleic AMBER94 (Kollman et al., Acc. Chem. Res. 29, 461-469, 1996)
4: AMBER99 protein, nucleic AMBER94 (Wang et al., J. Comp. Chem. 21, 1049-1074, 2000)
5: AMBER99SB protein, nucleic AMBER94 (Hornak et al., Proteins 65, 712-725, 2006)
6: AMBER99SB-ILDN protein, nucleic AMBER94 (Lindorff-Larsen et al., Proteins 78, 1950-58, 2010)
7: AMBERGS force field (Garcia & Sanbonmatsu, PNAS 99, 2782-2787, 2002)
8: CHARMM27 all-atom force field (CHARM22 plus CMAP for proteins)
9: CHARMM36 all-atom force field
10: GROMOS96 43a1 force field
11: GROMOS96 43a2 force field (improved alkane dihedrals)
12: GROMOS96 45a3 force field (Schuler JCC 2001 22 1205)
13: GROMOS96 53a5 force field (JCC 2004 vol 25 pag 1656)
14: GROMOS96 53a6 force field (JCC 2004 vol 25 pag 1656)
15: GROMOS96 54a7 force field (Eur. Biophys. J. (2011), 40, 843-856, DOI: 10.1007/s00249-011-0700-9)
16: OPLS-AA/L all-atom force field (2001 aminoacid dihedrals)
Using the Charmm36-jul2021 force field in directory charmm36-jul2021.ff
going to rename charmm36-jul2021.ff/aminoacids.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.r2b
going to rename charmm36-jul2021.ff/carb.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.r2b
going to rename charmm36-jul2021.ff/cgenff.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.r2b
going to rename charmm36-jul2021.ff/ethers.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.r2b
going to rename charmm36-jul2021.ff/lipid.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.r2b
going to rename charmm36-jul2021.ff/metals.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.r2b
going to rename charmm36-jul2021.ff/na.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.r2b
going to rename charmm36-jul2021.ff/silicates.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.r2b
going to rename charmm36-jul2021.ff/solvent.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.r2b
Reading test.pdb…
Read ‘’, 4 atoms
Analyzing pdb file
Splitting chemical chains based on TER records or chain id changing.
There are 1 chains and 0 blocks of water and 1 residues with 4 atoms
chain #res #atoms
1 ‘B’ 1 4
All occupancies are one
All occupancies are one
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/atomtypes.atp
Reading residue database… (Charmm36-jul2021)
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.c.tdb
Processing chain 1 ‘B’ (4 atoms, 1 residues)
Identified residue GLY1 as a starting terminus.
Identified residue GLY1 as a ending terminus.
8 out of 8 lines of specbond.dat converted successfully
Start terminus GLY-1: GLY-NH3+
End terminus GLY-1: COO-
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.arn
Checking for duplicate atoms…
Generating any missing hydrogen atoms and/or adding termini.
Now there are 1 residues with 10 atoms
Making bonds…
Number of bonds was 9, now 9
Generating angles, dihedrals and pairs…
Before cleaning: 15 pairs
Before cleaning: 15 dihedrals
Keeping all generated dihedrals
Making cmap torsions…
There are 15 dihedrals, 1 impropers, 15 angles
15 pairs, 9 bonds and 0 virtual sites
Total mass 75.068 a.m.u.
Total charge 0.000 e
Writing topology
Writing coordinate file…
--------- PLEASE NOTE ------------
You have successfully generated a topology from: test.pdb.
The Charmm36-jul2021 force field and the tip3p water model are used.
--------- ETON ESAELP ------------
GROMACS reminds you: “The absence of real intelligence doesn’t prove you’re using AI” (Magnus Lundborg)
however, when the above command is executed via
subprocess.call(“. /usr/local/gromacs/bin/GMXRC; echo ‘9’ | gmx pdb2gmx -f test.pdb -o protein.gro -p protein.top -ignh -water tip3p”, shell=True)
i get :
:-) GROMACS - gmx pdb2gmx, 2021.5 (-:
GROMACS is written by:
Andrey Alekseenko Emile Apol Rossen Apostolov
Paul Bauer Herman J.C. Berendsen Par Bjelkmar
Christian Blau Viacheslav Bolnykh Kevin Boyd
Aldert van Buuren Rudi van Drunen Anton Feenstra
Gilles Gouaillardet Alan Gray Gerrit Groenhof
Anca Hamuraru Vincent Hindriksen M. Eric Irrgang
Aleksei Iupinov Christoph Junghans Joe Jordan
Dimitrios Karkoulis Peter Kasson Jiri Kraus
Carsten Kutzner Per Larsson Justin A. Lemkul
Viveca Lindahl Magnus Lundborg Erik Marklund
Pascal Merz Pieter Meulenhoff Teemu Murtola
Szilard Pall Sander Pronk Roland Schulz
Michael Shirts Alexey Shvetsov Alfons Sijbers
Peter Tieleman Jon Vincent Teemu Virolainen
Christian Wennberg Maarten Wolf Artem Zhmurov
and the project leaders:
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2019, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.
GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
GROMACS: gmx pdb2gmx, version 2021.5
Executable: /usr/local/gromacs/bin/gmx
Data prefix: /usr/local/gromacs
Working dir: /mnt/NAS/AlphaFold/EUVEN/V1/Alpha/_P00006/Model_0
Command line:
gmx pdb2gmx -f test2.pdb -o protein.gro -p protein.top -ignh -water tip3p
Select the Force Field:
From ‘/usr/local/gromacs/share/gromacs/top’:
1: AMBER03 protein, nucleic AMBER94 (Duan et al., J. Comp. Chem. 24, 1999-2012, 2003)
2: AMBER94 force field (Cornell et al., JACS 117, 5179-5197, 1995)
3: AMBER96 protein, nucleic AMBER94 (Kollman et al., Acc. Chem. Res. 29, 461-469, 1996)
4: AMBER99 protein, nucleic AMBER94 (Wang et al., J. Comp. Chem. 21, 1049-1074, 2000)
5: AMBER99SB protein, nucleic AMBER94 (Hornak et al., Proteins 65, 712-725, 2006)
6: AMBER99SB-ILDN protein, nucleic AMBER94 (Lindorff-Larsen et al., Proteins 78, 1950-58, 2010)
7: AMBERGS force field (Garcia & Sanbonmatsu, PNAS 99, 2782-2787, 2002)
8: CHARMM27 all-atom force field (CHARM22 plus CMAP for proteins)
9: CHARMM36 all-atom force field
10: GROMOS96 43a1 force field
11: GROMOS96 43a2 force field (improved alkane dihedrals)
12: GROMOS96 45a3 force field (Schuler JCC 2001 22 1205)
13: GROMOS96 53a5 force field (JCC 2004 vol 25 pag 1656)
14: GROMOS96 53a6 force field (JCC 2004 vol 25 pag 1656)
15: GROMOS96 54a7 force field (Eur. Biophys. J. (2011), 40, 843-856, DOI: 10.1007/s00249-011-0700-9)
16: OPLS-AA/L all-atom force field (2001 aminoacid dihedrals)
Using the Charmm36-jul2021 force field in directory charmm36-jul2021.ff
going to rename charmm36-jul2021.ff/aminoacids.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.r2b
going to rename charmm36-jul2021.ff/carb.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.r2b
going to rename charmm36-jul2021.ff/cgenff.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.r2b
going to rename charmm36-jul2021.ff/ethers.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.r2b
going to rename charmm36-jul2021.ff/lipid.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.r2b
going to rename charmm36-jul2021.ff/metals.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.r2b
going to rename charmm36-jul2021.ff/na.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.r2b
going to rename charmm36-jul2021.ff/silicates.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.r2b
going to rename charmm36-jul2021.ff/solvent.r2b
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.r2b
Reading test2.pdb…
Read ‘’, 4 atoms
Analyzing pdb file
Splitting chemical chains based on TER records or chain id changing.
There are 1 chains and 0 blocks of water and 1 residues with 4 atoms
chain #res #atoms
1 ‘B’ 1 4
All occupancies are one
All occupancies are one
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/atomtypes.atp
Reading residue database… (Charmm36-jul2021)
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.rtp
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.hdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.n.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/carb.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/cgenff.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/ethers.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/lipid.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/metals.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/na.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/silicates.c.tdb
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/solvent.c.tdb
Back Off! I just backed up protein.top to ./#protein.top.2#
Processing chain 1 ‘B’ (4 atoms, 1 residues)
Identified residue GLY1 as a starting terminus.
Identified residue GLY1 as a ending terminus.
8 out of 8 lines of specbond.dat converted successfully
Start terminus GLY-1: GLY-NH3+
End terminus GLY-1: COO-
Opening force field file /usr/local/gromacs/share/gromacs/top/charmm36-jul2021.ff/aminoacids.arn
Checking for duplicate atoms…
Generating any missing hydrogen atoms and/or adding termini.
Program: gmx pdb2gmx, version 2021.5
Source file: src/gromacs/gmxpreprocess/pgutil.cpp (line 151)
Fatal error:
Residue 1 named GLY of a molecule in the input file was mapped
to an entry in the topology database, but the atom CB used in
that entry is not found in the input file. Perhaps your atom
and/or residue naming needs to be fixed.
For more information and tips for troubleshooting, please check the GROMACS
website at Common Errors — GROMACS webpage https://www.gromacs.org documentation
it is unclear from the error message to which entry in the database the GLY residue was mapped; however, the relevant rtp file does contain a proper [ GLY ] entry that does not reference a CB(??!!!) atom. the error persisted when the said Gly was part of a much larger structure with multiple Gly residues (non of which invoked an error), so it may have to do with the glycine location at the c-terminus. The error is prevented if I use charmm27 instead of charmm36.
I hope that the above information is sufficient to pinpoint the issue, would appreciate any help.
Yours,
Izhar.