Preprocessing
Preprocessing is the first stage of the HEDGEHOG pipeline. It standardizes input molecules and removes entries that are unsuitable for downstream descriptor, structural filtering, synthesis, and docking analysis.
What Preprocessing Does
The stage combines normalization and strict filtering:
- converts input SMILES into RDKit molecules
- removes salts and solvents
- keeps the largest organic fragment
- disconnects metals
- normalizes and sanitize molecules
- filters out unsupported elements, radicals, isotopes, invalid valence states, and unresolved multi-fragment artifacts when configured
This stage is intentionally conservative because it defines the clean molecular population that later stages see.
Key Configuration Areas
Preprocessing is controlled by config_mol_prep.yml.
Important sections:
steps.*controls normalization and cleanup operationsfilters.*controls hard rejection rulesoutput.write_duplicates_removedcontrols whether duplicate removals are written to disk
Output
Preprocessing writes its output under stages/01_mol_prep/, including filtered_molecules.csv, failed_molecules.csv, duplicates_removed.csv when duplicate output writing is enabled.
If Mol Prep finishes successfully but produces zero molecules, the pipeline exits early instead of running later stages on an empty set.