i am new to lammps and i didn’t get your point. I attached my input script below. If it’s possible to check then please check it. but when i used ready-made hcp lattice command, then box length was not changing so much during minimization and equilibration. now for custom lattice command, box length is increasing by 10-15 times. I have doubt on given basis for hcp. but i think it’s right. here is my input script.
#-----------------Initialize Simulation--------------------
clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array
variable xlatparam equal 3.23310
variable ylatparam equal sqrt(3)
variable zlatparam equal 1.5926
#----------------Atomistic Structure-----------------------
lattice custom {xlatparam} a1 1.0 0.0 0.0 a2 0 {ylatparam} 0 a3 0 0 ${zlatparam} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0 basis 0.5 0.83333333333 0.5 basis 0.0 0.33333333333 0.5 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
x [2 -1 -1 0] y [-1 2 -1 0] z [0 0 0 1]
region whole block -42.00 42.00 -42.00 42.00 -71.06 71.06 units box
create_box 1 whole
create_atoms 1 region whole
#----------------Interatomic Potential---------------------
pair_style eam/alloy
pair_coeff * * Zr.eam.alloy Zr
neighbor 2.0 bin
neigh_modify delay 10 check yes
#----------------Define Setting---------------------------
compute csym all centro/atom 12
compute eng all pe/atom
compute eatoms all reduce sum c_eng
#-----------------Basic Variable--------------------------
for box length and lattice spacing
variable z1 equal xlat
variable z2 equal ylat
variable z3 equal zlat
variable L1 equal lx
variable L2 equal ly
variable L3 equal lz
#----------------Minimization---------------------------
reset_timestep 0
fix 1 all box/relax iso 0.0 vmax 0.001
printing different thermo quantities during minimization
thermo 10
thermo_style custom step lx ly lz press pxx pyy pzz pe temp c_eatoms
min_style cg
minimize 1e-25 1e-25 8000 10000
unfix 1
printing lattice parameter
print “lattice spacing : {z1},{z2},${z3};”
printing box length
print “box Length : {L1},{L2},${L3};”
#--------------Equilibration---------------------------
reset_timestep 0
timestep 0.001
setting temperature of the system to 300 kelvin
velocity all create 300 12345 mom yes rot no
fix 2 all npt temp 300 300 0.16 iso 0 0 0.16 drag 1
printing different thermo quanities during minimization
thermo 1000
thermo_style custom step lx ly lz press pxx pyy pzz pe temp
run 80000
unfix 2
printing lattice parameter
print “lattice spacing : {z1},{z2},${z3};”
printing box length
print “box Length : {L1},{L2},${L3};”
printing initial box length
variable tmp equal “lz”
variable L0 equal {tmp}
print "Initial Length, L0 = {L0};"
#---------------Deformation---------------------------
reset_timestep 0
timestep 0.001
fix 3 all npt temp 300 300 0.16 x 0 0 0.16 y 0 0 0.16 drag 1
defining strain rate for deformation
variable srate equal 1.0e9
variable srate1 equal “v_srate / 1.0e12”
fix 4 all deform 1 z erate ${srate1} units box remap x
printing strain and stress in a single file
variable strain equal “(lz - v_L0)/v_L0”
variable p1 equal “v_strain”
variable p2 equal “-pxx/10000”
variable p3 equal “-pyy/10000”
variable p4 equal “-pzz/10000”
thermo 10000
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 press
run 200000
unfix 3
unfix 4
printing lattice parameter
print “lattice spacing : {z1},{z2},${z3};”
printing box length
print “box Length : {L1},{L2},${L3};”
#------------------Simulation Done-----------------------
print “All Done”
thanks