openff.toolkit.utils.exceptions

Exceptions

AntechamberNotFoundError(msg)

The antechamber executable was not found

AtomNotInTopologyError(msg)

An atom was not found in a topology.

CallbackRegistrationError(msg)

Error raised when callback registration fails.

ChargeCalculationError(msg)

An unhandled error occurred in an external toolkit during charge calculation

ChargeMethodUnavailableError(msg)

A toolkit does not support the requested partial_charge_method combination

ConformerGenerationError(msg)

Conformer generation via a wrapped toolkit failed.

DuplicateParameterError(msg)

Exception raised when trying to add a ParameterType that already exists

DuplicateUniqueMoleculeError(msg)

Exception for when the user provides indistinguishable unique molecules when trying to identify atoms from a PDB

DuplicateVirtualSiteTypeException(msg)

Exception raised when trying to register two different virtual site classes with the same 'type'

FractionalBondOrderInterpolationMethodUnsupportedError(msg)

Exception for when an unsupported fractional bond order interpolation assignment method is called.

GAFFAtomTypeWarning

A warning raised if a loaded mol2 file possibly uses GAFF atom types.

HierarchySchemeNotFoundException(msg)

Exception raised when trying to access a HierarchyScheme from a molecule that doesn't have one with the given iterator name

HierarchySchemeWithIteratorNameAlreadyRegisteredException(msg)

Exception raised when trying to add a HierarchyScheme to a molecule that already has one with the same iterator name

IncompatibleParameterError(msg)

Exception for when a set of parameters is scientifically/technically incompatible with another

IncompatibleUnitError(msg)

Exception for when a parameter is in the wrong units for a ParameterHandler's unit system

InconsistentStereochemistryError(msg)

Error raised when stereochemistry is inconsistent before and after conversions between molecule representations.

IncorrectNumConformersError(msg)

The requested partial_charge_method expects a different number of conformers than was provided

IncorrectNumConformersWarning

The requested partial_charge_method expects a different number of conformers than was provided

InvalidAromaticityModelError(msg)

General exception for errors while setting the aromaticity model of a Topology.

InvalidAtomMetadataError(msg)

The program attempted to set atom metadata to an invalid type

InvalidBondOrderError(msg)

Exception for passing a non-int to Molecule.bond_order

InvalidBoxVectorsError(msg)

Exception for setting invalid box vectors

InvalidConformerError(msg)

This error is raised when the conformer added to the molecule has a different connectivity to that already defined.

InvalidIUPACNameError(msg)

Failed to parse IUPAC name

InvalidPeriodicityError(msg)

Exception for setting invalid periodicity

InvalidToolkitError(msg)

A non-toolkit object was received when a toolkit object was expected

InvalidToolkitRegistryError(msg)

An object other than a ToolkitRegistry or toolkit wrapper was received

LicenseError(msg)

This function requires a license that cannot be found.

MissingIndexedAttributeError(msg)

Error raised when an indexed attribute does not exist

MissingPackageError(msg)

This function requires a package that is not installed.

MissingPartialChargesError(msg)

Error raised when a molecule is missing partial charges in a context in which it is expected to have them.

MissingUniqueMoleculesError(msg)

Exception for when unique_molecules is required but not found

MoleculeNotInTopologyError(msg)

A molecule was not found in a topology.

MultipleMoleculesInPDBError(msg)

Error raised when a multiple molecules are found when one was expected

NotAttachedToMoleculeError(msg)

Exception for when a component does not belong to a Molecule object, but is queried

NotBondedError(msg)

Exception for when a function requires a bond between two atoms, but none is present

NotEnoughPointsForInterpolationError(msg)

Exception for when less than two points are provided for interpolation

NotInTopologyError(msg)

An object was not found in a topology.

OpenFFToolkitException(msg)

Base exception for custom exceptions raised by the OpenFF Toolkit

ParameterHandlerRegistrationError(msg)

Exception for errors in ParameterHandler registration

ParameterLookupError(msg)

Exception raised when something goes wrong in a parameter lookup in ParameterHandler.__getitem__

PartialChargeVirtualSitesError(msg)

Exception thrown when partial charges cannot be computed for a Molecule because the ForceField applies virtual sites.

RadicalsNotSupportedError(msg)

The OpenFF Toolkit does not currently support parsing molecules with radicals.

RemapIndexError(msg)

An error with indices used to remap a molecule

SMILESParseError(msg)

The record could not be parsed into the given format

SMIRKSMismatchError(msg)

Exception for cases where smirks are inappropriate for the environment type they are being parsed into

SMIRKSParsingError(msg)

Exception for when SMIRKS are not parseable for any environment

SMIRNOFFAromaticityError(msg)

