Introduction to atomman: Potential class

Lucas M. Hale, lucas.hale@nist.gov, Materials Science and Engineering Division, NIST.

Disclaimers

1. Introduction

The Potential class is a Python interpretation of the potential_LAMMPS data model record format. The potential_LAMMPS data models contain metadata associated with the LAMMPS input command lines associated with properly running a simulation with the indicated potential. Together, the potential_LAMMPS data model and the Potential class make it easy to design simulations that can be easily executed across multiple potentials of any LAMMPS pair style.

Complete potential_LAMMPS data models in JSON and the associated potential parameter files for all potentials hosted by the NIST Interatomic Potentials Repository can be found at https://potentials.nist.gov/.

Library Imports

[1]:
# Standard libraries
import os
import datetime

# http://www.numpy.org/
import numpy as np

# https://github.com/usnistgov/atomman
import atomman as am
import atomman.lammps as lmp
import atomman.unitconvert as uc

# Show atomman version
print('atomman version =', am.__version__)

# Show date of Notebook execution
print('Notebook executed on', datetime.date.today())
atomman version = 1.3.2
Notebook executed on 2020-04-15

2. Class Basics

The atomman.Potential class is a Python interpretation of the potential_LAMMPS data model record format. A Potential object is initialized by reading in a data model as either a DataModelDict, or JSON or XML content.

2.1.Demonstration data model

This is a demonstration data model record for an eam/alloy style potential. See Section 5. for more details on the data model record format and examples for other pair styles.

[2]:
# Define data model record in JSON format
eam_alloy_json = """{
    "potential-LAMMPS": {
        "key": "a45a7731-d115-4079-b6f5-aa700c5b5c56",
        "id": "EAM-demo--LAMMPS--v1",
        "potential": {
            "key": "820738a9-f556-468b-9041-9d98351ff751",
            "id": "EAM-demo"
        },
        "units": "metal",
        "atom_style": "atomic",
        "atom": [
            {
                "element": "Ni",
                "mass": 58.6934
            },
            {
                "element": "Al",
                "mass": 26.981539
            },
            {
                "element": "Co",
                "mass": 58.9332
            }
        ],
        "pair_style": {
            "type": "eam/alloy"
        },
        "pair_coeff": {
            "term": [
                {
                    "file": "file.eam.alloy"
                },
                {
                    "symbols": "True"
                }
            ]
        }
    }
}"""

2.2. Load a data model with Potential

A Potential object is initialized by loading a data model.

Parameters

  • model (DataModelDict, str, or file-like object) The potential_LAMMPS data model content to load.

  • pot_dir (str, optional) directory location for any artifacts (eg. .eam.alloy files) associated with the potential. A value of None (default) indicates to use the working directory where the simulation will be ran.

[3]:
potential = lmp.Potential(eam_alloy_json)

Alternatively, a data model can be loaded by an existing Potential object with the load() method. It has the same parameters as the class initializer.

[4]:
potential.load(eam_alloy_json, pot_dir='potential_folder')

2.3. Potential identifiers

Each potential_LAMMPS record has multiple terms to uniquely identify the potential model and implementation.

  • potkey (str) uuid4 hash-key for the potential model, i.e. the published mathematical form. This is permanent once assigned.

  • potid (str) human-readable unique identifier for the potential model derived from year, author, element model information. This ideally is permanent, but may change based on updated publication information.

  • key (str) uuid hash-key for the LAMMPS potential implementation, i.e. the specific potential parameter file(s) and/or LAMMPS pair_style/pair_coeff command lines used. This is permament once assigned.

  • id (str) human-readable identifier for the LAMMPS potential implementation derived from the potid, source and version. This may change if potid changes.

Another way to think about it is that potkey and potid name the potential, while key and id name the version.

[5]:
print("potential.potkey ->", potential.potkey)
print("potential.potid -> ", potential.potid)
print("potential.key ->   ", potential.key)
print("potential.id ->    ", potential.id)
potential.potkey -> 820738a9-f556-468b-9041-9d98351ff751
potential.potid ->  EAM-demo
potential.key ->    a45a7731-d115-4079-b6f5-aa700c5b5c56
potential.id ->     EAM-demo--LAMMPS--v1

The string representation of the Potential returns its id.

[6]:
print(potential)
EAM-demo--LAMMPS--v1

