[lammps-users] How to make datafile

Dear lammps developer/users,

I have written a script with pair_style hybrid, system has 20 atom types, I tend to use “lj/charmm/coul/long & airebo & lj/cut 8.5” pair styles and them pair coeffs, then i want to write these pair coeffs to data file, What format and how I should sum these into one datafile?

Pair Coeffs # for lj/charmm/coul/long 8 10

1 0.046 0.4000135 0.046 0.4000135
2 0.046 0.4000135 0.046 0.4000135
19 0.055 3.875409 0.01 3.385415


pair_coeff 1 20 lj/cut 3.1 .0105
pair_coeff 2 20 lj/cut 3.4 .0103
pair_coeff 19 20 lj/cut 3.1 .0101

as well as

pair_coeff 20 20 tersoff SiC.tersoff

Thanks a lot,

The doc page for pair_coeff explains the one minor difference
between listing pair coeffs in a data file vs your input script.


Dear LAMMPS users,

the Hertzian forces Fn and Ft in pair_style gran/hertz differ from the values in the Zhang paper by a factor of sqrt(2), which comes from the different definition of the R = sqrt(RiRj/Ri+Rj) term.
In the Zhang paper R is merely the geometric mean of the particle radii R = sqrt(2RiRj/Ri+Rj) ...

Can someone confirm this discrepancy?

With kind regards,
Thomas Wagner.

You can look in the source code, but I'm pretty confident that
what is on the LAMMPS WWW page is what is implemented
in the code. I think what you are describing is just a pre-factor.


Dear LAMMPS users,

in pair_lubricate.cpp the shape[itype][0] value is taken as the radius of the atom of type itype, whereas the documentation says that shape stores the diameter of the atoms?

Furthermore, I checked the interaction between two atoms with

shape * 1.0 1.0 1.0

and an outer cutoff radius of 1.0 for pair_style lubricate. The interaction started when the center-to-center distance became less than 1.0. That would mean the atom type radius is zero.

With kind regards,
Thomas Wagner.

I'll check this. We actually use, internally, an unreleased pair lubricate2
that has some other enhancements.


I don't see anything obvious wrong with the source code for pair_lubricate.cpp.

Shape is specified (in the input script) as a diameter, but it is
stored internally
as a radius, which is how the source code treats it. Also note this from the
doc page:

Unlike most pair potentials, the two specified cutoffs (cutinner and
cutoff) refer to the surface-to-surface separation between two
particles, not center-to-center distance. Currently, this pair style
can only be used for mono-disperse extended spheres (same radii), so
that separation is r_ij - 2*radius, where r_ij is the center-to-center
distance between the particles. Within the inner cutoff cutinner, the
forces and torques are evaluated at a separation of cutinner. The
outer cutoff is the separation distance beyond which the pair-wise
forces are zero

So the cutoffs you specify are not center-to-center distances. The
code computes
h_sep = r - 2.0*radi;
which seems correct.