Skip to content
/ CrySPR Public

A Python interface for implementation of crystal structure pre-relaxation and prediction using machine-learning inter-atomic potentials.

License

Notifications You must be signed in to change notification settings

Tosykie/CrySPR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrySPR

Maintainers: Wei Nong [email: [email protected]] ; Ruiming Zhu [email: [email protected]]

CrySPR /ˈkrɪspɚ/ is a Python interface for crystal structure pre-relaxation and prediction using machine-learning interatomic potentials (ML-IAPs). Features include:

  • Implement structure generation from the input info (e.g., formula, Z, space group, etc.) via pyxtal and local structure optimization/relaxation through ase calculator using ML-IAPs;
  • Implement global search task for crystal structure prediction using 1) random search (done), and 2) particle swarm optimization (PSO) for a given reduced formula (in dev ...);
  • More in development

The original old repo Fast-Universal-CSP-Platform @RaymondZhurm

Python dependencies

python >= 3.9
ase # https://wiki.fysik.dtu.dk/ase/install.html
pymatgen # https://pymatgen.org/installation.html
pyxtal # https://pyxtal.readthedocs.io/en/latest/Installation.html#installation
torch # https://pytorch.org/get-started/locally/#linux-installation
matgl # https://matgl.ai/#installation
chgnet # https://chgnet.lbl.gov/#installation
mace-torch # https://mace-docs.readthedocs.io/en/latest/guide/installation.html
scikit-opt # https://scikit-opt.github.io/scikit-opt/#/en/README?id=install

Installation

PyPI distribution

$ pip install cryspr

Note on the installation of matgl (1.0.0) library:

  • Windows OS: pip install cryspr will normally install all related dependencies, and the matgl works for latest version of torch (as-of-date is 2.3.0)
  • Linux OS: the matgl requires torch<=2.2.1 and additionally pydantic, which is not well handled by pip. The two dependencies have to be manually installed using pip, or to install matgl using other package manager, like, conda.

Source code (GitHub)

  1. Download the repo or git clone.

  2. Add the CrySPR project into the system PYTHONPATH either by, e.g., on Linux/Mac OS

$ export PYTHONPATH=/path/to/CrySPR:$PYTHONPATH

or by in the python code

import sys
sys.path.insert(0, '/path/to/CrySPR')

Usage

To be updated.

Examples

Ground-state CaTiO3

This example shows the implementation of crystal structure relaxation and prediction from three test space groups (No. 62, 74, 140) through a random prediction mode. The ML-IAP calculator is CHGNet.

Refers to examples/cryspr_random_predict_CaTiO3.ipynb

About

A Python interface for implementation of crystal structure pre-relaxation and prediction using machine-learning inter-atomic potentials.

Resources

License

Stars

Watchers

Forks

Packages

No packages published