2.4. Other attributes

  • atom_style (str) LAMMPS atom_style option for the potential.

  • pair_style (str) LAMMPS pair_style option for the potential.

  • pot_dir (str) the directory containing files associated with the potential.

  • symbols (list) list of all atom-model symbols for the potential.

  • units (str) LAMMPS units option for the potential.

  • allsymbols (bool) flag affecting how pair_coeff lines are generated, is False for most potentials

  • status (str) indicates the current status of the potential implementation

    • ‘active’ = any implementation that is not known to be incorrect or superceded by a newer version.

    • ‘superceded’ = a correctly implemented version that has been replaced by a newer version to address minor issues.

    • ‘retracted’ = an incorrectly implemented version due to either a poor/wrong parameterization or data model representation resulting in major issues and deviations from the underlying potential model.

[7]:
print("potential.atom_style ->", potential.atom_style)
print("potential.pair_style ->", potential.pair_style)
print("potential.units ->     ", potential.units)
print("potential.symbols ->   ", potential.symbols)
print("potential.pot_dir ->   ", potential.pot_dir)
print("potential.allsymbols ->", potential.allsymbols)
print("potential.status ->    ", potential.status)
potential.atom_style -> atomic
potential.pair_style -> eam/alloy
potential.units ->      metal
potential.symbols ->    ['Ni', 'Al', 'Co']
potential.pot_dir ->    potential_folder
potential.allsymbols -> False
potential.status ->     active

The pot_dir can also be changed at any time.

[8]:
potential.pot_dir = 'new_potential_folder'

print("potential.pot_dir -> ", potential.pot_dir)
potential.pot_dir ->  new_potential_folder

3. Elements, Charges and Masses

Information about the elements, charges and masses associated with each atom-model symbol can also be retrieved using the elements(), charges() and masses() methods. All three methods have the same parameters.

SYMBOLS VS ELEMENTS NOTE: The Potential class makes a distinction between symbols and elements. The symbols are the tags used by LAMMPS to identify which atom-model listed in a parameter file to use. These typically coincide with the elements the models represent, but this is not always the case as some potential styles allow multiple interaction models to be defined for the same elements. Differentiating between symbols and elements allows for the Potential class to handle these types of potentials as well.

CHARGES NOTE: The default charge is 0. Charges only need to be defined for potentials with formats (pair_styles) where the ionic charge is constant for each atom model, e.g. Coulombic potentials. Potentials with variable charges, e.g. ReaxFF and COMB, compute the charges on a per-atom basis during simulations.

Parameters

  • symbols (str or list, optional) a list of the potential’s symbol models to retrieve values for. If value is None (default) then Potential.symbols is used.

Calling the methods without parameters uses all symbols.

[9]:
# Calling methods without parameters uses all symbols
print("potential.symbols ->   ", potential.symbols)
print("potential.elements() ->", potential.elements())
print("potential.charges() ->  ", potential.charges())
print("potential.masses() ->  ", potential.masses())
potential.symbols ->    ['Ni', 'Al', 'Co']
potential.elements() -> ['Ni', 'Al', 'Co']
potential.charges() ->   [0.0, 0.0, 0.0]
potential.masses() ->   [58.6934, 26.981539, 58.9332]

Calling the methods with symbols gives values for that particular set.

[10]:
# Calling methods with symbols uses that particular set
print("potential.elements('Ni') ->", potential.elements('Ni'))
print("potential.charges('Ni') ->", potential.charges('Ni'))
print("potential.masses('Ni') ->", potential.masses('Ni'))
print()

print("potential.elements(['Al', 'Al', 'Co', 'Al']) ->", potential.elements(['Al', 'Al', 'Co', 'Al']))
print("potential.charges(['Al', 'Al', 'Co', 'Al']) ->", potential.charges(['Al', 'Al', 'Co', 'Al']))
print("potential.masses(['Al', 'Al', 'Co', 'Al']) ->  ", potential.masses(['Al', 'Al', 'Co', 'Al']))
print()
potential.elements('Ni') -> ['Ni']
potential.charges('Ni') -> [0.0]
potential.masses('Ni') -> [58.6934]

potential.elements(['Al', 'Al', 'Co', 'Al']) -> ['Al', 'Al', 'Co', 'Al']
potential.charges(['Al', 'Al', 'Co', 'Al']) -> [0.0, 0.0, 0.0, 0.0]
potential.masses(['Al', 'Al', 'Co', 'Al']) ->   [26.981539, 26.981539, 58.9332, 26.981539]

