Bulding an itp and gro file

GROMACS version: 2021.4-Ubuntu-2021.4-2
GROMACS modification: No

Hi to everyone,

I’m really new to gromacs and I have a question about the itp and gro files. I’m tring to build an itp and gro file of a big polymer starting from the monomer that compose it.

The fact is that for the gro file there are a lot of documentations and directives about the format, like the spacing between the values. Thus I have no problem in building it correctly. On the other hand I coont find directives for the itp files.

I undestood the various sections that this type or file should contain. What is not clear to me are two things :

  • there are certain spacing that I should maintain between the vaues in every sections ?

  • I’m using opls_aa forcefield when I define the atomtypes in the first section I define them as (opls_800…opls_825… and so on) but when I arrive at 899 I have to jump to 1000 because 900-999 are alredy taken by the forcefile.itp file. I saw that ligpargen goes directly to 9500 why should I skip all the others ? What can I do If I have more that 200 atomtypes ?

I’m sorry for the, probably, silly questions

hope that someone can help me

Many thanks in advance

Hi, creating .itp files from scratch is quite tricky, usually the way to go is to create .rtp files for residue templates, and then use them to construct polymers. Not trivial if they don’t follow typical patterns of protein/nucleic acids connectivity but still doable.

To the specific questions, (1) no, .itp is very much a free format and only cares about whitespaces between columns, and (2) atomtype names are completely arbitrary, but if you’ve already arrived at 100 new types you might be doing something in a suboptimal way.

Many thanks for your advice your answers.

I’m sorry to bother @milosz.wieczor again but I’m very new to the world of atomistic simulations. I managed to build my polymer. If I try a simulation with a polymer composed by a small amount of monomers it all work fine with a timestep of 2 fs.

When I try with a bigger polymer (builded in the same way) I cannot even reach the timestep of 1 fs folowing the same protocol. Should I minimize more.

The problem seem associated with water molecules since I keep encountering this error: One or more water molecules can not be settled.
Check for bad contacts and/or reduce the timestep if appropriate.
Wrote pdb files with previous and current coordinates

I tried to equilibrate the water of my system keeping the polymer costrained but It didn’t work.

I have a box with a lot of water (like 20K molecules) can it be a problem shoud I minimize more ?

I know that is a super general and probably silly question.

Thanks in advance

As you say, this error message is quite generic and just says there’s something wrong with the energetics. For debugging purposes, you can always try an arbitrarily small timestep (even 0.1 fs) and set a very high xtc trajectory saving frequency (say, every 10-50 steps) to see what the failure mode is. If you minimized for more than 100-200 steps, I’d say doing more won’t improve the stability of the initial structure, the problem is likely elsewhere.

If you’re new to the field, and start by building things by hand, be prepared that the first attempts will be full of errors and bugs ;) But hey, at least you can have fun watching your system collapse in all the interesting ways until you get to make it stable.

You’re right ;) I will try to debug and see if I can menage to solve. I already tried with very small timestep like 0.1 fs even with long run like 1ns and the simulation finsh without any problem.

Hope to find the problem.

Thanks you ;)

That’s optimistic, then launch a 2-fs simulation from the end of that simulation, and see if the problem was just the initial geometry, or some algorithmic technicalities (say, bond constraints, if you have e.g. very stiff but unconstrained bonds somewhere in your polymer).

Yes now I’m trying to increase the timespet like 0.5 fs and then 1 fs and so on to see if I can detect the problem.
I run a simulation with 0.5 fs with DPOSRES defined and now I’m treying to see if I manege to run a simulazione with 1 fs without DPOSRES to see if the system is already equilibrated.

Many thanks for your suggestions

Sorry again to bother you @milosz.wieczor. I have one last question obout itp files.

I noticed that the mass and charge of an atomtype are defined two times in two different secitions. What I mean is that both in atomtype and in atoms sections mass and charge are defined. Which one gromacs take into account ?

I saw that if I try to generate an itp file with ligpargen it sets all the charge of the section atomtypes to 0 so I assume that gromacs take into account the ones in the section atoms.

Thanks again for all the help

The ones in [ atoms ] will take precedence, you can define default values in [ atomtypes ] and they will be used if the fields are missing in [ atoms ] but few people make use of it these days, that’s why it’s usually ignored. People still keep the masses though, I guess it makes sense to help distinguish e.g. carbon types from calcium/cesium/…

That’s great !! really thank you for all the informations