# metal.pair¶

Overview

 metal.pair.eam EAM pair potential.

Details

Metal pair potentials.

class hoomd.metal.pair.eam(file, type, nlist)

EAM pair potential.

Parameters: file (str) – File name with potential tables in Alloy or FS format type (str) – Type of file potential (‘Alloy’, ‘FS’) nlist (hoomd.md.nlist) – Neighbor list (default of None automatically creates a global cell-list based neighbor list)

eam specifies that a EAM (embedded atom method) pair potential should be applied between every non-excluded particle pair in the simulation.

No coefficients need to be set for eam. All specifications, including the cutoff radius, form of the potential, etc. are read in from the specified file.

Particle type names must match those referenced in the EAM potential file.

Particle mass (in atomic mass) must be set in the input script, users are allowed to set different mass values other than those in the potential file.

Two file formats are supported: Alloy and FS. They are described in LAMMPS documentation (commands eam/alloy and eam/fs) here: http://lammps.sandia.gov/doc/pair_eam.html and are also described here: http://enpub.fulton.asu.edu/cms/potentials/submain/format.htm

Attention

EAM is NOT supported in MPI parallel simulations.

Example:

nl = nlist.cell()
eam = pair.eam(file='name.eam.fs', type='FS', nlist=nl)
eam = pair.eam(file='name.eam.alloy', type='Alloy', nlist=nl)

disable(log=False)

Disable the force.

Parameters: log (bool) – Set to True if you plan to continue logging the potential energy associated with this force.

Examples:

force.disable()
force.disable(log=True)


Executing the disable command will remove the force from the simulation. Any hoomd.run() command executed after disabling a force will not calculate or use the force during the simulation. A disabled force can be re-enabled with enable().

By setting log to True, the values of the force can be logged even though the forces are not applied in the simulation. For forces that use cutoff radii, setting log=True will cause the correct r_cut values to be used throughout the simulation, and therefore possibly drive the neighbor list size larger than it otherwise would be. If log is left False, the potential energy associated with this force will not be available for logging.

enable()

Enable the force.

Examples:

force.enable()

get_energy(group)

Get the energy of a particle group.

Parameters: group (hoomd.group) – The particle group to query the energy for. The last computed energy for the members in the group.

Examples:

g = group.all()
energy = force.get_energy(g)

get_net_force(group)

Get the force of a particle group.

Parameters: group (hoomd.group) – The particle group to query the force for. The last computed force for the members in the group.

Examples

g = group.all() force = force.get_net_force(g)

get_net_virial(group)

Get the virial of a particle group.

Parameters: group (hoomd.group) – The particle group to query the virial for. The last computed virial for the members in the group.

Examples

g = group.all() virial = force.get_net_virial(g)