ShotgunCSP is a Python package designed to solve the crystal structure prediction (CSP) problem using a non-iterative, single-shot screening framework. This method leverages a large library of virtually created crystal structures and employs a machine-learning energy predictor for efficient and accurate predictions.
- Non-iterative, single-shot screening framework for CSP
- Transfer learning for accurate energy prediction
- Generative models based on element substitution (ShotgunCSP-GT) and symmetry-restricted structure generation (ShotgunCSP-GW)
- High prediction accuracy with reduced computational intensity
NOTE
The release of the ShotgunCSP-GW-based generator is anticipated for 2026.
Before installing shotgun-csp, you have to install PyTorch (^2.0.0) first. Please follow the official installation guidance.
To install shotgun-csp, you can use Poetry:
# Clone the repository
git clone https://github.com/tsumina/shotgun-csp.git
cd shotgun-csp
# Install dependencies and package
poetry install
Alternatively, you can directly install the package from PyPI:
pip install shotgun-csp
Here is a simple example of how to use shotgun-csp:
from shotgun_csp.generator import TemplateSelector
from shotgun_csp.utils import VASPInputGenerator
# Select templates
selector = TemplateSelector(target=<composition>, volume=<predicted volume>)
templates = selector(<pymatgen structures>, filter=<structure filter (optional)>)
# Generate VASP input
generator = VASPInputGenerator(save_to='/path/to/save')
generator.static_input(<pymatgen structure>) # static calculation
generator.relax_input(<pymatgen structure>) # relax calculation
See example for details.
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
We welcome contributions to improve ShotgunCSP. Please fork the repository and submit your pull requests.
We would like to thank all contributors and the scientific community for their valuable input and support.
For any inquiries or issues, please open an issue.