poly-disperse LJ system

Dear all,
I’d like to simulate a poly-disperse LJ system, with a Gaussian distribution of particle sizes. How should I do that? Do I need to modify the source code?

Best,
Nima

Dear all,
I'd like to simulate a poly-disperse LJ system, with a Gaussian distribution
of particle sizes. How should I do that? Do I need to modify the source
code?

the most straightforward way in my opinion would be to write a little
script or program that creates a suitable data file. no changes to LAMMPS
itself are required for that.

cheers,
    axel.

Thanks Axel,
It seems to practical. However there is small issue in setting pair coef… In data file one cannot set arbitrary pair coef. for particle type I and J when I!=J. any idea how to overcome this problem?

Best,
Majid.

Thanks Axel,
It seems to practical. However there is small issue in setting pair coef..
In data file one cannot set arbitrary pair coef. for particle type I and J
when I!=J. any idea how to overcome this problem?

those pair coefficients are traditionally generated through mixing rules.
you can control which mixing rule is applied through the pair_modify command.

if that is not what you want, you can always generate a second file
that contains all the permutations of coefficients via the pair_coeff
command and then read it into your lammps input script via the
include command _after_ read_data. this is what we do for our
cg/cmm coarse grain model for example.

cheers,
    axel.

If you want fully general polydispersity,
where individual atoms have their own sigma (effective size),
then you'll need to write your own pair style to do that.

Note that there is an atom_style sphere where each particle
can be given a diameter. Also the set command could easily
be extended to set diameters according to some distribution.
Or you could do as Axel suggested and create a data file
with the distribution of sizes you want.

Then you could use pair_lj_cut.cpp as a starting point and
create a new pair_style that simply replaces the kernel where
it uses a per-type sigma, with
the per-atom diameter.

Steve