# Fatal error: Residue "NAG' not found in residue topology database

**URL:** <https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160>\
**Category:** User discussions\
**Created:** [November 3, 2022, 1:14am UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160 "2022-11-03T01:14:04Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanoriega](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hanoriega/32/1562_2.png) [@Hanoriega](https://gromacs.bioexcel.eu/u/Hanoriega)\
**Post date:** [November 3, 2022, 1:14am UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/1 "2022-11-03T01:14:04Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
Hello,

I have a glycan that is a part of my PEGylated protein and it gives me this error, is there a way around this? I am new to GROMACS and am unsure from the documentation how I can do this to run a MD simulation. Will the PEG also cause issues as well? Is there another software that can run the simulation. It is fairly large. Thanks in advance.

Program: gmx pdb2gmx, version 2020.1-Ubuntu-2020.1-1  
Source file: src/gromacs/gmxpreprocess/resall.cpp (line 557)

Fatal error:  
Residue ‘NAG’ not found in residue topology database

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)

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [November 3, 2022, 10:41am UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/2 "2022-11-03T10:41:57Z")

</div>

Did you visit the link provided? This is one of the most common errors users encounter, and gets asked constantly on the forum. If a residue is not already defined in the force field, you can’t use `pdb2gmx` to produce its topology. There is more information in the link.

---

<div class="post-metadata">

