ComponentResult

class openff.qcsubmit.workflow_components.ComponentResult(component_name, component_description, component_provenance, molecules=None, input_file=None, input_directory=None, skip_unique_check=False, verbose=True)[source]

Class to contain molecules after the execution of a workflow component this automatically applies de-duplication to the molecules. For example if a molecule is already in the molecules list it will not be added but any conformers will be kept and transferred.

If a molecule in the molecules list is then filtered it will be removed from the molecules list.

Parameters
__init__(component_name, component_description, component_provenance, molecules=None, input_file=None, input_directory=None, skip_unique_check=False, verbose=True)[source]

Register the list of molecules to process.

Parameters
  • component_name (str) – The name of the component that produced this result.

  • component_description (Dict[str, str]) – The dictionary representation of the component which details the function and running parameters.

  • component_provenance (Dict[str, str]) – The dictionary of the modules used and there version number when running the component.

  • molecules (Optional[Union[List[openff.toolkit.topology.molecule.Molecule], openff.toolkit.topology.molecule.Molecule]]) – The list of molecules that have been possessed by a component and returned as a result.

  • input_file (Optional[str]) – The name of the input file used to produce the result if not from a component.

  • input_directory (Optional[str]) – The name of the input directory which contains input molecule files.

  • verbose (bool) – If the timing information and progress bar should be shown while doing deduplication.

  • skip_unique_check (Optional[bool]) – Set to True if it is sure that all molecules will be unique in this result

Methods

__init__(component_name, ...[, molecules, ...])

Register the list of molecules to process.

add_molecule(molecule)

Add a molecule to the molecule list after checking that it is not present already.

filter_molecule(molecule)

Filter out a molecule that has not passed this workflow component.

Attributes

filtered

Get the list of molecule that have been filtered to iterate over.

molecules

Get the list of molecules which can be iterated over.

n_conformers

The number of conformers stored in the molecules.

n_filtered

The number of filtered molecules.

n_molecules

The number of molecules saved in the result.

property molecules: List[openff.toolkit.topology.molecule.Molecule]

Get the list of molecules which can be iterated over.

property filtered: List[openff.toolkit.topology.molecule.Molecule]

Get the list of molecule that have been filtered to iterate over.

property n_molecules: int

The number of molecules saved in the result.

property n_conformers: int

The number of conformers stored in the molecules.

property n_filtered: int

The number of filtered molecules.

add_molecule(molecule)[source]

Add a molecule to the molecule list after checking that it is not present already. If it is de-duplicate the record and condense the conformers and metadata.

Parameters

molecule (openff.toolkit.topology.molecule.Molecule) – The molecule and its conformers which we should try and add to the result.

Returns

True if the molecule is already present and False if not.

Return type

bool

filter_molecule(molecule)[source]

Filter out a molecule that has not passed this workflow component. If the molecule is already in the pass list remove it and ensure it is only in the filtered list.

Parameters

molecule (openff.toolkit.topology.molecule.Molecule) – The molecule which should be filtered.