[lammps-users] phonon dispersion curves

Hi all;

I’m writing a compute class for calculating the phonon dispersion curves (for EAM potentials only). I need the set of basis vectors/atom types, which I’ve found are obtainable from lattice.cpp. A problem arises with systems that have multiple atom types in the unit cell (ie NaCl). I’ve had trouble setting up simple multi-element systems like this in the past, how would something like NaCl usually be defined in LAMMPS? How I thought this would be done(not working):

#----------NaCl toy code

#create lattice
lattice fcc 5.64
region box block 0 2 0 2 0 2
create_box 2 box
create_atoms 1 box
create_atoms 2 ??? #place the Cl atoms on top of the Na at just the lattice faces, not sure how to do this

EAM potentials

pair_style eam/alloy
pair_coeff * * …/potentials/NaCl.lammps.eam Na Cl

group sodi type 1
group chlo type 2
delete_atoms overlap 0.1 sodi chlo #delete overlapping Na atoms (they are deleted first)

#-----------End toy code

Of course the other option is to just have the user type in the basis vectors and corresponding atom types as an argument to the compute phonon command. Either way this is a problem that has bugged me for a while, and my work around for getting these kind of systems up is ugly. Thanks for your help.

Cheers;
-AdamC

Adam,

You can create an NaCl box by using two lattice commands, one for Na and the other for Cl, the origin for the latter being offset by 0.5,0,0. You can do this because both Na and Cl atoms lie on fcc sublattices!
Hope that helps.

Sai.

Having your compute depend on lattice.cpp is a bad idea,
b/c there is no guarantee the user has not defined the
lattice command multiple times in an input script (or
not at all, just reading atoms from a data file). There are
many different ways to define a NaCl lattice with the
LAMMPS lattice command, so how would your compute
know which form was used. You'd probably be
better off making the needed params be args to
your compute.

Steve

On 2nd thought, what you could do is have your compute
check that the lattice command has been defined, and document
that the compute will use the current lattice settings at
the time the compute is defined. That way you can require
the user to first define the lattice command in the way
that makes sense for your phonon compute to use,
for NaCl or any other system.

Once you get this to work, please send me the new compute
(to me directly via email). It sounds like it may be of interest
for users in general.

Thanks,
Steve

Sai, thanks for your help. I had no idea you could declare multiple lattice commands, since you don’t associate the lattice with a group I just assumed it was a global command.

Steve, for now I think I’ll just have the user input the basis atoms they want, this is simplest for dev/testing purposes and easily changed later on. Something else has just come up so it’ll be a while before I get to put some serious effort into this, sorry about the delay.

Also I forgot to mention earlier that I have a new compute class for calculating the elastic constants through the 2nd derivative of inter-atomic potential (just for EAM). I can just give that to you when I finish the phonon dispersion code, whatever is easiest for you.

-AdamC