Getting Started with the Reward Server
The Reward Server is a FastAPI application that evaluates molecular structures based on various scoring functions including docking, drug-likeness, and bioactivity predictions.
Starting the Server
Note
For GPU-accelerated docking, ensure AutoDock-GPU is installed (follow https://github.com/ccsb-scripps/AutoDock-GPU for installation instructions).
Set required environment variables (see here for all options):
Start the server:
You should see:
Basic Usage
Python Client
import requests
response = requests.post(
"http://localhost:8000/get_reward",
json={
"query": "<answer>CC(C)Cc1ccc(cc1)C(C)C(=O)O</answer>",
"prompt": "[Textual prompt used to generate the molecule]",
"metadata": [
{
"properties": ["sample_654138_model_0", "CalcExactMolWt"],
"objectives": ["below", "below"],
"target": [-10.86, 197.27]
}
]
}
)
Next Steps
- Explore how to configure the server in Server Configuration
- Understand the query and response formats in Query and Answer Format
- Learn about the full API in API Documentation