4. Generate LAMMPS commands

The LAMMPS input command lines for using the potential can also be autogenerated using the pair_info() method.

Potential.pair_info()

Parameters

  • symbols (str or list, optional) a list of the potential’s symbol models to associate with integer atom types of a system. If value is None (default) then Potential.symbols is used.

  • masses (list, optional) Can be given to override the default symbol-based masses for each atom type. Must be a list of the same length as symbols. Any values of None in the list indicate that the default value be used for that atom type. Added version 1.3.0.

NOTE: For pair_styles hybrid and hybrid/overlay, the list of symbols given as parameters must include all defined atom model interactions.

Without symbols gives LAMMPS commands for all symbols in the same order as the data model.

[11]:
print('potential.pair_info() ->')
print(potential.pair_info())
potential.pair_info() ->
mass 1 58.6934
mass 2 26.981539
mass 3 58.9332

pair_style eam/alloy
pair_coeff * * new_potential_folder\file.eam.alloy Ni Al Co

Give a list of symbols to dynamically generate commands based on the elements in the associated atomic system.

[12]:
print("potential.pair_info('Ni') ->")
print(potential.pair_info('Ni'))
potential.pair_info('Ni') ->
mass 1 58.6934

pair_style eam/alloy
pair_coeff * * new_potential_folder\file.eam.alloy Ni

[13]:
print("potential.pair_info(['Al', 'Al', 'Co', 'Al']) ->")
print(potential.pair_info(['Al', 'Al', 'Co', 'Al']))
potential.pair_info(['Al', 'Al', 'Co', 'Al']) ->
mass 1 26.981539
mass 2 26.981539
mass 3 58.9332
mass 4 26.981539

pair_style eam/alloy
pair_coeff * * new_potential_folder\file.eam.alloy Al Al Co Al

Specify masses to override default values

[14]:
print("potential.pair_info('Ni', masses=27) ->")
print(potential.pair_info('Ni', masses=27))
potential.pair_info('Ni', masses=27) ->
mass 1 27

pair_style eam/alloy
pair_coeff * * new_potential_folder\file.eam.alloy Ni

5. potential_LAMMPS Data Model

This section describes the structure of the potential_LAMMPS data model and provides some examples for different LAMMPS pair styles.

5.1. potential_LAMMPS data model schema

The potential_LAMMPS data model is consistent with a json/xml structure. The root element of the model is “potential-LAMMPS”.

Elements:

  • “key” : a uuid hash-key that uniquely identifies the potential implementation. Corresponds to the Potential.key attribute.

  • “id” : a human-readable identifier that uniquely identifies the potential implementation. Corresponds to the Potential.id attribute.

  • “potential” : contains metadata associated with the potential model.

  • “units” : the LAMMPS units option to use with the potential. Corresponds to the Potential.units attribute.

  • “atom_style” : the LAMMPS atom_style option to use with the potential. Corresponds to the Potential.atom_style attribute.

  • “allsymbols” : boolean flag that indicates if all of a potential’s symbols need to be listed in the pair_coeff lines. This is required for certain pair_styles. Assumed to be False if field is missing.

  • “status” : label characterizing the known status of the potential, i.e. “active”, “superceded”, or “retracted”. This makes it possible to separate old/bad implementations from current ones. If field is missing, status is assumed to be “active”.

  • “atom” : provides information relating to the atom-models defined in the potential.

  • “pair_style” : classifies the terms that appear in the LAMMPS pair_style command associated with the potential.

  • “pair_coeff” : classifies the terms that appear in the LAMMPS pair_coeff command associated with the potential.

  • “command” : classifies the terms that appear in any other LAMMPS command associated with the potential.

5.1.1. The “potential” branch

The “potential” branch gives metadata associated with the potential model that the LAMMPS implementation is based on. The potential model is the concept (mathematical expression) of a potential, and multiple implementations of the same potential model may exist.

Subelements:

  • “key” : a uuid hash-key that uniquely identifies the potential model. Corresponds to the Potential.potkey attribute.

  • “id” : a human-readable identifier that uniquely identifies the potential model. Corresponds to the Potential.potid attribute.

[15]:
print("""{
    "potential": {
        "key": <uuid>,
        "id": <name>
    }
}""")
{
    "potential": {
        "key": <uuid>,
        "id": <name>
    }
}

