agentsclimarketplace

Molecular structure tensor encoding

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/molecular-structure-tensor-encoding

Use when when you have raw molecular structure representations (SMILES strings, InChI notation, or chemical formulas) and need to feed them into a neural spectrum prediction model like SCARF or ICEBERG. Apply this skill before any forward inference pass through a pre-trained spectrum predictor.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill molecular-structure-tensor-encoding

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.4 KB, 792 tokens by cl100k_base, as published. Nobody here has run it

molecular-structure-tensor-encoding

Summary

Convert molecular input data (SMILES, InChI, or chemical formula) into model-compatible tensor representations for downstream mass spectrum prediction. This preprocessing step prepares chemical structures for neural network inference by encoding their structural information into fixed-dimensional numerical arrays.

When to use

When you have raw molecular structure representations (SMILES strings, InChI notation, or chemical formulas) and need to feed them into a neural spectrum prediction model like SCARF or ICEBERG. Apply this skill before any forward inference pass through a pre-trained spectrum predictor.

When NOT to use

  • Input molecules are already in tensor form or pre-encoded numerical format
  • The target model accepts raw structure files (e.g., SDF, MOL2) without intermediate encoding
  • You are performing structural elucidation via the ICEBERG WebUI, which handles encoding internally

Inputs

  • SMILES strings (molecular structure notation)
  • InChI notation (International Chemical Identifier)
  • Chemical formulas
  • Molecular input data in batch or single-molecule format

Outputs

  • Tensor arrays (model-compatible numerical representations)
  • Batch-formatted tensor structures
  • Encoded molecular representations suitable for neural network inference

How to apply

Load molecular input data in SMILES, InChI, or chemical formula format and convert each molecule into a model-compatible tensor representation. The encoding process depends on the specific model's expected input dimensionality and vocabulary: SCARF expects subformula-aware encodings that preserve chemical formula information, while fragment-based models may require molecular graph or SMILES-sequence encodings. Ensure consistent batch formatting and data type (typically float32 for neural networks). Validate tensor shapes match the model's expected input dimensions before passing to the forward pass. The encoded tensors serve as the primary input to the model's inference pipeline.

Related tools

Evaluation signals

  • Tensor dimensions match model's expected input shape (no shape mismatch errors during model loading)
  • All tensors have uniform batch size and consistent feature dimensions across the dataset
  • Numerical values are finite (no NaN or inf) and within expected ranges for molecular descriptors
  • Encoded representations preserve structural information sufficient for model to generate chemically valid predictions
  • Forward pass executes without runtime errors and produces spectrum predictions of expected dimensionality

Limitations

  • Encoding must be compatible with the specific pre-trained model weights; different model architectures (SCARF vs. ICEBERG) may require different tensor formats
  • Chemical formulas alone do not encode stereochemistry or bond information; use SMILES or InChI for structure-sensitive tasks
  • Batch encoding assumes homogeneous molecular complexity; very large or atypical molecules may exceed encoding capacity or require special handling

Evidence

  • [other] Load molecular input data (SMILES, InChI, or chemical formula) and prepare as model-compatible tensors.: "Load molecular input data (SMILES, InChI, or chemical formula) and prepare as model-compatible tensors."
  • [readme] SCARF predicts spectra at the level of chemical formula: "SCARF predicts spectra at the level of chemical formula"
  • [other] Initialize the SCARF model with pre-trained weights from the ms-pred repository. Execute forward inference pass through SCARF to generate subformula-level spectrum predictions: "Initialize the SCARF model with pre-trained weights from the ms-pred repository. Execute forward inference pass through SCARF to generate subformula-level spectrum predictions"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.