rxn.reaction_preprocessing.pistachio_record_standardizer.PistachioRecordStandardizer
- class rxn.reaction_preprocessing.pistachio_record_standardizer.PistachioRecordStandardizer(cfg_standardize, cfg_preprocess)[source]
Bases:
object
Class to standardize the reactions in Pistachio records.
It combines some aspects of the STANDARDIZE and PREPROCESS steps.
The main goal is to standardize the reaction SMILES and filter invalid reaction records. The individual SMILES strings for the components are also standardized, but the error is not propagated if this fails.
Duplicates are not removed here, as the criterion to do so is unclear, and also because this class does not store previously seen reactions.
The initialization from StandardizeConfig and PreprocessConfig is not optimal, as it (currently) contains more information than is needed, such as the location of the CSV files to load from and write to.
- Parameters
cfg_standardize (
StandardizeConfig
) –cfg_preprocess (
PreprocessConfig
) –
- __init__(cfg_standardize, cfg_preprocess)[source]
- Parameters
cfg_standardize (
StandardizeConfig
) –cfg_preprocess (
PreprocessConfig
) –
Methods
__init__
(cfg_standardize, cfg_preprocess)- param cfg_standardize
standardize
(reaction_record)Standardize a Pistachio reaction record.