How idslme/idsl_mint works
Project type and purpose
• This is a Python-based command-line data-processing and modeling framework (no GUI frontend) for mass-spectrometry interpretation.
• It implements three parallel “pipelines” (MS2FP, MS2SMILES, FP2MS), each driven by transformer models, to translate between MS/MS spectra, molecular fingerprints, and canonical SMILES.
• Configuration and orchestration are YAML-driven via a single CLI entrypoint MINT_workflow.
File structure
• Top-level:
• IDSL_MINT_workflow.py (CLI entrypoint)
• setup.py, environment.yml (install & environment)
• YAML/ (six trainer/predictor config files)
• IDSL_MINT/ (package root)
• Inside IDSL_MINT/:
• Three pipeline folders: MS2FP/, MS2SMILES/, FP2MS/
– Each contains: Assembler, DataLoader, Dataset, Model, training_function, yaml_trainer, yaml_predictor, msp_pickler
• utils/: reusable data-parsing, fingerprint, plotting, logging, mask-generation modules
• IDSL_MINT_workflow.py: inspects the YAML, dispatches to the correct pipeline
• Notice:
• Pattern: “YAML → workflow dispatcher → pipeline module → data loader & assembler → PyTorch Dataset → Transformer Model → training/inference → pickling & logging”
• External config = YAML files; external data = MSP files; external libs = PyTorch, RDKit.
Key README insights
• Three core use-cases:
a. MS/MS → molecular fingerprints (MS2FP)
b. MS/MS → SMILES (MS2SMILES)
c. Fingerprints/SMILES → MS/MS (FP2MS)
• Single CLI command: MINT_workflow --yaml /path/to/xxx.yaml
• Device-agnostic (CPU/GPU) via PyTorch; MSP parsing tolerant of different headers; YAML files define hyperparameters, file paths, beam search, etc.