SciML Hub is a unified platform for scientific machine learning, providing state-of-the-art Nexa models for predictions in biology (protein structure), astrophysics (stellar properties), and materials science (material properties). Access these models via a simple REST API, with results returned in JSON format including predictions and confidence scores (0-100%).
- Python 3.9+
- An API key (sign up at scimlhub.com to get yours)
requests
library (pip install requests
)
Predict the secondary structure of a protein sequence:
import requests
response = requests.post(
"https://api.scimlhub.com/v1/bio/predict",
headers={"X-API-Key": "your_api_key"},
json={"sequence": "MAKQVKL"}
)
result = response.json()
print(result)
# Output: {"prediction": "H", "confidence": 80.56}
Estimate a star's mass:
response = requests.post(
"https://api.scimlhub.com/v1/astro/predict",
headers={"X-API-Key": "your_api_key"},
json={
"temp": 5778, # Kelvin
"luminosity": 1.0, # Solar luminosity
"metallicity": 0.0 # [Fe/H]
}
)
result = response.json()
print(f"Stellar Mass: {result['prediction']} Solar masses")
print(f"Confidence: {result['confidence']}%")
# Output: {"prediction": 1.0, "confidence": 97.49}
Predict a material's band gap:
response = requests.post(
"https://api.scimlhub.com/v1/materials/predict",
headers={"X-API-Key": "your_api_key"},
json={"structure": "POSCAR data string"}
)
result = response.json()
print(f"Band Gap: {result['prediction']} eV")
print(f"Confidence: {result['confidence']}%")
# Output: {"prediction": 2.5, "confidence": 98.5}
- Model: Variational Autoencoder (VAE) with diffusion
- Purpose: Predicts protein secondary structures (H: Helix, E: Sheet, C: Coil)
- Accuracy: 70.82% overall (Q3 score)
- Latency: ~78ms
- Details: See
helixsynth-pro.ipynb
andTechnical_Whitepaper/analysis_results_20250219_202508.txt
- Model: Ensemble (Random Forest, CatBoost, Neural Network)
- Purpose: Predicts stellar properties (mass, class: QSO, GALAXY, STAR)
- Accuracy: 97.49% on validation set
- Latency: ~45ms
- Details: See
Technical_Whitepaper/Astrophysics results.txt
- Model: Graph Neural Network (GNN)
- Purpose: Predicts material properties (band gap, formation energy)
- Accuracy: 98.5% on crystal structures
- Latency: ~62ms
- Details: See
Material Science/generated_structures.csv
The API endpoints return predictions and confidence scores in JSON format: {"prediction": value, "confidence": percentage}
.
- Method: POST
- Input:
{ "sequence": "MAKQVKL" // Amino acid sequence (up to 1000 residues) }
- Output:
{ "prediction": "H", // H (Helix), E (Sheet), C (Coil) "confidence": 80.56 // Confidence in percentage (0-100) }
- Method: POST
- Input:
{ "temp": 5778, // Temperature in Kelvin "luminosity": 1.0, // Luminosity in solar units "metallicity": 0.0 // Metallicity [Fe/H] }
- Output:
{ "prediction": 1.0, // Mass in solar masses "confidence": 97.49 // Confidence in percentage (0-100) }
- Method: POST
- Input:
{ "structure": "POSCAR data string" // Crystal structure in POSCAR format }
- Output:
{ "prediction": 2.5, // Band gap in eV "confidence": 98.5 // Confidence in percentage (0-100) }
Include your API key in the request header:
X-API-Key: your_api_key
- 400 Bad Request: Invalid input format
- 401 Unauthorized: Missing or invalid API key
- 429 Too Many Requests: Rate limit exceeded
- 500 Server Error: Internal issue (contact support)
-
Clone the Repository:
git clone https://github.com/DarkStarStrix/scimlhub.git cd scimlhub
-
Install Dependencies:
pip install -r requirements.txt
-
Run the API Locally:
python app/main.py
The API will be available at
http://localhost:8000
. -
Docker Deployment (Optional):
docker-compose -f docker/docker-compose.yml up --build
- Fast: Average response time ~50ms
- Accurate: >95% accuracy across domains
- Reliable: Confidence scores with every prediction
- Scalable: Supports millions of requests daily
- Secure: SOC2 Type II compliant
{
"prediction": "H",
"confidence": 80.56
}
{
"prediction": "GALAXY",
"confidence": 97.29
}
{
"prediction": 2.5,
"confidence": 98.5
}
- Biology: Protein design, drug discovery
- Astrophysics: Stellar classification, exoplanet research
- Materials Science: Material discovery, energy applications
Plan | Requests/Month | Price |
---|---|---|
Free | 300 | $0 |
Premium-1K | 1,000 | $50/month |
Premium-5K | 5,000 | $35/month |
Premium-10K | 10,000 | $25/month |
Enterprise | Unlimited | Custom |
For custom models, on-premise deployment, or integration help, email: [email protected].
- Email: [email protected]
- Discord: Join
Commercial license - see LICENSE