problem with thermostat in water

Dear Lammps-Users

I’m trying to simulate a simple 3D periodic water flow. I use spce for water and set the temperature of water molecules via NPT at 323 k. at the following, I use compute temp/profile to extract the temperature distribution in z direction and use fix ave/time to average these values over time.
But the extracted temperature profile is not sensible. the temperature is around 220 k (and not the 323 which is set by NPT) in all bins.
I was wondering if you could help me through that.
I am using 1Feb14 version and my input script is as follows:

dimension 3

boundary p p p

units real

atom_style full

pair_style hybrid lj/cut/coul/long 10.0

bond_style harmonic

angle_style harmonic

kspace_style pppm 0.0001

neighbor 3.0 bin

neigh_modify check yes cluster yes #every 1

read_data “system.data”
group spce type 1 2

pair_coeff 1 1 lj/cut/coul/long 0.1553 3.166 #0.006735361 eV
pair_coeff 1 2 lj/cut/coul/long 0.0 0.0

pair_coeff 2 2 lj/cut/coul/long 0.0 0.0

bond_coeff 1 0.0 1.0

angle_coeff 1 0.0 109.47

velocity spce create 288 123456789 dist gaussian mom yes rot yes
fix 1 spce shake 1.0e-4 200 0 b 1 a 1

fix 2 all npt temp 323.0 323.0 10 iso 1.0 1.0 100

compute myTemp all temp/profile 1 1 1 z 20 out bin
fix ComputeTemp all ave/time 1 100 1000 c_myTemp mode vector file TempProfile.dat #ave running overwrite

compute WTemp spce temp
compute press all pressure WTemp

timestep 0.01
thermo 1000

thermo_style custom step etotal c_WTemp c_press

dump 1 all custom 1000 traj_npt.lammpstrj id mol type x y z

run 2000000

Dear Lammps-Users

I'm trying to simulate a simple 3D periodic water flow. I use spce for
water and set the temperature of water molecules via NPT at 323 k. at the
following, I use compute temp/profile to extract the temperature
distribution in z direction and use fix ave/time to average these values
over time.
But the extracted temperature profile is not sensible. the temperature is
around 220 k (and not the 323 which is set by NPT) in all bins.

​sorry, but it is sensible. you get what you have asked for (in a fashion).
please give the following two paragraphs from the temp/profile
documentation some additional consideration:

This compute subtracts out degrees-of-freedom due to fixes that constrain
molecular motion, such as fix shake<http://lammps.sandia.gov/doc/fix_shake.html>
and fix rigid <http://lammps.sandia.gov/doc/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<http://lammps.sandia.gov/doc/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.

Dear Dr. Kohlmeyer

Thanks for replying.
So the fix temp/profile does not account the revised degree of freedom.
in temp/profile, it’s possible for molecules to straddle one of the bin boundaries, so there is a question that how many of its degrees of freedom go into each bin and extra option in compute modify command may be wrong.
I have a question, how the temperature profile in a molecular flow like water could be computed?