**Author:** ![Hanoriega](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hanoriega/32/1562_2.png) [@Hanoriega](https://gromacs.bioexcel.eu/u/Hanoriega)\
**Post date:** [November 3, 2022, 2:18pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/3 "2022-11-03T14:18:27Z")

</div>

Yes I did and it mentions the x2top, because the pdb2gmx can’t be used. I am still learning, so I think what I was curious about is if I did the:

gmx x2top -f xxxxx.pdb -o xxxxx.gro , would this work?

I have a glycan and PEG associated in the pdb file. So I am trying to figure out a way to calculate free energy and predictability of the binding affinities to the receptor. I know the receptor/antipeg and receptor/PEG bind but there is a decrease and I want to know why?

---

<div class="post-metadata">

**Author:** ![Hanoriega](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hanoriega/32/1562_2.png) [@Hanoriega](https://gromacs.bioexcel.eu/u/Hanoriega)\
**Post date:** [November 3, 2022, 2:24pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/4 "2022-11-03T14:24:07Z")

</div>

gmx 2xtop -f xxxx.pdb -o xxxxx.top \*\* excuse me this is was I meant, Would this foresee issues, it is running now. But it has this warning:

WARNING: all CONECT records are ignored  
Opening force field file /usr/share/gromacs/top/oplsaa.ff/atomname2type.n2t  
There are 23 name to type translations in file oplsaa.ff

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [November 3, 2022, 2:37pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/5 "2022-11-03T14:37:53Z")

</div>

If you want to use `x2top`, you have to basically already know the topology (atom types and partial charges) to build the topology. If you don’t have that, there’s no point trying. `x2top` is really only useful for the simplest of molecules, stuff like CNT or graphene, or trivially simple polymers, but it makes a lot of assumptions about how to assign parameters. I do not recommend it. You will need much more detailed and careful parametrization to derive the topology for your species.

---

<div class="post-metadata">

**Author:** ![Hanoriega](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hanoriega/32/1562_2.png) [@Hanoriega](https://gromacs.bioexcel.eu/u/Hanoriega)\
**Post date:** [November 3, 2022, 3:51pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/6 "2022-11-03T15:51:01Z")

</div>

ok, thank you.

---

<div class="post-metadata">

**Author:** ![TomPiggot](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TomPiggot](https://gromacs.bioexcel.eu/u/TomPiggot)\
**Post date:** [November 3, 2022, 4:10pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/7 "2022-11-03T16:10:57Z")

</div>

Parameters for PEG and NAG (assuming it is n-acetyl glucosamine) already exist for several force fields. Have a search for them.

You should also be sure that just because they’re in that pdb file that you actually need/want them in your simulations.

Cheers

Tom

---

<div class="post-metadata">

**Author:** ![TomPiggot](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TomPiggot](https://gromacs.bioexcel.eu/u/TomPiggot)\
**Post date:** [November 3, 2022, 4:33pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/8 "2022-11-03T16:33:27Z")

</div>

For the case of the protein being PEGylated, something like the CHARMM-GUI may be able to provide a topology for you (I’m unsure of this but have a look) or you can use the well defined CHARMM methods for combining existing protein and PEG parameters. CHARMM force fields will also have NAG parameters too.

---

<div class="post-metadata">

**Author:** ![Hanoriega](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hanoriega/32/1562_2.png) [@Hanoriega](https://gromacs.bioexcel.eu/u/Hanoriega)\
**Post date:** [November 3, 2022, 5:01pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/9 "2022-11-03T17:01:45Z")

</div>

Thank you, so I came across the CHARMM-GUI and it said there is anomeric mismatch on NAG-E, I wonder if it is because I de-fucosylated it. Also, I have tried the CHARMM force field in GROMACS, so I think the problem is this particular NAG.

Also when I ran the glycan through CHARMM-GUI, the topol.top has different names (i.e CARA, POT, and CLA) for NAG, MAN, and BMA. Would it be easier to to manually switch the names for the forcefield to recognize? or would that fail?

Thank you for your replies.

---

<div class="post-metadata">

**Author:** ![TomPiggot](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TomPiggot](https://gromacs.bioexcel.eu/u/TomPiggot)\
**Post date:** [November 3, 2022, 5:20pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/10 "2022-11-03T17:20:23Z")

</div>

If it’s the correct species but with a different name/atom order then just change the pdb file. But be absolutely sure that it’s the molecule you need

---

<div class="post-metadata">

**Author:** ![TomPiggot](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TomPiggot](https://gromacs.bioexcel.eu/u/TomPiggot)\
**Post date:** [November 3, 2022, 5:28pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/11 "2022-11-03T17:28:19Z")

</div>

With anomer mismatch, I assume it’s because you’ve selected one anomer for the parameters but the structure is in the other state. That’s just a guess though

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [November 3, 2022, 5:51pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/12 "2022-11-03T17:51:20Z")

</div>

> [@Hanoriega](#):
>
> Also when I ran the glycan through CHARMM-GUI, the topol.top has different names (i.e CARA, POT, and CLA) for NAG, MAN, and BMA. Would it be easier to to manually switch the names for the forcefield to recognize? or would that fail?

CARA is a generic segment name assigned to CARbohydrate chain A in CHARMM-GUI, this is not a residue name. POT and CLA are K+ and Cl- ions, using standard CHARMM nomenclature. These are not your sugar substituents.

Note that the biggest issue here is that CHARMM does not use names like NAG for N-acetylglucosamine. It uses e.g. AGLCNA, BGLCNA (for α- and β-D-N-acetylglucosamine) and then links them to proteins via patches. This is the kind of non-linear bond assignment for which `pdb2gmx` is really unsuited. CHARMM does this seamlessly, but GROMACS has some issues. You may be able to get CHARMM-GUI to work, but keep in mind that the expected residue names in the CHARMM force field (unless internally translated in some way) are not PDB-compliant because they are longer than 3-4 characters.

---

<div class="post-metadata">

**Author:** ![TomPiggot](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TomPiggot](https://gromacs.bioexcel.eu/u/TomPiggot)\
**Post date:** [November 3, 2022, 6:18pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/13 "2022-11-03T18:18:10Z")

</div>

To back up Justin’s point, and as I mentioned you need to be absolutely sure you’ve got the right molecule before any kind of renaming, etc. Another guess is that you’ve perhaps removed the fucose from C1 of your NAG and the hydrogen left has the incorrect anomeric state for the NAG residue identified by CHARMM-GUI (as per the names given by Justin). Again, just a guess from what you’ve described

---

<div class="post-metadata">

**Author:** ![Hanoriega](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hanoriega/32/1562_2.png) [@Hanoriega](https://gromacs.bioexcel.eu/u/Hanoriega)\
**Post date:** [November 3, 2022, 6:51pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/14 "2022-11-03T18:51:04Z")

</div>

ok, I see. thank you!

---

<div class="post-metadata">

**Author:** ![Hanoriega](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hanoriega/32/1562_2.png) [@Hanoriega](https://gromacs.bioexcel.eu/u/Hanoriega)\
**Post date:** [November 3, 2022, 6:51pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/15 "2022-11-03T18:51:52Z")

</div>

ok Thank you.

---

<div class="post-metadata">

**Author:** ![HLodi](https://avatars.discourse-cdn.com/v4/letter/h/67e7ee/32.png) [@HLodi](https://gromacs.bioexcel.eu/u/HLodi)\
**Post date:** [July 10, 2024, 4:15pm UTC](https://gromacs.bioexcel.eu/t/fatal-error-residue-nag-not-found-in-residue-topology-database/5160/16 "2024-07-10T16:15:01Z")

</div>

Gromacs version: 2021.4  
As a new gromacs user, I am trying to simulate neoxanthin and since it’s not a commonly simulated molecule, I asked the researchers involved for the needed files. I got the parameters for it in the form of .itp file. I am confused about how to use this file and incorporate its information so that I can use gromacs to simulate it without any errors. I used the “-i” flag option in pdb2gmx to include my .itp file but I still get this error. Searching through the gromacs common errors link, I found this:  
“find a topology file for the molecule, convert it to an itp file and include it in your top file”  
But my question is that the top file is one of the files I am trying to make using the pdb2gmx so how can I include the .itp file in it?  
I would really appreciate any help, Thank you so much.
