metal.pair.eam EAM pair potential.


Metal pair potentials.

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

EAM pair potential.

  • file (str) – File name with potential tables in Alloy or FS format
  • type (str) – Type of file potential (‘Alloy’, ‘FS’)
  • 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: and are also described here:


EAM is NOT supported in MPI parallel simulations.


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 the force.

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



Executing the disable command will remove the force from the simulation. Any 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 the force.



See disable().


Get the energy of a particle group.

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


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