5.1.2. The “atom” branch

The “atom” branch of the data model provides a list of the atom-models described by the potential.

Subelements:

  • “element”: chemical element tag associated with the atom-model. If not given, it is set equal to the “symbol” value.

  • “symbol”: unique symbol associated with the atom-model. If not given, it is set equal to the “element” value.

  • “mass”: element mass associated with the element/atom-model. If not given, it is set equal to the standard atomic mass value associated with the element given by “element”.

  • “charge”: ionic charge associated with the atom-model. If not given, it is set to 0.0. Only needs to be defined for pair_styles where the ionic charge is constant for a given atom-model e.g. Columbic potentials.

[16]:
# Single-element potentials
print("""{
    "atom": {
        "element": <element-tag>,
        "symbol": <atom-model-name>,
        "mass": <element-mass>,
        "charge": <ionic-charge>
    }
}""")
{
    "atom": {
        "element": <element-tag>,
        "symbol": <atom-model-name>,
        "mass": <element-mass>,
        "charge": <ionic-charge>
    }
}
[17]:
# Multi-element potentials
print("""{
    "atom": [
        {
            "element": <element-tag>,
            "symbol": <atom-model-name>,
            "mass": <element-mass>,
            "charge": <ionic-charge>
        },
        {
            "element": <element-tag>,
            "symbol": <atom-model-name>,
            "mass": <element-mass>,
            "charge": <ionic-charge>
        }
    ]
}""")
{
    "atom": [
        {
            "element": <element-tag>,
            "symbol": <atom-model-name>,
            "mass": <element-mass>,
            "charge": <ionic-charge>
        },
        {
            "element": <element-tag>,
            "symbol": <atom-model-name>,
            "mass": <element-mass>,
            "charge": <ionic-charge>
        }
    ]
}

5.1.3. The “pair_style” branch

The “pair_style” branch of the data model characterizes the terms that appear in the LAMMPS pair_style command for the potential.

Subelements:

  • “type” : the specific LAMMPS pair_style option for the potential. Corresponds to the Potential.pair_style attribute.

  • “term” : a list characterizing any additional terms that appear in the pair_style command line. The available subelements are the same as the ones available in the “term” branch of “pair_coeff”.

[18]:
print("""{
    "pair_style": {
        "type": <pair_style-type>,
        "term": [
            {
                "parameter": <number>
            },
            {
                "option": <string>
            }
        ]
    }
}""")
{
    "pair_style": {
        "type": <pair_style-type>,
        "term": [
            {
                "parameter": <number>
            },
            {
                "option": <string>
            }
        ]
    }
}

5.1.4. The “pair_coeff” branch

The “pair_coeff” branch of the data model characterizes the terms that appear in the LAMMPS pair_coeff command lines for the potential. Multiple “pair_coeff” values can be given.

Subelements:

  • “interaction” : an “interaction” branch that outlines the atom-model interactions associated with a pair_coeff command line.

    • “symbol” : a list of the atom-model symbols that the interaction is associated with.

  • “term” : a “term” branch that characterizes all the terms that appear in a pair_coeff command line.

    • “option” : a string option value.

    • “parameter” : a numerical parameter value.

    • “file” : a file name. Used by potential styles that read parameters from external files, like eam/alloy.

    • “symbols” : Boolean indicating to show a list of the atom-model symbols to use. Used by potential styles that read parameters from external potential files, like eam/alloy.

    • “symbolsList” : Boolean indicating to show a list of the unique atom-model symbols to use. Don’t use!

Different types of pair_styles have slightly different rules with interpreting the “pair_coeff” branch.

  • For two-body style potentials, every unique atom-model pair has its own “pair_coeff” element. “interaction”-“symbol” must have two values indicating the atom-model pair, eg. [“Ag”, “Ag”] for the Ag-Ag interaction and [“Ag”, “Cu”] for Ag-Cu and Cu-Ag interactions. “interaction” is optional if there is only one pair interaction, i.e. an elemental pair potential.

  • For many-body style potentials, “interaction” is optional as all atom-model interactions are accessed using the same pair_coeff command line.

  • For hybrid style potentials, “interaction”-“symbol” lists all atom-model symbols associated with the particular sub-style. It will have two values for pair sub-styles, but can be of any length for many-body sub-styles.

