shakenbreak: Package to generate and analyse distorted defect structures, in order to identify ground-state and metastable defect configurations. · Pythie
ShakeNBreak is a defect structure-searching method employing chemically-guided bond distortions to locate ground-state
and metastable structures of point defects in solid materials.
ShakeNBreak is open-source, developed by members of the
Simulation of Advanced Materials lab at Cambridge,
the Scanlon group at Birmingham, the Walsh group at Imperial College and
contributors from across the globe.
Main features include:
Defect structure generation:
Automatic generation of distorted structures for input defects
Optionally, input file generation for geometry optimisation with several codes (VASP, CP2K, Quantum-Espresso, CASTEP & FHI-aims)
Analysis:
Parsing of geometry relaxation results
Plotting of final energies versus distortion to demonstrate what energy-lowering reconstructions have been identified
Coordination & bonding analysis to investigate the physico-chemical factors driving an energy-lowering distortion
Magnetisation analysis (currently only supported for VASP)
The code currently supports VASP, CP2K, Quantum-Espresso, CASTEP & FHI-aims. Code contributions to support additional solid-state packages are welcome.
Literature
We kindly ask that you cite the code and theory/method papers if you use ShakeNBreak in your work.
See the dopedLiterature section for recommended articles on
defect modelling in general.
Installation
ShakeNBreak can be installed using conda:
conda install -c conda-forge shakenbreak
or pip:
pip install shakenbreak
See the Installation docs if you encounter any issues (e.g. known issue with phonopyCMake build).
If using VASP, in order for ShakeNBreak to automatically generate the pseudopotential input files (POTCARs), your local VASP pseudopotential directory must be set in the pymatgen configuration file $HOME/.pmgrc.yaml as follows:
PMG_VASP_PSP_DIR: <Path to VASP pseudopotential top directory>
Within your VASP pseudopotential top directory, you should have a folder named POT_GGA_PAW_PBE
which contains the POTCAR.X(.gz) files (in this case for PBE POTCARs). Please refer to the doped Installation docs if you have
difficulty with this.
The font Montserrat (Open Font License) will be installed with the package, and will be used by default for plotting.
Usage
Python API
ShakeNBreak can be used through a Python API, as exemplified in the SnB Python API tutorial, with more info available on the docs.
Command line interface
Alternatively, the code can be used via the command line:
The functions provided include:
snb-generate: Generate distorted structures for a given defect
snb-generate_all: Generate distorted structures for all defects present in the specified/current directory
snb-run: Submit geometry relaxations to the HPC scheduler
snb-parse: Parse the results of the geometry relaxations and write them to a yaml file
snb-analyse: Generate csv files with energies and structural differences between the final configurations
snb-plot: Generate plots of energy vs distortion, with the option to include a colorbar to quantify structural differences
snb-regenerate: Identify defect species undergoing energy-lowering distortions and test these distortions for the other charge states of the defect
snb-groundstate: Save the ground state structures to a Groundstate directory for continuation runs
More information about each function and its inputs/outputs are available from the CLI section of the docs or using -h help option (e.g. snb -h).
We recommend at least looking through the tutorials when first starting to use ShakeNBreak, to familiarise yourself with the full functionality and workflow.
You may also find the
YouTube Overview (10 mins),
YouTube Seminar (35 mins)
and/or papers listed in the Literature section above useful.
Studies using ShakeNBreak
A. G. Squires, S. R. Kavanagh, A. Walsh and D. O. Scanlon Guidelines for robust and reproducible point defect simulations in crystalsNature Reviews Materials 2026
X. Wang et al. Making atomistic materials calculations accessible with the AiiDAlab Quantum ESPRESSO appnpj Computational Materials 2026
D. J. Keeble Detection and identification of vacancy defects in antimony selenideNature Communications 2026
E. I. Jaffal et al. Investigating mechanical properties through defect chemistry in hard binary phosphide material Ta3PSolid State Communications 2026
L. Tian et al. Optical Spectroscopic Determination of Photoexcited Small-Polaron Hopping in Transition Metal Oxide PhotocatalystsChemical Science 2026
S. R. Kavanagh Identifying Split Vacancy Defects with Machine-Learned Foundation Models and ElectrostaticsJPhys Energy 2025
R. Claes, A. G. Squires and D. O. Scanlon Establishing Doping Limits for ZnGa2O4 for Ultrawide-Band-Gap Semiconductor ApplicationsACS Applied Materials & Interfaces 2025
Y. Liu, S. Chae and E. Kioupakis Origin of shallow n-type doping in AlN and Al-rich AlGaNarXiv 2025
J. Zhou et al. Breaking the 800 mV open-circuit voltage barrier in antimony sulfide photovoltaicsarXiv 2025
K. Talit et al. Structural and electronic properties of Ti- and Ca-doped hexagonal TbInO3Physical Review Materials 2025
I. Mosquera-Lois, A. Walsh Dynamic Vacancy Levels in CsPbCl3 Obey Equilibrium Defect ThermodynamicsPRX Energy 2025
B. I. J. Johnston et al. Enhanced cycling stability of LiNiO2 cathodes through a Mg/W dual-cation modification strategyJournal of Materials Chemistry A 2025
Z. Li and A. Walsh Thermodynamics of Sulfur Vacancy Formation in the Chalcogenide Perovskite BaZrS3Journal of Physical Chemistry C 2025
P. Russell et al. Computational prediction of Y-doped Cd2Sb2O7 as a competitive Sb-based n-type Transparent Conducting OxideChemRxiv 2025
M. A. Fadla et al. Tailoring the Electronic Properties of Monoclinic (InxAl1-x)2O3 Alloys via Substitutional Donors and AcceptorsPhysical Review Materials 2025
C. López et al. Chalcogen Vacancies Rule Charge Recombination in Pnictogen Chalcohalide Solar-Cell AbsorbersACS Energy Letters 2025
Y. Fu & H. Lohan et al. Factors Enabling Delocalized Charge-Carriers in Pnictogen-Based Solar Absorbers: In-depth Investigation into CuSbSe2Nature Communications 2025
S. R. Kavanagh et al. Intrinsic point defect tolerance in selenium for indoor and tandem photovoltaicsEnergy & Environmental Science 2025
J. Huang et al. Manganese in β-Ga2O3: a deep acceptor with a large nonradiative electron capture cross-sectionJournal of Physics D: Applied Physics 2025
X. Zhao et al. Trace Yb doping-induced cationic vacancy clusters enhance thermoelectrics in p-type PbTeApplied Physics Letters 2025
Z. Cai & C. Ma Origin of oxygen partial pressure-dependent conductivity in SrTiO3Applied Physics Letters 2025
R. Desai et al. Exploring the Defect Landscape and Dopability of Chalcogenide Perovskite BaZrS3Journal of Physical Chemistry C 2025
G. Kalemai et al. Flexible Inorganic/Organic Memristor Based on W-Doped MoOx/Poly(methyl methacrylate) HeterostructureNanomaterials 2025
C. Kaewmeechai, J. Strand & A. Shluger Structure and Migration Mechanisms of Oxygen Interstitial Defects in β-Ga2O3Physica Status Solidi B 2025
Y. Gong Wang et al. Influence of Vanadium and Chromium Doping on the Thermoelectric Performance of AgSbTe2Physica Scripta 2025
W. Gierlotka et al. Thermodynamics of point defects in the AlSb phase and its influence on phase equilibriumComputational Materials Science 2025
P. Panagis Filippatos et al. Ab initio investigation of the Cr substitutional defect in α-quartz for quantum applicationsJournal of Applied Physics 2025
P. Panagis Filippatos, T. J. P. Irons and K. Inzani Revisiting intrinsic spin defects in hexagonal boron nitride with r2SCANarXiv 2025
P. Panagis Filippatos, A. Chroneos and N. Kelaidis A first-principles investigation of halogen doped diamond and its application to quantum technologiesJournal of Applied Physics 2025
W. D. Neilson et al. Oxygen Potential, Uranium Diffusion, and Defect Chemistry in UO2±x: A Density Functional Theory StudyJournal of Physical Chemistry C 2024
X. Wang et al. Sulfur Vacancies Limit the Open-circuit Voltage of Sb2S3 Solar CellsACS Energy Letters 2024
Z. Yuan & G. Hautier First-principles study of defects and doping limits in CaOApplied Physics Letters 2024
B. E. Murdock et al. Li-Site Defects Induce Formation of Li-Rich Impurity Phases: Implications for Charge Distribution and Performance of LiNi0.5-xMxMn1.5O4 Cathodes (M = Fe and Mg; x = 0.05–0.2)Advanced Materials 2024
A. G. Squires et al. Oxygen dimerization as a defect-driven process in bulk LiNiO22ACS Energy Letters 2024
X. Wang et al. Upper efficiency limit of Sb2Se3 solar cellsJoule 2024
I. Mosquera-Lois et al. Machine-learning structural reconstructions for accelerated point defect calculationsnpj Computational Materials 2024
S. R. Kavanagh et al. doped: Python toolkit for robust and repeatable charged defect supercell calculationsJournal of Open Source Software 2024
K. Li et al. Computational Prediction of an Antimony-based n-type Transparent Conducting Oxide: F-doped Sb2O5Chemistry of Materials 2024
S. Hachmioune et al. Exploring the Thermoelectric Potential of MgB4: Electronic Band Structure, Transport Properties, and Defect ChemistryChemistry of Materials 2024
X. Wang et al. Four-electron negative-U vacancy defects in antimony selenidePhysical Review B 2023
Y. Kumagai et al. Alkali Mono-Pnictides: A New Class of Photovoltaic Materials by Element MutationPRX Energy 2023
A. T. J. Nicolson et al. Cu2SiSe3 as a promising solar absorber: harnessing cation dissimilarity to avoid killer antisitesJournal of Materials Chemistry A 2023
J. Willis, K. B. Spooner, D. O. Scanlon On the possibility of p-type doping in barium stannateApplied Physics Letters 2023
J. Cen et al. Cation disorder dominates the defect chemistry of high-voltage LiMn1.5Ni0.5O4 (LMNO) spinel cathodesJournal of Materials Chemistry A 2023
J. Willis & R. Claes et al. Limits to Hole Mobility and Doping in Copper IodideChemistry of Materials 2023
I. Mosquera-Lois & S. R. Kavanagh, A. Walsh, D. O. Scanlon Identifying the ground state structures of point defects in solidsnpj Computational Materials 2023
B. Peng et al. Advancing understanding of structural, electronic, and magnetic properties in 3d-transition-metal TM-doped α-Ga₂O₃ (TM = V, Cr, Mn, and Fe)Journal of Applied Physics 2023
Y. T. Huang & S. R. Kavanagh et al. Strong absorption and ultrafast localisation in NaBiS2 nanocrystals with slow charge-carrier recombinationNature Communications 2022
S. R. Kavanagh, D. O. Scanlon, A. Walsh, C. Freysoldt Impact of metastable defect structures on carrier recombination in solar cellsFaraday Discussions 2022
Y-S. Choi et al. Intrinsic Defects and Their Role in the Phase Transition of Na-Ion Anode Na2Ti3O7ACS Applied Energy Materials 2022 (Early version)
S. R. Kavanagh, D. O. Scanlon, A. Walsh Rapid Recombination by Cadmium Vacancies in CdTeACS Energy Letters 2021
C. J. Krajewska et al. Enhanced visible light absorption in layered Cs3Bi2Br9 through mixed-valence Sn(II)/Sn(IV) dopingChemical Science 2021 (Early version)
BibTeX entries for these papers are provided in the CITATIONS.md file.
Code Compatibility
ShakeNBreak is built to natively function using doped / pymatgenDefect objects and be compatible with the most recent version of pymatgen.
If you are receiving pymatgen-related errors when using ShakeNBreak, you may need to update pymatgen and/or ShakeNBreak, which can be done with:
pip install -U pymatgen shakenbreak
ShakeNBreak is compatible with a variety of inputs (to then generate the trial distorted structures), including doped / pymatgenDefect objects, pymatgenStructure objects or structure files
(e.g. POSCARs for VASP). As such, it should be compatible with any defect code
(such as doped, pydefect,
PyCDT, PyLada,
DASP, Spinney,
DefAP, PyDEF...) or manual defect supercell generation.
Please let us know if you have any issues with compatibility, or if you would like to see any additional features added to ShakeNBreak to make it more compatible with your code.
Acknowledgements
ShakeNBreak has benefitted from feedback from many members of the Walsh and Scanlon research groups who have used / are using it in their work, including Adair Nicolson, Xinwei Wang, Katarina Brlec, Joe Willis, Zhenzhu Li, Jiayi Cen, Lavan Ganeshkumar, Daniel Sykes, Luisa Herring-Rodriguez, Alex Squires, Sabrine Hachmioune and Chris Savory.
Further code contributions have been added by Wei Bo Ng (@hwbng).
Contributing
Bugs reports, feature requests and questions
Please use the Issue Tracker to report bugs or request new features.
Contributions to extend this package are very welcome! Please use the
"Fork and Pull"
workflow to do so and follow the PEP8 style guidelines.
Use together with shakenbreak: extensions, drivers, servers and companion tools.
pymatgenPythie’s Index: 80Python Materials Genomics is a robust materials analysis code that defines core object representations for structures and molecules with support for many electronic structure codes. It is currently the core analysis code powering the Materials Project (https://materialsproject.org).1.2M downloads/mo
pymatgen-corePythie’s Index: 86Python Materials Genomics is a robust materials analysis code that defines core object representations for structures and molecules with support for many electronic structure codes. It is currently the core analysis code powering the Materials Project (https://materialsproject.org). This repository is for pymatgen-core, which implements the core data structures and algorithms.705.3K downloads/mo
dopedPythie’s Index: 36Python package to setup, process and analyse solid-state defect calculations with VASP46K downloads/mo