Skip to content

Atai0610/PyWPEM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

107 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyWPEM Logo

Python Toolkit for X-ray Diffraction Simulation, Analysis, and AI-driven Structure Refinement

Project Homepage · Algorithm Documentation · Paper (arXiv) · Supplementary Information · Download Statistics

Other tools include XQueryer for initial structure inference and PRDNet for crystal property prediction.


Overview PyPI Downloads

PyXplore is a modular Python framework for X-ray diffraction (XRD) simulation, decomposition, quantitative analysis, and AI-assisted structure refinement.

It integrates:

  • Physics-based diffraction modeling
  • EM-based Bragg optimization
  • Structure graph construction
  • Extinction and Wyckoff analysis
  • Amorphous phase quantification
  • AI-driven structural refinement

The toolkit is designed for reproducible scientific workflows in materials characterization and AI for Science research.

Install from PyPI and Install the dependencies:

pip install PyXplore

Upgrade to the latest version:

pip install --upgrade PyXplore

Key Features

  • XRD Simulation Accurate diffraction pattern generation from crystallographic information.

  • Peak Decomposition & Quantitative Analysis WPEM-based decomposition and volume fraction determination.

  • Bragg Law Optimization (EM Framework) Expectation-Maximization-based parameter solving.

  • Extinction & Wyckoff Handling Symmetry-aware preprocessing and structural filtering.

  • Graph-Based Structure Representation Crystal graph construction for downstream machine learning tasks.

  • Amorphous Structure Analysis RDF-based quantitative evaluation.

  • Multi-modal Extension Integrated modules for XAS and XPS analysis.


Architecture Overview

PyWPEM/
├── WPEM.py
├── XRDSimulation/
├── EMBraggOpt/
├── Refinement/
├── StructureOpt/
├── GraphStructure/
├── Extinction/
├── Amorphous/
├── Background/
├── Plot/
├── DecomposePlot/
├── WPEMXAS/
├── WPEMXPS/
└── refs/

The design follows a physics-consistent, modular architecture, enabling independent or pipeline-based execution.


Tables & Figures


Scientific Reference

If you use PyWPEM in your research, please cite:

@article{cao2026wpem,
  title={AI-Driven Structure Refinement of X-ray Diffraction},
  author={Bin Cao, Qian Zhang, Zhenjie Feng, Taolue Zhang, Jiaqiang Huang, Lu-Tao Weng, Tong-Yi Zhang},
  journal={arXiv preprint},
  year={2026},
  url={https://arxiv.org/abs/2602.16372v1}
}

Star History Chart


Contributing

We welcome contributions from the community.

  • Report bugs via Issues
  • Propose features
  • Submit pull requests
  • Contact for academic collaboration

Please ensure code readability, documentation clarity, and scientific correctness before submission.


License

This project is released under the MIT License.

Free for academic and commercial use. Please cite related publications when used in scientific research.


For any inquiries or assistance, feel free to contact Mr. CAO Bin at:
📧 Email: bcao686@connect.hkust-gz.edu.cn

Cao Bin is a PhD candidate at the Hong Kong University of Science and Technology (Guangzhou), under the supervision of Professor Zhang Tong-Yi. His research focuses on AI for science, especially intelligent crystal-structure analysis and discovery. Learn more about his work on his homepage.

About

[https://bin-cao.github.io/PyWPEM] AI-Driven Structure Refinement of X-ray Diffraction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 99.3%
  • Python 0.7%