Error: Triclinic box skew is too large

Hello to everyone.

I am trying to do a simulation with a coesite crystalline silica structure. Here is the unit structure:

# Coesite - O2 Si
  
          48  atoms
           2  atom types
 
      0.000000000000       7.140000000000  xlo xhi
      0.000000000000      12.371000000000  ylo yhi
      0.000000000000       6.192334339384  zlo zhi
      0.000000000000      -3.624309648648       0.000000000000  xy xz yz             
 
Masses
 
            1   28.08500000             # Si
            2   15.99900000             # O
 
Atoms # atomic
 
         1    1        0.738276412403       1.339779300000       0.447705772737
         2    1        1.658887772976       1.955855100000       3.348195177305
         3    2        0.000000000000       0.000000000000       0.000000000000
         4    2        0.851767763514       1.437510200000       4.644250754538
         5    2       -1.503359655518       1.529055600000       5.824509679625
         6    2        1.029294590068       1.289058200000       2.027989496148
         7    2       -1.613182012054       2.622652000000       2.959935814226
         8    1        4.308276412403       7.525279300000       0.447705772737
         9    1       -1.911112227024       8.141355100000       3.348195177305
        10    2        3.570000000000       6.185500000000       0.000000000000
        11    2       -2.718232236486       7.623010200000       4.644250754538
        12    2        2.066640344482       7.714555600000       5.824509679625
        13    2        4.599294590068       7.474558200000       2.027989496148
        14    2        1.956817987946       8.808152000000       2.959935814226
        15    1       -1.073878411921      11.031220700000       3.543872942430
        16    1        3.471042597300      10.415144900000       0.252028007613
        17    2       -1.812154824324       0.000000000000       3.096167169692
        18    2        2.663922587838      10.933489800000       1.548083584846
        19    2        0.308795168806      10.841944400000       2.728342509933
        20    2       -0.782860234256      11.081941800000       5.124156665840
        21    2       -3.425336836378       9.748348000000       6.056102983918
        22    1        2.496121588079       4.845720700000       3.543872942430
        23    1       -0.098957402700       4.229644900000       0.252028007613
        24    2        1.757845175676       6.185500000000       3.096167169692
        25    2       -0.906077412162       4.747989800000       1.548083584846
        26    2        3.878795168806       4.656444400000       2.728342509933
        27    2        2.787139765744       4.896441800000       5.124156665840
        28    2        0.144663163622       3.562848000000       6.056102983918
        29    1        4.589568763273       1.339779300000       2.648461396955
        30    1        0.044647754052       1.955855100000       5.940306331771
        31    2        3.206895182546       1.529055600000       3.463991829451
        32    2        4.298550585608       1.289058200000       1.068177673544
        33    2        6.941027187730       2.622652000000       0.136231355466
        34    1        1.019568763273       7.525279300000       2.648461396955
        35    1        3.614647754052       8.141355100000       5.940306331771
        36    2       -0.363104817454       7.714555600000       3.463991829451
        37    2        0.728550585608       7.474558200000       1.068177673544
        38    2        3.371027187730       8.808152000000       0.136231355466
        39    1        2.777413938949      11.031220700000       5.744628566647
        40    1        1.856802578376      10.415144900000       2.844139162079
        41    2        5.019050006870      10.841944400000       0.367824659759
        42    2        2.486395761284      11.081941800000       4.164344843236
        43    2        5.128872363406       9.748348000000       3.232398525159
        44    1       -0.792586061051       4.845720700000       5.744628566647
        45    1        5.426802578376       4.229644900000       2.844139162079
        46    2        1.449050006870       4.656444400000       0.367824659759
        47    2       -1.083604238716       4.896441800000       4.164344843236
        48    2        1.558872363406       3.562848000000       3.232398525159

And here is the input script:

units   metal
dimension  3
boundary  p p p
atom_style  atomic

read_data  coesite.lmp
replicate  4 2 5

timestep  0.001
pair_style  tersoff
pair_coeff  * * SiO.tersoff Si O

neighbor      1.0 bin
neigh_modify      delay 1

thermo   1000
thermo_style  custom step  temp  press  pe  vol  fnorm  density
           # Minimization
dump d1  all custom  100  minimization.dump  id  type  x y z
 minimize  0  2.9e-12  100000  10000000
 fix    f0 all box/relax  aniso  1.0  vmax  0.001
 minimize  0  1.0e-11  100000  10000000
 unfix    f0
 minimize  0  1.0e-11  100000  10000000
undump d1 
 
 velocity all create 300 4928459 rot yes dist gaussian
run   100000

dump d2 all custom  1000  everything.dump  id  type  x y z 

 fix    f2 all nvt temp 300 300 0.1
run 100000
 unfix    f2
 write_data d1.lmp
           # Heat
 fix    f3 all nvt temp 300 7000 0.1
run 670000
 unfix    f3
 write_data d2.lmp  
           # Anneal
 fix    f4 all nvt temp 7000 7000 0.1
run 100000
 unfix    f4
 write_data d3.lmp
           # Quench
 fix    f5 all nvt temp 7000 300 0.1
run 670000
 unfix    f5
 write_data d4.lmp
           # Relax
 fix     f6 all nvt temp 300 300 0.1
run 100000
 unfix     f6

write_data amorph_nvt_1920.lmp

undump d2

After that I get an error “Triclinic box skew is too large” which most probably comes from the tilt angle which is more than 120 degrees (LAMMPS limitation). How can I get rid of this message and conserve my system geometry?

Thx in advance.

This topic was already discussed on this forum, please search the archives. You need to rotate your entire system, so that the skew is smaller.

There used to be a box tilt large command, but it looks like it was removed. @akohlmey did that get replaced?

What is your LAMMPS version? I suspect it is an older version, since we removed this error check for LAMMPS version 22 Dec 2022. There used to be a command “box” that would allow to use large box skews: 5.15. Removed commands and packages — LAMMPS documentation

More importantly, since you have a supercell, you can actually reduce the tilt easily and avoid also the inefficiency issues on top of the error. After the “read_data” command you could replace the “replicate” command with this piece of code:

variable        lx equal $(lx)
replicate       4 2 5
group           none empty
change_box      none xz delta $(2.0*v_lx)

This should result in the exact same system with just the tilt reduced by 2 original unit cell lengths in x.

It is no longer needed: 5.15. Removed commands and packages — LAMMPS documentation

I saw that link, but it wasn’t clear to me, does it now always assumes large tilt which could hurt performance?

LAMMPS will print a warning to that effect.

Reading data file ...
  triclinic box = (0 0 0) to (7.14 12.371 6.1923343) with tilt (0 -3.6243096 0)
WARNING: Triclinic box skew is large. LAMMPS will run inefficiently. (src/domain.cpp:220)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
  48 atoms
  read_data CPU = 0.000 seconds

I see, thanks!

Thank You very much Mr. KOHLMEY.

I installed the latest version of LAMMPS and the error disappeared.

Best Regards.

You should still reduce the box tilt as suggested to avoid inefficiencies. LAMMPS’ parallelization and neighbor list construction is the most efficient for orthogonal simulation boxes. The farther you deviate from that, the less efficient the simulation becomes since you have to have more neighbors and more ghost atoms.

Sorry, I forgot to mention that I also reduced the tilt the way you adviced. Thank You again.