# Lattice constant at different temperature

Dear Steve:
Now i need to get the lattice constant at different temperatures, and have tried to use the "fix npt" and "fix box/relax" command to heat a system to a certain temperature, but the lattice constant at different temperature only exists slight difference with the lattice constant at 0k, e.g. a=4.08 at 600k and a=4.05 at 0k.

Here is my input script.
# ---------- Initialize Simulation ---------------------
clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array
# ---------- Create Atoms ---------------------
lattice fcc 4
region box block 0 1 0 1 0 1 units lattice
create_box 1 box
lattice fcc 4 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 box
replicate 10 10 10
# ---------- Define Interatomic Potential ---------------------
pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al
neighbor 2.0 bin
neigh_modify delay 10 check yes
# ---------- Heat ---------------------
reset_timestep 0
thermo 100
thermo_style custom step temp lx ly lz
velocity all create 600 222
fix 1 all npt temp 600 600 0.2 iso 0.0 0.0 1
fix 2 all box/relax iso 0.0 vmax 0.001
run 20000
## ------ output the lattice constant -----#
variable length equal "lx/10"
print "Lattice constant (Angstoms) = \${length};"
print "All done!"

First, there is no sense in using fix box/relax during a run.

Second, are you sure that your system has reached equilibrium after 20000
steps? Has minimal fluctuation in energy been observed? Is pressure near
zero? Since you are not thermo outputting energy nor pressure, it is hard
to tell.

Third, how did you determine the lattice constant? Did you take whatever
the value is at the final step? Or you did a block averaging? Lattice
constants only mean something when it's at equilibrium, but again, you
have no way to tell.

Best,
Ray