Class CompoundInfo

java.lang.Object
org.episteme.natural.chemistry.loaders.CompoundInfo

public class CompoundInfo extends Object
A data transfer object for chemical compound information from external APIs.

This class captures common properties returned by services like PubChem:

  • PubChem CID (compound identifier)
  • Molecular formula
  • Molecular weight
  • IUPAC name
  • InChIKey (structural identifier)
  • Canonical SMILES

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getCid

      public long getCid()
      Returns the PubChem Compound ID.
      Returns:
      CID
    • getName

      public String getName()
      Returns the common name of the compound.
      Returns:
      compound name
    • getMolecularFormula

      public String getMolecularFormula()
      Returns the molecular formula (e.g., "C9H8O4" for Aspirin).
      Returns:
      molecular formula
    • getMolecularWeight

      public double getMolecularWeight()
      Returns the molecular weight in g/mol.
      Returns:
      molecular weight
    • getMolecularWeightQuantity

      public Quantity<Mass> getMolecularWeightQuantity()
      Returns the molecular weight as a type-safe Quantity.
      Returns:
      molecular weight quantity (in g/mol, approximated as GRAM)
    • getIUPACName

      public String getIUPACName()
      Returns the IUPAC systematic name.
      Returns:
      IUPAC name
    • getInchiKey

      public String getInchiKey()
      Returns the InChIKey structural identifier.
      Returns:
      InChIKey
    • getCanonicalSmiles

      public String getCanonicalSmiles()
      Returns the canonical SMILES representation.
      Returns:
      SMILES string
    • toString

      public String toString()
      Overrides:
      toString in class Object