# openforcefield.utils.toolkits.ToolkitRegistry

class `openforcefield.utils.toolkits.``ToolkitRegistry`(register_imported_toolkit_wrappers=False, toolkit_precedence=None, exception_if_unavailable=True)

  Registry for ToolkitWrapper objects

  Examples

  Register toolkits in a specified order, skipping if unavailable

      >>> from openforcefield.utils.toolkits import ToolkitRegistry
      >>> toolkit_registry = ToolkitRegistry()
      >>> toolkit_precedence = [OpenEyeToolkitWrapper, RDKitToolkitWrapper, AmberToolsToolkitWrapper]
      >>> for toolkit in toolkit_precedence:
      ...     if toolkit.is_available():
      ...         toolkit_registry.register_toolkit(toolkit)

  Register specified toolkits, raising an exception if one is unavailable

      >>> toolkit_registry = ToolkitRegistry()
      >>> toolkits = [OpenEyeToolkitWrapper, AmberToolsToolkitWrapper]
      >>> for toolkit in toolkits:
      ...     toolkit_registry.register_toolkit(toolkit)

  Register all available toolkits in arbitrary order

      >>> from openforcefield.utils import all_subclasses
      >>> toolkits = all_subclasses(ToolkitWrapper)
      >>> for toolkit in toolkit_precedence:
      ...     if toolkit.is_available():
      ...         toolkit_registry.register_toolkit(toolkit)

  Retrieve the global singleton toolkit registry, which is created when this module is imported from all available toolkits:

      >>> from openforcefield.utils.toolkits import GLOBAL_TOOLKIT_REGISTRY as toolkit_registry
      >>> available_toolkits = toolkit_registry.registered_toolkits

  Warning

  This API is experimental and subject to change.

  Attributes
    `registered_toolkits`

      List registered toolkits.

  Methods

  `add_toolkit`(self, toolkit_wrapper) | Append a ToolkitWrapper onto the list of toolkits in this ToolkitRegistry
  `call`(self, method_name, *args[, …]) | Execute the requested method by attempting to use all registered toolkits in order of precedence.
  `register_toolkit`(self, toolkit_wrapper[, …]) | Register the provided toolkit wrapper class, instantiating an object of it.
  `resolve`(self, method_name) | Resolve the requested method name by checking all registered toolkits in order of precedence for one that provides the requested method.

  `__init__`(self, register_imported_toolkit_wrappers=False, toolkit_precedence=None, exception_if_unavailable=True)

    Create an empty toolkit registry.

    Parameters
      register_imported_toolkit_wrappers bool, optional, default=False
        If True, will attempt to register all imported ToolkitWrapper subclasses that can be found, in no particular

          order.

      toolkit_precedence list, optional, default=None

        List of toolkit wrapper classes, in order of desired precedence when performing molecule operations. If None, defaults to [OpenEyeToolkitWrapper, RDKitToolkitWrapper, AmberToolsToolkitWrapper].

      exception_if_unavailable bool, optional, default=True

        If True, an exception will be raised if the toolkit is unavailable

  Methods

  `__init__`(self[, …]) | Create an empty toolkit registry.
  `add_toolkit`(self, toolkit_wrapper) | Append a ToolkitWrapper onto the list of toolkits in this ToolkitRegistry
  `call`(self, method_name, *args[, …]) | Execute the requested method by attempting to use all registered toolkits in order of precedence.
  `register_toolkit`(self, toolkit_wrapper[, …]) | Register the provided toolkit wrapper class, instantiating an object of it.
  `resolve`(self, method_name) | Resolve the requested method name by checking all registered toolkits in order of precedence for one that provides the requested method.

  Attributes

  `registered_toolkits` | List registered toolkits.