reinvent_validate_input
Validate SMILES/CSV files for REINVENT4 by checking line counts, duplicates, and RDKit validity, with optional cleaning of valid, deduplicated SMILES.
Instructions
Validate SMILES/CSV input file before passing to REINVENT4.
Checks line counts, detects duplicates, validates each SMILES with RDKit, and applies generator-specific constraints (attachment points, fragments, etc.).
Args: smiles_file: Path to CSV or SMILES file generator: One of 'reinvent', 'libinvent', 'linkinvent', 'mol2mol' clean: If True, write _cleaned.smi with valid, deduplicated SMILES
Returns: { "valid": bool, "total_lines": int, "valid_smiles": int, "invalid_smiles": int, "duplicates": int, "cleaned_file": str (if clean=True), "errors": [{index, smiles, reason}, ...] (first 10) }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clean | No | ||
| generator | No | reinvent | |
| smiles_file | Yes |