[19]:
# pair_coeff example for two-body style potentials
print("""{
    "pair_coeff": [
        {
            "interaction": {
                "symbol": [
                    <atom-model-name>,
                    <atom-model-name>
                ]
            }
            "term": [
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "option": <string>
                }
            ]
        },
        {
            "interaction": {
                "symbol": [
                    <atom-model-name>,
                    <atom-model-name>
                ]
            }
            "term": [
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "option": <string>
                }
            ]
        }
    }
}""")
{
    "pair_coeff": [
        {
            "interaction": {
                "symbol": [
                    <atom-model-name>,
                    <atom-model-name>
                ]
            }
            "term": [
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "option": <string>
                }
            ]
        },
        {
            "interaction": {
                "symbol": [
                    <atom-model-name>,
                    <atom-model-name>
                ]
            }
            "term": [
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "parameter": <number>
                },
                {
                    "option": <string>
                }
            ]
        }
    }
}
[20]:
# pair_coeff example for many-body potentials with library and parameter files
print("""{
    "pair_coeff": {
        "term": [
            {
                "file": <file-path>
            },
            {
                "option": <string>
            },
            {
                "file": <file-path>
            },
            {
                "symbols": true
            }
        ]
    }
}""")
{
    "pair_coeff": {
        "term": [
            {
                "file": <file-path>
            },
            {
                "option": <string>
            },
            {
                "file": <file-path>
            },
            {
                "symbols": true
            }
        ]
    }
}

5.1.5. The “command” branch

The “command” branch of the data model characterizes the terms that appear in any other LAMMPS command lines that are required for properly running the potential. This is needed for specifying such things as a fix qeq/comb for COMB potentials.

Subelements:

  • “term” : a “term” branch that characterizes all the terms that appear in the command line.

    • “option” : a string option value.

    • “parameter” : a numerical parameter value.

    • “file” : a file name.

    • “symbols” : Boolean indicating to show a list of the atom-model symbols to use.

    • “symbolsList” : Boolean indicating to show a list of the unique atom-model symbols to use.

[21]:
print("""{
    "command": {
        "term": [
            {
                "option": <string>
            },
            {
                "option": <string>
            },
            {
                "parameter": <number>
            },
            {
                "parameter": <number>
            }
        ]
    }
}""")
{
    "command": {
        "term": [
            {
                "option": <string>
            },
            {
                "option": <string>
            },
            {
                "parameter": <number>
            },
            {
                "parameter": <number>
            }
        ]
    }
}

5.2. Example data models

WARNING! These are not real potentials! They are only meant to provide a demonstration for different potential styles.

5.2.1. Lennard-Jones and other two-body style potentials

[22]:
print("""{
    "potential-LAMMPS": {
        "key": "7102f7ec-3612-4665-ad7e-60de508b5f37",
        "id": "lj_cut-demo--LAMMPS--v1",
        "potential": {
            "key": "ebf17ffa-a5e7-41c5-8e6d-8e00eb7f5068",
            "id": "lj_cut-demo"
        },
        "units": "lj",
        "atom_style": "atomic",
        "atom": [
            {
                "element": "He"
            },
            {
                "element": "Ar"
            }
        ],
        "pair_style": {
            "type": "lj/cut",
            "term": {
                "parameter": 10.0
            }
        },
        "pair_coeff": [
            {
                "interaction": {
                    "symbol": [
                        "He",
                        "He"
                    ]
                },
                "term": [
                    {
                        "parameter": 1.0
                    },
                    {
                        "parameter": 1.0
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "Ar",
                        "Ar"
                    ]
                },
                "term": [
                    {
                        "parameter": 2.0
                    },
                    {
                        "parameter": 2.0
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "He",
                        "Ar"
                    ]
                },
                "term": [
                    {
                        "parameter": 1.0
                    },
                    {
                        "parameter": 2.0
                    }
                ]
            }
        ]
    }
}""")
{
    "potential-LAMMPS": {
        "key": "7102f7ec-3612-4665-ad7e-60de508b5f37",
        "id": "lj_cut-demo--LAMMPS--v1",
        "potential": {
            "key": "ebf17ffa-a5e7-41c5-8e6d-8e00eb7f5068",
            "id": "lj_cut-demo"
        },
        "units": "lj",
        "atom_style": "atomic",
        "atom": [
            {
                "element": "He"
            },
            {
                "element": "Ar"
            }
        ],
        "pair_style": {
            "type": "lj/cut",
            "term": {
                "parameter": 10.0
            }
        },
        "pair_coeff": [
            {
                "interaction": {
                    "symbol": [
                        "He",
                        "He"
                    ]
                },
                "term": [
                    {
                        "parameter": 1.0
                    },
                    {
                        "parameter": 1.0
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "Ar",
                        "Ar"
                    ]
                },
                "term": [
                    {
                        "parameter": 2.0
                    },
                    {
                        "parameter": 2.0
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "He",
                        "Ar"
                    ]
                },
                "term": [
                    {
                        "parameter": 1.0
                    },
                    {
                        "parameter": 2.0
                    }
                ]
            }
        ]
    }
}

