**From:** Mark Abraham (*Mark.Abraham_at_anu.edu.au*)

**Date:** Wed Jul 07 2004 - 22:35:44 CDT

**Next message:**Mark Abraham: "Re: octahedral period BCs"**Previous message:**Peter Jones: "Re: octahedral period BCs"**In reply to:**Peter Jones: "Re: octahedral period BCs"**Next in thread:**Mark Abraham: "Re: octahedral period BCs"**Reply:**Mark Abraham: "Re: octahedral period BCs"**Messages sorted by:**[ date ] [ thread ] [ subject ] [ author ] [ attachment ]

On Thu, 2004-07-08 at 12:34, Peter Jones wrote:

*> >> Hi all,
*

*> >>
*

*> >> I wonder if anyone could explain how one defines hexagonal unit cell
*

*> >> shapes when using periodic boundary conditions in NAMD, or direct me
*

*> >> to
*

*> >> a suitable reference,
*

See an inorganic chemistry text book for discussions on crystal packing

arrangements for some background here.

There are some small number of different ways you can define a repeating

volume defined by a given number of planar faces, depending on the

angles and distances between the planes. A cube is easy (three square

faces mutually at 90 degrees with the same edge length), a hexagonal

prism is almost as easy.

Once you have worked out the geometry you're packing, you need to

describe the three vectors that tell the computer the directions it

should move in order to replicate the periodic box. In

linear-algebra-speak these are the "basis vectors". With a cube, that's

easy - just move in the directions of the edges about any vertex. This

might gives basis vectors of (2,0,0), (0,2,0), (0,0,2) for a cubic

periodic cell of side length 2. You could also use (-2,0,0), (0,120) and

(0,0,-2) for reasons that are tedious to explain - try it and see. Think

about why (1,0,0), (0,1,0), (0,0,-1) wouldn't work.

With a hexagonal prism (i.e. a solid with parallel hexagonal faces

joined by six rectangular faces perpendicular to the hexagonal faces)

which I think you want to replicate, you need basis vectors that have

one 60 degree angle and two ninety degree angles between them. Try

writing out a tessellation of hexagons on paper to see why. Using the

two vectors at 60 degrees you can get from any hexagon center to any

other just using moves that correspond to those vectors (including moves

in the negative direction). The third vector (at 90 degrees to those

two) works like the cubic vectors...

Thus for

a hexagon side length of h and,

a prism height of p, and

that has the hexagonal faces parallel to the xy-plane,

vectors like

(h , 0 , 0)

(h/2, root(3)*h/2, 0)

(0 , 0 , p)

do the replication.

The sadistic might replace the second vector above by

(-h/2, root(3)*h/2, 0)

which should also work... :-)

Having said all that, I haven't ever done this in NAMD or anything else,

so I'm only guessing that that's the basis vectors it would want from

some orthorhombic examples they've given in the manual.

See page 61 for the periodic box syntax, of course.

Mark

P.S. Bonus question: Can you do a triangular prism periodic condition?

Why/Why not?

**Next message:**Mark Abraham: "Re: octahedral period BCs"**Previous message:**Peter Jones: "Re: octahedral period BCs"**In reply to:**Peter Jones: "Re: octahedral period BCs"**Next in thread:**Mark Abraham: "Re: octahedral period BCs"**Reply:**Mark Abraham: "Re: octahedral period BCs"**Messages sorted by:**[ date ] [ thread ] [ subject ] [ author ] [ attachment ]

*
This archive was generated by hypermail 2.1.6
: Wed Feb 29 2012 - 15:37:44 CST
*