lattice/create_atoms bug ?

Hi users and developers,

I may have discovered a bug in the create_atoms/lattice commands ... if not it would be great if you could point out where I am going wrong. Below is a minimal input script which reproduces the problem.

The crystal that is created in this example is correct in the x and z directions, but is not commensurate in the y direction at the cell boundaries, even though it is for every "unit cell".

--- INPUT FILE ----------
echo log
units metal
dimension 3
boundary p p p
atom_style atomic

lattice fcc 3.615 orient x 1 1 1 orient y -1 -1 2 orient z 1 -1 0
region cell block 0 10 0 10 0 10
create_box 1 cell
create_atoms 1 box

pair_style eam/alloy
pair_coeff * * Cu01.eam.alloy Cu ### find at http://www.ctcms.nist.gov/~cbecker/Cu.html

timestep 0.001

compute cna all cna/atom 3.09

dump dump_cfg all cfg 1000 dump.*.cfg id type xs ys zs c_cna
dump_modify dump_cfg element Cu

thermo 100

velocity all create 20.0 482748 dist gaussian

fix barostat all npt temp 10.0 10.0 1 aniso 0.0 0.0 10.0 drag 2.0
run 10000
unfix barostat

write_restart restart.1

Hi users and developers,

I may have discovered a bug in the create_atoms/lattice commands ... if
not it would be great if you could point out where I am going wrong.
Below is a minimal input script which reproduces the problem.

The crystal that is created in this example is correct in the x and z
directions, but is not commensurate in the y direction at the cell
boundaries, even though it is for every "unit cell".

i think the problem is that due to the orientation, you have a
periodicity that is not commensurate with the choice of 10 repeat
units. if you do a 9x9x9 unit cell box it seems to match again.

axel.

I corrected the problem by manually specifying lattice spacing:
spacing 1.73205080757 2.44948974278 1.41421356237

I would be interested in knowing what LAMMPS is calculating for the
Y-lattice spacing because it is not \sqrt(6).

I methodically went thru the LAMMPS code for setting up the lattice. I can't understand the reasoning behind the calculation, perhaps it has to do with triclinic boxes or custom basis vectors, I'm not sure, but the spacing in the y-direction which has direction [-1,-1,2] is 4/sqrt(6) rather than 6/sqrt(6).

But I forgot the spacing option of the command. Thanks.

And thank you also Axel, I will can certainly try to have multiples of 3 for the "unit cells". This is still an error in the code however since the unit cell should be a unit, but at the moment a work around is totally fine with me.