Change box from orthorombic to triclinic to reduce vacuum between periodic images

Dear all,

I am generating a cnt bundle continous in the z direction and hexagonal in the xy plane.
I’d like to have my lammps box simulation with no empty space between periodic images in the xy plane.

I read the data from a text file and I thought to use change box triclinic:

Reading data file ... orthogonal box = (-50.000000 -50.000000 0.0000000) to (50.000000 50.000000 61.487800)
change_box all triclinic
Changing box ... triclinic box = (-50.000000 -50.000000 0.0000000) to (50.000000 50.000000 61.487800) with tilt (0.0000000 0.0000000 0.0000000)

which does virtually nothing since tilt=0.
The difference in the two dump files reports this:

` ITEM: BOX BOUNDS xy xz yz pp pp pp
-5.0000000000000000e+01 5.0000000000000000e+01 0.0000000000000000e+00
-5.0000000000000000e+01 5.0000000000000000e+01 0.0000000000000000e+00
0.0000000000000000e+00 6.1487800000000000e+01 0.0000000000000000e+00

ITEM: BOX BOUNDS pp pp pp
-5.0000000000000000e+01 5.0000000000000000e+01
-5.0000000000000000e+01 5.0000000000000000e+01
0.0000000000000000e+00 6.1487800000000000e+01
`

How can I specify the xy angles to be 60 120?
Any other solution is welcomed.

I could create a orthorombic structure since the beginning, but I’d prefer to keep my system hexagonal for other reasons.

Thank you

You can use change_box command to set tilt ( xy, xz, yz keywords). The conversion from tilt factors to angles can be found here:
https://lammps.sandia.gov/doc/Howto_triclinic.html

Dear Mkanski,

I appreciate your suggestion.
I have inserted the “60 0.0 0.0 xy xz yz” below my cell dimension, as follows:

0.0 120.0000 xlo xhi # or 120=4*30, 30 being the distance between cnts
0.0 25.9808 ylo yhi # or 25.98=sqrt(3)/2*30
0.0 61.4878 zlo zhi #
60.00 0.0 0.0 xy xz yz

So, I modify the input file but and change box triclinic is finally not needed.
Nevertheless, I still want to minimize the box in the xy plane.
I am using a fix npt (xy, iso and aniso) as follows:
fix 3 all npt temp 1 1 0.1 xy 0 0 0.1
but I get a: ERROR: Fix npt/nph has tilted box too far in one step - periodic cell is too far from equilibrium state (src/fix_nh.cpp:1245)

Any other advice how to improve?
Thank you

Best
Marco

You can start with minimization and fix box/relax command, although this error message means that your system is too unstable (and it doesn’t have the angles you wanted).

Hello,

You are true. I thought looking at my orthoromic image that I just had an alomost perfect cell (I would expect they to get to the equilibrium position).
While the triclinic cell is nowhere close what I wanted.


What’s the smartest move here? Shall I just continue with my orthorombic box: ie built-in atoms in a honeycomb cell and lammps reading an orthorombic box?

Thank you
Marco

If you can use an orthogonal box, it is almost always the better solution than using a tricilinic box. The reason for that is that LAMMPS was designed around orthogonal boxes and triclinic box support is implemented by transforming the system into fractional coordinates (and thus making the box orthogonal again) when required (e.g. by communication) and then converting back when the actual coordinates are needed. This adds a lot of numerical noise to the position data and is the reason that some functionality does not work with triclinic boxes (it simply hasn’t been ported or it was too difficult).