CHEESEOn-Premise

CLI

Command reference for the on-premise CHEESE CLI: starting the server and UI, search, embeddings, visualisation, databases, and updates.

Suggest an edit

After installation, the cheese command gives you access to the on-premise CLI. Run cheese with no arguments to list the available commands:

Welcome to CHEESE !
Usage: cheese [options]
Commands:
  configure                    Update CHEESE configuration file
  test                         Test CHEESE commands
  generate-license-key         Generate CHEESE license key
  start-server                 Run CHEESE server (API)
  stop-servers                 Stop all CHEESE servers
  stop-apps                    Stop all CHEESE UIs
  start-app                    Run CHEESE UI
  start                        Run CHEESE server + UI
  embeddings-cpu               Run CHEESE Embeddings computation on CPU
  search                       Run CHEESE Search
  visualize                    Run CHEESE Embeddings visualization
  run-inference                Run CHEESE indexing
  update-scripts               Update CHEESE scripts
  update-env                   Update CHEESE environment file
  update-images                Update CHEESE Docker Images
  update-license               Update CHEESE license file
  download-dbs                 Download CHEESE indexed databases
  extract-dbs                  Extract downloaded CHEESE indexed databases
  -h, --help                   Show this help message

Updating CHEESE

  • cheese update-scripts gets the latest CLI scripts.
  • cheese update-images gets the latest Docker images.

Configuring CHEESE

Run cheese configure to edit the YAML configuration file you created during installation.

License

  • cheese generate-license-key creates a license key for this host.
  • Send the key to us. We reply with a JSON license file.
  • cheese update-license and paste in the contents of the JSON file.

The license key is specific to the host machine. Running CHEESE on another machine needs a new key and a new license file.

Server and apps

CHEESE has a server (which provides the API and the databases) and a web UI that runs on top of it.

Start the server:

cheese start-server
cheese start-server --port 8080   # optional: choose the port

Stop all running servers with cheese stop-servers.

Start the UI:

  • cheese start starts the server and the UI together, if no server is running.
  • cheese start-app starts only the UI, when a server is already running.
  • cheese stop-apps stops all running UIs.

With the server running you can use the API from Python, cURL, or any HTTP client, run the UI, and run the CLI commands below.

Databases

Our indexed databases are distributed through our SFTP file server. Contact us to get access credentials.

Download all databases available for your package:

cheese download-dbs --dest /path/to/downloads

Extract one database:

cheese extract-dbs --dest /path/to/downloads --db_name ZINC15

To make a database available to the app, add it to the output directories in your configuration, then restart CHEESE:

OUTPUT_DIRECTORIES:
  ENAMINE-REAL: "/data/enamine_real"
  ZINC15: "/data/zinc15"
  MyDatabase: "/data/custom_database_output"

DELIMITERS:
  ENAMINE-REAL: "\t"
  ZINC15: ","
  MyDatabase: ","

INDEX_TYPES:
  ENAMINE-REAL: "clustered"
  ZINC15: "clustered"
  MyDatabase: "in_memory"

To index a database of your own, see Index Inference.

Embeddings

Compute CHEESE embeddings for a file of molecules on CPU:

Usage: cheese embeddings-cpu
Computing CHEESE Embeddings on CPU
Options:
  --input_file       Input file: .csv, .txt, .smi, or .sdf
  --smiles_col       SMILES column in the CSV file (default: SMILES)
  --dest_folder      Destination folder for the embeddings
  --search_type      'morgan', 'espsim_shape', 'espsim_electrostatic', 'active_pairs', or 'all'
  --port             CHEESE server port to run the computation on
  -h, --help         Show this help message
cheese embeddings-cpu --input_file /tmp/cheese_test/test_mols.csv --dest_folder /home/user/embs --search_type morgan

For large files, the output format matters. Embeddings are written as .npy files, which are NumPy arrays. The API can also return JSON or CSV, but for large sets we recommend .npy or .parquet.

Choosing GPUs

Embedding computation runs on CPU by default. For indexing, the --gpu_devices option of run-inference selects which GPUs to use.

Search a file of molecules against your available databases:

Usage: cheese search
Searching a file of molecules with CHEESE
Options:
  --input_file        Input file: .csv, .txt, or .smi
  --smiles_col        SMILES column in the CSV file (default: SMILES)
  --output_file       Destination file for the search results
  --search_type       'morgan', 'espsim_shape', 'espsim_electrostatic', 'active_pairs', or 'consensus' (default: morgan)
  --n_neighbors       Number of neighbours to return
  --search_quality    Speed/accuracy trade-off: 'fast', 'accurate', or 'very_accurate'
  --db_names          Databases to search, comma-separated (default: ZINC15,ENAMINE-REAL)
  --port              CHEESE server port to run the search on
  -h, --help          Show this help message
cheese search \
  --input_file /tmp/cheese_test/test_mols.csv \
  --output_file /tmp/cheese_test/search_results.csv \
  --db_names CUSTOM_CLUSTERED,CUSTOM_IN_MEM \
  --search_type espsim_electrostatic \
  --search_quality very_accurate \
  --n_neighbors 200

Chemical space visualisation

Compute 2D coordinates for a set of molecules, using PCA or UMAP:

Usage: cheese visualize
Compute CHEESE visualisation coordinates for a file of molecules
Options:
  --input_file              Input file: .csv, .txt, or .smi
  --smiles_col              SMILES column in the CSV file (default: SMILES)
  --dest_folder             Destination folder for the coordinates
  --search_type             'morgan', 'espsim_shape', 'espsim_electrostatic', or 'active_pairs' (default: morgan)
  --visualisation_method    'pca' or 'umap'
  --port                    CHEESE server port to run the computation on
  -h, --help                Show this help message
cheese visualize --input_file tests/test_mols.csv --dest_folder viz_embs --search_type espsim_electrostatic --visualisation_method pca

The same visualisation is available over the API. See On-Premise Endpoints.

On this page