openmmml.models.aimnet2potential.AIMNet2PotentialImpl#

class openmmml.models.aimnet2potential.AIMNet2PotentialImpl(name)#

This is the MLPotentialImpl implementing the AIMNet2 potential.

The AIMNet2 potential is constructed using aimnet to build a PyTorch model, and then integrated into the OpenMM System using a TorchForce. To use it, specify the model by name:

>>> potential = MLPotential('aimnet2')
__init__(name)#

Methods

__init__(name)

addForces(topology, system, atoms, ...)

Add Force objects to a System to implement the potential function.

addForces(topology: Topology, system: System, atoms: Iterable[int] | None, forceGroup: int, **args)#

Add Force objects to a System to implement the potential function.

This is invoked by MLPotential.createSystem(). Subclasses must implement it to create the requested potential function.

Parameters:
  • topology (Topology) – the Topology from which the System is being created

  • system (System) – the System that is being created

  • atoms (Optional[Iterable[int]]) – the indices of atoms the potential should be applied to, or None if it should be applied to the entire System

  • forceGroup (int) – the force group that any newly added Forces should be in

  • args – any additional keyword arguments that were provided to createSystem() are passed to this method. This allows subclasses to customize their behavior based on extra arguments.