Psc_predict / README.md
SEUyishu's picture
Upload 32 files
2279159 verified
metadata
title: Psc Predict MCP Server
emoji: ☀️
colorFrom: yellow
colorTo: yellow
sdk: docker
app_port: 7860
pinned: false
license: mit

Psc_Predict MCP Server

Perovskite Solar Cell Performance Prediction MCP Service

Features

Predict 8 performance metrics from CIF crystal structure files:

Metric Description Unit
PCE Power Conversion Efficiency %
DFT Band Gap DFT calculated band gap eV
Energy Above Hull Thermodynamic stability eV/atom
Stability Retention Stability retention percentage %
Stability T80 T80 lifetime hours
Voc Open-circuit voltage V
Jsc Short-circuit current density mA/cm²
FF Fill factor -

Available Model Types

Model Description Recommendation
XGBoost Gradient boosting ensemble ⭐ Default & Recommended
Random Forest Ensemble of decision trees Good interpretability
Neural Network 3-layer MLP (128-64-32) Deep learning approach

MCP Connection

SSE Connection Configuration

{
  "mcpServers": {
    "psc-predict": {
      "url": "https://your-space.hf.space/sse"
    }
  }
}

Available Tools (Simplified)

Tool Description Parameters
predict_ensemble Predict using ALL 3 models with ensemble statistics cif, targets
parse_cif_features Parse CIF and extract features cif
get_model_info Get model information -
list_available_models List all available models -

Ensemble Prediction (Autonomous Multi-Model)

The predict_ensemble tool automatically calls all three models and provides:

  • Individual predictions from XGBoost, Random Forest, and Neural Network
  • Ensemble statistics: mean, std, min, max, range
  • Recommendation based on model performance benchmarks

Example response:

{
  "results": {
    "pce": {
      "predictions": {"xgboost": 18.5, "random_forest": 17.8, "neural_network": 19.1},
      "ensemble": {"mean": 18.47, "std": 0.53, "range": 1.3},
      "recommendation": {"model": "xgboost", "value": 18.5}
    }
  }
}

Input Example

data_CsPbI3
_cell_length_a   6.2894
_cell_length_b   6.2894
_cell_length_c   6.2894
_cell_angle_alpha   90.0
_cell_angle_beta   90.0
_cell_angle_gamma   90.0
_cell_volume   248.89
_chemical_formula_sum   'Cs1 Pb1 I3'

Model Information

  • Model Types: XGBoost (recommended), Random Forest, Neural Network
  • Input Features: 93-dimensional (7 lattice parameters + 86 element fractions)
  • Training Data: Perovskite solar cell database

Local Development

# Install dependencies
pip install -r requirements.txt

# Run server
python server.py

# Or with Docker
docker build -t psc-predict .
docker run -p 7860:7860 psc-predict

License

MIT