rxn.reaction_preprocessing.annotations.molecule_annotation.MoleculeAnnotation

class rxn.reaction_preprocessing.annotations.molecule_annotation.MoleculeAnnotation(original_smiles, updated_smiles, decision, categories, **extra_info)[source]

Bases: object

Specifies a molecule annotation, i.e. a SMILES string that may have an updated SMILES, whether to keep it or not, etc.

Parameters
  • original_smiles (str) –

  • updated_smiles (Optional[str]) –

  • decision (str) –

  • categories (List[str]) –

  • extra_info (Any) –

__init__(original_smiles, updated_smiles, decision, categories, **extra_info)[source]
Parameters
  • original_smiles (str) – original SMILES that is potentially present in a data set. Fragment bonds are indicated by a tilde ‘~’.

  • updated_smiles (Optional[str]) – if specified, SMILES with which to replace original_smiles. Also uses ‘~’ for fragment bonds, and dots ‘.’ may be used to separate compounds from the solvent in which they are solved.

  • decision (str) – “accept” or “reject”.

  • categories (List[str]) – categories to which the annotation belongs to.

  • **extra_info – additional information not covered by the other variables.

  • extra_info (Any) –

Methods

__init__(original_smiles, updated_smiles, ...)

type original_smiles

str

Attributes

original_without_fragment_bond

Get the original SMILES with dots instead of tildes to delimit fragments.

updated_without_fragment_bond

Get the updated SMILES with dots instead of tildes to delimit fragments.

original_smiles

updated_smiles

decision

categories

extra_info

property original_without_fragment_bond: str

Get the original SMILES with dots instead of tildes to delimit fragments.

Return type

str

property updated_without_fragment_bond: List[str]

Get the updated SMILES with dots instead of tildes to delimit fragments.

Since dots may be used to delimit solvents from compounds, a list must be returned.

Return type

List[str]