> This page is for MolMIM, version 1.0.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 1.0.0 (Latest) (default): https://docs.nvidia.com/nim/bionemo/molmim/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/bionemo/llms.txt.

# Quickstart for MolMIM

> Pull the MolMIM NIM container, launch the service, and run your first embedding inference request.

This Quickstart Guide walks you through pulling the MolMIM NIM container, launching the service, and running your first inference request. For comprehensive system requirements and verified configurations, refer to the [Support Matrix](/nim/bionemo/molmim/get-started/support-matrix).

## Prerequisites

Before you begin, review the following prerequisites.

<Note>
This page assumes you have installed and set up [Prerequisite Software](/nim/bionemo/molmim/get-started/prerequisites) (Docker, NGC CLI, NGC registry access).
</Note>

## Quickstart Steps

To quickly get started with the MolMIM NIM, complete the following steps.

### Launch the MolMIM NIM

Complete the following steps to launch the NIM:

1. Pull the NIM container with the following command.

   ```bash
   docker pull nvcr.io/nim/nvidia/molmim:1.0.0
   ```
   

2. Run the NIM container with the following command.

   ```bash
   docker run --rm -it --name molmim --runtime=nvidia \
       -e CUDA_VISIBLE_DEVICES=0 \
       -e NGC_CLI_API_KEY \
       -p 8000:8000 \
       nvcr.io/nim/nvidia/molmim:1.0.0
   ```
   

   This command starts the NIM container and exposes port 8000 for the user to interact with the NIM.

3. Open a new terminal, leaving the current terminal open with the launched service.

4. Wait until the health check endpoint returns `{"status":"ready"}` before proceeding.

   This can take a couple of minutes. In the new terminal, you can use the following command to query the health check.

   ```bash
   curl -X 'GET' \
       'http://localhost:8000/v1/health/ready' \
       -H 'accept: application/json'
   ```

### Run Inference

Complete the following steps to run inference:

1. Run inference to get the embeddings of a molecule from its SMILES string representation and save the output to output.json using the following command.

   ```bash
   curl -X 'POST' \
       'http://localhost:8000/embedding' \
       -H 'accept: application/json' \
       -H 'Content-Type: application/json' \
       -d '{"sequences": ["CC(Cc1ccc(cc1)C(C(=O)O)C)C"]}' > output.json
   ```

2. View the outputs.

   You can use the `cat` tool to print the outputs to the command line as with the following command.

   ```bash
   cat output.json
   ```

3. Format the outputs.

   We recommend installing [`jq`](https://jqlang.github.io/jq/), a command-line tool that can format JSON for improved readability. You can use `jq` to visualize the output from the file:

   ```bash
   jq . output.json
   ```

   or you can pipe the output directly to `jq` as in the following command:

   ```bash
   curl -X 'POST' \
       'http://localhost:8000/embedding' \
       -H 'accept: application/json' \
       -H 'Content-Type: application/json' \
       -d '{"sequences": ["CC(Cc1ccc(cc1)C(C(=O)O)C)C"]}' > output.json
   ```

## Next Steps

Now that you have a working setup, explore the following resources in greater detail:

<CardGroup cols={2}>
  <Card title="Endpoints" href="/molmim/endpoints">
    Explore the MolMIM NIM API endpoints and worked examples.
  </Card>
  <Card title="Deployment Guide" href="/molmim/get-started/deployment-guide">
    A detailed walkthrough of the MolMIM NIM container run command and caching.
  </Card>
  <Card title="Advanced Usage" href="/molmim/advanced-usage">
    Benchmark the NIM locally and control its logging levels.
  </Card>
  <Card title="Support Matrix" href="/molmim/get-started/support-matrix">
    Hardware, software, and verified GPU configurations for the NIM.
  </Card>
</CardGroup>