# temp/profile

Hello everyone,

I have a quick question with respect to the fix temp/profile command.

I am shearing a liquid between 2 metallic plates. In the liquid, I have a fix shake command on certain bonds.

On the solids, I am imposing a velocity in the + and - X directions:

velocity SolidUpper set 0.0001 NULL NULL units box
velocity SolidLower set -0.0001 NULL NULL units box

I am thermostatting just the solids at 300 K in the Y and Z directions.

compute T_Low ControlL temp/partial 0 1 1
compute T_High ControlU temp/partial 0 1 1
fix 1 all nve
fix 2 SolidUpper langevin 300 300 100 845174 tally yes
fix_modify 2 temp T_Low
fix 3 SolidLower langevin 300 300 100 445178 tally yes
fix_modify 3 temp T_High

I am then calculating the temperature gradient for the entire system (solid + liquid) using the temp/profile command, only taking out the average velocity in the X direction :

compute T_all all temp/profile 1 0 0 z 210 out bin

Bizarrely, on the solids, I get a temperature of around 200 K, while in the liquid, I am getting a temperature of around 300 K. Is the command, temp/profile not supposed to be used on a group where a velocity is imposed ? I believe there was something about this in the documentation on temp/profile :

“When using the out keyword with a value of bin, the calculated temperature for each bin does not include the degrees-of-freedom adjustment described in the preceeding paragraph, for fixes that constrain molecular motion.”

Does this therefore apply to the “velocity set” command as well ?

If I have been unclear, please let me know and I’ll explain further. Thanks for your help !

-Tom

I am shearing a liquid between 2 metallic plates. In the liquid, I have a
fix shake command on certain bonds.

On the solids, I am imposing a velocity in the + and - X directions:

What is the velocity profile in the liquid across the gap? Think about
if a simple average takes out the relevant flow components. Shouldn
the average be zero in this setup?

These are the 2 relevant paragraphs on the doc page:

This compute subtracts out degrees-of-freedom due to fixes that
constrain molecular motion, such as “fix shake”_fix_shake.html and
“fix rigid”_fix_rigid.html. This means the temperature of groups of
atoms that include these constraints will be computed correctly. If
needed, the subtracted degrees-of-freedom can be altered using the
{extra} option of the “compute_modify”_compute_modify.html command.

IMPORTANT NOTE: When using the {out} keyword with a value of {bin},
the calculated temperature for each bin does not include the
degrees-of-freedom adjustment described in the preceeding paragraph,
for fixes that constrain molecular motion. It does include the
adjustment due to the {extra} option, which is applied to each bin.

You are using fix shake, so it is saying that compute temp/profile is
not accounting for the DOF subtracted to fix shake when it outputs
the temp of each bin. I.e. it is not smart enough to figure out which
molecules are in which bins and which straddle bins, etc. It just
ignores fix shake DOF for that output. So it could affect your answer.
Note that this is not an issue for using the compute with thermostatting;
it does get the correct global temperature.

Steve