Dear All
I am a new lammps user (rpm version 4.11.2, Jul 25 2016). I have a problem with my first script. I want to calculate lattice parameter for constant temperature (600 K) and pressure (1 bar). I need to stabilize the pressure more accurately than the temperature. However, my script will give pressure oscillations much larger than the temperature oscillations. Please help improve it. Other improvements will also be appreciated.
I would be grateful for any help you can offer me.
Mirek
units metal
boundary p p p
atom_style atomic
pair_style meam
lattice fcc 4.078
region box block 0 16 0 16 0 16
create_box 1 box
lattice fcc 4.078 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 box
mass 1 26.98
pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al
neighbor 2.0 bin
neigh_modify delay 0 every 1
compute eng all pe/atom
compute eatoms all reduce sum c_eng
reset_timestep 0
timestep 0.0001
velocity all create 1000 12345678 mom yes rot no
fix 1 all npt temp 600 600 1.0 iso 1.0 1.0 1.20 drag 0.5
fix 2 all press/berendsen iso 1.0 1.0 10000.0
compute 2 all temp
thermo 500
thermo_style custom step temp press vol lx xlat
minimize 1e-30 1e-30 1000000 1000000
run 1000000
unfix 1
unfix 2
variable natoms equal "count(all)"
variable teng equal "c_eatoms"
variable length equal "lx/10"
variable ecoh equal "v_teng/v_natoms"
print "Total energy (eV) = \{teng\};"
print "Number of atoms = {natoms};"
print \{length\}
print "Lattice constant \(Angstoms\) = {length};"
print "Cohesive energy (eV) = ${ecoh};"
print "All done!".