rxnutils.pipeline.actions package¶
Submodules¶
rxnutils.pipeline.actions.dataframe_mod module¶
Module containing actions that modify the dataframe in some way
- class rxnutils.pipeline.actions.dataframe_mod.DropColumns(columns)¶
Bases:
object
Drops columns specified in ‘columns’
yaml example:
- drop_columns:
- columns:
NRingChange
RingBondMade
- Parameters:
columns (list[str])
- pretty_name: ClassVar[str] = 'drop_columns'¶
- columns: list[str]¶
- class rxnutils.pipeline.actions.dataframe_mod.DropDuplicates(key_columns)¶
Bases:
object
Action for dropping duplicates from dataframe
- Parameters:
key_columns (list[str])
- pretty_name: ClassVar[str] = 'drop_duplicates'¶
- key_columns: list[str]¶
- class rxnutils.pipeline.actions.dataframe_mod.DropRows(indicator_columns)¶
Bases:
object
Drops rows according to boolean in ‘indicator_columns’. True => Keep, False => Drop.
yaml example:
- drop_rows:
- indicator_columns:
is_sanitizable
is_sanitizable2
- Parameters:
indicator_columns (list[str])
- pretty_name: ClassVar[str] = 'drop_rows'¶
- indicator_columns: list[str]¶
- class rxnutils.pipeline.actions.dataframe_mod.KeepColumns(columns)¶
Bases:
object
Drops columns not specified in ‘columns’
yaml example:
- keep_columns:
- columns:
id
classification
rsmi_processed
- Parameters:
columns (list[str])
- pretty_name: ClassVar[str] = 'keep_columns'¶
- columns: list[str]¶
- class rxnutils.pipeline.actions.dataframe_mod.RenameColumns(in_columns, out_columns)¶
Bases:
object
Renames columns specified in ‘in_columns’ to the names specified in ‘out_columns’
yaml example:
- rename_columns:
- in_columns:
column1
column2
- out_columns:
column1_renamed
column2_renamed
- Parameters:
in_columns (list[str])
out_columns (list[str])
- pretty_name: ClassVar[str] = 'rename_columns'¶
- in_columns: list[str]¶
- out_columns: list[str]¶
- class rxnutils.pipeline.actions.dataframe_mod.QueryDataframe(query)¶
Bases:
object
Uses dataframe query to produce a new (smaller) dataframe. Query must conform to pandas.query()
yaml file example: Keeping only rows where the has_stereo columns is True:
- query_dataframe:
query: has_stereo == True
- Parameters:
query (str)
- pretty_name: ClassVar[str] = 'query_dataframe'¶
- query: str¶
- class rxnutils.pipeline.actions.dataframe_mod.StackColumns(in_columns, out_column='StackedColumns')¶
Bases:
object
Stacks the specified in_columns under a new column name (out_column), multiplies the rest of the columns as appropriate
yaml control file example:
- stack_columns:
- in_columns:
rsmi_processed
rsmi_inverted_stereo
out_column: rsmi_processed
- Parameters:
in_columns (list[str])
out_column (str)
- pretty_name: ClassVar[str] = 'stack_columns'¶
- in_columns: list[str]¶
- out_column: str = 'StackedColumns'¶
- class rxnutils.pipeline.actions.dataframe_mod.StackMultiColumns(stack_columns, target_columns)¶
Bases:
object
Stacks the specified target_columns on top of the stack_columns after renaming.
Example Yaml:
- stack_multi_columns:
- stack_columns:
rsmi_inverted_stereo
PseudoHash_inverted_stereo
- target_columns:
rsmi_processed
PseudoHash
- Parameters:
stack_columns (list[str])
target_columns (list[str])
- pretty_name: ClassVar[str] = 'stack_multi_columns'¶
- stack_columns: list[str]¶
- target_columns: list[str]¶
rxnutils.pipeline.actions.reaction_mod module¶
Module containing actions on reactions that modify the reaction in some way
- class rxnutils.pipeline.actions.reaction_mod.DesaltMolecules(in_column, out_column='RxnDesalted', keep_something=False)¶
Bases:
ReactionActionMixIn
Action for desalting molecules
- Parameters:
in_column (str)
out_column (str)
keep_something (bool)
- pretty_name: ClassVar[str] = 'desalt_molecules'¶
- in_column: str¶
- out_column: str = 'RxnDesalted'¶
- keep_something: bool = False¶
- class rxnutils.pipeline.actions.reaction_mod.NameRxn(in_column, options='', nm_rxn_column='NextMoveRxnSmiles', nmc_column='NMC')¶
Bases:
object
Action for calling namrxn
- Parameters:
in_column (str)
options (str)
nm_rxn_column (str)
nmc_column (str)
- pretty_name: ClassVar[str] = 'namerxn'¶
- in_column: str¶
- options: str = ''¶
- nm_rxn_column: str = 'NextMoveRxnSmiles'¶
- nmc_column: str = 'NMC'¶
- class rxnutils.pipeline.actions.reaction_mod.NeutralizeMolecules(in_column, out_column='RxnNeutralized')¶
Bases:
ReactionActionMixIn
Action for neutralizing molecules
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'neutralize_molecules'¶
- in_column: str¶
- out_column: str = 'RxnNeutralized'¶
- class rxnutils.pipeline.actions.reaction_mod.ReactantsToReagents(in_column, out_column='RxnSmilesWithTrueReagents')¶
Bases:
ReactionActionMixIn
Action for converting reactants to reagents
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'reactants2reagents'¶
- in_column: str¶
- out_column: str = 'RxnSmilesWithTrueReagents'¶
- class rxnutils.pipeline.actions.reaction_mod.ReagentsToReactants(in_column, out_column='RxnSmilesAllReactants')¶
Bases:
object
Action for converting reagents to reactants
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'reagents2reactants'¶
- in_column: str¶
- out_column: str = 'RxnSmilesAllReactants'¶
- class rxnutils.pipeline.actions.reaction_mod.RemoveAtomMapping(in_column, out_column='RxnSmilesNoAtomMap')¶
Bases:
ReactionActionMixIn
Action for removing all atom mapping
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'remove_atom_mapping'¶
- in_column: str¶
- out_column: str = 'RxnSmilesNoAtomMap'¶
- class rxnutils.pipeline.actions.reaction_mod.RemoveStereoInfo(in_column, out_column='RxnSmilesNoStereo')¶
Bases:
object
Action for removing stero information
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'remove_stereo_info'¶
- in_column: str¶
- out_column: str = 'RxnSmilesNoStereo'¶
- class rxnutils.pipeline.actions.reaction_mod.InvertStereo(in_column, out_column='RxnSmilesInvertedStereo')¶
Bases:
object
Action for inverting stero information
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'invert_stereo'¶
- in_column: str¶
- out_column: str = 'RxnSmilesInvertedStereo'¶
- class rxnutils.pipeline.actions.reaction_mod.IsotopeInfo(in_column, isotope_column='Isotope', out_column='RxnSmilesWithoutIsotopes', match_regex='\\[(?P<mass>[0-9]+)(?P<symbol>[A-Za-z][a-z]*)(?P<spec>[^\\]]+)*\\]', sub_regex='[\\g<symbol>\\g<spec>]')¶
Bases:
object
Action creating and modifying isotope information
- Parameters:
in_column (str)
isotope_column (str)
out_column (str)
match_regex (str)
sub_regex (str)
- pretty_name: ClassVar[str] = 'isotope_info'¶
- in_column: str¶
- isotope_column: str = 'Isotope'¶
- out_column: str = 'RxnSmilesWithoutIsotopes'¶
- match_regex: str = '\\[(?P<mass>[0-9]+)(?P<symbol>[A-Za-z][a-z]*)(?P<spec>[^\\]]+)*\\]'¶
- sub_regex: str = '[\\g<symbol>\\g<spec>]'¶
- class rxnutils.pipeline.actions.reaction_mod.RemoveExtraAtomMapping(in_column, out_column='RxnSmilesReassignedAtomMap')¶
Bases:
ReactionActionMixIn
Action for removing extra atom mapping
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'remove_extra_atom_mapping'¶
- in_column: str¶
- out_column: str = 'RxnSmilesReassignedAtomMap'¶
- class rxnutils.pipeline.actions.reaction_mod.RemoveUnchangedProducts(in_column, out_column='RxnNoUnchangedProd')¶
Bases:
ReactionActionMixIn
Compares the products with the reagents and reactants and remove unchanged products.
Protonation is considered a difference, As example, if there’s a HCl in the reagents and a Cl- in the products, it will not be removed.
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'remove_unchanged_products'¶
- in_column: str¶
- out_column: str = 'RxnNoUnchangedProd'¶
- class rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable(in_column, out_column='RxnSanitizable', bad_column='BadMolecules')¶
Bases:
ReactionActionMixIn
Action for removing unsanitizable reactions
- Parameters:
in_column (str)
out_column (str)
bad_column (str)
- pretty_name: ClassVar[str] = 'remove_unsanitizable'¶
- in_column: str¶
- out_column: str = 'RxnSanitizable'¶
- bad_column: str = 'BadMolecules'¶
- class rxnutils.pipeline.actions.reaction_mod.RDKitRxnRoles(in_column, out_column='RxnRoleAssigned')¶
Bases:
object
Action for assigning roles based on RDKit algorithm
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'rdkit_RxnRoleAssignment'¶
- in_column: str¶
- out_column: str = 'RxnRoleAssigned'¶
- class rxnutils.pipeline.actions.reaction_mod.RxnMapper(in_column, out_column='RxnmapperRxnSmiles', rxnmapper_command='conda run -p ${RXNMAPPER_ENV_PATH} python /home/runner/work/reaction_utils/reaction_utils/rxnutils/data/mapping.py')¶
Bases:
object
Action for mapping reactions with the RXNMapper tool
- Parameters:
in_column (str)
out_column (str)
rxnmapper_command (str)
- pretty_name: ClassVar[str] = 'rxnmapper'¶
- in_column: str¶
- out_column: str = 'RxnmapperRxnSmiles'¶
- rxnmapper_command: str = 'conda run -p ${RXNMAPPER_ENV_PATH} python /home/runner/work/reaction_utils/reaction_utils/rxnutils/data/mapping.py'¶
- class rxnutils.pipeline.actions.reaction_mod.SplitReaction(in_column, out_columns)¶
Bases:
ReactionActionMixIn
Action for splitting reaction into components
- Parameters:
in_column (str)
out_columns (list[str])
- pretty_name: ClassVar[str] = 'split_reaction'¶
- in_column: str¶
- out_columns: list[str]¶
- class rxnutils.pipeline.actions.reaction_mod.AtomMapTagDisconnectionSite(in_column='RxnSmilesClean', out_column='products_atom_map_tagged')¶
Bases:
ReactionActionMixIn
Action for tagging disconnection site in products with atom-map ‘[<atom>:1]’.
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'atom_map_tag_disconnection_site'¶
- in_column: str = 'RxnSmilesClean'¶
- out_column: str = 'products_atom_map_tagged'¶
- class rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag(in_column='products_atom_map_tagged', out_column_tagged='products_tagged', out_column_reconstructed='products_reconstructed')¶
Bases:
ReactionActionMixIn
Action for converting atom-map tagging to exclamation mark tagging.
yaml example:
- convert_atom_map_disconnection_tag:
in_column_tagged: products_atom_map_tagged in_column_untagged: products out_column_tagged: products_tagged out_column_reconstructed: products_reconstructed
- Parameters:
in_column (str)
out_column_tagged (str)
out_column_reconstructed (str)
- pretty_name: ClassVar[str] = 'convert_atom_map_disconnection_tag'¶
- in_column: str = 'products_atom_map_tagged'¶
- out_column_tagged: str = 'products_tagged'¶
- out_column_reconstructed: str = 'products_reconstructed'¶
- class rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles(in_column, out_column='RxnSmiles', smiles_column_index=0)¶
Bases:
object
Action from trimming reaction SMILES
- Parameters:
in_column (str)
out_column (str)
smiles_column_index (int)
- pretty_name: ClassVar[str] = 'trim_rxn_smiles'¶
- in_column: str¶
- out_column: str = 'RxnSmiles'¶
- smiles_column_index: int = 0¶
rxnutils.pipeline.actions.reaction_props module¶
Module containing actions on reactions that doesn’t modify the reactions only compute properties of them
- class rxnutils.pipeline.actions.reaction_props.CountComponents(in_column, nreactants_column='NReactants', nmapped_reactants_column='NMappedReactants', nreagents_column='NReagents', nmapped_reagents_column='NMappedReagents', nproducts_column='NProducts', nmapped_products_column='NMappedProducts')¶
Bases:
ReactionActionMixIn
Action for counting reaction components
- Parameters:
in_column (str)
nreactants_column (str)
nmapped_reactants_column (str)
nreagents_column (str)
nmapped_reagents_column (str)
nproducts_column (str)
nmapped_products_column (str)
- pretty_name: ClassVar[str] = 'count_components'¶
- in_column: str¶
- nreactants_column: str = 'NReactants'¶
- nmapped_reactants_column: str = 'NMappedReactants'¶
- nreagents_column: str = 'NReagents'¶
- nmapped_reagents_column: str = 'NMappedReagents'¶
- nproducts_column: str = 'NProducts'¶
- nmapped_products_column: str = 'NMappedProducts'¶
- class rxnutils.pipeline.actions.reaction_props.CountElements(in_column, out_column='ElementCount')¶
Bases:
object
Action for counting elements in reactants
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'count_elements'¶
- in_column: str¶
- out_column: str = 'ElementCount'¶
- class rxnutils.pipeline.actions.reaction_props.HasStereoInfo(in_column, out_column='HasStereo')¶
Bases:
object
Action for checking stereo info
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'has_stereo_info'¶
- in_column: str¶
- out_column: str = 'HasStereo'¶
- class rxnutils.pipeline.actions.reaction_props.HasUnmappedRadicalAtom(in_column, out_column='HasUnmappedRadicalAtom')¶
Bases:
object
Action for flagging if reaction has any unmapped radical atoms
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'hasunmappedradicalatom'¶
- in_column: str¶
- out_column: str = 'HasUnmappedRadicalAtom'¶
- class rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants(rsmi_column, bad_columns, out_column='HasUnsanitizableReactants')¶
Bases:
object
Action for flagging if reaction has any unsanitizable reactants
- Parameters:
rsmi_column (str)
bad_columns (List[str])
out_column (str)
- pretty_name: ClassVar[str] = 'unsanitizablereactants'¶
- rsmi_column: str¶
- bad_columns: List[str]¶
- out_column: str = 'HasUnsanitizableReactants'¶
- class rxnutils.pipeline.actions.reaction_props.CgrCreated(in_column, out_column='CGRCreated')¶
Bases:
object
Action for determining if a CGR can be created from the reaction smiles
- Parameters:
in_column (str)
out_column (str)
- in_column: str¶
- pretty_name: ClassVar[str] = 'cgr_created'¶
- out_column: str = 'CGRCreated'¶
- class rxnutils.pipeline.actions.reaction_props.CgrNumberOfDynamicBonds(in_column, out_column='NDynamicBonds')¶
Bases:
object
Action for calculating the number of dynamic bonds
- Parameters:
in_column (str)
out_column (str)
- in_column: str¶
- pretty_name: ClassVar[str] = 'cgr_dynamic_bonds'¶
- out_column: str = 'NDynamicBonds'¶
- class rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats(in_column, unmapped_column='UnmappedProdAtoms', widow_column='WidowAtoms')¶
Bases:
object
Action for collecting statistics of product atom mapping
- Parameters:
in_column (str)
unmapped_column (str)
widow_column (str)
- pretty_name: ClassVar[str] = 'product_atommapping_stats'¶
- in_column: str¶
- unmapped_column: str = 'UnmappedProdAtoms'¶
- widow_column: str = 'WidowAtoms'¶
- class rxnutils.pipeline.actions.reaction_props.ProductSize(in_column, out_column='ProductSize')¶
Bases:
object
Action for counting product size
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'productsize'¶
- in_column: str¶
- out_column: str = 'ProductSize'¶
- class rxnutils.pipeline.actions.reaction_props.PseudoReactionHash(in_column, out_column='PseudoHash', no_reagents=False)¶
Bases:
object
Action for creating a reaction hash based on InChI keys
- Parameters:
in_column (str)
out_column (str)
no_reagents (bool)
- pretty_name: ClassVar[str] = 'pseudo_reaction_hash'¶
- in_column: str¶
- out_column: str = 'PseudoHash'¶
- no_reagents: bool = False¶
- class rxnutils.pipeline.actions.reaction_props.PseudoSmilesHash(in_column, out_column='PseudoSmilesHash')¶
Bases:
object
Action for creating a reaction hash based on SMILES
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'pseudo_smiles_hash'¶
- in_column: str¶
- out_column: str = 'PseudoSmilesHash'¶
- class rxnutils.pipeline.actions.reaction_props.ReactantProductAtomBalance(in_column, out_column='RxnAtomBalance')¶
Bases:
object
Action for computing atom balance
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'atombalance'¶
- in_column: str¶
- out_column: str = 'RxnAtomBalance'¶
- class rxnutils.pipeline.actions.reaction_props.ReactantSize(in_column, out_column='ReactantSize')¶
Bases:
object
Action for counting reactant size
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'reactantsize'¶
- in_column: str¶
- out_column: str = 'ReactantSize'¶
- class rxnutils.pipeline.actions.reaction_props.MaxRingNumber(in_column, out_column='MaxRings')¶
Bases:
object
Action for calculating the maximum number of rings in either the product or reactant For a reaction without reactants or products, it will return 0 to enable easy arithmetic comparison
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'maxrings'¶
- in_column: str¶
- out_column: str = 'MaxRings'¶
- class rxnutils.pipeline.actions.reaction_props.RingNumberChange(in_column, out_column='NRingChange')¶
Bases:
object
Action for calculating if reaction has change in number of rings
A positive number from this action implies that a ring was formed during the reaction
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'ringnumberchange'¶
- in_column: str¶
- out_column: str = 'NRingChange'¶
- class rxnutils.pipeline.actions.reaction_props.RingBondMade(in_column, out_column='RingBondMade')¶
Bases:
object
Action for flagging if reaction has made a ring bond in the product
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'ringbondmade'¶
- in_column: str¶
- out_column: str = 'RingBondMade'¶
- class rxnutils.pipeline.actions.reaction_props.RingMadeSize(in_column, out_column='RingMadeSize')¶
Bases:
object
Action for computing the size of a newly formed ring
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'ringmadesize'¶
- in_column: str¶
- out_column: str = 'RingMadeSize'¶
- class rxnutils.pipeline.actions.reaction_props.SmilesLength(in_column, out_column='SmilesLength')¶
Bases:
object
Action for counting SMILES length
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'smiles_length'¶
- in_column: str¶
- out_column: str = 'SmilesLength'¶
- class rxnutils.pipeline.actions.reaction_props.SmilesSanitizable(in_column, out_column='SmilesSanitizable')¶
Bases:
object
Action for checking if SMILES are sanitizable
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'smiles_sanitizable'¶
- in_column: str¶
- out_column: str = 'SmilesSanitizable'¶
- class rxnutils.pipeline.actions.reaction_props.StereoInvention(in_column, out_column='StereoInvention')¶
Bases:
object
Flags reactions where non-stereo compounds (No “@”s in SMILES) turn into stereo compounds (containing “@”)
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'stereo_invention'¶
- in_column: str¶
- out_column: str = 'StereoInvention'¶
- class rxnutils.pipeline.actions.reaction_props.StereoCentreChanges(in_column, out_column='HasStereoChanges', stereo_changes_column='StereoChanges')¶
Bases:
object
Action for checking if stereogenic centre in reaction center is changing during the reaction
- Will create two columns:
A boolean column indicating True or False if it has stereochanges
A description of the stereo information before and after the reaction
- Parameters:
in_column (str)
out_column (str)
stereo_changes_column (str)
- pretty_name: ClassVar[str] = 'stereo_centre_changes'¶
- in_column: str¶
- out_column: str = 'HasStereoChanges'¶
- stereo_changes_column: str = 'StereoChanges'¶
- class rxnutils.pipeline.actions.reaction_props.StereoHasChiralReagent(in_column, out_column='HasChiralReagent')¶
Bases:
object
Action for checking if reagent has stereo centres
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'stereo_chiral_reagent'¶
- in_column: str¶
- out_column: str = 'HasChiralReagent'¶
- class rxnutils.pipeline.actions.reaction_props.StereoCenterIsCreated(in_column='StereoChanges', out_column='StereoCentreCreated')¶
Bases:
object
Action for checking if stereo centre is created during reaction
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'stereo_centre_created'¶
- in_column: str = 'StereoChanges'¶
- out_column: str = 'StereoCentreCreated'¶
- class rxnutils.pipeline.actions.reaction_props.StereoCenterIsRemoved(in_column='StereoChanges', out_column='StereoCentreRemoved')¶
Bases:
object
Action for checking if stereo centre is removed during reaction
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'stereo_centre_removed'¶
- in_column: str = 'StereoChanges'¶
- out_column: str = 'StereoCentreRemoved'¶
- class rxnutils.pipeline.actions.reaction_props.StereoCenterInReactantPotential(in_column, out_column='PotentialStereoCentre')¶
Bases:
object
Action for checking if there is a potential stereo centre in the reaction
Do not consider changes to bond stereochemistry
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'potential_stereo_center'¶
- in_column: str¶
- out_column: str = 'PotentialStereoCentre'¶
- class rxnutils.pipeline.actions.reaction_props.StereoCenterOutsideReaction(in_column, out_column='StereoOutside')¶
Bases:
object
Action for checking if there is a stereo centre outside the reaction centre
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'stereo_centre_outside'¶
- in_column: str¶
- out_column: str = 'StereoOutside'¶
- class rxnutils.pipeline.actions.reaction_props.StereoMesoProduct(in_column, out_column='MesoProduct')¶
Bases:
object
Action for checking if the product is a meso compound
- Parameters:
in_column (str)
out_column (str)
- pretty_name: ClassVar[str] = 'meso_product'¶
- in_column: str¶
- out_column: str = 'MesoProduct'¶
rxnutils.pipeline.actions.templates module¶
Module containing template validation actions
- class rxnutils.pipeline.actions.templates.CountTemplateComponents(in_column, nreactants_column='nreactants', nreagents_column='nreagents', nproducts_column='nproducts')¶
Bases:
object
Action for counting template components
- Parameters:
in_column (str)
nreactants_column (str)
nreagents_column (str)
nproducts_column (str)
- pretty_name: ClassVar[str] = 'count_template_components'¶
- in_column: str¶
- nreactants_column: str = 'nreactants'¶
- nreagents_column: str = 'nreagents'¶
- nproducts_column: str = 'nproducts'¶
- class rxnutils.pipeline.actions.templates.RetroTemplateReproduction(template_column, smiles_column, expected_reactants_column='TemplateGivesTrueReactants', other_reactants_column='TemplateGivesOtherReactants', noutcomes_column='TemplateGivesNOutcomes')¶
Bases:
object
Action for checking template reproduction
- Parameters:
template_column (str)
smiles_column (str)
expected_reactants_column (str)
other_reactants_column (str)
noutcomes_column (str)
- pretty_name: ClassVar[str] = 'retro_template_reproduction'¶
- template_column: str¶
- smiles_column: str¶
- expected_reactants_column: str = 'TemplateGivesTrueReactants'¶
- other_reactants_column: str = 'TemplateGivesOtherReactants'¶
- noutcomes_column: str = 'TemplateGivesNOutcomes'¶