pair_coeff command¶
Syntax¶
pair_coeff I J args
I,J = atom types (see asterisk form below)
args = coefficients for one or more pairs of atom types
Examples¶
pair_coeff 1 2 1.0 1.0 2.5 pair_coeff 2 * 1.0 1.0 pair_coeff 3* 1*2 1.0 1.0 2.5 pair_coeff * * 1.0 1.0 pair_coeff * * nialhjea 1 1 2 pair_coeff * 3 morse.table ENTRY1 pair_coeff 1 2 lj/cut 1.0 1.0 2.5 (for pair_style hybrid)
Description¶
Specify the pairwise force field coefficients for one or more pairs of atom types. The number and meaning of the coefficients depends on the pair style. Pair coefficients can also be set in the data file read by the read_data command or in a restart file.
I and J can be specified in one of two ways. Explicit numeric values can be used for each, as in the 1st example above. I <= J is required. LAMMPS sets the coefficients for the symmetric J,I interaction to the same values.
A wildcard asterisk can be used in place of or in conjunction with the I,J arguments to set the coefficients for multiple pairs of atom types. This takes the form “*” or “*n” or “n*” or “m*n”. If N = the number of atom types, then an asterisk with no numeric values means all types from 1 to N. A leading asterisk means all types from 1 to n (inclusive). A trailing asterisk means all types from n to N (inclusive). A middle asterisk means all types from m to n (inclusive). Note that only type pairs with I <= J are considered; if asterisks imply type pairs where J < I, they are ignored.
Note that a pair_coeff command can override a previous setting for the same I,J pair. For example, these commands set the coeffs for all I,J pairs, then overwrite the coeffs for just the I,J = 2,3 pair:
pair_coeff * * 1.0 1.0 2.5 pair_coeff 2 3 2.0 1.0 1.12
A line in a data file that specifies pair coefficients uses the exact same format as the arguments of the pair_coeff command in an input script, with the exception of the I,J type arguments. In each line of the “Pair Coeffs” section of a data file, only a single type I is specified, which sets the coefficients for type I interacting with type I. This is because the section has exactly N lines, where N = the number of atom types. For this reason, the wild-card asterisk should also not be used as part of the I argument. Thus in a data file, the line corresponding to the 1st example above would be listed as
2 1.0 1.0 2.5
For many potentials, if coefficients for type pairs with I != J are not set explicitly by a pair_coeff command, the values are inferred from the I,I and J,J settings by mixing rules; see the pair_modify command for a discussion. Details on this option as it pertains to individual potentials are described on the doc page for the potential.
Many pair styles, typically for many-body potentials, use tabulated potential files as input, when specifying the pair_coeff command. Potential files provided with LAMMPS are in the potentials directory of the distribution. For some potentials, such as EAM, other archives of suitable files can be found on the Web. They can be used with LAMMPS so long as they are in the format LAMMPS expects, as discussed on the individual doc pages.
When a pair_coeff command using a potential file is specified, LAMMPS looks for the potential file in 2 places. First it looks in the location specified. E.g. if the file is specified as “niu3.eam”, it is looked for in the current working directory. If it is specified as “../potentials/niu3.eam”, then it is looked for in the potentials directory, assuming it is a sister directory of the current working directory. If the file is not found, it is then looked for in the directory specified by the LAMMPS_POTENTIALS environment variable. Thus if this is set to the potentials directory in the LAMMPS distro, then you can use those files from anywhere on your system, without copying them into your working directory. Environment variables are set in different ways for different shells. Here are example settings for
csh, tcsh: % setenv LAMMPS_POTENTIALS /path/to/lammps/potentials bash: % export LAMMPS_POTENTIALS=/path/to/lammps/potentials Windows: % set LAMMPS_POTENTIALS="C:Path to LAMMPSPotentials
Here is an alphabetic list of pair styles defined in LAMMPS. Click on the style to display the formula it computes, arguments specified in the pair_style command, and coefficients specified by the associated pair_coeff command.
Note that there are also additional pair styles submitted by users which are included in the LAMMPS distribution. The list of these with links to the individual styles are given in the pair section of this page.
There are also additional accelerated pair styles included in the LAMMPS distribution for faster performance on CPUs and GPUs. The list of these with links to the individual styles are given in the pair section of this page.
pair_style hybrid - multiple styles of pairwise interactions
pair_style hybrid/overlay - multiple styles of superposed pairwise interactions
pair_style adp - angular dependent potential (ADP) of Mishin
pair_style airebo - AIREBO potential of Stuart
pair_style beck - Beck potential
pair_style body - interactions between body particles
pair_style bop - BOP potential of Pettifor
pair_style born - Born-Mayer-Huggins potential
pair_style born/coul/long - Born-Mayer-Huggins with long-range Coulombics
pair_style born/coul/msm - Born-Mayer-Huggins with long-range MSM Coulombics
pair_style born/coul/wolf - Born-Mayer-Huggins with Coulombics via Wolf potential
pair_style brownian - Brownian potential for Fast Lubrication Dynamics
pair_style brownian/poly - Brownian potential for Fast Lubrication Dynamics with polydispersity
pair_style buck - Buckingham potential
pair_style buck/coul/cut - Buckingham with cutoff Coulomb
pair_style buck/coul/long - Buckingham with long-range Coulombics
pair_style buck/coul/msm - Buckingham long-range MSM Coulombics
pair_style buck/long/coul/long - long-range Buckingham with long-range Coulombics
pair_style colloid - integrated colloidal potential
pair_style comb - charge-optimized many-body (COMB) potential
pair_style coul/cut - cutoff Coulombic potential
pair_style coul/debye - cutoff Coulombic potential with Debye screening
pair_style coul/dsf - Coulombics via damped shifted forces
pair_style coul/long - long-range Coulombic potential
pair_style coul/msm - long-range MSM Coulombics
pair_style coul/wolf - Coulombics via Wolf potential
pair_style dipole/cut - point dipoles with cutoff
pair_style dpd - dissipative particle dynamics (DPD)
pair_style dpd/tstat - DPD thermostatting
pair_style dsmc - Direct Simulation Monte Carlo (DSMC)
pair_style eam - embedded atom method (EAM)
pair_style eam/alloy - alloy EAM
pair_style eam/fs - Finnis-Sinclair EAM
pair_style eim - embedded ion method (EIM)
pair_style gauss - Gaussian potential
pair_style gayberne - Gay-Berne ellipsoidal potential
pair_style gran/hertz/history - granular potential with Hertzian interactions
pair_style gran/hooke - granular potential with history effects
pair_style gran/hooke/history - granular potential without history effects
pair_style hbond/dreiding/lj - DREIDING hydrogen bonding LJ potential
pair_style hbond/dreiding/morse - DREIDING hydrogen bonding Morse potential
pair_style kim - interface to potentials provided by KIM project
pair_style lcbop - long-range bond-order potential (LCBOP)
pair_style line/lj - LJ potential between line segments
pair_style lj/charmm/coul/charmm - CHARMM potential with cutoff Coulomb
pair_style lj/charmm/coul/charmm/implicit - CHARMM for implicit solvent
pair_style lj/charmm/coul/long - CHARMM with long-range Coulomb
pair_style lj/charmm/coul/msm - CHARMM with long-range MSM Coulombics
pair_style lj/class2 - COMPASS (class 2) force field with no Coulomb
pair_style lj/class2/coul/cut - COMPASS with cutoff Coulomb
pair_style lj/class2/coul/long - COMPASS with long-range Coulomb
pair_style lj/cut - cutoff Lennard-Jones potential with no Coulomb
pair_style lj/cut/coul/cut - LJ with cutoff Coulomb
pair_style lj/cut/coul/debye - LJ with Debye screening added to Coulomb
pair_style lj/cut/coul/dsf - LJ with Coulombics via damped shifted forces
pair_style lj/cut/coul/long - LJ with long-range Coulombics
pair_style lj/cut/coul/msm - LJ with long-range MSM Coulombics
pair_style lj/cut/tip4p/cut - LJ with cutoff Coulomb for TIP4P water
pair_style lj/cut/tip4p/long - LJ with long-range Coulomb for TIP4P water
pair_style lj/expand - Lennard-Jones for variable size particles
pair_style lj/gromacs - GROMACS-style Lennard-Jones potential
pair_style lj/gromacs/coul/gromacs - GROMACS-style LJ and Coulombic potential
pair_style lj/long/coul/long - long-range LJ and long-range Coulombics
pair_style lj/long/tip4p/long - long-range LJ and long-range Coulomb for TIP4P water
pair_style lj/smooth - smoothed Lennard-Jones potential
pair_style lj/smooth/linear - linear smoothed Lennard-Jones potential
pair_style lj96/cut - Lennard-Jones 9/6 potential
pair_style lubricate - hydrodynamic lubrication forces
pair_style lubricate/poly - hydrodynamic lubrication forces with polydispersity
pair_style lubricateU - hydrodynamic lubrication forces for Fast Lubrication Dynamics
pair_style lubricateU/poly - hydrodynamic lubrication forces for Fast Lubrication with polydispersity
pair_style meam - modified embedded atom method (MEAM)
pair_style mie/cut - Mie potential
pair_style morse - Morse potential
pair_style peri/lps - peridynamic LPS potential
pair_style peri/pmb - peridynamic PMB potential
pair_style reax - ReaxFF potential
pair_style rebo - 2nd generation REBO potential of Brenner
pair_style resquared - Everaers RE-Squared ellipsoidal potential
pair_style soft - Soft (cosine) potential
pair_style sw - Stillinger-Weber 3-body potential
pair_style table - tabulated pair potential
pair_style tersoff - Tersoff 3-body potential
pair_style tersoff/zbl - Tersoff/ZBL 3-body potential
pair_style tri/lj - LJ potential between triangles
pair_style yukawa - Yukawa potential
pair_style yukawa/colloid - screened Yukawa potential for finite-size particles
pair_style zbl - Ziegler-Biersack-Littmark potential
Restrictions¶
This command must come after the simulation box is defined by a read_data, read_restart, or create_box command.