Skip to main content

    Compound Collections

    Create, search, import, and export molecular compound libraries from the command line.

    compoundsmoleculessmilesscreening

    Difficulty

    beginner

    The ivybloom CLI is the scriptable surface for the platform, and compound collections are how you create, search, import, and export molecular libraries from the command line. Reach for them when a scripted pipeline needs a managed set of molecules — a screening library to feed batch ADMET or docking, a hit list, a lead series, or a reference set. They give your automation a durable, reusable input surface; for the full command surface, see the CLI overview.

    Compound Collections (since v0.8.10)

    Create, search, import, and export molecular compound libraries from the command line.


    Overview

    Compound collections are sets of molecules stored together for analysis. Common use cases:

    • Screening libraries — Import compound sets for batch ADMET or docking
    • Hit lists — Collect compounds that pass screening criteria
    • Lead series — Track optimized compounds through the pipeline
    • Reference sets — Maintain known drug or fragment libraries

    Commands marked with MCP are available via ivybloom mcp serve for AI agent integration. They do not have dedicated CLI subcommands.


    Creating Collections

    ivybloom compounds create "ADMET Hits" --description "Filtered drug candidates" --project proj_abc123
    NAMEstringrequired

    Collection name (first positional argument).

    --descriptionstring

    Optional description of the collection.

    --projectstring

    Project ID to associate the collection with.


    Importing Compounds

    Submit a file to import compounds from CSV, SDF, or SMILES formats:

    ivybloom compounds import COLLECTION_ID compounds.csv
    ivybloom compounds import COLLECTION_ID library.sdf --tag "round1"
    ivybloom compounds import COLLECTION_ID compounds.csv --skip-duplicates --wait=false

    Supported Formats

    FormatExtensionDescription
    CSV.csvComma-separated with SMILES column (required)
    SDF.sdfStructure-Data File (3D coordinates)
    SMILES.smiOne SMILES string per line

    Import Parameters

    COLLECTION_IDstringrequired

    Collection to import into (first positional argument).

    FILEstringrequired

    File to import (second positional argument).

    --skip-duplicatesbooldefault: false

    Check against existing compounds in the collection (not yet implemented; reserved for future use).

    --tagstring

    Attach a label to imported compounds for later filtering (not yet implemented; reserved for future use).

    --waitbooldefault: true

    Wait for import to complete. Set to false to submit and return an import ID for polling.

    Status

    The import endpoint accepts requests and returns status: "pending" with a note, but compounds are not imported yet. The feature is under development. Contact support for ETA.


    Searching

    Search compounds using four search types: substructure, similarity, text and property. The query goes in a flag, not a positional argument.

    Find all molecules containing a specific substructure (e.g., benzene ring):

    ivybloom compounds search COLL_ID --type substructure --smarts "c1ccccc1"

    Find molecules similar to a query (Tanimoto coefficient):

    ivybloom compounds search COLL_ID --type similarity --smiles "CC(=O)Oc1ccccc1C(=O)O" --threshold 0.8

    Search by compound name or metadata:

    ivybloom compounds search COLL_ID --query "aspirin" --limit 20

    Property Filter

    Filter by computed properties:

    ivybloom compounds search COLL_ID --type property --filter "mw<500" --filter "logp<5"
    COLLECTION_IDstringrequired

    Collection to search in (first positional argument).

    --typestringdefault: text

    Search type: substructure, similarity, text, or property.

    --smartsstring

    Query SMARTS for substructure search.

    --smilesstring

    Query SMILES for similarity search.

    --querystring

    Text query for text search.

    --filterstring

    Property filter such as mw<500. Repeat the flag to combine filters.

    --thresholdfloatdefault: 0.7

    Similarity threshold (0-1). Only applies to similarity search.

    --limitintdefault: 100

    Maximum number of results to return.

    Output Examples

    NAME          SMILES                              SCORE
    aspirin       CC(=O)Oc1ccccc1C(=O)O              1.000
    salicylic     OC(=O)c1ccccc1O                    0.823
    diflunisal    OC(=O)c1cc(F)c(-c2ccc(F)cc2O)cc1   0.714

    Exporting

    Export a collection to a file:

    ivybloom compounds export COLL_ID --format sdf --output library.sdf
    COLLECTION_IDstringrequired

    Collection to export (first positional argument).

    --formatstringdefault: json

    Output format: json, sdf, smiles, or csv.

    --outputstring

    Output file path (-o shorthand). Defaults to stdout.


    Listing and Deleting

    List Collections

    ivybloom compounds list
    ivybloom compounds list --project proj_abc123 --limit 10 --json
    --projectstring

    Filter by project ID.

    --limitintdefault: 100

    Maximum collections to return.

    --jsonbool

    Output as JSON.

    Delete a Collection

    ivybloom compounds delete COLLECTION_ID

    Deleting a collection permanently removes all compounds in it. This cannot be undone.


    Workflow Integration

    Pipe to Batch ADMET Screening

    Export a collection, then screen through ADMET:

    # Export as CSV
    ivybloom compounds export COLL_ID --format csv --output library.csv
    
    # Create batch file from the library and submit
    ivybloom batch submit admet-screen.yaml --wait
    ivybloom batch collect BATCH_ID --format csv --output admet-results.csv

    Docking Library Preparation

    Combine with protein preparation for a complete docking workflow:

    # Prepare the protein
    ivybloom proteinprep run receptor.pdb --detect-sites --wait
    
    # Export compounds for docking
    ivybloom compounds export COLL_ID --format sdf --output ligands.sdf

    Was this page helpful?

    Loading...