How to set the temperature in the "fix nvt" command when the molecules are partially restricted

Dear everyone, when the atoms in the system are fixed (such as using the fix setforce 0 0 0), its temperature is 0 K. Therefore, compute temp can be used to calculate the temperature that does not include that part, replacing the default temperature in fix nvt.
My question is:

  1. If the fix setforce 0 0 NULL is used for these atoms, how should the default temperature of fix nvt be modified? Should the temperature calculated using compute myTempTemps/partial 0 0 1 be replaced?
  2. In the same situation as in 1, if using the fix npt, should the pressure be replaced with compute myPress pressure temp myTemp?

Hi @Tifo,

Keeping atom positions fixed in some position of space and computing temperature can become a tricky business. I don’t know what your model and physics are but be aware that this often leads to weird results.

Some remarks on your questions:

Using setforce 0 0 0 only fix atoms with null velocity. If they have a velocity it is simply not updated. Therefore, they can have a finite temperature.

The default temperature in fix nvt is the group temperature. Therefore you can simply integrate the atoms you want to thermostat with fix nvt and leave the atoms you want to fix outside of the fix group.

IMHO you should use two different fix NVT. One with the compute temp/partial temperature used through fix_modify and one untouched.

Things starts to get complicated here. I would advise using fix nph for time integration and delegate thermostatting to other dedicated fixes like Langevin to which you could apply the same strategy as before.

1 Like

This is an “unsolvable” problem. Your system is rather artificial by explicitly removing degrees of freedom by zeroing forces and setting velocities to zero. However, the contribution of the forces created by these partially immobilized atoms to the stress tensor are still included. You may try to correct the kinetic contribution, but your pressure will still be inconsistent. I would not want to run a variable cell time integration at all for such a system (outside of some initial equilibration perhaps).

For such an artificial system what does pressure mean at all?

2 Likes