Dear all,

I am considering if someone knows how I could compute the temperature of a group or a region without removing the bias (velocity of com) from the velocities. Since I wanna use the computed temperature in a fix_modify command, it is necessary to use a “temp” calculating “compute” like *compute temp* or *compute temp/region*.

Regards

Dear all,

I am considering if someone knows how I could compute the temperature of a

group or a region without removing the bias (velocity of com) from the

velocities. Since I wanna use the computed temperature in a fix_modify

command, it is necessary to use a "temp" calculating "compute" like *compute

temp *or *compute temp/region*.

so why don't you use compute temp/region?

axel.

Dear Axel,

According to sec. 6.16 of the manual, “compute temp/region” removes the bias velocity. I could not see any option to force this command to calculate the temp **without** removing the bias.

Regards.

Dear Axel,

According to sec. 6.16 of the manual, "compute temp/region" removes the

bias velocity. I could not see any option to force this command to

calculate the temp *without* removing the bias.

i think you are misreading this section.

there is no indication in the documentation for compute temp/region (or in

the source code), that there is a center of mass velocity bias removed.

http://lammps.sandia.gov/doc/compute_temp_region.html

axel.

Thanks for the reply.

Unfortunately, I am still confused.

1- The source code file of compue temp/region (the attached file) contains several parts about removing the bias velocity. Therefore, at least there should be a way for this compute to remove the bias. As I could not find any option for that, I concluded that this fix always removes the bias!

2- Also in sec 6.16 it is written that this compute calculates the velocity biases directly and removes it when computing the thermal temperature:

These *compute commands* calculate temperature, and the *compute pressure* command calculates pressure.

· *compute temp*

· *compute temp/sphere*

· *compute temp/asphere*

· *compute temp/com*

· *compute temp/deform*

· *compute temp/partial*

· *compute temp/profile*

· *compute temp/ramp*

· *compute temp/region*

All but the first 3 calculate velocity biases directly (e.g. advection velocities) that are **removed when computing the thermal temperature**.

Regards

compute_temp_region.cpp (7.4 KB)

Thanks for the reply.

Unfortunately, I am still confused.

1- The source code file of compue temp/region (the attached file)

contains several parts about removing the bias velocity. Therefore, at

least there should be a way for this compute to remove the bias. As I could

not find any option for that, I concluded that this fix always removes the

bias!

please don't make claims about code, when you don't understand it. the

whole point about temperature biases applies to using a thermostat, but

*not* to computing a temperature. compute temp/region can be use to compute

the temperature of the region (see the compute_scalar() function), but it

can *also* be used as a temperature bias for a thermostat algorithm, i.e.

to only thermostat atoms in that region. those "bias" functions will not be

called, if you use the compute simply to compute the temperature.

2- Also in sec 6.16 it is written that this compute calculates the

velocity biases directly and removes it when computing the thermal

temperature:

These *compute commands* <http://lammps.sandia.gov/doc/compute.html> calculate

temperature, and the *compute pressure*

<http://lammps.sandia.gov/doc/compute_pressure.html> command calculates

pressure.

· *compute temp* <http://lammps.sandia.gov/doc/compute_temp.html>

· *compute temp/sphere*

<http://lammps.sandia.gov/doc/compute_temp_sphere.html>

· *compute temp/asphere*

<http://lammps.sandia.gov/doc/compute_temp_asphere.html>

· *compute temp/com*

<http://lammps.sandia.gov/doc/compute_temp_com.html>

· *compute temp/deform*

<http://lammps.sandia.gov/doc/compute_temp_deform.html>

· *compute temp/partial*

<http://lammps.sandia.gov/doc/compute_temp_partial.html>

· *compute temp/profile*

<http://lammps.sandia.gov/doc/compute_temp_profile.html>

· *compute temp/ramp*

<http://lammps.sandia.gov/doc/compute_temp_ramp.html>

· *compute temp/region*

<http://lammps.sandia.gov/doc/compute_temp_region.html>

All but the first 3 calculate velocity biases directly (e.g. advection

velocities) that are *removed when computing the thermal temperature*.

rather than arguing with documentation fragments that confuse you, why

don't you just make test?

set up a system, where the region covers the entire system, and compare the

output of compute temp with compute temp/region and compute temp/com, which

is the one compute that *does* remove the COM velocity before computing the

temperature.

axel.

Regards