Elastic constants error, Mg hcp structure

Hi,

I am following the example for the calculation of elastic constants
provided by LAMMPS to calculate the elastic constants for magnesium. I
import my structure, rather that defining it manually . Apart from the
structure the only parameters I change is the mass and the potential.

When I use either displace_reverse.mod or displace_restart.mod I get an
error "ERROR: Cannot change box tilt factors for orthogonal box
(../change_box.cpp:249)".
This error appears after many successful minimisation calculations (and
many "Changing box ..."), but I am not sure I understand why it stops.
Could please give me a hint why?

I attach my files.

Thank you
Alex

log.lammps (63.6 KB)

init.mod (1.06 KB)

potential.mod (471 Bytes)

1 Like

You need to add dummy box tilt factors (with a value of 0) to your initial structure, so that it is considered as a triclinic box. This error happens when trying to use change_box with triclinic adjustable size parameters (xy, xz, yz) on an orthogonal box. Only (x, y, z) deformations can be defined for orthogonal boxes, which is why you saw several successful minimisations before the error.

In your structure file, you should therefore have this line after the xlo xhi ylo yhi zlo zhi lines :

0.0 0.0 0.0 xy xz yz

Arthur

1 Like

Hi Arthur,

Thanks for the fast reply! I tried this (both 0 values or even higher to
actually make it triclinic) but unfortunately does not change the problem.

Alex

Hi Arthur,

Thanks for the fast reply! I tried this (both 0 values or even higher to
actually make it triclinic) but unfortunately does not change the problem.

you didn't do it right, then.

you should also be able to change the box from orthogonal to triclinic
right after you load the data file with the change_box command.

either way, if you correctly change your box correctly, the error you
report *cannot* happen.

axel.

You are right. When I use the change_box command it works fine. I am not
sure why when I try Arthur's way does not work ( I 've done this many
times..).

Thanks both.

Alex

You are right. When I use the change_box command it works fine. I am not
sure why when I try Arthur's way does not work ( I 've done this many
times..).

both methods work. if one doesn't work for you, you don't do it correctly.