Pair styles SW and Tersoff used in the same simulation

Hi all:
I have a question regarding the possible combined use of SW and Tersoff potentials in a single simulation. I understand that LAMMPS (12-Jun11) requires that the arguments of the command line 'pair coeff' for each of these two potentials must be '* *'. I have reviewed the functions 'void PairTersoff::coeff(int narg, char **arg)' and 'void PairSW::coeff(int narg, char **arg)' where this condition is enforced. Some lines below, I can read that the setflag is clear since the coefficients I,J = * *.

I am running a dummy test of two blocks of silicon of 20 nm3 each separated by a distance of 0.4 nm such that there is no interaction between each other by using aa ZBL potential. See attached input script. If I comment out the conditional statement:

if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0)
error->all("Incorrect args for pair coefficients");

I am able to run this simulation and results are generated but I am more interested in the logical or physical effects that this rough decision might imply in the simulation.

Thank you,

- Fernan Saiz
Dept. of Mechanical and Aerospace Engineering
University of California, Irvine
Irvine, CA 92697

in.sw+tersoff (2.51 KB)

fernan,

Hi all:
I have a question regarding the possible combined use of SW and Tersoff
potentials in a single simulation. I understand that LAMMPS (12-Jun11)
requires that the arguments of the command line 'pair coeff' for each of
these two potentials must be '* *'. I have reviewed the functions 'void
PairTersoff::coeff(int narg, char **arg)' and 'void PairSW::coeff(int narg,
char **arg)' where this condition is enforced. Some lines below, I can read
that the setflag is clear since the coefficients I,J = * *.

I am running a dummy test of two blocks of silicon of 20 nm3 each separated
by a distance of 0.4 nm such that there is no interaction between each
other by using aa ZBL potential. See attached input script. If I comment out
the conditional statement:

if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0)
error->all("Incorrect args for pair coefficients");

I am able to run this simulation and results are generated but I am more
interested in the logical or physical effects that this rough decision might
imply in the simulation.

you don't need to modify the sources. just do:

pair_style hybrid sw tersoff ziegler 2.0
pair_coeff * * sw Si.sw Si NULL
pair_coeff * * tersoff Si.tersoff NULL Si
pair_coeff 1 2 ziegler 14 14 3.0

and you should get exactly what you ask for.

the important point about using manybody potentials
with pair_style hybrid is that you _always_ have to include
_all_ permutations of pairs and triples of the atom types
that you flag as active for a specific style. you then only
need to add the potential for the interactions between
the atom types that are not yet covered.

you have to separate Si types and define an
apparently pairwise potential between them.
this is - at least as far as the inner logic of
lammps is concerned - perfectly valid.

cheers,
axel.