Gromacs geometry setup

GROMACS version:2022_4
GROMACS modification: Yes/No
I am relatively new to gromacs. I am trying to compare the dynamics of a solvated polymer in a confined geometry. (vertical rigid neutral interaction walls and lateral ceramic substrate) The three walls will interact with the polymer in a non-bonded interaction. I would like to group the substrate (1) and the two walls (2,3) to depict the geometry confinement and freeze them. So they are interacting with the polymer in a non-bonded interaction.

I have the .gro file generated for the whole system but I am not sure how to group them in the .mdp file. Also, how do I enter the following pair-wise interactions ;
left-wall-polymer, right-wall-polymer and substrate-polymer.

Appreciate any suggestions or pointers,
Thanks

Hi, do you mean physical walls (i.e. the structure is in some .gro/.pdb file) or ideal walls (which you can setup with nwall>0 in the .mdp file)? What do you mean by “grouping” them in the .mdp file?

Hi, Yes, The walls are made graphite layers on either side and is in a .xyz format.
image

Currently,I have set this up as a .gro file. I am not sure how to specify the interactions between region 1 and 2 and 1 and 3. Hence, I was thinking I should group them separately. Is there a way to specify this in the topology file?

Hi,
You can define different atomtypes and moleculetype for regions 1, 2 and 3. You can either specify the non-bonded interactions between different atom types or specify the combination rules to automatically generate them in defaults. Have a look here: https://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.html

P.S. I would suggest using ideal walls together with substrate 1 in the vertical (z) direction to prevent molecules from going over the periodic direction.

Thanks for the suggestions. I am still struggling with generating the .itp files for the geometry above. I have the .gro file for the total set-up with the walls+substrate, but the manual .itp file which I generated always seem to have an error. Is there a tutorial on how to generate an …itp file for a non-crystalline inorganic material system?

Hi.

In my experience I have found that it’s very difficut to “generate” a topology file directly from a configuration file for these types of systems. It’s usually a matter of setting up the .itp and .top files yourself.

the manual .itp file which I generated always seem to have an error

What type of error?

There is a mismatch between the atom name in the .gro file and the .top file. I double checked and the # coordinates and the atom names are correct.
Basically, I use the total system as one single molecule with 5000 atoms. The system contains 4 different types of atoms, the first three belong to region 1 and the 4 belong to region 2 and 3. I get the following warning message:
Warning: atom name 1837 in AA_system.top and trench.gro does not match (Al- H)
Warning: atom name 1853 in AA_system.top and trench.gro does not match (H - O)
Warning: atom name 1981 in AA_system.top and trench.gro does not match (O - Al)

This is how I describe the .top file
[ defaults ]
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
1 2 yes 1 0.5

[ atomtypes ]
; name at.num mass charge ptype sigma epsilon
Al 13 44.1 0.00000000 A 0.302 7.69856E-06
O 8 15.9994 0.00000000 A 0.316557 0.650629
H 1 1.00794 0.00000000 A 0.000 0.000
C 6 12.00 D 0.0 0.0

Atom name 1837 is Al, 1838 is H. Similarly, 1853 is O and 1854 is H…

I am not able to check where the error is.

Hi, I have almost always managed to solve these kind of warnings by changing the order of lines in the topology files.
E.g. swapping lines in the [ atomtypes ] declaration or [ molecules ].
I have to say that even after years spent as a Gromacs user still I cannot understand if and when the order matters in the topolofy files, maybe some developer can provide you with further support.

The [molecules] directive must correspond exactly to the coordinate file, in both the number of species listed and the order that they appear. The corresponding atoms in the [moleculetype] directives as have to be in the same order in the coordinate file.

So if Ligand appears first in [molecules], then its atoms have to be the first ones in the coordinate file. Further, those atoms have to follow the same order as the [moleculetype] named Ligand.

Hello,
Thanks for the clarification. I double-checked my files and the order of the coordinates of the atoms (.gro fike) is the same as in the .itp file. What else should I check for. I also want to mention that the atoms in region 2 and 3 are also part of the .gro file and the atom is also added as type dummy in the .itp file as above.

Regards.

Also, is there any other way to add wall at left and right such that the interaction between wall and the polymer which will be inserted is neutral? I am currently adding the atoms C as a dummy with L-J 0 0.

Hi,
What do you mean by “neutral”? I think that adding a LJ wall with sigma=0 and epsilon=0 is effectively equivalent to adding no wall. If you are looking for a purely reflective wall… I am afraid it cannot be done in Gromacs. However, you can have a purely repulsive wall (which would have a similar effect as a reflective wall) by having sigma<0 (or C6<0).

Thanks Michele for the responses. By neutral, I mean the wettability factor of surface. In the system above, the region 1 is a hydrophilic surface while 2 and 3 are neutral. How can I set this difference in the L-J parameters?

Also, one other question on simulation set-up. I am trying to simulate the above geometry with vacuum only along the +z direction while region 1, 2 and 3 are frozen. Is this a reasonable set-up. The slab+walls is not in the center of the simulation box.

Regards,

Hi, you can change the epsilon (or the C6) parameter of the Lennard-Jones potential of the wall atoms to obtain different equilibrium contact angles. I am sure there’s plenty of papers where this is discussed, as most MD studies of wetting use simple Lennard-Jones surfaces.
I think the setup might be reasonable, the only thing to keep oin mind is that in Gromacs nwall can only be 1 or 2, hence periodicity can be ‘avoided’ onlyn in one direction. And there cannot be infinite semiplanes either, because of periodic boundary conditions.

Thanks for all the answers, I have managed to obtain the .gro and the .top file for the above system. I modified the .gro file to have an L-shaped structure instead of the above cavity. So effectively with PBC along x and y, it looks like this.

The .top file and the .gro file have no errors; however when I try to prepare the grompp file for the mdruns, it gives me a warning on the box size being small.
ERROR 1 [file AA_system.top, line 21]:
ERROR: The cut-off length is longer than half the shortest box vector or
longer than the smallest box diagonal element. Increase the box size or
decrease rlist.
Is there a problem in the above setup and how do I get rid of this error?

Regards