Fixing one dimension of simulation box in constant pressure

2020-12-04T07:00:00Z
GROMACS version:2020.3
GROMACS modification: No

I have a quick and naive how-to question as a new user. Is there a way to run a constant pressure simulation where one dimension of the box is fixed at a constant length, so that pressure adjustments only occur in the other two dimensions of the simulation box? I can’t find a setting quite like this in the manual, but I’ve been told that the feature is probably in the program.

Thanks!

Semiisotropic coupling allows the box to deform uniformly in the x-y plane and independently in z. In your case, you would align your incompressible dimension along z and set the value of compressibility to zero for z.

Anisotropic coupler could be an option. I used following settings to activate coupling along x-dimension.

pcoupl           = Berendsen 
ref-p            = 1.0    0.0    0.0    0.0    0.0    0.0  
compressibility  = 4.5e-5 0.0    0.0    0.0    0.0    0.0    
tau-p            = 2.0 
pcoupltype       = anisotropic 

Similarly, non-zero second and third entry will activate y and z. Last three entries typically remain zero for rectangular box.

Regards,
Masrul

This worked perfectly! Thanks!

-ggsmith

First, I want to thank you both, this helped me get started. I do have a follow up question that has turned up regarding the simulation of a semiisotropic (or anisotropic) system. Say I set the compressibility to zero on the z-axis input to fix that dimension of the box; if I set the reference pressure to 0.0 on that dimension, does it turn the referencing off, or does it cause the box to try to adopt a 0.0 bars pressure along that dimension? Is there some way to explicitly turn off referencing for one dimension? I know this might be a weird question, but I’m trying to compare the energies of two systems that are very similar but are different in a quite critical way where it’s clear that this critical difference is affecting the pressure equilibration such that they don’t tend to the same final pressures even though they are referenced the same way. I can’t compare the energies without STP. My current conclusion is that I’m setting something wrong.

Thanks,
Greg

Fixing the box vector simply requires compressibility = 0. The ref-p value in that dimension is then irrelevant as the box cannot adjust.

Thank you! I had hoped this was the case.

Greg