5.2.2. eam/alloy and other many-body potentials from single parameter files

NOTE: Data models for the original eam pair_style are different (see Section 5.2.6.)!

[23]:
print("""{
    "potential-LAMMPS": {
        "key": "a45a7731-d115-4079-b6f5-aa700c5b5c56",
        "id": "EAM-demo--LAMMPS--v1",
        "potential": {
            "key": "820738a9-f556-468b-9041-9d98351ff751",
            "id": "EAM-demo"
        },
        "units": "metal",
        "atom_style": "atomic",
        "atom": [
            {
                "element": "Ni",
                "mass": 58.6934
            },
            {
                "element": "Al",
                "mass": 26.981539
            },
            {
                "element": "Co",
                "mass": 58.9332
            }
        ],
        "pair_style": {
            "type": "eam/alloy"
        },
        "pair_coeff": {
            "term": [
                {
                    "file": "file.eam.alloy"
                },
                {
                    "symbols": "True"
                }
            ]
        }
    }
}""")
{
    "potential-LAMMPS": {
        "key": "a45a7731-d115-4079-b6f5-aa700c5b5c56",
        "id": "EAM-demo--LAMMPS--v1",
        "potential": {
            "key": "820738a9-f556-468b-9041-9d98351ff751",
            "id": "EAM-demo"
        },
        "units": "metal",
        "atom_style": "atomic",
        "atom": [
            {
                "element": "Ni",
                "mass": 58.6934
            },
            {
                "element": "Al",
                "mass": 26.981539
            },
            {
                "element": "Co",
                "mass": 58.9332
            }
        ],
        "pair_style": {
            "type": "eam/alloy"
        },
        "pair_coeff": {
            "term": [
                {
                    "file": "file.eam.alloy"
                },
                {
                    "symbols": "True"
                }
            ]
        }
    }
}

5.2.3. COMB and other potentials requiring additional commands

[24]:
print("""{
    "potential-LAMMPS": {
        "key": "c6623d40-a3f2-4b2f-948a-3b277f174116",
        "id": "COMB-demo--LAMMPS--v2",
        "potential": {
            "key": "5ec2aac4-3dd4-4f5c-afb4-21749577c038",
            "id": "COMB-demo"
        },
        "units": "nano",
        "atom_style": "charge",
        "atom": [
            {
                "element": "O"
            },
            {
                "element": "Cu"
            },
            {
                "element": "Ni"
            }
        ],
        "pair_style": {
            "type": "comb",
            "term": {
                "option": "polar_off"
            }
        },
        "pair_coeff": {
            "term": [
                {
                    "file": "file.comb"
                },
                {
                    "symbols": true
                }
            ]
        },
        "command": {
            "term": [
                {
                    "option": "fix"
                },
                {
                    "option": "qeq/comb"
                },
                {
                    "parameter": 10
                },
                {
                    "parameter": 0.0001
                }
            ]
        }
    }
}""")
{
    "potential-LAMMPS": {
        "key": "c6623d40-a3f2-4b2f-948a-3b277f174116",
        "id": "COMB-demo--LAMMPS--v2",
        "potential": {
            "key": "5ec2aac4-3dd4-4f5c-afb4-21749577c038",
            "id": "COMB-demo"
        },
        "units": "nano",
        "atom_style": "charge",
        "atom": [
            {
                "element": "O"
            },
            {
                "element": "Cu"
            },
            {
                "element": "Ni"
            }
        ],
        "pair_style": {
            "type": "comb",
            "term": {
                "option": "polar_off"
            }
        },
        "pair_coeff": {
            "term": [
                {
                    "file": "file.comb"
                },
                {
                    "symbols": true
                }
            ]
        },
        "command": {
            "term": [
                {
                    "option": "fix"
                },
                {
                    "option": "qeq/comb"
                },
                {
                    "parameter": 10
                },
                {
                    "parameter": 0.0001
                }
            ]
        }
    }
}

