# Syntax error - File UNL.itp, line 6 Last line read: '\[ atomtypes \]' Invalid order for directive atom

**URL:** <https://gromacs.bioexcel.eu/t/syntax-error-file-unl-itp-line-6-last-line-read-atomtypes-invalid-order-for-directive-atom/5635>\
**Category:** User discussions\
**Tags:** grompp\
**Created:** [January 23, 2023, 2:46pm UTC](https://gromacs.bioexcel.eu/t/syntax-error-file-unl-itp-line-6-last-line-read-atomtypes-invalid-order-for-directive-atom/5635 "2023-01-23T14:46:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akash6912](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@akash6912](https://gromacs.bioexcel.eu/u/akash6912)\
**Post date:** [January 23, 2023, 2:46pm UTC](https://gromacs.bioexcel.eu/t/syntax-error-file-unl-itp-line-6-last-line-read-atomtypes-invalid-order-for-directive-atom/5635/1 "2023-01-23T14:46:13Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
while running the following command:  
gmx grompp -f ions.mdp -c 1\_solvated.gro -p topol.top -o ions.tpr  
I am getting this:  
Fatal error:  
Syntax error - File UNL.itp, line 6  
Last line read:  
‘[atomtypes]’  
Invalid order for directive atomtypes  
Link for documents:  
[https://drive.google.com/drive/folders/1Ka4B4DVvsRMexdsMOqw13GXadev0TTNO?usp=sharing](https://drive.google.com/drive/folders/1Ka4B4DVvsRMexdsMOqw13GXadev0TTNO?usp=sharing)

---

<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:** [January 24, 2023, 8:26am UTC](https://gromacs.bioexcel.eu/t/syntax-error-file-unl-itp-line-6-last-line-read-atomtypes-invalid-order-for-directive-atom/5635/2 "2023-01-24T08:26:05Z")

</div>

HI,  
It looks like that the order of the directives in the topology file is wrong.  
Topology files are hierarchical in GROMACS. In the following table you find the order in which the directive in the topology file are expected to be found  
[https://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.html#topology-file](https://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.html#topology-file)  
I hope it helps to understand where is the problem.  
\Alessandra
