[lammps-users] Compute temp/region for water

Hello,

I wish to use “compute temp/region” to thermostat a region of a simulation box containing water.
However, as mentioned in the documentation:
(http://lammps.sandia.gov/doc/compute_temp_region.html)

"Unlike other compute styles that calculate temperature, this compute does NOT currently subtract out degrees-of-freedom due to fixes that constrain molecular motion, such as fix shake and fix rigid. If needed the subtracted degrees-of-freedom can be altered using the extra option of the compute_modify command."

The temperature can approximately be calculated by knowing how many water molecules are present in the region of interest, using:
"variable … count(group,region)
… and then multiplying this number by the appropriate factor and supplying this to:
compute_modify … extra …

My question is this:
Will the “extra” value be taken every time the compute is called? i.e “dynamically”
OR will it be initialized once in the beginning and remain constant?

Appreciate your help.

Thanks and Warm Regards,
Mario Pinto

The value you set with extra will be taken out every time
temperature is computed with that compute. What won't happen
is the "extra" value will not be re-computed on-the-fly to
correspond to the number of atoms/molecules currently in
the region. In other words the value of "extra" is a constant.

Steve

Thanks a lot Steve.

I do hope someone (or me, once I figure out how to code in C++ ;oD)
would consider upgrading temp/region,
so that it can take into account degrees-of-freedom due to fixes that constrain molecular motion.

As a temporary work-around, I shall alter the temperature to which I thermostat the region…
eg: For SPC/E water, if I want the region to have a (rescaled) temp T,
I will now put the target temperature at 2T/3.

Cheers!
Mario