ChemicalDomain

model openff.nagl.domains.ChemicalDomain[source]

A domain of chemical space to which a molecule can belong

Used for determining if a molecule is represented in the training data for a given model.

Fields
field allowed_elements: Tuple[int, ...] [Optional]

The atomic numbers of the elements allowed in the domain

field forbidden_patterns: Tuple[str, ...] [Optional]

The SMARTS patterns which are forbidden in the domain

check_allowed_elements(molecule: Molecule, return_error_message: bool = False) Union[bool, Tuple[bool, str]][source]
check_forbidden_patterns(molecule: Molecule, return_error_message: bool = False) Union[bool, Tuple[bool, str]][source]
check_molecule(molecule: Molecule, return_error_message: bool = False) Union[bool, Tuple[bool, str]][source]