Interface SubstructLibrary

An object containing a collection of structures. Used for efficient substructure searching.

Add molecules to the library with the add_mol, add_smiles or add_trusted_smiles methods.

Perform substructure searches with the get_matches method.

interface SubstructLibrary {
    add_mol(m: JSMol): number;
    add_smiles(smi: string): number;
    add_trusted_smiles(smi: string): number;
    count_matches(q: JSMol): number;
    count_matches(q: JSMol, useChirality: boolean, numThreads: number): number;
    get_matches(q: JSMol): string;
    get_matches(q: JSMol, maxResults: number): string;
    get_matches(q: JSMol, useChirality: boolean, numThreads: number, maxResults: number): string;
    get_mol(i: number): JSMol;
}

Methods

  • Add a molecule to the library

    Parameters

    Returns number

  • Add a molecule to the library

    Parameters

    • smi: string

      SMILES string

    Returns number

  • Add a molecule to the library.

    Molecule validity will not be checked!

    Parameters

    • smi: string

      SMILES string (trusted to be valid)

    Returns number

  • Return the number of substructure matches

    Parameters

    Returns number

  • Return the number of substructure matches

    Parameters

    • q: JSMol

      query molecule

    • useChirality: boolean

      set to true to enable chiral substructure searching

    • numThreads: number

      number of threads to use

    Returns number

  • Get all molecules from the library matching the substructure query

    Parameters

    Returns string

  • Get all molecules from the library matching the substructure query

    Parameters

    • q: JSMol

      query molecule

    • maxResults: number

      maximum number of results

    Returns string

  • Get all molecules from the library matching the substructure query

    Parameters

    • q: JSMol

      query molecule

    • useChirality: boolean

      set to true to enable chiral substructure searching

    • numThreads: number

      number of threads to use

    • maxResults: number

      maximum number of results

    Returns string

  • Get a molecule from the library

    Parameters

    • i: number

      index of the molecule

    Returns JSMol