Exception thrown when an incompatible SMIRNOFF aromaticity model is checked for compatibility.

SMIRNOFFParseError(msg)

Error for when a SMIRNOFF data structure is not parseable by a ForceField

SMIRNOFFSpecError(msg)

Exception for when data is noncompliant with the SMIRNOFF data specification.

SMIRNOFFSpecUnimplementedError(msg)

Exception for when a portion of the SMIRNOFF specification is not yet implemented.

SMIRNOFFVersionError(msg)

Exception thrown when an incompatible SMIRNOFF version data structure is attempted to be read.

SmilesParsingError(msg)

This error is raised when parsing a SMILES string results in an error.

ToolkitUnavailableException(msg)

The requested toolkit is unavailable.

UnassignedAngleParameterException(msg)

Exception raised when there are angle terms for which a ParameterHandler can't find parameters.

UnassignedBondParameterException(msg)

Exception raised when there are bond terms for which a ParameterHandler can't find parameters.

UnassignedChemistryInPDBError([msg, ...])

Error raised when a bond or atom in a polymer could not be assigned chemical information.

UnassignedMoleculeChargeException(msg)

Exception raised when no charge method is able to assign charges to a molecule.

UnassignedProperTorsionParameterException(msg)

Exception raised when there are proper torsion terms for which a ParameterHandler can't find parameters.

UnassignedValenceParameterException(msg)

Exception raised when there are valence terms for which a ParameterHandler can't find parameters.

UndefinedStereochemistryError(msg)

A molecule was attempted to be loaded with undefined stereochemistry

UnsupportedFileTypeError(msg)

Error raised when attempting to parse an unsupported file type.

UnsupportedMoleculeConversionError(msg)

Error raised when attempting to instantiate a Molecule with insufficient inputs.

WrongShapeError(msg)

Error raised when an array of the wrong shape is found

exception openff.toolkit.utils.exceptions.OpenFFToolkitException(msg)[source]

Base exception for custom exceptions raised by the OpenFF Toolkit

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.IncompatibleUnitError(msg)[source]

Exception for when a parameter is in the wrong units for a ParameterHandler’s unit system

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.MissingPackageError(msg)[source]

This function requires a package that is not installed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.ToolkitUnavailableException(msg)[source]

The requested toolkit is unavailable.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.LicenseError(msg)[source]

This function requires a license that cannot be found.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidToolkitError(msg)[source]

A non-toolkit object was received when a toolkit object was expected

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidToolkitRegistryError(msg)[source]

An object other than a ToolkitRegistry or toolkit wrapper was received

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UndefinedStereochemistryError(msg)[source]

A molecule was attempted to be loaded with undefined stereochemistry

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.GAFFAtomTypeWarning[source]

A warning raised if a loaded mol2 file possibly uses GAFF atom types.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.ChargeMethodUnavailableError(msg)[source]

A toolkit does not support the requested partial_charge_method combination

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.IncorrectNumConformersError(msg)[source]

The requested partial_charge_method expects a different number of conformers than was provided

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.IncorrectNumConformersWarning[source]

The requested partial_charge_method expects a different number of conformers than was provided

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.ChargeCalculationError(msg)[source]

An unhandled error occurred in an external toolkit during charge calculation

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.ConformerGenerationError(msg)[source]

Conformer generation via a wrapped toolkit failed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidIUPACNameError(msg)[source]

Failed to parse IUPAC name

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.AntechamberNotFoundError(msg)[source]

The antechamber executable was not found

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMILESParseError(msg)[source]

The record could not be parsed into the given format

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.RadicalsNotSupportedError(msg)[source]

The OpenFF Toolkit does not currently support parsing molecules with radicals.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidConformerError(msg)[source]

This error is raised when the conformer added to the molecule has a different connectivity to that already defined. or any other conformer related issues.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SmilesParsingError(msg)[source]

This error is raised when parsing a SMILES string results in an error.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.NotAttachedToMoleculeError(msg)[source]

Exception for when a component does not belong to a Molecule object, but is queried

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.NotInTopologyError(msg)[source]

An object was not found in a topology.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.RemapIndexError(msg)[source]

An error with indices used to remap a molecule

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.AtomNotInTopologyError(msg)[source]

An atom was not found in a topology.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.MoleculeNotInTopologyError(msg)[source]

A molecule was not found in a topology.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidAtomMetadataError(msg)[source]

The program attempted to set atom metadata to an invalid type

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.DuplicateUniqueMoleculeError(msg)[source]

Exception for when the user provides indistinguishable unique molecules when trying to identify atoms from a PDB

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.NotBondedError(msg)[source]

Exception for when a function requires a bond between two atoms, but none is present

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidBondOrderError(msg)[source]

