Question regarding the topology file structure

GROMACS version: 2018.1
GROMACS modification: No


It might look silly to ask, but I was just curious about the hierarchy of data read in GROMACS. I just noticed something when a topology file is read and I wanted to ask what the reason is.

In the [ atomtypes ] section of the topology file, one can specify the masses and charges in the 3rd and 4th columns, as indicated here. However, I noticed that both masses and charges are read from the [ atoms ] section of the topology and not the [ atomtypes ]. Meaning that even if the masses and charges are set to zero in the [ atomtypes ] section, both can be updated later in the [ atoms ] section.

Then here is the question: if masses and charges in the [ atoms ] section is prioritized over the [ atomtypes ] section, why is there a need to have them also mentioned in the [ atomtypes ]? I can understand this for the charges of course, but why masses? Are they expected to change?

I hope I could make what I mean clear, and sorry if it seems stupid.

Kind regards,

Values of mass and charge are given in [atomtypes] because many years ago there was a thought that GROMACS could one day include a general molecule builder, from which generic values of these properties could be taken to construct a topology. They are entirely irrelevant.

1 Like

Thank you Dr. Lemkul for your response. It is clear now. Thinking about a general molecule builder also makes me excited. I hope we can have it someday in the future.
Kind regards,

Don’t count on it :) It was an idea many years ago that has never come to fruition. It would take a fairly massive effort to make it work, which is why it still doesn’t exist.