[lammps-users] Outputting Coordination Number?

Hi all,

I am doing some work on point defects in 3C SiC (zinc-blende structure), and wanted to know if there was any options available in LAMMPS for outputting coordination number (i.e. number of nearest neighbors). I noticed that one can get centrosymmetry, but that doesn’t seem to be very useful for what I am trying to do, since the equation used seems more suited to FCC or BCC systems and isn’t an integer quantity (I would prefer the CN for visualization, an integer makes creating cutoffs in visualization more meaningful and clean in my opinion); there was also the option for potential energy, however LAMMPS reports that the Tersoff potential doesn’t support outputting per-atom potential energies (and also - not an integer even if it did work, but would probably be more meaningful than CSP).

In short - can one output coordination number from LAMMPS? I would prefer to have the code do it, as doing it in post-processing may get cumbersome particularly for large and long simulations.

Thanks,

Dave

David E. Farrell

Graduate Student

Mechanical Engineering

Northwestern University

email: [email protected]…435…

Hi Dave.

You’re essentially asking for the Delaunay/Voronoi graph. I don’t think there is any built-in way for LAMMPS to do this (maybe someone knows better?), but it would not be terribly difficult to do it. You would need to construct the bisecting planes for each neighbor and start throwing away redundant neighbors (classical problem in computational geometry). I’ve been hesitating for months on whether to implement an on-line Voronoi/Delaunay routine… essentially copy and prune the neighbor list…, but I’ve just been settling for doing this in post-processing with the “qhull” package (qhull.org). There’s also a package called “triangle” available on netlib. Now I’m getting to systems which are large enough to make this a pain to do in post-processing, so I may actually get around to putting it on-line. Please let me know if you do it.

Note that the standard voronoi/delaunay routines (sweepline) are O[n log(n)]. If you have an oracle that knows the radius of the largest voronoi cell (e.g. the LAMMPS neighbor list is a super-set of the delaunay graph) , then it’s just an O[n] thing (with a NICE pre-factor, since LAMMPS has already built the neighbor list).

–Craig

Hi Craig,

That sounds like something that may be beyond my abilities (at least at the moment), but I would be willing to take a look at at least doing a rough estimate based on a nearest-neighbor cutoff radius value taken from the input to do some basic pruning of the neighbor list. That way, it would ideally be a modification of the CSP code, which needs a list of at least nearby atoms and the distances. I haven’t taken a look at the code for that, so I am just assuming at this point.

Dave

Just posted a patch to compute the coordination number (# of neighbors
less than a cutoff distance away), via a compute coord/atom command.

Steve

Great! Thanks for that speedy response.

Dave

If you need coord. number only for visualization, AtomEye does a good
job. It calculates CN on-fly and can color atoms according to CN or
make atoms with given CN invisible (e.g. to show only defected atoms).
And you can easily play with CN cutoff.

Marcin