5.2.4. MEAM and other many-body potentials with library and parameter files

[25]:
print("""{
    "potential-LAMMPS": {
        "key": "ac63aa71-808c-47e7-b80b-991a50870f35",
        "id": "MEAM-demo--LAMMPS--v1",
        "potential": {
            "key": "9546264a-06b8-451a-9920-f8a17cc6917b",
            "id": "MEAM-demo"
        },
        "units": "metal",
        "atom_style": "atom",
        "atom": [
            {
                "element": "Cu",
                "symbol": "CuD"
            },
            {
                "element": "Al",
                "symbol": "AlD"
            },
            {
                "element": "Fe",
                "symbol": "FeD"
            }
        ],
        "pair_style": {
            "type": "meam"
        },
        "pair_coeff": {
            "term": [
                {
                    "file": "library.meam"
                },
                {
                    "option": "CuD AlD FeD"
                },
                {
                    "file": "potential.meam"
                },
                {
                    "symbols": true
                }
            ]
        }
    }
}""")
{
    "potential-LAMMPS": {
        "key": "ac63aa71-808c-47e7-b80b-991a50870f35",
        "id": "MEAM-demo--LAMMPS--v1",
        "potential": {
            "key": "9546264a-06b8-451a-9920-f8a17cc6917b",
            "id": "MEAM-demo"
        },
        "units": "metal",
        "atom_style": "atom",
        "atom": [
            {
                "element": "Cu",
                "symbol": "CuD"
            },
            {
                "element": "Al",
                "symbol": "AlD"
            },
            {
                "element": "Fe",
                "symbol": "FeD"
            }
        ],
        "pair_style": {
            "type": "meam"
        },
        "pair_coeff": {
            "term": [
                {
                    "file": "library.meam"
                },
                {
                    "option": "CuD AlD FeD"
                },
                {
                    "file": "potential.meam"
                },
                {
                    "symbols": true
                }
            ]
        }
    }
}

5.2.5. hybrid-style potentials

[26]:
print("""{
    "potential-LAMMPS": {
        "key": "7687807f-6355-4bef-bdc3-dc0dc944e106",
        "id": "hybrid-demo--LAMMPS--v3",
        "potential": {
            "key": "14226c15-561c-44d4-96ad-ad51304a3606",
            "id": "hybrid-demo"
        },
        "units": "metal",
        "atom_style": "atom",
        "atom": [
            {
                "element": "Cu"
            },
            {
                "element": "H"
            }
        ],
        "pair_style": {
            "type": "hybrid",
            "term": [
                {
                    "option": "eam/alloy"
                },
                {
                    "option": "lj/cut"
                },
                {
                    "parameter": 5.0
                }
            ]
        },
        "pair_coeff": [
            {
                "interaction": {
                    "symbol": [
                        "Cu"
                    ]
                },
                "term": [
                    {
                        "option": "eam/alloy"
                    },
                    {
                        "file": "cu.eam.alloy"
                    },
                    {
                        "symbols": true
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "Cu",
                        "H"
                    ]
                },
                "term": [
                    {
                        "option": "lj/cut"
                    },
                    {
                        "parameter": 3.5
                    },
                    {
                        "parameter": 3.0
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "H",
                        "H"
                    ]
                },
                "term": [
                    {
                        "option": "lj/cut"
                    },
                    {
                        "parameter": 1.2
                    },
                    {
                        "parameter": 2.4
                    }
                ]
            }
        ]
    }
}""")
{
    "potential-LAMMPS": {
        "key": "7687807f-6355-4bef-bdc3-dc0dc944e106",
        "id": "hybrid-demo--LAMMPS--v3",
        "potential": {
            "key": "14226c15-561c-44d4-96ad-ad51304a3606",
            "id": "hybrid-demo"
        },
        "units": "metal",
        "atom_style": "atom",
        "atom": [
            {
                "element": "Cu"
            },
            {
                "element": "H"
            }
        ],
        "pair_style": {
            "type": "hybrid",
            "term": [
                {
                    "option": "eam/alloy"
                },
                {
                    "option": "lj/cut"
                },
                {
                    "parameter": 5.0
                }
            ]
        },
        "pair_coeff": [
            {
                "interaction": {
                    "symbol": [
                        "Cu"
                    ]
                },
                "term": [
                    {
                        "option": "eam/alloy"
                    },
                    {
                        "file": "cu.eam.alloy"
                    },
                    {
                        "symbols": true
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "Cu",
                        "H"
                    ]
                },
                "term": [
                    {
                        "option": "lj/cut"
                    },
                    {
                        "parameter": 3.5
                    },
                    {
                        "parameter": 3.0
                    }
                ]
            },
            {
                "interaction": {
                    "symbol": [
                        "H",
                        "H"
                    ]
                },
                "term": [
                    {
                        "option": "lj/cut"
                    },
                    {
                        "parameter": 1.2
                    },
                    {
                        "parameter": 2.4
                    }
                ]
            }
        ]
    }
}

