Box length changing during minimization and equilibration

Hello,
I’d like to do tensile test for HCP - zirconium metal. At the first i used ready-made lattice command for hcp by
lattice hcp 3.2331 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

But i have to use c/a ratio =1.5926 instead of sqrt(8/3). So, I used custom lattice command by
lattice custom 3.2331 a1 1.0 0.0 0.0 a2 0.0 sqrt(3) 0.0 a3 0.0 0.0 1.5926 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

but for custom lattice command, crystal box length is increasing during minimization and equilibration by 10-15 times. Also, I used
fix 1 all box/relax iso 0.0 vmax 0.001

for box relaxation during minimization.
Is there anybody here who worked on HCP structures before and see where i went wrong ? How can i restrict changing box length during minimiztion?

Thanks,

Anurag

Hello,
I'd like to do tensile test for HCP - zirconium metal. At the first i used
ready-made lattice command for hcp by
*lattice hcp 3.2331 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1*

But i have to use c/a ratio =1.5926 instead of sqrt(8/3). So, I used
custom lattice command by
*lattice custom 3.2331 a1 1.0 0.0 0.0 a2 0.0 sqrt(3) 0.0 a3 0.0 0.0 1.5926
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*

but for custom lattice command, crystal box length is increasing during
minimization and equilibration by 10-15 times. Also, I used
*fix 1 all box/relax iso 0.0 vmax 0.001*
for box relaxation during minimization.

​there is too little information here to make any proper comments.​

Is there anybody here who worked on HCP structures before and see where i

went wrong ?

​this sounds like you have overlapping atoms at the periodic boundaries due
to numerics. it is usually best to shift your lattice origin (or box
origin), so that atoms on​ lattice positions don't get placed exactly on
box boundaries and subject to floating-point truncation issues.

How can i restrict changing box length during minimiztion?

​*VERY* bad idea. this doesn't correct your problem.​

axel.

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

i am new to lammps and i didn't get your point.

then ​please look up previous discussions on the subject in the mailing
list archives. this is a recurring noob problem.​

I attached my input script below. *If it's possible to check* then please
check it. but when

you can check it yourself (in fact, you should *always* check your results,
when you are new to a topic). simply ​output the coordinates of your
initial configuration and visualize it with a visualization program that
can show periodic images, and verify that you have no overlaps and a clean
continuation of the periodic images. that not only requires proper
definition of the lattice, but also you have to make sure that you choose
box dimensions that are compatible with the periodicity of your lattice.

this is not so much a LAMMPS issue, but more how crystal lattices work,
thus i would suggest you also review some text books on that subject, to
understand what this is about.​

i used ready-made hcp lattice command, then box length was not changing so
much during minimization and equilibration. now for

​that is irrelevant. *first* you have to make certain, that you request the
correct structure and that your input is what you think it is.​

The lattice you define is only used to create atoms, and (optionally)
to create the initial simulation box (depending on how you did that).

It has nothing to do with the minimization. You should verify
that your initial box and atoms are (nearly) identical for
your 2 choices of lattice. If so, then the minimization should
proceed (nearly) idenctically. If you don’t want the box size
to change during the minimize, don’t use the fix box/relax command.

Again that has nothing to do with the defined lattice.

Steve