I am using the fix ave/spatial command below for computing the averaged temperature in different layers of atoms. This is in the context of thermal conductivity computations.
fix 3 all ave/spatial 1 300000 500000 z lower 1.4 v_temp file tmp.profile units box
In the line above, Nevery=1, Nrepeat=300000, and Nfreq=500000. This apparently seems to work fine, and I see the prinout of temperature in the file tmp.profile.
However, keeping everything else the same, if I increase Nrepeat to 400000 or even 500000, I do not see any printout of temperature in the file tmp.profile.
I am not sure why this happens, and was wondering if there was perhaps an upper limit to Nrepeat.
Please let me know.
There is no upper limit. I don't know why this would happen. If you
can reproduce this with a small, quick-to-run problem,then please
post your input script.
I have attached the input script file (in-third.sw) as well as other files required to run the problem. The conductivity* files are all restart files. I ran the problem on 8 processors - I have attached the script file (96-k-1.pbs) I used to run simulations in the batch mode on our cluster. The log file (log.lammps), Stillinger-Weber file (Si.sw), and the file with the temperature profile (tmp.profile) are also attached. There does not seem to be any error in the log file; however, as can be seen from the file tmp.profile, the temperature data is not there. I ran the problem for 500000 steps, and Nrepeat as well as Nfreq (in in-third.sw) are 500000.
tmp.profile (109 Bytes)
96-k-1.pbs (269 Bytes)
conductivity.0.2200000 (133 KB)
conductivity.1.2200000 (131 KB)
conductivity.2.2200000 (132 KB)
conductivity.3.2200000 (132 KB)
conductivity.4.2200000 (131 KB)
conductivity.5.2200000 (132 KB)
conductivity.6.2200000 (132 KB)
conductivity.7.2200000 (134 KB)
conductivity.base.2200000 (500 Bytes)
in-third.sw (969 Bytes)
log.lammps (1.77 KB)
Si.sw (653 Bytes)
I ran the script below on 8 procs (derived from yours, I'm not going
to run your large
problem with a dozen input files for 500K steps) - and it's fine. Are you
using the most current (fully patched) version of LAMMPS? If so,
it could be that your system has some kind of I/O problem that isn't
getting the final output to your profile file.
# 3d Lennard-Jones melt
lattice fcc 0.8442
region box block 0 4 0 4 0 4
create_box 1 box
create_atoms 1 box
mass 1 1.0
velocity all create 1.44 87287 loop geom
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 all nve
#fix 2 all thermal/conductivity 1 z 372
#dump 1 all atom 50 dump.sw
compute ke all ke/atom
variable temp atom c_ke/(1.5*8.6173e-05)
fix 3 all ave/spatial 1 500000 500000 z lower 1.4 v_temp file
tmp.profile units box
thermo_style custom step pe press
Output in tmp.profile:
# Spatial-averaged data for fix 3 and group all
# TimeStep Number-of-layers
# Layer Coordinate Natoms v_temp
1 0.7 53.4403 8110.2
2 2.1 53.3518 8119.86
3 3.5 53.1959 8042.04
4 4.9 53.3375 8017.76
5 6.3 42.6745 8047.45
I also ran a much smaller problem (in terms of number of atoms). The input script is attached (in-third.sw). The two conductivity* files are restart files (the original simulation was a NVT run for 200000 steps). As seen in the file in-third.sw, Nrepeat and Nfreq are both 500000, and the temperatures are now getting output to the file tmp.profile (attached).
However, this brings up another question. Given that it starting from a restart file, shouldn’t the output in tmp.profile be at timestep 700000, 1200000, 1700000 and 2200000? Instead the output in tmp.profile is at 500000, 1000000, 1500000 and 2000000.
I believe I am using the December 2008 version of LAMMPS. I can change to latest version of LAMMPS, if that could be a possible reason for the lack of printout in tmp.profile for my earlier simulations.
tmp.profile (3.49 KB)
conductivity.0.200000 (27.5 KB)
conductivity.base.200000 (534 Bytes)
in-third.sw (972 Bytes)
log.lammps (1.75 KB)
Si.sw (653 Bytes)
yes, please use the latest LAMMPS (with all patches) - some output
issues have been addressed
If you restart from a file on timestep N, it will not change the fact
that fix ave/spatial does its output on multiples of 500K (in this case).
So if you start at step 300,000, your first output at 500K may be 0
or incomplete. If you want to change this, then use the reset_timestep
command after you read the restart file.