# Why did I get an error related to the terminal caps?

**URL:** <https://gromacs.bioexcel.eu/t/why-did-i-get-an-error-related-to-the-terminal-caps/3291>\
**Category:** User discussions\
**Tags:** pdb2gmx, forcefield\
**Created:** [December 13, 2021, 12:28am UTC](https://gromacs.bioexcel.eu/t/why-did-i-get-an-error-related-to-the-terminal-caps/3291 "2021-12-13T00:28:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Natsulait](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/natsulait/32/1045_2.png) [@Natsulait](https://gromacs.bioexcel.eu/u/Natsulait)\
**Post date:** [December 13, 2021, 12:28am UTC](https://gromacs.bioexcel.eu/t/why-did-i-get-an-error-related-to-the-terminal-caps/3291/1 "2021-12-13T00:28:45Z")

</div>

GROMACS version: gmx pdb2gmx, version 2021.3  
GROMACS modification: No

Purpose: To cap both termini of a protein by ACE and NME and make the topology file.  
My attempt:

1. To add ACE and NME by PyMOL and NME is renamed to CT1.
2. `gmx pdb2gmx -ff charmm27 -f protein_test.pdb -water tip3p`

I tried to make the topology file via `gmx pdb2gmx` command, but I failed and got the following error.  
Could you please help me to resolve this issue?

```auto
$ bash test.sh
                     :-) GROMACS - gmx pdb2gmx, 2021.3 (-:

                            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.3
Executable: /Users/me/.local/gromacs-2021.3/build/bin/gmx
Data prefix: /Users/me/.local/gromacs-2021.3 (source tree)
Working dir: /Users/me/Dropbox/00_Research/16_koff_estimation/data/02_prep_system/thrombin/1bmn/test
Command line:
  gmx pdb2gmx -f protein_test.pdb -ff charmm27 -water tip3p

Using the Charmm27 force field in directory charmm27.ff

going to rename charmm27.ff/aminoacids.r2b
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/aminoacids.r2b

going to rename charmm27.ff/rna.r2b
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/rna.r2b
Reading protein_test.pdb...
Read '', 91 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 11 residues with 91 atoms

  chain #res #atoms

  1 'I' 11 91

All occupancies are one
All occupancies are one
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/atomtypes.atp

Reading residue database... (Charmm27)
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/aminoacids.rtp
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/dna.rtp
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/lipids.rtp
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/rna.rtp
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/aminoacids.hdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/dna.hdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/lipids.hdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/rna.hdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/aminoacids.n.tdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/dna.n.tdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/rna.n.tdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/aminoacids.c.tdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/dna.c.tdb
Opening force field file /Users/me/.local/gromacs-2021.3/share/top/charmm27.ff/rna.c.tdb

Processing chain 1 'I' (91 atoms, 11 residues)

Identified residue ACE55 as a starting terminus.

Identified residue CT364 as a ending terminus.
8 out of 8 lines of specbond.dat converted successfully
Start terminus ACE-55: NH3+
End terminus CT3-64: CT3

-------------------------------------------------------
Program: gmx pdb2gmx, version 2021.3
Source file: src/gromacs/gmxpreprocess/pdb2top.cpp (line 1104)

Fatal error:
atom N not found in buiding block 1ACE while combining tdb and rtp

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------

```

---

<div class="post-metadata">

**Author:** ![scinikhil](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/scinikhil/32/3483_2.png) [@scinikhil](https://gromacs.bioexcel.eu/u/scinikhil)\
**Post date:** [December 13, 2021, 7:51am UTC](https://gromacs.bioexcel.eu/t/why-did-i-get-an-error-related-to-the-terminal-caps/3291/2 "2021-12-13T07:51:38Z")

</div>

What are you trying to build? The error says There is a mismatching or missing atoms from your input pdb with that of files in ff. Also, did you tried with -ter flag?

---

<div class="post-metadata">

**Author:** ![ebriand](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/ebriand/32/2314_2.png) [@ebriand](https://gromacs.bioexcel.eu/u/ebriand)\
**Post date:** [December 13, 2021, 7:57am UTC](https://gromacs.bioexcel.eu/t/why-did-i-get-an-error-related-to-the-terminal-caps/3291/3 "2021-12-13T07:57:43Z")

</div>

ACE and NME cap require an empty terminus (“None”). The default behavior of pdb2gmx is to try to add NH3+ and COO- terminus as for a normal peptide. As suggested, use the `-ter` command line flag and select None for terminus at both end.

---

<div class="post-metadata">

**Author:** ![Natsulait](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/natsulait/32/1045_2.png) [@Natsulait](https://gromacs.bioexcel.eu/u/Natsulait)\
**Post date:** [December 13, 2021, 9:26am UTC](https://gromacs.bioexcel.eu/t/why-did-i-get-an-error-related-to-the-terminal-caps/3291/4 "2021-12-13T09:26:32Z")

</div>

> ACE and NME cap require an empty terminus (“None”). The default behavior of pdb2gmx is to try to add NH3+ and COO- terminus as for a normal peptide. As suggested, use the `-ter` command line flag and select None for terminus at both end.

Thank you. I have resolved the issue.  
I did not know how `-ter None` works. After using `-ter` flag and selecting `None`, I succeed in getting a structure whose termini are capped by aceyl and nmetyl groups :)
