You are building a web app that needs molecular descriptors. Or a Jupyter notebook that filters a chemical library by logP. Or a backend service that triages compounds before docking. In all three cases, the ideal setup is: take a SMILES string, make one HTTP call, get back a JSON object with everything you need. No local RDKit install, no quantum chemistry environment, no DFT. This post walks through that setup.
What you can compute in a single call
The SciRouter quantum chemistry properties endpoint wraps several neural network potentials behind one clean JSON interface. A single call gives you:
- logP — the octanol-water partition coefficient, a classic lipophilicity descriptor.
- TPSA — topological polar surface area, a proxy for passive membrane permeability.
- pKa — one value per ionizable site, so you know which groups are protonated at a given pH.
- BDE — bond dissociation energies for the weakest bonds, useful for metabolic stability reasoning.
- Fukui indices — local reactivity sites for nucleophilic and electrophilic attack.
- Relaxed 3D geometry — an optimized structure at DFT-quality accuracy.
All of this comes from one forward pass through the underlying neural network potential, which is why it is fast and why the numbers are internally consistent.
Sign up and get an API key
Before you can call the endpoint, you need a key. Head to SciRouter sign up, create an account, and copy the API key from your dashboard. Keys are prefixed with sk-sci- and should be kept secret. Do not commit them to git.
Hello world with curl
The simplest way to try the endpoint is a single curl command. Here is caffeine:
curl -X POST https://scirouter-gateway-production.up.railway.app/v1/chemistry/qm/properties \
-H "Authorization: Bearer sk-sci-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"smiles": "CN1C=NC2=C1C(=O)N(C(=O)N2C)C"
}'The response comes back as a JSON object with all the properties listed above. For caffeine you should see logP near -0.07, TPSA near 58, and pKa values for the two basic nitrogens.
Python example
The SciRouter Python SDK wraps the same endpoint for script-friendly use:
from scirouter import SciRouter
client = SciRouter(api_key="sk-sci-YOUR_API_KEY")
result = client.chemistry.qm.properties(
smiles="CN1C=NC2=C1C(=O)N(C(=O)N2C)C"
)
print(f"logP : {result.logp:.2f}")
print(f"TPSA : {result.tpsa:.1f}")
print(f"pKa : {result.pka_values}")
print(f"Weak BDE: {min(result.bde_values):.1f} kcal/mol")The SDK handles serialization, authentication, retries, and typing. If you prefer to use the raw HTTP interface, every request and response is documented in the OpenAPI schema.
Batch requests
For a library of compounds, use the batch endpoint. It accepts a list of SMILES and returns a list of property objects, with requests pipelined for efficiency.
smiles_list = [
"CCO", # ethanol
"CC(=O)O", # acetic acid
"c1ccccc1O", # phenol
"CN1C=NC2=C1C(=O)N(C(=O)N2C)C", # caffeine
"CC(C)Cc1ccc(cc1)C(C)C(=O)O", # ibuprofen
]
results = client.chemistry.qm.batch(smiles=smiles_list)
for smi, res in zip(smiles_list, results):
print(f"{smi:45s} logP={res.logp:6.2f} TPSA={res.tpsa:6.1f}")A batch of 100 molecules typically finishes in a few seconds. For larger libraries, split into chunks and run them in parallel.
Using the results in a web UI
A common pattern is to call this endpoint from a backend that serves a web app. The user pastes a SMILES, the frontend posts it to your backend, your backend calls SciRouter, and you render the results. From the browser you can even call SciRouter directly if you are careful with rate limiting and key management.
Do not put the raw API key in your frontend JavaScript. A thin backend proxy is one line of code and protects you from key leakage.
What to build
A few starter ideas for projects that use this endpoint:
- A browser extension that inspects any molecule on a web page and shows its predicted pKa and logP in a tooltip.
- A Streamlit dashboard for medicinal chemists that lets them paste SMILES and compare predicted descriptors against target ranges.
- An automated filter that ingests a virtual library, computes descriptors for every molecule, and flags the ones that violate rule of five.
- A LLM tool-use plug-in that lets ChatGPT or Claude answer “what is the logP of ibuprofen” with real numbers instead of guesses.
Troubleshooting
- HTTP 401: Your API key is missing or wrong. Double-check the Authorization header.
- HTTP 422: The SMILES string is malformed. Validate it with RDKit or an online sanitizer before sending.
- HTTP 429: You have hit your rate limit. Back off and retry.
- Unexpected numbers: The molecule might be outside the neural network's comfort zone. Spot-check with a second tool before trusting the result.
Bottom line
A single HTTP call from any language, a free tier that covers most experimentation, DFT-quality numbers for drug-like molecules. The days of needing a quantum chemistry installation to ask “what is the pKa of this molecule” are over. If you are building anything that touches small molecules, this is one of the most valuable endpoints you can wire into your stack.