lattice equivalent for Graphene Nanotube moltemplate example

Hello Andrew,

I had build a system based on the example in the moltemplate website
(Graphene, water and nanotube example).

I hope I am not spamming anyone by forwarding this conversation to the list.

That is a somewhat complicated example. I hope it was not hard to
follow. If it is helpful, here is another picture of that system,
viewed from a different angle:
http://www.moltemplate.org/images/nanotube+water/nanotube+walls+water_top_nopbc_t=0.jpg

(The system looks rectangular after periodic boundary conditions are applied
http://www.moltemplate.org/images/nanotube+water/nanotube+walls+water_side_pbc_t=0ps.jpg)

I want to begin by saying that there are several ways to build this
system. Laurent Joly posted the scripts he used to build this system
here:
http://lammps.sandia.gov/scripts.html

I wanted to create some regions in
lammps using the region command, but however I was unable to decide upon the
lattice for this system.
Could you please let me know how to specify the
lattice for the given example?

I have never used the "lattice" command, but from looking at the
documentation, I think (for graphene with C-C bond-length 1.42A) it
would be:

lattice custom 2.4595121467478 &
      a1 1.0 0.0 0.0 &
      a2 0.5 0.8660254037844386 0.0 &
      a3 0.0 0.0 1.0 &
      basis 0.0 0.0 0.0 &
      basis 0.5 0.28867513459481287 0.0
Note: Grahene is a 2-D crystal,. However your simulation is in 3-D.
For this reason, I think we must include an a3 vector (even though it
is meaningless). So I used "a3 0.0 0.0 1.0" here. This was
arbitrary. Please ignore it.

Please do not be angry if this lattice command does not work. I have
not tried it.

   --- Where do these numbers come from? ----

The lattice vectors for the 2-dimensional graphene sheet which I am
using are expressed (in Angstroms) in the command which creates the
wall. This information is located in the "graphene_walls.lt" file.
(http://www.moltemplate.org/examples/nanotube+water/graphene_walls.lt)

unitcells = new Graphene/2AtomCellAlignX
                          [14].move(1.2297560733739, 2.13, 0)
                          [13].move(2.4595121467478, 0, 0)
  :

This is a hexagonal unit cell. The length of each lattice vector is
2.4595121467478 Angstroms. However, LAMMPS wants us to express the
other coordinates in units of this distance, so I divide all
coordinates by 2.4595121467478. This results in:
      a1 1.0 0.0 0.0 &
      a2 0.5 0.8660254037844386 0.0 &

The contents of each unit cell in this example were defined in
"graphene.lt" (http://www.moltemplate.org/examples/nanotube+water/graphene.lt).
The positions of the atoms in each unit cell are defined there:

2AtomCellAlignX
{
  # atomID molID atomType charge x y z
  write("Data Atoms") {
    $atom:C1 $mol:... @atom:../C 0.0 -0.61487804 -0.355 0.0
    $atom:C2 $mol:... @atom:../C 0.0 0.61487804 0.355 0.0
  }
}

If I understand correctly, the numbers following the "basis" arguments
are the coordinates of each atom in this unit cell.
(http://lammps.sandia.gov/doc/lattice.html) We must divide them by
the lattice-cell length as well (2.4595121467478). This results in:
      basis -0.25 -0.14433756729740643 &
      basis 0.25 0.14433756729740643

however I offset the two positions so that they are not negative.
This resulted in:
      basis 0.0 0.0 0.0 &
      basis 0.5 0.28867513459481287 0.0

--- Combining this information, the result is: ---

lattice custom 2.4595121467478 &
      a1 1.0 0.0 0.0 &
      a2 0.5 0.8660254037844386 0.0 &
      a3 0.0 0.0 1.0 &
      basis 0.0 0.0 0.0 &
      basis 0.5 0.28867513459481287 0.0

Could you please also let me know how to cite
Moltemplate?

Unfortunately I have not yet had time to published a paper on
moltemplate, but I'd like to. I will let you know if I do. Thanks
for offering to cite me!
Cheers!

Andrew