Access APIs, SDKs, and tools to integrate Astra Vida’s quantum drug discovery platform into your applications.
Get up and running with Astra Vida’s API in minutes.
import requests
# Screen a molecule
url = "https://api.astravida.com/v1/screen"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
data = {
"smiles": "CC(=O)NC1=CC=C(O)C=C1", # Acetaminophen
"target": "COX-2"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
🔍 POST request to screen Acetaminophen against COX-2.
Leverage our SDKs and tools to build quantum drug discovery applications.
Explore example code for quantum simulations, API integrations, and visualizations.
import pennylane as qml
from pennylane import numpy as np
from pennylane.optimize import NesterovMomentumOptimizer
# Simplified Molecular Hamiltonian
coeffs = [-0.5, 0.3, 0.2]
terms = [qml.PauliZ(0), qml.PauliX(1), qml.PauliY(0) @ qml.PauliY(1)]
H = qml.Hamiltonian(coeffs, terms)
dev = qml.device("default.qubit", wires=2)
@qml.qnode(dev)
def circuit(params):
qml.templates.StronglyEntanglingLayers(params, wires=[0, 1])
return qml.expval(H)
layers = 2
params = np.random.random([layers, 2, 3])
opt = NesterovMomentumOptimizer(stepsize=0.1)
for i in range(50):
params = opt.step(circuit, params)
if i % 10 == 0:
print(f"Step {i}: Energy = {circuit(params):.6f} Hartree")
🔍 Simulates molecular energy using VQE for drug binding affinity.
let viewer = $3Dmol.createViewer($('.mol-container-sample'));
viewer.addModel(`10
Sample Molecule
C 0.000000 0.000000 0.000000
C 1.400000 0.000000 0.000000
N 1.400000 1.200000 0.000000
C 0.000000 1.200000 0.000000
O 0.000000 0.000000 1.400000
C 1.400000 0.000000 1.400000
C 2.800000 0.000000 0.000000
C 2.800000 1.200000 0.000000
N 1.400000 2.400000 0.000000
C 0.000000 2.400000 0.000000
`, 'xyz');
viewer.setStyle({}, {stick: {}});
viewer.zoomTo();
viewer.render();
🔍 Renders a sample molecule in 3D using 3Dmol.js.
Join our developer community to collaborate, share ideas, and get support.
Start integrating our quantum drug discovery tools or join our developer community today.