[lammps-users] minimization before fix box/relax

I think I have a misunderstanding of fix box/relax and I’m hoping for some clarification. If I take a crystal structure at the minimum energy structure from a DFT calculation and apply fix box/relax iso 0.0 and perform a series of minimizations, the forces slowly decrease as the box expands until the final minimization converges, as I expected. However, if I uncomment the minimization command in the input script below that occurs before the fix box/relax is called, the pressure value printed in the thermo data after the first minimization is very large. At zero temperature, I expected that for a minimized structure, the pressure should be near zero, since only the virial terms play a role, and the forces are near zero. Once the fix box/relax minimizations start, the forces start to grow as the box increases in size. What is the driving force causing the box to expand when zero pressure is applied and the starting configuration has near zero forces on all of the atoms?

My LAMMPS version is 29 Oct 2020.

# Reax/C potential

units real

atom_style charge

dimension 3

boundary p p p

read_data data.CrSi2

replicate 3 3 3

set group all charge 0.0

pair_style reax/c NULL

pair_coeff * * ffield.reax.0 Cr Si

neighbor 2.0 bin

neigh_modify every 1 delay 0 check yes

timestep 0.2

thermo_modify norm yes

thermo 50

dump coords all custom 10 test.lammpstrj id type q x y z fx fy fz

dump_modify coords sort id

velocity all set 0.0 0.0 0.0

fix 0 all qeq/reax 1 0.0 10.0 1.0e-4 reax/c

#minimize 1e-8 0.0 10000 100000

variable a loop 10

#fix 1 all box/relax tri 0.0 scalexy no scalexz no scaleyz no

fix 1 all box/relax iso 0.0

label loop

minimize 1e-8 0.0 100000 1000000

next a

jump SELF loop

zero forces doesn’t mean zero stress.

if you have 3 atoms in a line X-Y-X with the same X-Y distance, atom Y will not have a net force, but each X may experience a strong force.
so your minimized system has near zero forces due to symmetry.


Ah, I see what you mean Axel. Looking at the Louwerse and Baerends article about pressure in periodic boundary systems, I realized I was making the error of not accounting for the effect of periodic images and the cancellation of forces, as you pointed out. Thank you.