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) – Filename 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.

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.

Danger

HOOMD-blue’s EAM implementation is known to be broken.

Example:

nl = nlist.cell()
eam = pair.eam(file='al1.mendelev.eam.fs', type='FS', 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()

See disable().

get_energy(group)

Get the energy of a particle group.

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

Examples:

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