Atomic coordinates in a triclinic box

Dear all,

I am trying to run simulation in a triclinic box and I have two questions in this regard.

  1. Despite reading the manual and the mailing list thoroughly, I am still confused about how atomic coordinates of a triclinic box should be defined in the data file. I found two emails asking the same question about this in the mailing list but the responses to these questions seem contradictory:

Here: http://lammps.sandia.gov/threads/msg41658.html

It’s said that atom coordinates “used or output” by Lammps are given in orthogonal basis.

However, here: http://lammps.sandia.gov/threads/msg23803.html

It’s mentioned that “the actual positions of the atoms” in a triclinic box should be given in the data file.

So, could somebody please clarify this for me that finally atom coordinates of a triclinic unit cell should be given in orthogonal basis or in the triclinic non-orthogonal basis in the data file?

  1. I have optimized a carbon structure in Gulp, from which I get the lattice vectors of (a, b, c and alpha, beta, gamma). Using the instruction given in the documentation (section 6-12), I can convert this to the nomenclature used by Lammps (lx, ly, lz and xy, xz, yz). However, the calculated values of lx, ly and lz are slightly smaller than the actual (xlo – xhi), (ylo – yhi) and (zlo – zhi) respectively, which simply means if I feed these lattice vectors to Lammps, some of the atoms will be left outside the box. I am sure about my calculation and I can trust on the initial lattice vectors given by Gulp but I can’t figure out what might be missing here! I was just wondering if anybody perhaps could give me a hint on this and let me know if I am missing something?

Many thanks for your assistance in advance.

Best regards,

Amir

Dear all,

I am trying to run simulation in a triclinic box and I have two questions in
this regard.

1. Despite reading the manual and the mailing list thoroughly, I am
still confused about how atomic coordinates of a triclinic box should be
defined in the data file. I found two emails asking the same question about
this in the mailing list but the responses to these questions seem
contradictory:

Here: http://lammps.sandia.gov/threads/msg41658.html

It’s said that atom coordinates “used or output” by Lammps are given in
orthogonal basis.

However, here: http://lammps.sandia.gov/threads/msg23803.html

It’s mentioned that “the actual positions of the atoms” in a triclinic box
should be given in the data file.

those two statements are *not* in contradiction. coordinates are
specified as absolute cartesian coordinates, even if you have a
triclinic cell. that is true for creating atoms on a lattice in then
input or through reading a data file.

So, could somebody please clarify this for me that finally atom coordinates
of a triclinic unit cell should be given in orthogonal basis or in the
triclinic non-orthogonal basis in the data file?

2. I have optimized a carbon structure in Gulp, from which I get the
lattice vectors of (a, b, c and alpha, beta, gamma). Using the instruction
given in the documentation (section 6-12), I can convert this to the
nomenclature used by Lammps (lx, ly, lz and xy, xz, yz). However, the
calculated values of lx, ly and lz are slightly smaller than the actual (xlo
– xhi), (ylo – yhi) and (zlo – zhi) respectively, which simply means if I

xlo, xhi are the maximum extent in x and not the same as lx for a
triclinic cell (please note that it is xhi-xlo and not the other way
around.). same goes for the other two. however, i don't think that lz
is shorter than zhi-zlo. it should be longer.

Dear Axel,

Thank you for your helpful comments.
I understand that the atom coordinates are specified as absolute cartesian coordinates. So, if the actual positions of the atoms of a triclinic unit cell are given in the data file, what in fact the former email implies when it says the coordinates are given in *orthogonal basis*? (http://lammps.sandia.gov/threads/msg41658.html)

I apologize if this is not clear to me yet.
Best regards,

Amir

Dear Axel,

Thank you for your helpful comments.
I understand that the atom coordinates are specified as absolute cartesian coordinates. So, if the actual positions of the atoms of a triclinic unit cell are given in the data file, what in fact the former email implies when it says the coordinates are given in *orthogonal basis*? (http://lammps.sandia.gov/threads/msg41658.html)

same as i said before: absolute cartesian coordinates.

read the manual again. THAT is the authoritative resource. and don't
get hung up on a random e-mail from the mailing list. ...and if that
doesn't help. build some small test system where you place atoms at
the boundaries and see which ones are inside or outside.

we could keep arguing about semantics for days, but it will not get
you anywhere.

axel.

Dear Axel,

Thank you for your reply.

Let me get back to my 2nd question in my original email:

“2. I have optimized a carbon structure in Gulp, from which I get the lattice vectors of (a, b, c and alpha, beta, gamma). Using the instruction given in the documentation (section 6-12), I can convert this to the nomenclature used by Lammps (lx, ly, lz and xy, xz, yz). However, the calculated values of lx, ly and lz are slightly smaller than the actual (xhi- xlo), (yhi- ylo) and (zhi- zlo) respectively, which simply means, if I feed these lattice vectors to Lammps, some of the atoms will be left outside the box. I am sure about my calculation and I can trust on the initial lattice vectors given by Gulp but I can’t figure out what might be missing here! I was just wondering if anybody perhaps could give me a hint on this and let me know if I am missing something?”

And your response to my question was:

“xlo, xhi are the maximum extent in x and not the same as lx for a triclinic cell. same goes for the other two. however, i don’t think that lz is shorter than zhi-zlo. it should be longer”.

I have the original lattice vectors from Gulp (table 1):

As a conclusion, it seems LAMMPS always assumes (xhi- xlo), (yhi- ylo) and (zhi- zlo) are equal to lx, ly and lz regardless of what the tilt factors or atomic coordinates are in the data file.

Now, I wonder how this can be true if “xlo, xhi are the maximum extent in x and not the same as lx for a triclinic cell”?! I would like to repeat my question asked at the beginning of this email and I would very much appreciate it, if you >

could kindly clarify this.

Not sure what you are asking. The xlo/xhi specified

in the read_data command are different than those

printed in a dump file, when the box is triclinic.

The doc page for each explains what they are.

The ones in the dump file are “max extent” b/c

they are intended to be a bounding box for viz.

Steve

Hi Steve,

Thank you for your reply.
The question was not about the lattice parameters as they are printed in the dump file but those printed using Thermo Style command in the output file.
I gave two specific examples, where the lattice parameters calculated by lammps for a triclinic unit cell are not consistent between the two nomenclatures discussed in section 6-12 of the user manual (which are a, b, c, alpha, beta, gamma versus Lx, Ly, Lz, xy, xz, yz). When I used Xhi – Xlo, Yhi – Ylo and Zhi – Zlo instead of the Lx, Ly and Lz in the data file (of course along with xy, xz, yz), Lammps couldn’t reproduce a, b, c, alpha, beta, gamma correctly.

Best regards,
Amir

Sorry, I’m unclear by what you mean by this:

“the lattice parameters calculated by lammps for a triclinic unit cell are not consistent between the two nomenclatures”

and this:

“When I used Xhi – Xlo, Yhi – Ylo and Zhi – Zlo instead of the Lx, Ly and Lz in the data file (of course along with xy, xz, yz), Lammps couldn’t reproduce a, b, c, alpha, beta, gamma correctly.”

Not sure how you are inferring what you think LAMMPS is doing.

The only access you have are the triclinic params input via the read_data or create_box command.
And the only output access is via the thermo or dump command.

Are you saying that some of those input or output values are not valid for the problem you have setup?

If so, can you re-explain (as simply as possible) the issue, and post a simple input script/output that
illlustrate?

Steve