LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

pair_style command

Syntax:

pair_style style args 

Examples:

pair_style none
pair_style eam
pair_style gran/history 200000.0 0.5 1.0 1
pair_style lj/charmm/coul/charmm 10.0 10.3
pair_style lj/charmm/coul/charmm/implicit 10.0
pair_style lj/charmm/coul/long 10.0
pair_style lj/cut 2.5
pair_style lj/cut/coul/cut 10.0 8.0
pair_style lj/cut/coul/debye 1.5 3.0
pair_style lj/cut/coul/long 12.0
pair_style lj/expand 2.5
pair_style class2 8.0
pair_style soft 2.0
pair_style table linear 1000
pair_style table bitmap 12
pair_style hybrid lj/charmm/coul/long 10.0 eam 

Description:

Set the formula(s) LAMMPS will use to computing pairwise interactions. In LAMMPS, a pairwise force field includes all pairwise interactions (Lennard Jones, Coulombic, etc), so there is a range of style choices that encompass combinations of multiple kinds of interactions.

The coefficients for the formulas for each atom type pair are set by the pair_coeff command or read from a file by the read_data or read_restart commands. Mixing and shifting of the interaction potentials is discussed is the documentation for the pair_modify command.

The cutoff arguments set global cutoffs for all atom type pairs. The global value can be overridden by the pair_coeff command for a specific pair. The pair style settings (including global cutoffs) can be changed by a subsequent pair_style command using the same style. This will reset the cutoffs for all atom type pairs, including those previously set explicitly by a pair_coeff command. The exceptions to this are that pair_style table and hybrid settings cannot be reset. A new pair_style command for these styles will wipe out all previously specified pair_coeff values.

All cutoff arguments are in distance units. The distance(s) can be smaller or larger than the dimensions of the simulation box.

In the formulas to follow, E is the energy of a pairwise interaction between two atoms separated by a distance r. The force between the atoms is the negative derivative of this expression.


Style none turns off pairwise interactions.

With this choice, the force cutoff is 0.0, which means that only atoms within the neighbor skin distance (see the neighbor command) are communicated between processors. You must insure the skin distance is large enough to acquire atoms needed for computing bonds, angles, etc.

A pair style of none will also prevent pairwise neighbor lists from being built. However if the neighbor style is bin, data structures for binning are still allocated. If the neighbor skin distance is small, then these data structues can consume a large amount of memory. So you should either set the neighbor style to nsq or set the skin distance to a larger value.


The buck styles compute a Buckingham potential (exp/6 instead of Lennard-Jones 12/6) given by

where A, rho, and C are coefficients defined for each pair of atom types. Rc is the cutoff.

The buck/coul/cut and buck/coul/long styles add a Coulombic term as described in the lj/cut styles.


The dipole styles are not yet implemented in LAMMPS. They will enable a point dipole and charge to be assigned to each atom and the resulting charge-dipole and dipole-dipole interactions to be computed.


Style eam computes pairwise interactions for metals and metal alloys using embedded-atom method (EAM) potentials (Daw). The total energy Ei of an atom I is given by

where F is the embedding energy which is a function of the atomic electron density rho, and phi is a pair potential interaction. The multi-body nature of the EAM potential is a result of the embedding energy term. Both summations in the formula are over all neighbors J of atom I within the cutoff distance.

The cutoff distance and the tabulated values of F, rho, and phi are listed in one or more files which are specified by the pair_coeff command. Several files for different metals are in the "potentials" directory of the LAMMPS distribution. These are ASCII text files in a DYNAMO-style format. DYNAMO was a serial MD code authored by two of the EAM originators, Stephen Foiles and Murray Daw.


The gran styles use the following formula (Silbert) for frictional force between two granular particles that are a distance r apart when r is less than the contact distance d.

The 1st term is a normal force and the 2nd term is a tangential force. The other quantites are as follows:

See the citation for more discussion of the granular potentials.


The lj/charmm styles compute LJ and Coulombic interactions with an additional switching function S(r) that ramps the energy and force smoothly to zero between an inner and outer cutoff. It is a widely used option in the CHARMM MD code.

Both the LJ and Coulombic terms require an inner and outer cutoff. They can be the same for both formulas or different depending on whether 2 or 4 arguments are used in the pair_style command. In each case, the inner cutoff distance must be less than the outer cutoff. It it typical to make the difference between the 2 cutoffs about 1.0 Angstrom.

Style lj/charmm/coul/charmm/implicit computes the same formulas as style lj/charmm/coul/charmm except that an additional 1/r term is included in the Coulombic formula. The Coulombic energy thus varies as 1/r^2. This is effectively a distance-dependent dielectric term which is a simple model for an implicit solvent with additional screening. It is designed for use in a simulation of an unsolvated biomolecule (no explicit water molecules).

