A containerized microservice for molecular generation and analysis. Generates molecular variants through systematic mutations using RDKit. Features a REST API, web interface, and CLI tool with secure API key authentication.
To initiate the platform:
docker-compose up --buildFor testing without the web interface, install and use the provided CLI tool:
# Build and install CLI (one-time)
cd backend
python3 -m venv venv && source venv/bin/activate && pip install build && python -m build
pipx install dist/mol_platform-1.0.0-py3-none-any.whl
# Test health
mol-platform --api-key your-key --health
# Generate molecule
mol-platform --api-key your-key --generate "CC(=O)OC1=CC=CC=C1C(=O)O"- API Documentation: http://localhost:8000/docs
- Frontend Interface: http://localhost:3000
Endpoint: POST /generate_molecule
Facilitates the creation of molecular variants through systematic mutations.
Request Structure
{
"base_smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"num_mutations": 3,
"mutation_types": ["substituent", "bond_order", "atom_swap"]
}Parameters:
base_smiles: SMILES representation (required)num_mutations: Mutation count (optional, default: 3)mutation_types: Permitted mutation categories (optional)
Response Structure:
{
"original_smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"generated_smiles": "CC(=O)Oc1cSCN)cccc1C(=O)O",
"molecular_image": "base64_encoded_png",
"properties": {
"Molecular Weight": 180.16,
"LogP": 1.31,
"H-Bond Donors": 1,
"H-Bond Acceptors": 3,
"Topological Polar Surface Area": 63.6
}
}Available Mutations:
substituent: Introduces substituent groupsbond_order: Adjusts bonding configurationsatom_swap: Exchanges atomic elements
Endpoint: GET /health
Provides service status confirmation.
Response Structure:
{
"status": "healthy",
"version": "1.0.0"
}