3D Prep & SDF Exports
Turn a filtered ZINC SMILES set into docking-ready 3D with RDKit ETKDGv3 and MMFF — deduplicate on canonical SMILES first, then shard the SDF at 10k-20k.
This page shows how to turn a filtered ZINC SMILES set into docking-ready 3D structures with RDKit, then deduplicate and shard the output into manageable SDF files. Ask Ivy to run this in the chat's code workspace, where RDKit is installed and files land under /workspace/scratch/, or run it on your own machine. Deduplicating on canonical SMILES before 3D generation is what most affects the result, since it avoids wasting embedding effort on redundant molecules.
2D → 3D with RDKit
Deduplicate
- Normalize canonical SMILES and drop duplicates before 3D generation.
- For SDF outputs, store the canonical SMILES in a property (e.g.,
SMILES) for easy dedup later.
Sharding SDF
- Write 10k–20k molecules per SDF to keep file sizes manageable.
- Name shards consistently:
zinc_3d_0001.sdf,zinc_3d_0002.sdf, etc.
Tips
- Set
ETKDGv3seeds for reproducibility:params.randomSeed = 13. - If MMFF fails, fall back to UFF for problematic molecules.
- Track failures (embed/optimize) to understand data quality; log counts per failure mode.
Was this page helpful?