openmmml.mlpotential.EmbeddingFactory#
- class openmmml.mlpotential.EmbeddingFactory#
Abstract interface for classes that create Embedding objects.
If you are defining a new embedding method, you need to create subclasses of Embedding and EmbeddingFactory, and register an instance of the factory by calling MLPotential.registerEmbeddingFactory(). Alternatively, if a Python package creates an entry point in the group “openmmml.embeddings”, the embedding will be registered automatically. The entry point name is the name of the embedding method, and the value should be the name of the EmbeddingFactory subclass.
- __init__()#
Methods
__init__()createEmbedding(name)Create an Embedding that will be used to implement an embedding method.
- createEmbedding(name: str) Embedding#
Create an Embedding that will be used to implement an embedding method.
When a mixed ML/MM system is created with an MLPotential, it invokes this method to create an object implementing the requested embedding. Subclasses must implement this method to return an instance of the correct Embedding subclass.
- Parameters:
name (str) – the name of the embedding given to MLPotential.createMixedSystem()
- Return type:
an Embedding instance that implements the embedding