Skip to content

Latest commit

Β 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

dopingflow

High-throughput ML-driven doping workflow for materials screening.

dopingflow is a modular CLI pipeline for automated generation, screening, relaxation, and evaluation of doped crystal structures using machine-learning interatomic potentials and graph neural networks.

Designed for reproducible, scalable materials discovery workflows.


πŸ“˜ Documentation

The full documentation is available in multiple formats:


Installation

Clone repository

git clone https://github.com/KazemZh/dopingflow.git
cd ml-doping-workflow

Create environment

conda create -n dopingflow python=3.11
conda activate dopingflow

Install Packages

⚠️ Choose only one backend between M3GNet and UMA. They require incompatible versions of numpy and ase. Do not install both in the same environment!

MACE backend:

pip install -e ".[mace]"

GRACE backend:

pip install -e ".[grace]"

M3GNet backend:

pip install -e ".[m3gnet]"

UMA backend:

pip install -e ".[uma]"

Requires Hugging Face access (see setup below).

UMA Backend Setup

The UMA backend is provided through FAIR-Chem and requires access to the pretrained UMA models hosted on Hugging Face.

  1. Request access to the UMA model repository
    https://huggingface.co/facebook/UMA

  2. Log in to Hugging Face

After access is granted, authenticate in your UMA environment:

hf auth login

ALIGNN Backend:

pip install -e ".[alignn]"

GUI:

pip install -e ".[gui]"

Material Project API:

pip install -e ".[mp]"

Development tools:

pip install -e ".[dev]"

Required Environment Variables

ALIGNN model directory (required for bandgap step)

export ALIGNN_MODEL_DIR=/path/to/alignn/model

Materials Project API (optional)

export MP_API_KEY=your_api_key

Workflow Commands

Each stage can be run individually:

dopingflow refs-build -c input.toml
dopingflow generate -c input.toml
dopingflow scan -c input.toml
dopingflow relax -c input.toml
dopingflow filter -c input.toml
dopingflow bandgap -c input.toml
dopingflow formation -c input.toml
dopingflow collect -c input.toml
dopingflow alloy-hull -c input.toml
dopingflow phase-diagram -c input.toml
dopingflow surface -c input.toml

Or run the complete pipeline:

dopingflow run-all -c input.toml

For gradual composition-by-composition doping, use sequential-run. This reuses the lowest-energy relaxed structure from each composition as the base for the next composition:

dopingflow sequential-run -c input.toml

Logging

Logs are written to:

logs/dopingflow.log

Use --verbose for detailed output.


Graphical User Interface (Streamlit)

dopingflow provides an optional Streamlit-based graphical user interface for interactive workflow configuration, execution, and results analysis.

The GUI allows you to:

  • Build and edit input.toml
  • Run workflow stages interactively
  • Visualize generated structures
  • Explore results_database.csv and per-system phase-diagram CSVs with Plotly

Relative-energy controls remain inside the existing [formation] section:

[formation]
relative_enabled = true
endpoint_x = "auto"

Launch the GUI

From the project root directory:

streamlit run gui/app.py

After launching, a local browser window will open automatically.


Project Structure

.
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ docs
β”‚   β”œβ”€β”€ make.bat
β”‚   β”œβ”€β”€ Makefile
β”‚   └── source
β”‚       β”œβ”€β”€ api
β”‚       β”‚   β”œβ”€β”€ dopingflow.rst
β”‚       β”‚   └── modules.rst
β”‚       β”œβ”€β”€ conf.py
β”‚       β”œβ”€β”€ examples
β”‚       β”‚   β”œβ”€β”€ enumerate_screening.rst
β”‚       β”‚   β”œβ”€β”€ explicit_batch.rst
β”‚       β”‚   β”œβ”€β”€ explicit_single_oxides.rst
β”‚       β”‚   β”œβ”€β”€ explicit_single.rst
β”‚       β”‚   β”œβ”€β”€ smoke_test.rst
β”‚       β”‚   └── sequential_workflow.rst
β”‚       β”œβ”€β”€ index.rst
β”‚       β”œβ”€β”€ input_file.rst
β”‚       β”œβ”€β”€ installation_and_usage.rst
β”‚       β”œβ”€β”€ methods
β”‚       β”‚   β”œβ”€β”€ bandgap.rst
β”‚       β”‚   β”œβ”€β”€ database.rst
β”‚       β”‚   β”œβ”€β”€ filtering.rst
β”‚       β”‚   β”œβ”€β”€ formation_energy.rst
β”‚       β”‚   β”œβ”€β”€ generation.rst
β”‚       β”‚   β”œβ”€β”€ phase_diagram.rst
β”‚       β”‚   β”œβ”€β”€ references.rst
β”‚       β”‚   β”œβ”€β”€ relaxation.rst
β”‚       β”‚   β”œβ”€β”€ sequential.rst
β”‚       β”‚   β”œβ”€β”€ scanning.rst
β”‚       β”‚   └── surfaces.rst
β”‚       β”œβ”€β”€ required_inputs.rst
β”‚       β”œβ”€β”€ _static
β”‚       β”‚   β”œβ”€β”€ .gitkeep
β”‚       β”‚   └── logo.png
β”‚       β”œβ”€β”€ _templates
β”‚       └── workflow_overview.rst
β”œβ”€β”€ dopingflow-user-guide.pdf
β”œβ”€β”€ examples
β”‚   β”œβ”€β”€ enumerate_screening
β”‚   β”œβ”€β”€ explicit_batch
β”‚   β”œβ”€β”€ explicit_single_composition
β”‚   β”œβ”€β”€ explicit_single_composition_oxide_reference
β”‚   β”œβ”€β”€ smoke_test
β”‚   └── surface_creation
β”œβ”€β”€ .github
β”‚   └── workflows
β”‚       └── docs.yml
β”œβ”€β”€ .gitignore
β”œβ”€β”€ gui
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ gui_config.py
β”‚   β”œβ”€β”€ io_project.py
β”‚   β”œβ”€β”€ README.md
β”‚   └── view_structure.py
β”œβ”€β”€ input.toml
β”œβ”€β”€ LICENSE
β”œβ”€β”€ logo.png
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ README.md
β”œβ”€β”€ src
β”‚   └── dopingflow
β”‚       β”œβ”€β”€ bandgap.py
β”‚       β”œβ”€β”€ cli.py
β”‚       β”œβ”€β”€ collect.py
β”‚       β”œβ”€β”€ filtering.py
β”‚       β”œβ”€β”€ formation.py
β”‚       β”œβ”€β”€ generate.py
β”‚       β”œβ”€β”€ hardware.py
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ logging.py
β”‚       β”œβ”€β”€ ml_backends.py
β”‚       β”œβ”€β”€ ml_relaxation.py
β”‚       β”œβ”€β”€ phase_diagram.py
β”‚       β”œβ”€β”€ refs.py
β”‚       β”œβ”€β”€ relax.py
β”‚       β”œβ”€β”€ scan.py
β”‚       β”œβ”€β”€ sequential.py
β”‚       β”œβ”€β”€ surface.py
β”‚       └── utils
β”‚           β”œβ”€β”€ io.py
β”‚           β”œβ”€β”€ parallel.py
β”‚           └── pymatgen_helpers.py
└── tests
    β”œβ”€β”€ test_cli_help.py
    β”œβ”€β”€ test_cli.py
    β”œβ”€β”€ test_generate_minimal.py
    └── test_imports.py



License

Proprietary and confidential.

Β© 2026 Kazem Zhour
RWTH Aachen University

Unauthorized use, modification, or distribution is prohibited.


Author

Kazem Zhour
RWTH Aachen University

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages