# Simulating a carbon nanotube structure in Gromacs

**URL:** <https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252>\
**Category:** User discussions\
**Created:** [December 13, 2020, 11:36pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252 "2020-12-13T23:36:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 13, 2020, 11:36pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/1 "2020-12-13T23:36:41Z")

</div>

GROMACS version: Gromacs version 2018.1  
GROMACS modification: No  
Here post your question:

Dear Gromacs users,

I have a modified carbon nanotube structure (.pdb and .mol2 files) that I’d like to simulate in Gromacs. I loaded the pdb file by using this command line:

gmx pdb2gmx -f CNH\_vmd.pdb -o CNH.gro -water tip3p

As requested by the prompt, I selected the CHARMM27 force field. However, I received the following message:

GROMACS: gmx pdb2gmx, version 2018.1  
Executable: /usr/bin/gmx  
Data prefix: /usr  
Working dir: /home/eduardo/Documents/Projeto\_Doutorado/Gromacs/Gromacs-CNH  
Command line:  
gmx pdb2gmx -f CNH\_vmd.pdb -o CNH.gro -water tip3p

Select the Force Field:  
From ‘/usr/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: GROMOS96 43a1 force field  
10: GROMOS96 43a2 force field (improved alkane dihedrals)  
11: GROMOS96 45a3 force field (Schuler JCC 2001 22 1205)  
12: GROMOS96 53a5 force field (JCC 2004 vol 25 pag 1656)  
13: GROMOS96 53a6 force field (JCC 2004 vol 25 pag 1656)  
14: GROMOS96 54a7 force field (Eur. Biophys. J. (2011), 40, 843-856, DOI: 10.1007/s00249-011-0700-9)  
15: OPLS-AA/L all-atom force field (2001 aminoacid dihedrals)  
8

Using the Charmm27 force field in directory charmm27.ff

Opening force field file /usr/share/gromacs/top/charmm27.ff/aminoacids.r2b  
Opening force field file /usr/share/gromacs/top/charmm27.ff/rna.r2b  
Reading CNH\_vmd.pdb…  
Read 373 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 373 atoms

chain #res #atoms  
1 ‘X’ 1 373

All occupancy fields zero. This is probably not an X-Ray structure  
Opening force field file /usr/share/gromacs/top/charmm27.ff/atomtypes.atp  
Atomtype 213  
Reading residue database… (charmm27)  
Opening force field file /usr/share/gromacs/top/charmm27.ff/aminoacids.rtp  
Residue 44  
Sorting it all out…  
Opening force field file /usr/share/gromacs/top/charmm27.ff/dna.rtp  
Residue 48  
Sorting it all out…  
Opening force field file /usr/share/gromacs/top/charmm27.ff/lipids.rtp  
Residue 60  
Sorting it all out…  
Opening force field file /usr/share/gromacs/top/charmm27.ff/rna.rtp  
Residue 64  
Sorting it all out…  
Opening force field file /usr/share/gromacs/top/charmm27.ff/aminoacids.hdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/dna.hdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/lipids.hdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/rna.hdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/aminoacids.n.tdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/dna.n.tdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/rna.n.tdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/aminoacids.c.tdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/dna.c.tdb  
Opening force field file /usr/share/gromacs/top/charmm27.ff/rna.c.tdb  
Processing chain 1 ‘X’ (373 atoms, 1 residues)

Warning: No residues in chain starting at MOL0 identified as Protein/RNA/DNA.  
This makes it impossible to link them into a molecule, which could either be  
correct or a catastrophic error. Please check your structure, and add all  
necessary residue names to residuetypes.dat if this was not correct.

Problem with chain definition, or missing terminal residues.  
This chain does not appear to contain a recognized chain molecule.  
If this is incorrect, you can edit residuetypes.dat to modify the behavior.  
8 out of 8 lines of specbond.dat converted successfully

* * *

Program: gmx pdb2gmx, version 2018.1  
Source file: src/gromacs/gmxpreprocess/resall.cpp (line 639)

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

## For more information and tips for troubleshooting, please check the GROMACS website at [http://www.gromacs.org/Documentation/Errors](http://www.gromacs.org/Documentation/Errors)

-I understand that this force field (charmm27) is indicated for proteins, but I selected it as a possible option for describing this system. I also know that this error is related to the fact that the residue name “MOL”, which is located in my pdb file, was not identified in the library of this force field. Thus, I would like to ask you how to define this new set of atoms/residues that are presented in my structure. Regarding the force field, I selected the charmm27 option, since it is conventionally used in the literature (as well as the charmm36 FF) for this type of system.

Sincerely,

Eduardo.

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [December 14, 2020, 9:59am UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/2 "2020-12-14T09:59:47Z")

</div>

Hi,  
You can add new residues types rtp file.  
Here some documentation that can help you

> **[pdb2gmx input files — GROMACS 2020.4 documentation](http://manual.gromacs.org/current/reference-manual/topologies/pdb2gmx-input-files.html#pdb2gmxfiles)**

  

> **[Force field organization — GROMACS 2020.4 documentation](http://manual.gromacs.org/current/reference-manual/topologies/force-field-organization.html)**

A finally warning any modifications to force field should be done accounting for the philosophy behind the force field.

Best regard  
Alessandra

---

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 14, 2020, 8:41pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/3 "2020-12-14T20:41:47Z")

</div>

Dear Alessandra,

Thank you for your help! I’ll prepare this rtp file for my carbon nanotube structure.

Sincerely,

Eduardo.

---

<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:** [December 14, 2020, 9:15pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/4 "2020-12-14T21:15:06Z")

</div>

`pdb2gmx` is the wrong tool for a CNT. What you want is `x2top` in conjunction with a suitable `.n2t` file. `pdb2gmx` is not useful for non-linear/sparingly branched polymers. There is a GROMACS CNT tutorial that explains the logic of how you would approach such a system:

> **[Modeling Carbon Nanotubes with GROMACS - Chembytes](http://chembytes.wikidot.com/grocnt)**

---

<div class="post-metadata">

**Author:** ![Eduardo1](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eduardo1](https://gromacs.bioexcel.eu/u/Eduardo1)\
**Post date:** [December 15, 2020, 2:31pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/5 "2020-12-15T14:31:06Z")

</div>

Dear jalemkul,

Thank you for your help! I’ll use this tutorial for setting up my system.

Sincerely,

Eduardo

---

<div class="post-metadata">

**Author:** ![boumeftah](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@boumeftah](https://gromacs.bioexcel.eu/u/boumeftah)\
**Post date:** [May 10, 2023, 12:54pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/6 "2023-05-10T12:54:24Z")

</div>

Hi dear jalemkul  
does it work for functionalized CNTs?

---

<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:** [May 11, 2023, 1:52pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/7 "2023-05-11T13:52:32Z")

</div>

You can build a topology for anything if you can specify unambiguous atom assignments in a `.n2t` file for `x2top`.

---

<div class="post-metadata">

**Author:** ![boumeftah](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@boumeftah](https://gromacs.bioexcel.eu/u/boumeftah)\
**Post date:** [May 14, 2023, 2:39pm UTC](https://gromacs.bioexcel.eu/t/simulating-a-carbon-nanotube-structure-in-gromacs/1252/8 "2023-05-14T14:39:15Z")

</div>

Thank you so much
