# Help Needed to Generate Topology File for Glutamate and Chlorophyll A System

**URL:** <https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762>\
**Category:** User discussions\
**Tags:** forcefield, mdrun\
**Created:** [July 27, 2024, 8:43am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762 "2024-07-27T08:43:39Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [July 27, 2024, 8:43am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/1 "2024-07-27T08:43:39Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
Dear Gromacs use  
Dear GROMACS Community,

I am currently working on a project that involves investigating the binding between glutamate and chlorophyll A. To achieve this, I have prepared the ITP files for both glutamate and chlorophyll A. However, I am facing difficulties in generating the combined topology (.top) file for the system.

Here is what I have done so far:

1. Prepared the structure files for both glutamate and chlorophyll A.
2. Created individual ITP files for both molecules.
3. Tried to combine them into a single system topology file.

I attempted to create a combined `topol.top` file as follows:  
[acpype\_newbondCLAGLU.top](https://gromacs.bioexcel.eu/uploads/short-url/zL67zOAekH8c4OAMM5ts9g5GrDr.top) (74.5 KB)

Despite following these steps, I am encountering issues when trying to generate the topology file. I am not sure if there are errors in my ITP files or if I am missing some steps.

Could anyone please provide guidance or suggest corrections? Any help on how to correctly format and combine these files would be greatly appreciated.

Thank you in advance for your assistance!

---

<div class="post-metadata">

**Author:** ![hemantaup](https://avatars.discourse-cdn.com/v4/letter/h/b2d939/32.png) [@hemantaup](https://gromacs.bioexcel.eu/u/hemantaup)\
**Post date:** [July 27, 2024, 10:08am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/2 "2024-07-27T10:08:56Z")

</div>

Please provide terminal output to analyze error.

---

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [July 27, 2024, 11:39am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/3 "2024-07-27T11:39:36Z")

</div>

Hello hemantaup and thank you for your help.

ERROR 1 [file acpype\_newbondCLAGLU.top, line 266]:  
Atom index (98) in bonds out of bounds (1-97).  
This probably means that you have inserted topology section “bonds”  
in a part belonging to a different molecule than you intended to.  
In that case move the “bonds” section to the right molecule.

There were 2 notes  
Program: gmx grompp, version 2021.4-Ubuntu-2021.4-2  
Source file: src/gromacs/gmxpreprocess/toppush.cpp (line 1948)

Fatal error:  
There was 1 error in input file(s)

---

<div class="post-metadata">

**Author:** ![hemantaup](https://avatars.discourse-cdn.com/v4/letter/h/b2d939/32.png) [@hemantaup](https://gromacs.bioexcel.eu/u/hemantaup)\
**Post date:** [July 30, 2024, 6:03pm UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/4 "2024-07-30T18:03:19Z")

</div>

I think, there is a better way to solve this issue. If you have .itp file for each molecules then you just place it in your working directory. Now you manually edit your topology file.

```auto
#include "amber99sb-ildn.ff/forcefield.itp"
#include "./GLUTAMATE.itp"
#include "./CHLOROPHYLL.itp"
; Replace with your .itp name

; Include Position restraint file
#ifdef POSRES
#include "posre.itp"
#endif

;place posre.itp in your working directory
 
; Include water topology
#include "amber99sb-star-ildnp.ff/spce.itp"

#ifdef POSRES_WATER
; Position restraint for each water oxygen
[position_restraints]
; i funct fcx fcy fcz
   1 1 1000 1000 1000
#endif

; Include topology for ions
#include "amber99sb-star-ildnp.ff/ions.itp"

[system]
; Name
Glutamate and Chlorophyll A

[molecules]
; Compound #mols
CLA_GLU 1  
; replace with suitable no of molecules and name of molecule. This number should exactly match the number of molecule in your system

```

_ **Note: One problem may still arise due to atomtype. To remove this issue you just cut both atom type section and paste in a single atomtype.itp file and include just below forcefield.itp** _  
_ **Tips: To Check number of molecule you can use:** _

```auto
gmx make_ndx your_file.gro

```

---

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [August 1, 2024, 5:55am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/5 "2024-08-01T05:55:09Z")

</div>

Thank you very much for your help.

I actually modified as you explained, but unfortunately, I had the error as you expected. Then I generated the atomtype.itp files for both glutamate and chlorophyll after executing this command:  
gmx grompp -f opt1.mdp -c complex.gro -p acpype\_newbondCLAGLU.top -o complex.tpr  
I had this error:  
Fatal error:  
Syntax error - File CLA\_GMX.itp, line 1  
Last line read:  
‘[atomtypes]’  
Invalid order for directive atomtypes  
please see below top file after modifications:  
[acpype\_newbondCLAGLU.top](https://gromacs.bioexcel.eu/uploads/short-url/Avte3XEvGzrgnX3uRGxXXUCDrd6.top) (71.8 KB)

---

<div class="post-metadata">

**Author:** ![hemantaup](https://avatars.discourse-cdn.com/v4/letter/h/b2d939/32.png) [@hemantaup](https://gromacs.bioexcel.eu/u/hemantaup)\
**Post date:** [August 2, 2024, 7:41am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/6 "2024-08-02T07:41:18Z")

</div>

Try this one:  
[acpype\_newbondCLAGLU(1).top](https://gromacs.bioexcel.eu/uploads/short-url/gP6yWEriBxvucVtSjj0jCgJ75Hi.top) (1.5 KB)

If this doesn’t work, please provide me individual itp files, also gro file (if you don’t mind).

---

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [August 2, 2024, 8:46am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/7 "2024-08-02T08:46:27Z")

</div>

Also it didnot work and had this error :  
Fatal error:  
Syntax error - File CLA\_GMX.itp, line 1  
Last line read:  
‘[atomtypes]’  
Invalid order for directive atomtypes  
Please find the attached files  
[CLA\_GMX.itp.txt](https://gromacs.bioexcel.eu/uploads/short-url/p0nL6XS42ZNIQQOPVND3ykU4inV.txt) (97.1 KB)  
[glu\_GMX.itp.txt](https://gromacs.bioexcel.eu/uploads/short-url/lHQIia4SMwls8SFn7d7wwTa7ASK.txt) (9.1 KB)  
[complex.gro.txt](https://gromacs.bioexcel.eu/uploads/short-url/f2CU1sHfGq88yEMD7ptLU4GOe2u.txt) (10.6 KB)  
Please note that I have changed just the formate to .txt in order to upload it here.

---

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [August 2, 2024, 12:17pm UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/8 "2024-08-02T12:17:35Z")

</div>

[complex.gro.txt](https://gromacs.bioexcel.eu/uploads/short-url/1N31EVYpmEkf5itoSpzZ9IirSs0.txt) (6.8 KB)  
here is the corrected gro file

---

<div class="post-metadata">

**Author:** ![hemantaup](https://avatars.discourse-cdn.com/v4/letter/h/b2d939/32.png) [@hemantaup](https://gromacs.bioexcel.eu/u/hemantaup)\
**Post date:** [August 2, 2024, 3:20pm UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/9 "2024-08-02T15:20:35Z")

</div>

Check with these files:  
[acpype\_newbondCLAGLU.top](https://gromacs.bioexcel.eu/uploads/short-url/7VYK4iFjE8XHsd6p5UQcWMxrJ5W.top) (639 Bytes)  
[atom\_type.itp.txt](https://gromacs.bioexcel.eu/uploads/short-url/yvNSoSoG4NIvAQuzOHjNPwCJXgZ.txt) (2.9 KB)  
[glu\_GMX.itp.txt](https://gromacs.bioexcel.eu/uploads/short-url/pE6yEOdMsp4wYBwrBiksJ9WhM00.txt) (8.3 KB)  
[CLA\_GMX.itp.txt](https://gromacs.bioexcel.eu/uploads/short-url/nShGIGsqwUvqTCQGbMhjXwKd8iD.txt) (94.9 KB)

> Note: All itp files are modified (atom type removed and added to atom\_type.itp). So, use all these files.

---

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [August 2, 2024, 8:15pm UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/10 "2024-08-02T20:15:21Z")

</div>

Dear hemantaup,  
I used them and I had this error :  
Fatal error:  
Topology include file “amber99sb-star-ildnp.ff/spce.itp” not found.  
inspite of that I have this forcefield in my directory.

---

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [August 3, 2024, 2:14am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/11 "2024-08-03T02:14:22Z")

</div>

Dear Hemantaup,  
First of all, I would like to thank you for your help and your time. Your guidance was helpful, and it worked successfully. Now I can move forward to the next steps.

---

<div class="post-metadata">

**Author:** ![Raeed83](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Raeed83](https://gromacs.bioexcel.eu/u/Raeed83)\
**Post date:** [August 7, 2024, 10:09am UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/12 "2024-08-07T10:09:07Z")

</div>

Hi,  
Here the updates for my project , the simulation ran without any errors, and the process completed successfully. However, upon visual inspection via VMD of the resulting `boxed.gro` file, I noticed that the structure appears incorrect.  
Please find the attached below.  
[boxed.gro.txt](https://gromacs.bioexcel.eu/uploads/short-url/twmhi02me4yELTfxouOo2jCfrP4.txt) (6.9 KB)  
[complex.gro.txt](https://gromacs.bioexcel.eu/uploads/short-url/1N31EVYpmEkf5itoSpzZ9IirSs0.txt) (6.8 KB)

---

<div class="post-metadata">

**Author:** ![RahulS](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RahulS](https://gromacs.bioexcel.eu/u/RahulS)\
**Post date:** [August 15, 2024, 12:13pm UTC](https://gromacs.bioexcel.eu/t/help-needed-to-generate-topology-file-for-glutamate-and-chlorophyll-a-system/9762/13 "2024-08-15T12:13:03Z")

</div>

Hi @Raeed83 I am facing problem in generating the topology of chlorophyll A due to Mg. How you generated the topology. In addition which forcefield in Gromacs you used. I am using Gromacs 2020.5 Version.
