DanielEmeka/FormationEnergyPredictor
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
๐ Formation Energy Predictor
FormationEnergyPredictor is a machine learning web application that predicts the formation energy (eV/atom) of perovskite-based materials using their atomic and physical properties. It also classifies the material as Stable, Metastable, or Unstable, helping materials scientists rapidly screen novel compositions for energy, electronics, and photovoltaic applications.
๐ Live App on Hugging Face Spaces
๐ฌ What It Does
- Takes in a materialโs A site, B site, and X site elements and a few physical properties
- Predicts the formation energy using a trained machine learning model
- Classifies material stability:
- ๐ข Stable (low/negative formation energy)
- ๐ก Metastable (near-zero formation energy)
- ๐ด Unstable (positive formation energy)
- Visualizes the result on a stability scale
๐๏ธ How It Was Built
This project was built using:
- Python & Scikit-learn: for training a Gradient Boosting model
- Gradio: for building the web interface
- Matplotlib: to visualize formation energy in a stability chart
- Hugging Face Spaces: to host the application online
๐ง Workflow
- Data Source: A curated dataset of perovskite materials with elemental properties and formation energies.
- Feature Engineering:
- Selected top features including:
A site #1,B site #1,X siteNumber of elementsDensity_AB_avgIonization Energy_AB_avgAtomic Volume_AB_avg- Modeling:
- Used
GradientBoostingRegressorinside a preprocessing pipeline - Trained with 80/20 train-test split and achieved a good Rยฒ score
- Deployment:
- Packaged with
gradioand deployed to Hugging Face usingrequirements.txt
๐ง Use Case & Problem Solved
๐ง Challenge:
In materials science, discovering new stable compounds is time-consuming and expensive. Researchers often simulate or synthesize hundreds of compositions before finding one that works.
โ This app solves:
- Fast pre-screening of candidate perovskite materials
- Prediction of stability before physical experiments or simulations
- Reduction in cost and time spent on unstable materials
- Supports green energy and optoelectronic research
โถ๏ธ How to Use
- Visit the app: FormationEnergyPredictor on Hugging Face
- Fill in:
- A site element (e.g.,
Na) - B site element (e.g.,
Ti) - X site element (e.g.,
O) - Additional properties like density, ionization energy, etc.
- Click Submit
- View:
- Formation energy prediction (eV/atom)
- Stability classification
- Visual chart showing result
๐ก Examples to Try
๐ Key Feature Insights
From the trained model, these features were found most important:
- Ionization Energy โ higher values lead to instability
- Density and Atomic Volume โ influence bonding compactness
- A, B, X site identity โ define lattice behavior in perovskites
๐ฎ Future Improvements
- Add support for ABXโ and double perovskite structures
- Enable batch predictions via file upload
- Integrate SHAP or permutation importance plots for full explainability
- Add default dropdown menus and example presets
๐งโ๐ฌ Author
Daniel Emeka Physicist | Nanomaterials Researcher | Machine Learning Enthusiast Built for material discovery and sustainability-driven innovation.