Style lj/charmm/coul/long computes the same formulas as style lj/charmm/coul/charmm except that an additional damping factor is applied to the Coulombic term, as in the discussion for style lj/cut/coul/long. Only one Coulombic cutoff is specified for lj/charmm/coul/long; if only 2 arguments are used in the pair_style command, then the outer LJ cutoff is used as the single Coulombic cutoff.


The lj/class2 styles compute a 6/9 Lennard-Jones potential given by

where epsilon and sigma are coefficients defined for each pair of atom types. Rc is the cutoff.

The lj/class2/coul/cut and lj/class2/coul/long styles add a Coulombic term as described in the lj/cut styles.


The lj/cut styles compute the standard 6/12 Lennard-Jones potential, given by

where epsilon and sigma are coefficients defined for each pair of atom types. Rc is the cutoff.

Style lj/cut/coul/cut adds a Coulombic pairwise interaction given by

where C is an energy-conversion constant, Qi and Qj are the charges on the 2 atoms, and epsilon is the dielectric constant which can be set by the dielectric command. If one cutoff is specified in the pair_style command, it is used for both the LJ and Coulombic terms. If two cutoffs are specified, they are used as cutoffs for the LJ and Coulombic terms respectively.

Style lj/charmm/coul/debye adds an additional exp() damping factor to the Coulombic term, given by

where Kappa is the Debye length. This potential is another way to mimic the screening effect of a polar solvent.

Style lj/cut/coul/long computes the same Coulombic interactions as style lj/cut/coul/cut except that an additional damping factor is applied to the Coulombic term so it can be used in conjunction with the kspace_style command and its ewald or pppm option. The Coulombic cutoff specified for this style means that pairwise interactions within this distance are computed directly; interactions outside that distance are computed in K-space.


Style lj/expand computes a LJ interaction with a distance shifted by delta

The epsilon, sigma, and delta coefficients are defined for each pair of atom types. Rc is the cutoff.


Style morse computes pairwise interactions with the formula

where D0, alpha, and r0 are coefficients defined for each pair of atom types. Rc is the cutoff.


Style soft is useful for pushing apart overlapping atoms, since it does not blow up as r goes to 0. It computes a pairwise interaction as

where A is a pre-factor that varies in time from the start to the end of the run. Starting and ending values for A are specified by the pair_coeff or read_data command. Rc is the cutoff.


Style table creates interpolation tables of length N from pair potential and force values listed in a file(s) as a function of distance. The files are read by the pair_coeff command which also describes the file format.

The interpolation tables are created by fitting cubic splines to the file values and interpolating energy and force values at each of N distances. During a simulation, these tables are used to interpolate energy and force values as needed. The interpolation is done in one of 4 styles: lookup, linear, spline, or bitmap.

For the lookup style, the distance between 2 atoms is used to find the nearest table entry, which is the energy or force.

For the linear style, the distance is used to find 2 surrounding table values from which an energy or force is computed by linear interpolation.

For the spline style, a cubic spline coefficients are computed and stored each of the N values in the table. The pair distance is used to find the appropriate set of coefficients which are used to evaluate a cubic polynomial which computes the energy or force.

For the bitmap style, the N means to create interpolation tables that are 2^N in length. The pair distance is used to index into the table via a fast bit-mapping technique (Wolff) and a linear interpolation is performed between adjacent table values.


Style yukawa computes pairwise interactions with the formula

where A is a coefficient defined for each pair of atom types. Rc is the cutoff.


The hybrid style enables the use of multiple pair styles in one simulation. A pair style can be assigned to each pair of atom types via the pair_coeff command.

For example, a metal on a LJ surface could be computed where the metal atoms interact with each other via a eam potential, the surface atoms interact with each other via a lj/cut potential, and the metal/surface interaction is also via a lj/cut potential.

All pair styles that will be used must be listed in the pair_style hybrid command (in any order). Each sub-style is listed with its arguments, as illustrated in the last example above.

Restrictions:

This command must be used before any coefficients are set by the pair_coeff, read_data, or read_restart commands.

The hybrid style cannot include any of the gran styles in its list of styles to use. Only one coul/long style can be used in the list of hybrid styles.

Some pair styles are part of specific packages. They are only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.

The gran/hertzian, gran/history, and gran/no_history styles are part of the "granular" package. The lj/charmm/coul/charmm and lj/charmm/coul/charmm/implicit styles are part of the "molecule" package. The lj/cut/coul/long and lj/charmm/coul/long styles are part of the "kspace" package. The eam style is part of the "metal" package.

Related commands:

pair_coeff, read_data, pair_modify, kspace_style, dielectric, pair_write

Default:

pair_style none 

(Daw) Daw, Baskes, Phys Rev Lett, 50, 1285 (1983). Daw, Baskes, Phys Rev B, 29, 6443 (1984).

(Silbert) Silbert, Ertas, Grest, Halsey, Levine, Plimpton, Phys Rev E, 64, p 051302 (2001).

(Wolff) Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999).