Too long delay for .tpr loading

GROMACS version:2021.7
GROMACS modification: No
Here post your question

Dear all,
I am conducting MD simulations on polymer mixtures using GROMACS 2021.7. During the mdrun step, there is a delay of about 1-2 minutes when loading the .tpr file and starting the simulation. I would like to reduce this time delay.

All polymer backbones are identical, but they vary in the number of pendant groups. There are a total of 32 different polymers, with the heaviest polymer consisting of 245 atoms and the lightest consisting of 150 atoms. Since the polymers are very similar and composed only of C, H, and O atoms, it is possible to create all 32 polymers using 8 atom types. Regardless of the polymer type, each system contains a total of 100 polymers, and the maximum number of atoms is 24,500.

In a system composed of 100 polymers of the same type, the .tpr file size is around 700 kB, and the .tpr file is loaded almost instantly during the mdrun step. However, in a system composed of 10 different polymer types (10 moleculetypes), the .tpr file size is around 1100 kB, and it takes about 1 minute to load the .tpr file and start the simulation. Furthermore, in a system composed of 20 different polymer types (20 moleculetypes), the .tpr file size is around 1600 kB, and the delay is about 2 minutes. All the simulation uses the same .mdp file.

I am using the OPLS-AA force field. This delay is acting as a significant bottleneck for my project, and I would like to reduce it. Additionally, when I increase the system size to 1000 polymers of a single type (not a mixture), with over 240,000 atoms and a .tpr file size exceeding 5 MB, there is no such delay, and the calculation starts immediately.

I would greatly appreciate any help in understanding the reasons for this delay and finding a solution to reduce it

Best regards

This sounds strange. You have not added atomtypes to the force field?

The only thing I can think of it that you might have many moleculeblocks. Do you have one moleculeblock in the topology for each polymer type or do you have 100 blocks in [ system }?

I think i added atomtypes to the forcefield.
In .top files, forcefield.itp is included and, atomtypes, moleculetypes, atom, bonds, angles, improper dihedrals, proper dihedrals, pairs, system, molecules are included.

It is 100 blocks in each system.
In the case of 1 kind polymerblock, (1X100), the calculation starts immediately.
However, in the case of 20 kinds of polymerblocks, 5 blocks for each polymerblock, (20X5=100), it takes 2min to start the calculation

If you added atomtypes for each polymer type, than that that’s likely the issue. The atomtype matrix is #atomtypes^2 large. You should be able to reuse many atom types between the different polymer types.

one of my .top is here

#include “FF/oplsaa.ff/forcefield.itp”
#include “FF/Atomtypes.itp”
#include “FF/AAAAA_others.itp”
#include “FF/AAAAB_others.itp”
#include “FF/AAABA_others.itp”
#include “FF/AAABB_others.itp”
#include “FF/AABAA_others.itp”
#include “FF/AABAB_others.itp”
#include “FF/AABBA_others.itp”
#include “FF/AABBB_others.itp”
#include “FF/ABAAA_others.itp”
#include “FF/ABAAB_others.itp”
#include “FF/ABABA_others.itp”
#include “FF/ABABB_others.itp”
#include “FF/ABBAA_others.itp”
#include “FF/ABBAB_others.itp”
#include “FF/ABBBA_others.itp”
#include “FF/ABBBB_others.itp”
#include “FF/BAAAA_others.itp”
#include “FF/BAAAB_others.itp”
#include “FF/BAABA_others.itp”
#include “FF/BAABB_others.itp”
#include “FF/BABAA_others.itp”
#include “FF/BABAB_others.itp”
#include “FF/BABBA_others.itp”
#include “FF/BABBB_others.itp”
#include “FF/BBAAA_others.itp”
#include “FF/BBAAB_others.itp”
#include “FF/BBABA_others.itp”
#include “FF/BBABB_others.itp”
#include “FF/BBBAA_others.itp”
#include “FF/BBBAB_others.itp”
#include “FF/BBBBA_others.itp”
#include “FF/BBBBB_others.itp”

[ system ]
; name
PR

[ molecules ]
; name number
AAAAA 34
AAAAB 4
AAABA 6
AAABB 2
AABAA 9
AABAB 1
AABBA 10
AABBB 1
ABAAB 1
ABBAB 2
ABBBA 1
BAAAA 14
BAAAB 1
BAABA 1
BABAA 4
BABBA 3
BABBB 2
BBAAB 1
BBABB 1
BBBAB 1
BBBBA 1

In the Atomtypes.itp
[ atomtypes ]
POLY_000 H0 1.0080 0.000 A 2.50000E-01 1.25520E-01
POLY_001 C1 12.0110 0.000 A 3.50000E-01 2.76144E-01
POLY_002 O2 15.9990 0.000 A 2.90000E-01 5.85760E-01
POLY_003 C3 12.0110 0.000 A 3.55000E-01 2.92880E-01
POLY_004 O4 15.9990 0.000 A 3.12000E-01 7.11280E-01
POLY_005 H5 1.0080 0.000 A 0.00000E+00 0.00000E+00
POLY_006 H6 1.0080 0.000 A 2.42000E-01 1.25520E-01
POLY_007 O7 15.9990 0.000 A 2.96000E-01 8.78640E-01

and the ~_others.itps have moleculetype, atoms, bonds, angles, improper dihedrals, proper dihedrals, pairs.

I don’t think I added atomtypes for each polymer type.

How many atomtypes have you added?

In the Atomtypes.itp, there are 8 atomtypes.
[atomtypes] is only in Atomtypes.itp, not in ~others.itps

In the ~others.itps, there are 245~150 atoms, which are composed of 7~8 atomtypes.

Then I that can’t be the problem.

Do you define the bonded parameters on the same line as each bonded interaction or do you look them up based on atom types?

I made the .itp files using LigParGen, thus the bonded parameters are on the same line.

That leads to quite a lot of parameters which could slow down grompp due to O(#parameters^2) operators, but I don’t see how that would affect topology loading.

If you provide me the tpr file, I could have a look. You can also have a look yourself by compiling a debug version, running in the debugger and breaking during loading and check where it’s spending a lot of time.