# Pdb2gmx Error - molecule in input file was mapped to entry in topology, but atom not found

**URL:** <https://gromacs.bioexcel.eu/t/pdb2gmx-error-molecule-in-input-file-was-mapped-to-entry-in-topology-but-atom-not-found/6553>\
**Category:** User discussions\
**Tags:** pdb2gmx\
**Created:** [June 6, 2023, 1:00pm UTC](https://gromacs.bioexcel.eu/t/pdb2gmx-error-molecule-in-input-file-was-mapped-to-entry-in-topology-but-atom-not-found/6553 "2023-06-06T13:00:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zeer](https://avatars.discourse-cdn.com/v4/letter/z/dfb087/32.png) [@Zeer](https://gromacs.bioexcel.eu/u/Zeer)\
**Post date:** [June 6, 2023, 1:00pm UTC](https://gromacs.bioexcel.eu/t/pdb2gmx-error-molecule-in-input-file-was-mapped-to-entry-in-topology-but-atom-not-found/6553/1 "2023-06-06T13:00:17Z")

</div>

GROMACS version:  
GROMACS modification: Yes/ **No**  
Here post your question

gmx 2020.6-Debian-2020.6-2 - not modified

Hello Gromacs Developers and Users,

I have been trying to setup a system for my protein structure (Rhodopsin with the retinal chromophore) via the module ‘pdb2gmx’ and have been receiving the following error (output from pdb2gmx):

Command line:  
gmx pdb2gmx -f LYS+RET.pdb -o neo.gro -p a-ARM\_Rh\_GLH-181\_CASTp\_18273.top -ff amber94 -water tip3p

Force field ‘amber94’ occurs in 2 places. pdb2gmx is using the one in the  
current directory. Use interactive selection (not the -ff option) if  
you would prefer a different one.

Using the Amber94 force field in directory ./amber94.ff

going to rename ./amber94.ff/aminoacids.r2b  
Opening force field file ./amber94.ff/aminoacids.r2b  
going to rename ./amber94.ff/dna.r2b  
Opening force field file ./amber94.ff/dna.r2b  
going to rename ./amber94.ff/rna.r2b  
Opening force field file ./amber94.ff/rna.r2b  
Reading LYS+RET.pdb…  
Read ‘’, 3788 atoms  
Analyzing pdb file  
Splitting chemical chains based on TER records or chain id changing.  
There are 1 chains and 1 blocks of water and 251 residues with 3788 atoms

chain #res #atoms  
1 ’ ’ 238 3749  
2 ’ ’ 13 39 (only water)

All occupancy fields zero. This is probably not an X-Ray structure  
Opening force field file ./amber94.ff/atomtypes.atp  
Reading residue database… (Amber94)  
Opening force field file ./amber94.ff/aminoacids.rtp  
Opening force field file ./amber94.ff/dna.rtp  
Opening force field file ./amber94.ff/rna.rtp  
Opening force field file ./amber94.ff/aminoacids.hdb  
Opening force field file ./amber94.ff/dna.hdb  
Opening force field file ./amber94.ff/rna.hdb  
Opening force field file ./amber94.ff/aminoacids.n.tdb  
Opening force field file ./amber94.ff/aminoacids.c.tdb

Back Off! I just backed up a-ARM\_Rh\_GLH-181\_CASTp\_18273.top to ./#a-ARM\_Rh\_GLH-181\_CASTp\_18273.top.1#  
Processing chain 1 (3749 atoms, 238 residues)  
Identified residue LYS1 as a starting terminus.

Warning: Residue CL246 in chain has different type (‘Ion’) from  
residue LYS1 (‘Protein’). This chain lacks identifiers, which makes  
it impossible to do strict classification of the start/end residues. Here we  
need to guess this residue should not be part of the chain and instead  
introduce a break, but that will be catastrophic if they should in fact be  
linked. Please check your structure, and add CL to residuetypes.dat  
if this was not correct.

Warning: Residue CL247 in chain has different type (‘Ion’) from  
residue LYS1 (‘Protein’). This chain lacks identifiers, which makes  
it impossible to do strict classification of the start/end residues. Here we  
need to guess this residue should not be part of the chain and instead  
introduce a break, but that will be catastrophic if they should in fact be  
linked. Please check your structure, and add CL to residuetypes.dat  
if this was not correct.

Warning: Residue CL248 in chain has different type (‘Ion’) from  
residue LYS1 (‘Protein’). This chain lacks identifiers, which makes  
it impossible to do strict classification of the start/end residues. Here we  
need to guess this residue should not be part of the chain and instead  
introduce a break, but that will be catastrophic if they should in fact be  
linked. Please check your structure, and add CL to residuetypes.dat  
if this was not correct.

Warning: Residue CL249 in chain has different type (‘Ion’) from  
residue LYS1 (‘Protein’). This chain lacks identifiers, which makes  
it impossible to do strict classification of the start/end residues. Here we  
need to guess this residue should not be part of the chain and instead  
introduce a break, but that will be catastrophic if they should in fact be  
linked. Please check your structure, and add CL to residuetypes.dat  
if this was not correct.

Warning: Residue CL250 in chain has different type (‘Ion’) from  
residue LYS1 (‘Protein’). This chain lacks identifiers, which makes  
it impossible to do strict classification of the start/end residues. Here we  
need to guess this residue should not be part of the chain and instead  
introduce a break, but that will be catastrophic if they should in fact be  
linked. Please check your structure, and add CL to residuetypes.dat  
if this was not correct.

Disabling further warnings about unidentified residues at end of chain.  
Identified residue VAL232 as a ending terminus.  
8 out of 8 lines of specbond.dat converted successfully  
Special Atom Distance matrix:  
CYS24 MET41 MET46 MET47 CYS49 MET138 CYS139  
SG372 SD636 SD722 SD739 SG767 SD2163 SG2177  
MET41 SD636 2.067  
MET46 SD722 0.891 1.420  
MET47 SD739 1.323 1.573 0.627  
CYS49 SG767 1.042 1.408 0.890 1.017  
MET138 SD2163 3.410 2.740 3.200 2.972 2.424  
CYS139 SG2177 4.010 3.087 3.675 3.370 2.993 0.765  
CYS144 SG2257 2.913 1.787 2.450 2.196 1.875 1.123 1.319  
MET151 SD2368 2.870 1.189 2.266 2.128 1.905 1.883 2.029  
CYS172 SG2715 2.158 0.847 1.818 2.027 1.390 2.320 2.786  
CYS210 SG3345 1.996 1.939 2.103 2.241 1.258 1.828 2.539  
MET216 SD3440 1.006 1.228 0.928 1.340 0.598 2.764 3.343  
CYS144 MET151 CYS172 CYS210  
SG2257 SD2368 SG2715 SG3345  
MET151 SD2368 0.839  
CYS172 SG2715 1.638 1.232  
CYS210 SG3345 1.779 1.988 1.298  
MET216 SD3440 2.176 2.011 1.153 1.315  
Opening force field file ./amber94.ff/aminoacids.arn  
Opening force field file ./amber94.ff/dna.arn  
Opening force field file ./amber94.ff/rna.arn  
Checking for duplicate atoms…  
Generating any missing hydrogen atoms and/or adding termini.

* * *

Program: gmx pdb2gmx, version 2020.6-Debian-2020.6-2  
Source file: src/gromacs/gmxpreprocess/pgutil.cpp (line 130)

Fatal error:  
Residue 212 named RET of a molecule in the input file was mapped  
to an entry in the topology database, but the atom CM 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](http://www.gromacs.org/Documentation/Errors)

I had generated my .pdb structure from converting a Tinker-xyz file into pdb using a python script ([GitHub - emleddin/pdbxyz-xyzpdb: Scripts to convert between PDB to Tinker XYZ files, without using the existing TINKER programs for conversion.](https://github.com/emleddin/pdbxyz-xyzpdb)). Unfortunately, the residue IDs get a little messed up so I wrote a script to re-ordered the residue ID, as well as change all the atomic names to fit those in Amber94. Additionally, my ligand (chromophore) includes the Retinal chromophore along with the neighboring LYS residue. I am using a topology file that I had previously worked on with another rhodopsin structure which I was able to perform MD with (aminacids.top/.itp/.rtp within the amber94.ff/ directory has been modified to include the Retinal and Lysine as ‘RET’ and used on a previous structure which gave no errors/structural deformity). The current structure Im working on is a mutant of the previous rhodopsin, but differs by AA sequence/Retinal (cis/trans) isomer. So I figured that the same topology files should work for both structures.

Could anyone please explain what could be the issue here? And please let me know if additional files are required (e.g. the modified topology/etc. files).
