When should I use refcoord-scaling in the mdp file?

Hello,
I am doing a regular NPT run of my system. I have read the manual and searched a little bit, but I still can not fully understand on what occasions refcoord-scaling should be used. Most of the important parts of my .mdp file are attached below but if anything matters are missing, I can add it. The hydrogen bonds are constrained.
Could you please tell me whether I should use refcoord-scaling in the .mdp file and which option com or all should be used? A little explanation would be much appreciated if possible.
Thank you very much in advance!

integrator          =  md
dt                  =  0.001
nsteps              =  5000
nstcomm             =  1

; Bond parameters
continuation            = no 
constraint_algorithm    = lincs
constraints             = h-bonds
lincs_iter              = 1
lincs_order             = 4

; Velocity generation
gen_vel     = yes  
gen_temp    = 300
gen_seed    = -1

; Neighborsearching
nstlist             =  10
ns_type             =  grid
rlist               =  1.0
rcoulomb            =  1.2
rvdw                =  1.2
DispCorr            = EnerPres

; Temperature coupling is on
Tcoupl              = v-rescale
tc-grps		    =  System
tau_t               =  0.1
ref_t               =  300
; Electro
coulombtype         =  PME
; Energy monitoring
energygrps          =  system 

; Pressure coupling is on     
Pcoupl                   = berendsen
Pcoupltype               = isotropic
tau_p                    = 0.5
compressibility          = 4.5e-5 
ref_p                    = 0.0 
1 Like

Doesn’t look like you have position restraints, so likely you do not need refcoord_scaling at all (though depending on your .itp you might have position restraints always on and not dependent on a conditional via a define = in the .mdp file, so impossible to tell for sure).

If you can run grompp without the -r flag in recent versions of gromacs, then the use of refcoord_scaling or the absence of it should have no effect.

Many usages work well with refcoord_scaling = com. That will shift the center of mass of your reference positions with changes in the box dimensions, but will not change the relative vectors between restrained positions. refcoord_scaling = all will scale each position restraint independent with the box (so if you put position restraints on the Calpha atoms of a helix whose long axis was along Cartesian Z, then if the box gets Nx larger in Z, the helix will be stretched by Nx in Z; which is usually not what one wants). In this case turning off refcoord_scaling would be OK too.

You should usually be able to test the effects of a change in the .mdp file with a zero-point energy evaluation using two different .tpr files.

1 Like

Hello,
Thank you very much for your detailed answer!
I might be confused with the constraints and restraints of Gromacs. So does that mean that constraints of h-bonds do not require refcoord-scaling to be used? Is the restraint relevant to refcoord-scaling only those on this webpage of the manual?
I am using the 2018.8 version now and is that a version that could be considered as a recent version you mentioned about the -r flag?
Thanks very much for the very detailed explanation! I do not know much about zero-point energy evaluation yet. I will try to learn that.

Constraints and restraints are entirely separate concepts. Constraints keep bond lengths fixed at a prescribed length. Restraints are a biasing force that disfavors atomic motion.

The refcoord-scaling option applies to position restraints, and is only relevant when using them, e.g. during equilibration.

Yes, the -r option became mandatory as of version 2018, but is only required when restraints are active. If you have no restraints during the simulation, you do not need to use it.

Hello,
Thank you very much for your reply!

  1. It may sound naive, but may I confirm that in my case in which I think only h-bonds constraints are used, I do not have to use refcoord-scaling? This is the essential reason why I posted the question, I want to make sure I understand this correctly.
  2. According to this webpage of the manual, the position restraints are implemented by using some specific bond type, angle type, etc. in the topology file. Could you please tell me whether there are any settings special in the .mdp file? Sorry I could not find it after reading the manual
  3. If position restraints are NOT used in the simulation, but refcoord-scaling=XXX is included in the .mdp file, it will have no effect, nothing is harmful. Is that correct?

Any help would be much appreciated!

  1. The refcoord-scaling option has nothing to do with constraints.
  2. Position restraints are a simple harmonic potential, from which forces are derived from displacements from reference positions. The general discussion of restraints is not relevant here.
  3. Correct.
1 Like

Hello,
Thank you very very much for your help!
This reminds me of another question related to this. May I continue this last question here? If freezegrps are used in the .mdp file, is this cased considered to be position restraints? And refcoord-scaling should be used together?
Thanks in advance!

Freezing means coordinates are never updated. Restraining is applying a biasing potential to disfavor motion. These are separate concepts and freezing has no relation to refcoord_scaling.

Thank you very much for all the explanations! That helps me a lot.