Hi,
I think there might be a problem with the fix ave/time command.
The process that i am going through is
1)
I create a fcc lattice, create a region and then create a box.
When i use the fix ave/time command to find the average box dimension from a NPT run, it cannot compute the average.
But 2)
When i repeat the same process by reading a data file, the fix ave/time gives me the average of the box dimension.
I am unable to understand why this is happening. Any help would be appreciated.
Thanks and regards,
Subham
PS, i provide the box dimension to the ave/time by using a variable.
Can you attach scripts (preferably with anything extraneous removed) and the output?
I added these two lines to the examples/melt/in.melt example and it worked fine.
variable xbox equal lx
fix 2 all ave/time 1 50 50 v_xbox file ave.out
Ray
for the first case==================================================
variable a equal 4.08
lattice fcc $a
region myreg block 0 3 0 3 0 3
create_box 1 myreg
create_atoms 1 region myreg
#create_atoms 1 box
#specify potential
pair_style eam/alloy
pair_coeff * * …/…/potentials/Al99.eam.alloy Al
#minimisation
fix 1 all box/relax iso 0.0 vmax 0.001
thermo 10
thermo_style custom step temp etotal press lx ly lz
min_style cg
minimize {etol} {ftol} {maxiter} {maxeval}
unfix 1
#NPT relaxation
velocity all create $t 5287287 mom yes rot yes dist gaussian
variable lata equal lx
fix 2 all npt temp $t $t 0.7 iso 0.0 0.0 3.0
fix 21 all ave/time 2 10000 20000 v_lata file ave.latticeA
thermo 20000
thermo_style custom step temp etotal press lx ly lz f_21 v_lata
run 20000
for the second case=================================================
read_data data.al
#specify potential
pair_style eam/alloy
pair_coeff * * …/…/potentials/Al99.eam.alloy Al
#NPT relaxation
velocity all create $t 5287287 mom yes rot yes dist gaussian
variable lata equal lx
fix 1 all npt temp $t $t 0.7 iso 0.0 0.0 3.0
fix 11 all ave/time 2 10000 20000 v_lata file ave.latticeA
thermo 20000
thermo_style custom step temp etotal press lx ly lz f_11
run 20000
in the above two codes, thermo output for f_21 (in first case) stays at zero. But thermo output for f_11 (in second case) prints the average value after 20000 steps.
Regards,
Subham Mridha
Your script 1 does not run because etol, ftol, etc are not defined.
Again, I added my aforementioned f_2 to thermo_style custom and it
worked fine.
Please check what version of LAMMPS you are using.
Ray
These are just the bare minimum from the code. etol, ftol, … are there in the actual code.
Regards,
Subham Mridha
Hi,
Just wanted to add that I am using the 17 December version of lammps.
Regards
Subham
I did not test 17Dec13 version, but both 21Nov13 and 7Jan14 worked just fine.
Ray