openmmml.mlpotential.Embedding#
- class openmmml.mlpotential.Embedding#
Abstract interface for classes that implement embedding methods.
If you are defining a new embedding method, you need to create subclasses of of Embedding and EmbeddingFactory. When a user specifies a name for an embedding method that is not a custom embedding method supported by that potential, MLPotential looks up the factory that has been registered for that name and uses it to create an Embedding of the appropriate subclass.
- __init__()#
Methods
__init__()createMixedSystem(potential, topology, ...)Creates a mixed system using the embedding method.
- createMixedSystem(potential: MLPotentialImpl, topology: Topology, system: System, atoms: list[int], forceGroup: int, interpolate: bool, **args)#
Creates a mixed system using the embedding method.
This is invoked by MLPotential.createMixedSystem(). It must be implemented in subclasses. The implementation should call potential.addForces() as needed to generate the appropriate ML forces.
Each embedding method is responsible for implementing interpolation; if interpolate is True, a global parameter “lambda_interpolate” should be present in the returned system, with the behavior as described by MLPotential.createMixedSystem().