# Problem with repeating atom type in .itp file?

**URL:** <https://gromacs.bioexcel.eu/t/problem-with-repeating-atom-type-in-itp-file/2246>\
**Category:** User discussions\
**Tags:** forcefield\
**Created:** [May 29, 2021, 4:32pm UTC](https://gromacs.bioexcel.eu/t/problem-with-repeating-atom-type-in-itp-file/2246 "2021-05-29T16:32:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![megamence](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@megamence](https://gromacs.bioexcel.eu/u/megamence)\
**Post date:** [May 29, 2021, 4:32pm UTC](https://gromacs.bioexcel.eu/t/problem-with-repeating-atom-type-in-itp-file/2246/1 "2021-05-29T16:32:30Z")

</div>

GROMACS version: 2020.5  
GROMACS modification: No  
I am getting the following warning when I run a grompp for ion addition to my system.

> ```
> Atomtype OPLS_0 was defined previously (e.g. in the forcefield files),
> and has now been defined again. This could happen e.g. if you would use a
> self-contained molecule .itp file that duplicates or replaces the
> contents of the standard force-field files. You should check the contents
> of your files and remove such repetition. If you know you should override
> the previous definition, then you could choose to suppress this warning
> with -maxwarn.
> 
> ```

The command I am executing is: gmx grompp -f ions.mdp -c nipaa-solv.gro -p topol.top -o ions.tpr -maxwarn 1 \> ions.txt 2\>&1

And this is my .itp file which is the source of the error:

> [atomtypes]  
> ; atm\_kind symbol mass charge ptype sigma epsilon  
> TER H 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_0 C82 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_1 C81 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_2 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_3 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_4 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_5 C17 12.0110 0.000 A 0.37500 0.43932  
> OPLS\_6 O17 15.9990 0.000 A 0.29600 0.87864  
> OPLS\_7 N18 14.0070 0.000 A 0.32500 0.71128  
> OPLS\_8 H18 1.0080 0.000 A 0.00000 0.00000  
> OPLS\_9 C17 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_10 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_11 C80 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_12 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_13 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_14 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_15 C80 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_16 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_17 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_18 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_0 C82 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_1 C81 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_2 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_3 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_4 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_5 C17 12.0110 0.000 A 0.37500 0.43932  
> OPLS\_6 O17 15.9990 0.000 A 0.29600 0.87864  
> OPLS\_7 N18 14.0070 0.000 A 0.32500 0.71128  
> OPLS\_8 H18 1.0080 0.000 A 0.00000 0.00000  
> OPLS\_9 C17 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_10 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_11 C80 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_12 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_13 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_14 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_15 C80 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_16 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_17 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_18 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_0 C82 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_1 C81 12.0110 0.000 A 0.35000 0.27614  
> OPLS\_2 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_3 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_4 H85 1.0080 0.000 A 0.25000 0.12552  
> OPLS\_5 C17 12.0110 0.000 A 0.37500 0.43932  
> OPLS\_6 O17 15.9990 0.000 A 0.29600 0.87864  
> OPLS\_7 N18 14.0070 0.000 A 0.32500 0.71128  
> OPLS\_8 H18 1.0080 0.000 A 0.00000 0.00000  
> OPLS\_9 C17 12.0110 0.000 A 0.35000 0.27614  
> .  
> .  
> [atoms]  
> ; srno atm\_kind resnr res sym cgnr charge mass  
> 1 TER 0 UNL H 1 0.060 1.0080  
> 2 OPLS\_0 1 UNL C82 1 -0.120 12.0110  
> 3 OPLS\_1 1 UNL C81 1 -0.120 12.0110  
> 4 OPLS\_2 1 UNL H85 1 0.060 1.0080  
> 5 OPLS\_3 1 UNL H85 1 0.060 1.0080  
> 6 OPLS\_4 1 UNL H85 1 0.060 1.0080  
> 7 OPLS\_5 1 UNL C17 1 0.500 12.0110  
> 8 OPLS\_6 1 UNL O17 1 -0.500 15.9990  
> 9 OPLS\_7 1 UNL N18 1 -0.500 14.0070  
> 10 OPLS\_8 1 UNL H18 1 0.300 1.0080  
> 11 OPLS\_9 1 UNL C17 1 0.140 12.0110  
> 12 OPLS\_10 1 UNL H85 1 0.060 1.0080  
> 13 OPLS\_11 1 UNL C80 1 -0.180 12.0110  
> 14 OPLS\_12 1 UNL H85 1 0.060 1.0080  
> 15 OPLS\_13 1 UNL H85 1 0.060 1.0080  
> 16 OPLS\_14 1 UNL H85 1 0.060 1.0080  
> 17 OPLS\_15 1 UNL C80 1 -0.180 12.0110  
> 18 OPLS\_16 1 UNL H85 1 0.060 1.0080  
> 19 OPLS\_17 1 UNL H85 1 0.060 1.0080  
> 20 OPLS\_18 1 UNL H85 1 0.060 1.0080  
> 21 OPLS\_0 2 UNL C82 1 -0.060 12.0110  
> 22 OPLS\_1 2 UNL C81 1 -0.120 12.0110  
> 23 OPLS\_2 2 UNL H85 1 0.060 1.0080  
> 24 OPLS\_3 2 UNL H85 1 0.060 1.0080  
> 25 OPLS\_4 2 UNL H85 1 0.060 1.0080  
> 26 OPLS\_5 2 UNL C17 1 0.500 12.0110  
> 27 OPLS\_6 2 UNL O17 1 -0.500 15.9990  
> 28 OPLS\_7 2 UNL N18 1 -0.500 14.0070  
> 29 OPLS\_8 2 UNL H18 1 0.300 1.0080  
> 30 OPLS\_9 2 UNL C17 1 0.140 12.0110  
> 31 OPLS\_10 2 UNL H85 1 0.060 1.0080  
> 32 OPLS\_11 2 UNL C80 1 -0.180 12.0110  
> 33 OPLS\_12 2 UNL H85 1 0.060 1.0080  
> .  
> .  
> .

It is essentially a monomer unit being repeated, and since the charges and everything is the same, I have given the units the same atm\_type (OPLS\_xx). What is the reason for this error? The error disappears when every atom in the polymer chain has a different number assigned to it ie OPLS\_nnn where nnn is distinct for each atom.

---

<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 31, 2021, 1:47am UTC](https://gromacs.bioexcel.eu/t/problem-with-repeating-atom-type-in-itp-file/2246/2 "2021-05-31T01:47:14Z")

</div>

Each atom type can only be defined once. You clearly have many redundancies in your `[atomtypes]` directive. Delete duplicate entries.
