[gmx-users] atom indexing in top and gro files

Justin Lemkul jalemkul at vt.edu
Thu Nov 28 01:07:44 CET 2019



On 11/27/19 5:07 PM, Ling Chan wrote:
> Dear Colleague,
>
> I just wonder how exactly are the atom numbering in gro files and in the “atoms” section of topology files used. There does not seem to be much information on the file format manual pages. (i.e. http://manual.gromacs.org/documentation/current/reference-manual/file-formats.html#gro and http://manual.gromacs.org/documentation/current/reference-manual/topologies/topology-file-formats.html#tab-topfile2). In the given examples, they are simply 1,2,3,4,… But if that has to be the case, why have this field to begin with? So I suppose there has to be certain rules, perhaps to map atoms from the topology file to the gro file.

The code requires all [moleculetype] directives to be numbered from 1. 
This has no relationship to the actual global atom numbers in the 
coordinate file. What must be true is that the atoms in the topology and 
coordinate files appear in the same order.

> According to this archived post, https://www.mail-archive.com/gromacs.org_gmx-users@maillist.sys.kth.se/msg17227.html, only the ordering of the lines is important. Does it mean that if in the topology file I have in the “molecules” field
>    Protein_chain_A    1
>    Protein_chain_B    1
>   SOL            831
> and in the gro file they are ordered as ChainA, then water, then ChainB, then things will break? Alternatively, if

Mismatch of the order of coordinates and topology causes the wrong 
parameters to be mapped. Your water between chains A and B will be 
interpreted as protein atoms in chain B. grompp will warning you of 
mismatching names. You must have everything in the same order.

> within some residues the atom ordering differs between the topology file the the gro file, (e.g. CD NE OE as opposed to CD OE NE), then things will break even if I “reorder” them by atom indices?

Yes, this will break.

> And if the atom indices are really ignored, can I just put 999 on all lines?

This will likely cause problems with indexing, but I haven't done it 
myself. You can easily renumber coordinate files with editconf, so 
there's no reason to insert dummy atom numbers.

-Justin

> I understand that if I use pdb2gmx it will take care of things, but I need to write my own utilities to produce gro and top files.
>
> Thank you in advance!
>
> Ling
>
> Notice of Confidentiality: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error please contact the sender immediately by return electronic transmission and then immediately delete this transmission including all attachments without copying, distributing or disclosing the same.

-- 
==================================================

Justin A. Lemkul, Ph.D.
Assistant Professor
Office: 301 Fralin Hall
Lab: 303 Engel Hall

Virginia Tech Department of Biochemistry
340 West Campus Dr.
Blacksburg, VA 24061

jalemkul at vt.edu | (540) 231-3129
http://www.thelemkullab.com

==================================================



More information about the gromacs.org_gmx-users mailing list