[lammps-users] is hybrid sw morse possible?

Hello List,

I need help to set up a hybrid pair potential with sw and lj. I have made the following script and some variants, but I cannot make it work.
This one goes up to the line “print after morse” and then says: ERROR: Pair coeff for hybrid has invalid style/
(If all are sw or all are morse, the script works ok)

Can anyone point to me what’s the right way to set up this hybrid simulation? If I replace the sw for lj/cut works, so I wonder if there is some
limitation for the use of sw with hybrid (and if yes, whether it can be removed).

A second question: in a hybrid simulation that includes a three body potential such as sw, is the three body loop done for all the atoms or
only the sw ones?

Thanks so much for your help,

units real
atom_style full
boundary p p p
special_bonds 0.0 0.0 1.0

#pair_style sw
#pair_style morse 8.
pair_style hybrid sw morse 8.
bond_style harmonic
angle_style none
dihedral_style none
improper_style none
kspace_style none

read_data data.poly24-500mW
newton on

print before morse
pair_coeff * * morse 1. 3.0 3.
print after morse
pair_coeff 1 1 two.sw Si NULL
print after sw

neighbor 2.0 bin
neigh_modify every 2 delay 4 check yes

timestep 10.0
thermo_style one
thermo 50
thermo_modify flush yes

fix 1 all npt 275.0 275.0 500.0 xyz 0. 0. 2000
run 200

data.poly24-500mW (31.8 KB)

two.sw (1.57 KB)

For a hybrid simulation, this command

pair_coeff 1 1 two.sw Si NULL

would have to be

pair_coeff 1 1 sw two.sw Si NULL

just like the Morse pair coeff command.

Re: 3-body loop, I think what will happen is only the SW atoms
will be in the neighbor lists, so the outer part of the loop
will be over all atoms, but the inner parts will only be over SW atoms


Steve, thanks so much for answering my two questions. I am still having problem with the sw, if I use

pair_coeff 1 1 sw two.sw Si NULL

I obtain the following error:
ERROR: Incorrect args for pair coefficients

Do you know how to overcome this problem for sw?
thanks for your help,

It should be

pair_coeff * * 1 1 sw two.sw Si NULL

for the SW potential.