[lammps-users] How do I generate and output a temperature profile every 1000 time steps?

Hello,

I’m a new user and need to know how I can generate and output a temperature profile every 1000 time steps.

Part 1: Generating the temperature profile
My simulation box is periodic in x and y, but not z. My intention is to generate the temperature profile for particles within the group “liquid.” I want this to be a histogram with 10 bins that span the z direction.

I’ve tried using the “compute temp/profile” command (http://lammps.sandia.gov/doc/compute_temp_profile.html) by using the following code, but am getting an “Invalid compute style” error message:

compute test liquid temp/profile 1 1 1 z 10

The syntax is pretty straight forward and what I’ve entered above is nearly the same as the examples given, which also returns the same error message.

Part 2: How do I output this histogram every 1000 steps?
I haven’t been able to think much on this yet since I haven’t gotten the answer to part 1. I don’t think I can use the dump command as it seems it can only spit out scalar quantities (not the vector of histogram values). Is there another way writing the histograms to a file?

If anyone can please provide any feedback, it’d be much appreciated. I’m open to any and all suggestions if there’s another way of doing this, too.

I currently have version 09JAN09 installed, but am soon going to install 07JUL09. If the answer to part 1 is as simple as updating my version of LAMMPS, I will still need help on part 2.

Thanks in advance,

Brian

Answers below.

Steve

Hello,

I'm a new user and need to know how I can generate and output a temperature
profile every 1000 time steps.

Part 1: Generating the temperature profile
My simulation box is periodic in x and y, but not z. My intention is to
generate the temperature profile for particles within the group "liquid." I
want this to be a histogram with 10 bins that span the z direction.

I've tried using the "compute temp/profile" command
(http://lammps.sandia.gov/doc/compute_temp_profile.html) by using the
following code, but am getting an "Invalid compute style" error message:

compute test liquid temp/profile 1 1 1 z 10

Are you using the most current LAMMPS version? I'm guessing
your version doesn't have the command. The command you listed
works fine in my version.

The syntax is pretty straight forward and what I've entered above is nearly
the same as the examples given, which also returns the same error message.

Part 2: How do I output this histogram every 1000 steps?
I haven't been able to think much on this yet since I haven't gotten the
answer to part 1. I don't think I can use the dump command as it seems it
can only spit out scalar quantities (not the vector of histogram values). Is
there another way writing the histograms to a file?

Despite it's name compute temp/profile does not produce a histogrammed
temp profile. It produces a single number which is the thermal temp
with a profile subtracted out. I think what you want is fix
ave/spatial which can produce a spatial profile of any quantity, including
temp.

If anyone can please provide any feedback, it'd be much appreciated. I'm
open to any and all suggestions if there's another way of doing this, too.

I currently have version 09JAN09 installed, but am soon going to install
07JUL09. If the answer to part 1 is as simple as updating my version of
LAMMPS, I will still need help on part 2.

The on-line doc pages always reflect the fully patched version.
Compute temp/profile
was added after the 9Jan09 release, as a patch.