The toolkit wrappers provide a simple uniform API for accessing minimal functionality of cheminformatics toolkits.
These toolkit wrappers are generally used through a ToolkitRegistry
, which can be constructed with a desired precedence of toolkits:
from openforcefield.utils.toolkits import ToolkitRegistry
toolkit_registry = ToolkitRegistry()
toolkit_precedence = [OpenEyeToolkitWrapper, RDKitToolkitWrapper, AmberToolsToolkitWrapper]
[ toolkit_registry.register(toolkit) for toolkit in toolkit_precedence if toolkit.is_available() ]
Alternatively, the global toolkit registry (which will attempt to register any available toolkits) can be used:
from openforcefield.utils.toolkits import DEFAULT_TOOLKIT_REGISTRY as toolkit_registry
The toolkit wrappers can then be accessed through the registry:
molecule = Molecule.from_smiles('Cc1ccccc1')
smiles = toolkit_registry.call('to_smiles', molecule)
Registry for ToolkitWrapper objects |
|
Toolkit wrapper base class. |
|
OpenEye toolkit wrapper |
|
RDKit toolkit wrapper |
|
AmberTools toolkit wrapper |
Mix-in to add serialization and deserialization support via JSON, YAML, BSON, TOML, MessagePack, and XML. |
Miscellaneous utility functions.
Inherit docstrings from parent class |
|
Recursively retrieve all subclasses of the specified class |
|
Context to temporary change the working directory. |
|
Context for safe creation of temporary directories. |
|
Get the full path to one of the reference files in testsystems. |
|
Convert an 0.1-compliant SMIRNOFF dict to an 0.2-compliant one. |
|
Convert an 0.2-compliant SMIRNOFF dict to an 0.3-compliant one. |
Tools for manipulating molecules and structures
Warning
These methods are deprecated and will be removed and replaced with integrated API methods. We recommend that no new code makes use of these functions.
Process a list of molecules with a specified SMIRNOFF ffxml file and determine which parameters are used by which molecules, returning collated results. |