Exception for passing a non-int to Molecule.bond_order

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidBoxVectorsError(msg)[source]

Exception for setting invalid box vectors

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidPeriodicityError(msg)[source]

Exception for setting invalid periodicity

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.MissingUniqueMoleculesError(msg)[source]

Exception for when unique_molecules is required but not found

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMIRKSMismatchError(msg)[source]

Exception for cases where smirks are inappropriate for the environment type they are being parsed into

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMIRKSParsingError(msg)[source]

Exception for when SMIRKS are not parseable for any environment

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.ParameterHandlerRegistrationError(msg)[source]

Exception for errors in ParameterHandler registration

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMIRNOFFVersionError(msg)[source]

Exception thrown when an incompatible SMIRNOFF version data structure is attempted to be read.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMIRNOFFAromaticityError(msg)[source]

Exception thrown when an incompatible SMIRNOFF aromaticity model is checked for compatibility.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InvalidAromaticityModelError(msg)[source]

General exception for errors while setting the aromaticity model of a Topology.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMIRNOFFParseError(msg)[source]

Error for when a SMIRNOFF data structure is not parseable by a ForceField

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.PartialChargeVirtualSitesError(msg)[source]

Exception thrown when partial charges cannot be computed for a Molecule because the ForceField applies virtual sites.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMIRNOFFSpecError(msg)[source]

Exception for when data is noncompliant with the SMIRNOFF data specification.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.SMIRNOFFSpecUnimplementedError(msg)[source]

Exception for when a portion of the SMIRNOFF specification is not yet implemented.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.FractionalBondOrderInterpolationMethodUnsupportedError(msg)[source]

Exception for when an unsupported fractional bond order interpolation assignment method is called.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.NotEnoughPointsForInterpolationError(msg)[source]

Exception for when less than two points are provided for interpolation

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.IncompatibleParameterError(msg)[source]

Exception for when a set of parameters is scientifically/technically incompatible with another

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnassignedValenceParameterException(msg)[source]

Exception raised when there are valence terms for which a ParameterHandler can’t find parameters.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnassignedBondParameterException(msg)[source]

Exception raised when there are bond terms for which a ParameterHandler can’t find parameters.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnassignedAngleParameterException(msg)[source]

Exception raised when there are angle terms for which a ParameterHandler can’t find parameters.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnassignedProperTorsionParameterException(msg)[source]

Exception raised when there are proper torsion terms for which a ParameterHandler can’t find parameters.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnassignedMoleculeChargeException(msg)[source]

Exception raised when no charge method is able to assign charges to a molecule.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.DuplicateParameterError(msg)[source]

Exception raised when trying to add a ParameterType that already exists

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.ParameterLookupError(msg)[source]

Exception raised when something goes wrong in a parameter lookup in ParameterHandler.__getitem__

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.DuplicateVirtualSiteTypeException(msg)[source]

Exception raised when trying to register two different virtual site classes with the same ‘type’

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.CallbackRegistrationError(msg)[source]

Error raised when callback registration fails.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.HierarchySchemeWithIteratorNameAlreadyRegisteredException(msg)[source]

Exception raised when trying to add a HierarchyScheme to a molecule that already has one with the same iterator name

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.HierarchySchemeNotFoundException(msg)[source]

Exception raised when trying to access a HierarchyScheme from a molecule that doesn’t have one with the given iterator name

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.MissingIndexedAttributeError(msg)[source]

Error raised when an indexed attribute does not exist

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.MissingPartialChargesError(msg)[source]

Error raised when a molecule is missing partial charges in a context in which it is expected to have them.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnsupportedMoleculeConversionError(msg)[source]

Error raised when attempting to instantiate a Molecule with insufficient inputs.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.InconsistentStereochemistryError(msg)[source]

Error raised when stereochemistry is inconsistent before and after conversions between molecule representations.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnsupportedFileTypeError(msg)[source]

Error raised when attempting to parse an unsupported file type.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.MultipleMoleculesInPDBError(msg)[source]

Error raised when a multiple molecules are found when one was expected

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.WrongShapeError(msg)[source]

Error raised when an array of the wrong shape is found

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception openff.toolkit.utils.exceptions.UnassignedChemistryInPDBError(msg: Optional[str] = None, substructure_library: Optional[Dict[str, Tuple[str, List[str]]]] = None, omm_top: Optional[OpenMMTopology] = None, unassigned_bonds: Optional[List[Tuple[int, int]]] = None, unassigned_atoms: Optional[List[int]] = None, matches: Optional[DefaultDict[int, List[str]]] = None)[source]

Error raised when a bond or atom in a polymer could not be assigned chemical information.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.