5.2.6. Original eam pair_style

[27]:
print("""{
    "potential-LAMMPS": {
        "key": "3c437986-882f-4e23-bc39-6e12dcdba364",
        "id": "eam-demo--LAMMPS--v2",
        "potential": {
            "key": "5e92413c-8542-49c4-9608-b91ea5c12701",
            "id": "eam-demo"
        },
        "units": "metal",
        "atom_style": "atomic",
        "atom": [
            {
                "element": "Cu",
                "mass": 63.55
            },
            {
                "element": "Ni",
                "mass": 58.71
            }
        ],
        "pair_style": {
            "type": "eam"
        },
        "pair_coeff": [
            {
                "interaction": {
                    "symbol": [
                        "Cu",
                        "Cu"
                    ]
                },
                "term": {
                    "file": "Cu.eam"
                }
            },
            {
                "interaction": {
                    "symbol": [
                        "Ni",
                        "Ni"
                    ]
                },
                "term": {
                    "file": "Ni.eam"
                }
            }
        ]
    }
}""")
{
    "potential-LAMMPS": {
        "key": "3c437986-882f-4e23-bc39-6e12dcdba364",
        "id": "eam-demo--LAMMPS--v2",
        "potential": {
            "key": "5e92413c-8542-49c4-9608-b91ea5c12701",
            "id": "eam-demo"
        },
        "units": "metal",
        "atom_style": "atomic",
        "atom": [
            {
                "element": "Cu",
                "mass": 63.55
            },
            {
                "element": "Ni",
                "mass": 58.71
            }
        ],
        "pair_style": {
            "type": "eam"
        },
        "pair_coeff": [
            {
                "interaction": {
                    "symbol": [
                        "Cu",
                        "Cu"
                    ]
                },
                "term": {
                    "file": "Cu.eam"
                }
            },
            {
                "interaction": {
                    "symbol": [
                        "Ni",
                        "Ni"
                    ]
                },
                "term": {
                    "file": "Ni.eam"
                }
            }
        ]
    }
}

5.2.7 Columbic pair_style

[28]:
print("""{
    "potential-LAMMPS": {
        "key": "7f013ca0-0358-4721-ba72-790a074b0fd8",
        "id": "coul_long-demo--LAMMPS--v1",
        "potential": {
            "key": "3b326a65-5cbe-4a6c-862a-aa7203660b27",
            "id": "coul_long-demo"
        },
        "units": "metal",
        "atom_style": "charge",
        "atom": [
            {
                "element": "Na",
                "charge": 1
            },
            {
                "element": "Cl",
                "charge": -1
            }
        ],
        "pair_style": {
            "type": "coul/long",
            "term": {
                "parameter": 10.0
            }
        },
        "pair_coeff": {
            "term": []
        }
    }
}""")
{
    "potential-LAMMPS": {
        "key": "7f013ca0-0358-4721-ba72-790a074b0fd8",
        "id": "coul_long-demo--LAMMPS--v1",
        "potential": {
            "key": "3b326a65-5cbe-4a6c-862a-aa7203660b27",
            "id": "coul_long-demo"
        },
        "units": "metal",
        "atom_style": "charge",
        "atom": [
            {
                "element": "Na",
                "charge": 1
            },
            {
                "element": "Cl",
                "charge": -1
            }
        ],
        "pair_style": {
            "type": "coul/long",
            "term": {
                "parameter": 10.0
            }
        },
        "pair_coeff": {
            "term": []
        }
    }
}