--- license: mit task_categories: - tabular-regression - tabular-classification pretty_name: NMRGym language: - en tags: - chemistry - nmr - spectroscopy - molecular-property-prediction - drug-discovery - cheminformatics size_categories: - 100K --- ### Quick Checklist * [✅] Data cleaning: Heavy atom filtering and illegal smiles exclusion. * [✅] Data Summary and Visualization. * [✅] Data Split. * [] 3D coord. generation. Rdkit. * [✅] Toxic Property label generation. * [✅] Function Group label generation. --- ## NMRGym Split Dataset Format (`nmrgym_spec_filtered_both_{train,test}.pkl`) This dataset contains post-QC, scaffold-split molecular entries with paired NMR spectra, structure fingerprints, functional group annotations, and toxicity labels. Each `.pkl` file is a Python list of dictionaries. Each dictionary corresponds to a single unique molecule. ### Example record structure ```python { "smiles": "CC(=O)Oc1ccccc1C(=O)O", "h_shift": [7.25, 7.32, 2.14, 1.27], "c_shift": [128.5, 130.1, 172.9, 20.7], "fingerprint": np.ndarray(shape=(2048,), dtype=np.uint8), "fg_onehot": np.ndarray(shape=(22,), dtype=np.uint8), "toxicity": np.ndarray(shape=(7,), dtype=np.int8), } ``` --- ### Field definitions **`smiles`** (`str`) Canonical SMILES string for this molecule. **`h_shift`** (`list[float]`) Experimental or curated ¹H NMR peak positions in ppm. **`c_shift`** (`list[float]`) Experimental or curated ¹³C NMR peak positions in ppm. **`fingerprint`** (`np.ndarray(2048,)`, `uint8`) RDKit Morgan fingerprint (radius = 2, 2048 bits). Encodes local circular substructures. **`fg_onehot`** (`np.ndarray(22,)`, `uint8`) Binary functional-group vector. `1` means the SMARTS pattern is present in the molecule. Index mapping (0→21): 1. Alcohol 2. Carboxylic Acid 3. Ester 4. Ether 5. Aldehyde 6. Ketone 7. Alkene 8. Alkyne 9. Benzene 10. Primary Amine 11. Secondary Amine 12. Tertiary Amine 13. Amide 14. Cyano 15. Fluorine 16. Chlorine 17. Bromine 18. Iodine 19. Sulfonamide 20. Sulfone 21. Sulfide 22. Phosphoric Acid **`toxicity`** (`np.ndarray(7,)`, `int8`) Seven binary toxicity endpoints (1 = toxic / positive, 0 = negative): 0. AMES (mutagenicity) 1. DILI (Drug-Induced Liver Injury) 2. Carcinogens_Lagunin (carcinogenicity) 3. hERG (cardiotoxic channel block) 4. ClinTox (clinical toxicity) 5. NR-ER (endocrine / estrogen receptor) 6. SR-ARE (oxidative stress response) --- ### Train / Test meaning * `nmrgym_spec_filtered_both_train.pkl`: scaffold-based training set. * `nmrgym_spec_filtered_both_test.pkl`: scaffold-disjoint test set. Scaffold split is computed using Bemis–Murcko scaffolds. This means test scaffolds do not appear in train, simulating generalization to new chemotypes instead of just new stereoisomers. --- ### Minimal usage example ```python import pickle from rdkit import Chem from rdkit.Chem import AllChem # load the dataset test_path = "/gemini/user/private/NMRGym/utils/split_output/nmrgym_spec_filtered_both_test.pkl" with open(test_path, "rb") as f: dataset = pickle.load(f) print("num molecules:", len(dataset)) print("keys:", dataset[0].keys()) print("example toxicity vector:", dataset[0]["toxicity"]) # build 3D conformer for the first molecule smi = dataset[0]["smiles"] mol = Chem.MolFromSmiles(smi) mol = Chem.AddHs(mol) # add hydrogens for 3D AllChem.EmbedMolecule(mol, AllChem.ETKDG()) AllChem.UFFOptimizeMolecule(mol) # extract 3D coordinates (in Å) conf = mol.GetConformer() coords = [] for atom_idx in range(mol.GetNumAtoms()): pos = conf.GetAtomPosition(atom_idx) coords.append([pos.x, pos.y, pos.z]) print("3D coords for first molecule (Angstrom):") for i, (x,y,z) in enumerate(coords): sym = mol.GetAtomWithIdx(i).GetSymbol() print(f"{i:2d} {sym:2s} {x:8.3f} {y:8.3f} {z:8.3f}") ``` ### Notes on 3D coordinates * We generate a single low-energy conformer using RDKit ETKDG embedding + UFF optimization. * Coordinates are in Ångström. * These coordinates are not guaranteed to match the experimental NMR conformer in solvent; they are intended for featurization (message passing models, geometry-aware models, etc.), not quantum-accurate geometry. --- ## Downstream Benchmark Tasks This benchmark suite evaluates AI models on multiple spectroscopy-related prediction tasks. Each task reflects a distinct molecular reasoning aspect — from direct spectrum regression to property and toxicity prediction. ### 1. Spectral Prediction | **Method / Paper Title** | **Model Type / Approach** | **Metric(s)** | **Model Size** | **Notes** | | ------------------------ | ------------------------- | ------------- | -------------- | --------- | | x | x |x | x | x | ### 2. Structure Prediction (Inverse NMR) | **Method / Paper Title** | **Model Type / Approach** | **Metric(s)** | **Model Size** | **Notes** | | ------------------------ | ------------------------- | ------------- | -------------- | --------- | | x | x |x | x | x | ### 3. Molecular Fingerprint Prediction (Spec2FP) | **Method / Paper Title** | **Model Type / Approach** | **Metric(s)** | **Model Size** | **Notes** | | ------------------------ | ------------------------- | ------------- | -------------- | --------- | | x | x |x | x | x | ### 4. Functional Group Classification (Spec2Func) | **Method / Paper Title** | **Model Type / Approach** | **Metric(s)** | **Model Size** | **Notes** | | ------------------------ | ------------------------- | ------------- | -------------- | --------- | | x | x |x | x | x | ### 5. Molecular Toxicity Prediction (Spec2Tox / ADMET) | **Method / Paper Title** | **Model Type / Approach** | **Metric(s)** | **Model Size** | **Notes** | | ------------------------ | ------------------------- | ------------- | -------------- | --------- | | x | x |x | x | x | ---