\section{\label{sec:level1}Introduction\protect}
Defects control the properties and performance of most functional materials and devices.
Unravelling the identity and impact of these imperfections is, however, a challenging task. Their dilute concentrations hinder experimental identification, which is often tackled by combining characterisation measurements with \textit{ab-initio} techniques.
The standard modelling approach, based on local optimisation of a defect containing crystal, is prone to miss the true ground state atomic arrangement, however.
The chosen initial configuration, which is often initiated as a vacancy/substitution/interstitial on a known crystal site (Wyckoff position) and all other atoms retaining their typical lattice positions, may lie within a local minimum or on a saddle point of the potential energy surface (PES), trapping a gradient-based optimisation algorithm in an unstable or metastable arrangement\cite{Arrigoni_evolutionary_2021,Ong_2012,Evarestov_2017,Lany_dimer_2004,Lindstrom_2015,Sokol_2010,Osterbacka_2022,Krajewska_2021,Mosquera_2021} as illustrated in \cref{fig:neb_vac_1_Cd_0}.
By yielding incorrect geometries, the predicted defect properties, such as equilibrium concentrations, charge transition levels and recombination rates, are rendered inaccurate. This behaviour can severely impact theoretical predictions of material performance, including photovoltaic efficiency\cite{Kavanagh_2021}, catalytic activity\cite{Kehoe_2011}, absorption spectra\cite{Lany_2004} and carrier doping\cite{Goyal_2020}, highlighting the pressing requirement for improved structure prediction techniques for defects in solids.
\begin{figure}
    \centering
    \includegraphics[width=0.6\linewidth]{figures/V_Cd_PES.pdf}
    \caption{Potential energy surface for the neutral cadmium vacancy in \ce{CdTe}, illustrating the global minimum (Te dimer) and local minima (Bipolaron and Tetrahedral configurations). A standard optimisation from the initial, high-symmetry configuration (black star) gets trapped in the metastable Tetrahedral configuration. Adapted from \textit{Matter}, I. Mosquera-Lois and S.R. Kavanagh, \textit{In Search of Hidden Defects} (2021) with permission from Elsevier.}
    \label{fig:neb_vac_1_Cd_0}
\end{figure}
Several approaches have recently been devised to navigate the defect configurational landscape.
Arrigoni and Madsen\cite{Arrigoni_evolutionary_2021} used an evolutionary algorithm enhanced with a machine learning model to explore the defect PES and identify low energy structural configurations. While its robust performance makes it suitable for in-depth studies of specific defects, its complexity and computational cost hinders its applicability in standard defect studies, where all intrinsic defects in all plausible charge states (and relevant extrinsic defects) are modelled.
On the other hand, Pickard and Needs\cite{Pickard_2006} employed random sampling of the PES.
Essentially, they remove the defect atom and its nearest neighbours and reintroduce them at random positions within a 5 \AA~cube centred on the defect, thus ensuring sampling of an important region of the PES. Despite successfully identifying the ground state structures for several systems\cite{Morris_2008,Morris_2009,Morris_2011,Pickard_2006,Mulroue_2011}, constrained random sampling in a high-dimensional space lowers efficiency and increases computational cost.

To improve PES sampling efficiency, domain knowledge can be employed to bias the search towards energy-lowering structural distortions.
Accordingly, we exploit the localised nature of defect distortions, as well as the key role of the defect valence electrons, to guide the exploration of the PES.
By combining these biases with lessons learnt from crystal structure prediction, we develop a practical and robust method to identify the defect ground and low-energy metastable states. Its application to eight host materials (CdTe, GaAs, \ce{Sb2S3}, \ce{Sb2Se3}, \ce{CeO2}, \ce{In2O3}, \ce{ZnO}, \ce{TiO2}) reveals a myriad of energy-lowering defect distortions, which are missed when relaxing the ideal high-symmetry defect configurations.
Notably, energy-lowering distortions that are missed by standard geometry relaxation were found in each system investigated.
Classifying these atomic rearrangements by distortion motif, we outline the main physico-chemical factors that underlie defect reconstructions. Moreover, we demonstrate the strong effect on defect formation energies and their charge transition levels, illustrating the
importance of exploring the defect configurational space for accurate predictions of defect properties.
Additionally, while defect properties are often determined by the ground state structure, there are cases when low energy metastable structures can significantly affect behaviour\cite{Kavanagh_2021,Coutinho_2020,kavanagh2022impact}. Accordingly, we tested our approach for low-energy metastable configurations by considering the DX centres in GaAs, which have been extensively studied due to their anomalous physical properties and technological importance. By finding the vast majority ($>90$\%) of configurations identified by previous investigations, we demonstrate the applicability of our approach to locate both ground state and low-energy metastable defect structures, constituting an affordable and effective tool to explore the defect configurational landscape.

\section{Methodology}
\subsection{\label{sec:level2} Structure search strategy}
{I. \emph{Local bond distortion}}\\
The role of valence electrons in defect reconstructions has been demonstrated by the defect-molecule model developed by Watkins\cite{Watkins_1983,Watkins_1993,Watkins_1996,Watkins_1997,Watkins_2000,Watkins_2001} and Coulson\cite{Coulson_1957}.
It successfully explained the Jahn-Teller distortions observed for vacancy centres in silicon and diamond, and continues to be applied to rationalise defect reconstructions\cite{El-Maghraby_1998,Stoneham_2001_vacancies,Lindstrom_2015,Carvalho_2010,Lanoo_1981,Kavanagh_2021,Lany_2004,Lany_2005,Chanier_2008,Schultz_2009,Feichtinger_1986}.
This highlights the suitability and utility of defect valence electrons as an approximate indicator of likely defect distortions. As such, our method incorporates this feature, as well as the localised nature of defect reconstructions, to generate a reasonable set of chemically-guided distortions to sample the PES.
Specifically, we use the number of missing/additional valence electrons of the defect species to determine the number of nearest neighbour atoms to distort. To generate a set of trial structures, the initial defect-neighbour distances $d_0$ are distorted by varying amounts, with the range set by the minimum and maximum distortion factors $k_{min}$ and $k_{max}$, such that $d_{min} = k_{min}d_0$ and $d_{max} = k_{max}d_0$, and the increment parameter $\delta$ which determines the sampling density of the trial distortion mesh.
Thus, the distorted defect-neighbour distances $d$ are given by
\begin{equation}
    d_n =  k_{n}d_0
\end{equation}
\begin{equation}
    k_{n} = k_{min} + n\delta \quad \textrm{with} \quad n=0,1,2,...,\Big(\frac{k_{max}-k_{min}}{\delta}\Big)
\end{equation}
While these parameters may be varied, in our work we found a distortion range of $\pm60\%$ (i.e. $k_{min} = 0.4$ and $k_{max} = 1.6$) and increment of $10\%$ ($\delta = 0.1$) to be an optimal choice, with a sufficiently wide and dense distortion mesh to identify all known energy-lowering distortions (see SI Section III for more details).
Similar bond distortions have previously been applied by Pham and Deskins\cite{Pham_2020} to locate the ground state of small polarons in three metal oxides. Analogously, these initial distortions aim to escape the local energy basin in which the ideal, undistorted structure may be trapped.
Further, by only distorting the defect nearest neighbours --- and thus restricting to a lower-dimensional subspace, the method aims to sample the key regions of the PES that may comprise energy-lowering reconstructions, such as Jahn-Teller effects or rebonding between under-coordinated atoms.

The utility of electron count as an indicator for the number of defect-neighbour bonds to distort is demonstrated for the neutral cadmium vacancy in CdTe in \cref{fig:BDM_parameters_V_Cd} (a).
Here, bond distortions were applied to differing numbers of defect neighbours. Best performance (i.e. widest range of distortions yielding the ground state) was obtained when distorting two neighbours, supporting the feature choice given that the vacancy site lacks two valence electrons relative to the original Cd atom.\\

{II. \emph{Atomic rattle}}\\
Following the nearest neighbour distortion, the method applies random perturbations to the coordinates $r$ of all atoms $N$ in the supercell. This aids to escape from any metastable symmetry trapping and locate small, symmetry-breaking distortions (i.e. nearby lower energy basins).
This step has proven useful in other structure-searching approaches, such as the investigation of symmetry breaking distortions in perovskites\cite{Wang_2021} or point defects\cite{Huang_2022,kavanagh2022impact}.
The magnitudes of these randomly-directed atomic displacements $d$ are themselves randomly selected from a normal distribution of chosen standard deviation $\sigma$ (\cref{eq:rattle}).
\begin{equation}\label{eq:rattle}
\begin{aligned}
    r'_i = r_i + d \quad
    & \textrm{with} \quad i = 0,1,...,3N
    & \textrm{and} \quad d
    \leftarrow \frac{1}{\sigma \sqrt{2\pi}}
    \exp \big( -\frac{d^2}{2\sigma^2}  \big)
\end{aligned}
\end{equation}
To determine the optimum magnitude of the perturbation, several standard deviations were tested for a series of defects -- shown in the SI Section III and exemplified in \cref{fig:BDM_parameters_V_Cd} (b) for \kvc{V}{Cd}{0} in CdTe. In general, we found values between 0.05 - \SI{0.25}{\AA} to give good performance, and adopted \SI{0.25}{\AA} since it was the only distortion capable of finding the ground state of $\rm S_i^{-1}$ in \ce{Sb2S3} (SI Fig. S3).

Additionally, we also investigated a `localised' rattle, where the perturbations were only applied to atoms located within 5~\AA~of the defect, as recently employed in other defect studies\cite{Gake_2021,Kumagai_2021,Huang_2022}.
However, this yielded inferior performance for several defects (less bond distortions leading to the ground state) without significant reduction in the number of ionic relaxation steps (SI Fig. S4). While the final structure is still only locally deformed, it appears that the external potential induced by the long-range symmetry of the surrounding host crystal biases the initial forces toward retaining the high-symmetry metastable defect structure. Therefore rattling was applied to all atoms in the simulation supercell.
\begin{figure}
    \includegraphics[width=\textwidth]{figures/SnB_Schematic_and_Parameters.pdf}
    \caption{\textbf{(a)} Schematic representation of our approach, as described in the Methods section, using the neutral cadmium vacancy (\kvc{V}{Cd}{0}\!\!) in CdTe as an example. Cd in blue, Te in gold and \kv{V}{Cd} in black, with the distorted Te neighbours shown in a gold/white. \textbf{(b)} Relative energy of relaxed structures for \kvc{V}{Cd}{0}\!\! in CdTe, for different numbers of distorted defect neighbours and \textbf{(c)} rattle standard deviations. A localised rattle (where only atoms within 5~\AA~to the defect are distorted) is also shown ($\sigma=0.25_{loc}$ \AA). The widest interval of bond distortions leading to the ground state is obtained by distorting two nearest neighbours.
    Only negative bond distortions are shown since all positive ones yield the metastable `Tetrahedral' configuration.}
    \label{fig:BDM_parameters_V_Cd}
\end{figure}

\subsection{Computational details}
The bond distortion and rattling procedure for defect structure generation has been implemented in Python\cite{Ong_pymatgen_2013,Bahn_ase_2002}.
The underlying total energy and force calculations were performed with plane-wave Density Functional Theory (DFT) within VASP\cite{Kresse_1993,Kresse_1994}, using the projector augmented wave method.\cite{Kresse_1996}.
All calculations were spin-polarised and based on the HSE screened hybrid exchange-correlation functional\cite{Heyd_2003}.
When reported in previous studies, the bandgap-corrected Hartree-Fock exchange fraction ($\alpha$) was used, which is common practice in the field\cite{Alkauskas_2011,Alkauskas_2014,Lyons_2010,Deak_2005}.
Otherwise HSE06 ($\alpha = 25\%$) was employed. The basis set energy cut-off and $k$-point grid were converged to 3 meV/atom in each case. The converged parameters, valence electron configurations and fractions of Hartree-Fock exchange used for each system are tabulated in the SI Table I.
\\
The conventional supercell approach for modelling defects in periodic solids\cite{Huang_2021} was used.
To reduce periodic image interactions, supercell dimensions of at least 10 \AA~in each direction\cite{Zunger_2008_assessment} were employed (SI Table I).
The use of a large supercell justifies performing the PES exploration with $\Gamma$-point-only reciprocal space sampling, thus increasing speed while retaining qualitative accuracy. This makes the cost of these test geometry optimisations very small compared to the total cost of the fully-converged defect calculations.
The $\Gamma$-point approximation was further validated by optimising the defect ground state and metastable geometry (obtained by relaxing the high-symmetry, undistorted structure) with denser reciprocal space sampling (converged within 3 meV/atom). For materials containing heavy-atom elements (CdTe, \ce{Sb2S3}, \ce{Sb2Se3}, \ce{CeO2}, \ce{In2O3}), relativistic effects were accounted for by including spin-orbit coupling (SOC) interactions. To calculate the defect formation energy, we followed the approach described by Freysoldt \emph{et al}\cite{Freysoldt_2014}, using the charge correction developed by Kumagai and Oba\cite{Kumagai_2014}. Madelung energies were calculated using Mulliken charges with the LOBSTER package\cite{ertural_development_2019,dronskowski_crystal_1993,deringer_crystal_2011,maintz_analytic_2013,nelson_lobster_2020}. To generate and analyse the defect distortions described in this work, we developed the \texttt{ShakeNBreak} python and command-line package (\url{https://github.com/SMTG-UCL/ShakeNBreak}) which will be described in a forthcoming publication.
\subsection{Defect suite}
To test our method we chose a set of eight host crystals that provide diversity in crystal symmetry, coordination environments and electronic structure. CdTe and GaAs are tetrahedral semiconductors that adopt the zincblende structure (space group $F\bar43m$). \ce{Sb2Se3} and \ce{Sb2S3} are layered materials (space group $Pnma$), composed of one-dimensional [\ce{Sb4X6}]$_n$ ribbons with covalent metal-chalcogen bonds within each ribbon and van der Waals interactions between ribbons\cite{Guo_2018,Wang_2022,Caruso_2015,Song_2017,Yang_2018,Gusmao_2019}. Beyond these covalently-bonded crystals, we also studied four metal oxides (\ce{In2O3}, \ce{ZnO}, \ce{CeO2}, \ce{TiO2}). \ce{ZnO} crystallises in the hexagonal wurtzite structure (space group $P6_3mc$) with tetrahedral coordination, while \ce{In2O3} adopts a bixbyite structure (space group $Ia3$). \ce{CeO2} crystallises in the fluorite structure with a face-centred cubic unit cell (space group $Fm\bar3m$). The anatase phase of \ce{TiO2} was considered, which adopts a tetragonal structure composed of distorted \ce{TiO6} octahedra (space group $I4_1/amd$). For the covalently-bonded systems, all intrinsic defects were studied, while for the oxides we focused on defects where reconstructions had been reported or were likely (oxygen interstitials in \ce{ZnO}, \ce{In2O3} and a-\ce{TiO2} and dopant defects in \ce{CeO2}). For the materials that can host defects in several symmetry inequivalent sites, the lowest energy one was selected if the energy difference with the other sites was higher than 1 eV, otherwise all symmetry inequivalent sites were considered.

\section{Results}
The application of our method to a series of semiconductors revealed a range of defect reconstructions, which are missed when performing a geometry optimisation of the high symmetry configuration. We categorise these reconstructions into distinct motifs according to the chemical origins of the energy-lowering distortion, as exemplified in  \cref{fig:distortion_rationales} and discussed hereafter.

\begin{figure*}[ht]
    \centering
    \includegraphics[width=0.95\textwidth]{figures/distortion_rationales.pdf}
    \caption{Types of symmetry-breaking reconstructions at point defect sites identified by our method.}
    \label{fig:distortion_rationales}
\end{figure*}

\subsection{Rebonding}
For covalently-bonded materials, defect reconstructions identified by our method often entailed a change in the bonding arrangement at the defect site (`rebonding'), such as dimer formation or replacing cation-cation/anion-anion bonds with more favourable cation-anion ones.\\
\emph{Dimerisation.} For many vacancies and interstitials, symmetry breaking was found to produce dimer bonds between under-coordinated atoms. This novel bond formation results in these distortions being highly-favourable, with energy decreases from \SI{0.4}{eV} to over \SI{2.5}{eV} (\cref{tab:dimer}), between the ground state and metastable structure obtained from standard relaxations.
As expected given the large energy differences, the metastable and ground state configurations also display significant structural differences, which we quantify here by summing the atomic displacements between structures which are above a 0.1 \AA~threshold. The large structural rearrangements for dimer reconstructions are demonstrated by displacement values ranging between 2.0 and 24.3 \AA, with the distortion mainly localised to the dimer-forming atoms (SI Figs.~S8, S9, S10). For vacancies, the distortion typically entails two of the under-coordinated defect neighbours displacing toward each other to form a bond, while for interstitials it is the additional atom which displaces towards a nearby neighbour.

\begin{table}[ht]
    \centering
        \caption{Dimerisation. Energy difference and summed atomic displacements ($\Sigma$Disp.) between the ground state identified by our method and the metastable configuration found when relaxing the ideal, undistorted defect structure (i.e. $\rm \Delta E = E_{\rm ground} - E_{\rm metastable}$).}
		\label{tab:dimer}
		\setlength{\tabcolsep}{8pt}
		\renewcommand{\arraystretch}{1.30}
		\begin{tabular}{ccccc}
			\hline
			\multicolumn{5}{c}{Cation-cation}\\
			\hline
			Defect & Material & Charge &  $\Delta$E~(eV) & $\Sigma$Disp.~(\AA) \\
			\hline
			\kv{V}{Te} & CdTe & 0 & -0.42 & 6.0 \\
			\hline
			{\ce{Sb_i}} & {\ce{Sb2S3}} & -3 & -0.46 &  12.8 \\
			\hline
			\multicolumn{5}{c}{Anion-anion}\\
			\hline
			Defect & Material & Charge & $\Delta $E~(eV) & $\Sigma$Disp.~(\AA) \\
			\hline
			\kv{V}{Cd} & CdTe & 0 & -0.50 & 6.1 \\
			\hline
			\multirow{4}{*}{\kv{V}{Sb,1}} &
			\multirow{4}{*}{\ce{Sb2Se3}}
			&-1 & -0.66 & 8.2\\
			& & 0 & -0.78 & 8.7\\
			& & +1 & -0.84 & 8.9\\
			& & +2 & -2.02 & 12.8\\
			\hline
			\multirow{4}{*}{\kv{V}{Sb,2}} &
			\multirow{4}{*}{\ce{Sb2Se3}}
			&-1 & -0.80 & 7.2\\
			& & 0 & -0.91 & 9.0\\
			& & +1 & -2.10 & 14.7\\
			& & +2 & -2.15 & 16.6\\
			\hline
			\multirow{4}{*}{\kv{V}{Sb,1}} &
			\multirow{4}{*}{\ce{Sb2S3}}
			&-1 & -0.80 & 9.9 \\
			& & 0 & -1.03 & 9.0 \\
			& & +1 & -2.31 & 11.8 \\
			& & +2 & -2.03 & 24.3 \\
			\hline
			\multirow{4}{*}{\kv{V}{Sb,2}} &
			\multirow{4}{*}{\ce{Sb2S3}}
			&-1 & -0.99 & 8.9 \\
			& & 0 & -1.10 & 12.2 \\
			& & +1 & -2.50 & 12.8 \\
			& & +2 & -2.59 & 21.9 \\
			\hline
			$\rm S_i$& \ce{Sb2S3} & -1 & -0.54 & 9.4 \\
			\hline
			\multirow{2}{*}{\kv{O}{i}} &
			\multirow{2}{*}{\ce{In2O3}}
			& 0 & -1.47 & 1.6 \\
			& & +1 & -2.44 & 3.4 \\
			\hline
			\multirow{2}{*}{\kv{O}{i}} &
			\multirow{2}{*}{\ce{ZnO}}
			& 0 & -1.87 & 4.3 \\
			& & +1 & -2.22 & 3.9  \\
			\hline
			\multirow{2}{*}{\kv{O}{i}} &
			\multirow{2}{*}{a-\ce{TiO2}}
			& 0 & -2.23 & 3.1 \\
			& & +1 & -1.99 & 3.2  \\
			\hline
		\end{tabular}
\footnotetext[1]{Metastable and ground state structures with bond distance labelling shown in SI Figs.~S8, S9, S10.}
\end{table}

Within the cases reported in \cref{tab:dimer}, it is instructive to further consider the antimony vacancies (\kv{V}{Sb}) in the quasi-one dimensional materials \ce{Sb2(S/Se)3}.
In contrast to other systems, the dimer reconstruction is favourable across several charge states, with its stability increasing with the magnitude of the charge state of the defect. As indicated by Crystal Orbital Hamilton Population analysis (COHP) \cite{Deringer_2011,Dronskowski_1993,Maintz_2013}, from the singly negative to the double positive state, we observe greater net bonding anion-anion interactions (SI: Table 3, Figure 11), thereby leading to stronger bonds and thus a more favourable reconstruction. Furthermore, for the neutral and positive charge states, the under-coordinated vacancy neighbours form \emph{two} anion-anion bonds (yielding a S-S-S trimer), which is achieved by a large displacement of one of the vacancy neighbours towards the other two (\cref{fig:vac_2_Sb}). This remarkable ability to distort likely stems from their soft, quasi-1D structure\cite{Wang_2022}, with van der Waals voids between atomic chains\cite{Zhang_2022} (SI Fig.~S5).
Despite the key role of anion dimerisation for \kv{V}{Sb}, which significantly impacts its energy and structure, this reconstruction has not been reported by previous studies on \ce{Sb2S3}\cite{Cai_2020} or \ce{Sb2Se3}\cite{Savory_2019,Huang_2019,Liu_2017,Zhao_2021,Tumelero_2016,Stoliaroff_2020}, due to the local minimum trapping which our method aims to tackle. While sulfur dimers were not identified in \ce{Sb2(S/Se)3}, they were reported for \kv{V}{Bi} and $\rm S_i$ in the isostructural material \ce{Bi2S3}\cite{Han_2017}, where their formation stabilises abnormal charge states for both species, rendering them \emph{donor} defects --- contradicting the typical acceptor nature of cation vacancies and anion interstitials.
\begin{figure}[h]
    \centering
    \includegraphics[width=1.0\textwidth]{figures/Sb2S3/vac_2_sb_reconstruction.png}
    \caption{Anion-anion dimer formation undergone by \kvc{V}{Sb,2}{-1,0,+1,+2} in \ce{Sb2S3}, where the subscript differentiates between the two symmetry inequivalent sites of Sb (shown in SI Fig. S7). Similar reconstructions were observed for the other symmetry inequivalent site and in \ce{Sb2Se3}. For each charge state, on the top we show the configuration obtained by relaxing the ideal, high-symmetry geometry and on the bottom the ground state found with our method. For the singly negative charge states, the distortion is driven by the formation of one sulfur dimer while for the neutral and positively charge states a trimer is formed.
    \kv{V}{Sb} in black and S in yellow. Pseudo-bonds from the vacancy position to neighbouring S atoms are shown for the metastable configurations to illustrate the coordination environment and the arrows illustrate the key displacement from the high-symmetry structure.}
    \label{fig:vac_2_Sb}
\end{figure}

Beyond covalently-bonded materials, anion-anion bond formation is also observed for anion interstitials in systems with a stronger ionic character (\ce{In2O3}, \ce{ZnO}, a-\ce{TiO2}).
Rather than leading to hole localisation in the interstitial atom and/or neighbouring anions (metastable state), the defect can accommodate the charge deficiency by forming oxygen dimers, resulting in highly favourable reconstructions (\cref{tab:dimer}). When only two electrons are missing ($\rm O_i^{0}$), the interstitial atom displaces towards a lattice oxygen forming a peroxide ($\rm O_2^{-2}$, d(O-O)=\SI{1.45}{\AA}, SI Fig.~S10), which is 1.5-2.0 eV more favourable than the metastable double polaron state. If an additional electron is removed (\kvc{O}{i}{+1}\!\!), a hole is trapped in one of the peroxide antibonding $\pi$* orbitals (e.g. $\rm h^+ + O_2^{-2}$, d(O-O)=\SI{1.31}{\AA}, SI Fig.~S12). Remarkably, this peroxide hole trapping yields a stabilisation $>$\SI{2}{eV} compared to the system with 3 holes localised on the defect region, and has previously been reported for \emph{bulk} lithium peroxide (\ce{Li2O2})\cite{Ong_2012}.

Overall, these anion-anion dimers lead to highly-favourable distortions and stabilise abnormal charge states for anion interstitials and cation vacancies. This unexpected behaviour highlights the key role of exploring the defect configurational space for accurate theoretical predictions of defect properties, while also demonstrating the importance of considering a wide range of charge states, as unforeseen chemical interactions (facilitated by defect reconstructions) may lead to unexpected stabilisations.
Finally, we note that dimer reconstructions at defects are not uncommon, and have been previously reported for numerous vacancies and interstitials, including \kvc{V}{Se}{0} in ZnSe, \ce{CuInSe2} and \ce{CuGaSe2}\cite{Lany_2004}, \kvc{V}{S}{0} in ZnS\cite{Lany_2004}, \kvc{V}{Ti}{0,-1} and \kvc{V}{Zr}{0} in \ce{CaZrTi2O7} \cite{Mulroue_2011}, \kvc{O}{i}{0} in \ce{In2O3}\cite{Agoston_2009}, \ce{ZnO}\cite{Erhart_2005}, \ce{Al2O3}\cite{Sokol_2010}, \ce{MgO}\cite{Evarestov_1996,Kotomin_1998}, \ce{CdO}\cite{Burbano_2011}, \ce{SnO2}\cite{Scanlon_2012_Onthe,Godinho_2009}, \ce{PbO_2}\cite{Scanlon_2011_Nature}, \ce{CeO2}\cite{Keating_2012}, \ce{BaSnO3}\cite{Scanlon_2013_Defect} and
\ce{In2ZnO4}\cite{Walsh_2009}, $\rm Ag_{i}^{0}$ in AgCl and AgBr\cite{Wilson_2008}, \kvc{V}{I}{-}, \kvc{I}{i}{0},  \kvc{Pb}{i}{0}, $\rm Pb_{CH_3NH_3}^{0}$ and $\rm I_{CH_3NH_3}^{0}$ in \ce{CH3NH3PbI3} \cite{Agiorgousis_2014,Whalley_2017,Whalley_2021,Motti_2019}, $\rm Pb_i$ in \ce{CsPbBr3}\cite{Kang_2017}, \ce{(CH3NH3)3Pb2I7}\cite{Zhao_2016},
\ce{(CH3NH3)2Pb(SCN)2I2}\cite{Xiao_2016} and \kv{Sn}{i} in \ce{CH3NH3SnI3}\cite{Meggiolaro_2020}.

\emph{Cation-anion rebonding. }
Beyond dimerisation, rebonding between defect neighbours can also include replacing cation-cation/anion-anion (homoionic) bonds with more favourable cation-anion (heteroionic) bonds. This reconstruction motif is primarily observed for antisite defects, where the antisite may displace from its original position towards an oppositely-charged ion to form a new bond, while breaking a cation-cation/anion-anion bond. This is illustrated in \cref{fig:as_on_ga_-2} for $\rm As_{Ga}^{-2}$ in GaAs and was also found for $\rm Sb_{S}^{+3}$ and $\rm S_{Sb}^{+3}$ in \ce{Sb2S3}. In the former ($\rm As_{Ga}^{-2}$), both the cation and anion displace towards each other (\cref{fig:as_on_ga_-2}), from an original separation of \SI{4.00}{\AA} to \SI{2.49}{\AA} (close to the bulk Ga-As bond length of \SI{2.45}{\AA}), breaking an As-$\rm As_{Ga}$ bond in the process.
Interestingly, this behaviour contrasts with that of $\rm Te_{Cd}^{-2}$ in the isostructural compound semiconductor; CdTe, which displaces to form a Te-Te dimer\cite{Lindstrom_2015} rather than the cation-anion rebonding witnessed here. The differing reconstructions exhibited by these nominally similar anion-on-cation antisite defects -- both in zinc blende compound semiconductors, may be rationalised by the greater bond energy of Te-Te (\SI{260}{kJ/mol}) compared to As-As (\SI{200}{kJ/mol})\cite{liao_2006}, suggesting a greater proclivity toward anion dimerisation.
\begin{figure}[ht]
    \centering
    \includegraphics[width=0.5\textwidth]{figures/GaAs/as_As_on_Ga_2-.png}
    \caption{Cation-anion rebonding undergone by $\rm As_{Ga}^{-2}$ in GaAs. On the left is the metastable $T_d$ structure identified by standard defect relaxation, and to the right the ground state $C_s$ symmetry identified by our method. Ga in green and As in purple.}
    \label{fig:as_on_ga_-2}
\end{figure}

\begin{table}[ht]
    \begin{center}
        \caption{Cation--anion rebonding. Energy difference and summed atomic displacements ($\Sigma$Disp.) between the ground state identified by our method and the metastable configuration found when relaxing the ideal, undistorted defect structure (i.e. $\rm \Delta E = E_{\rm ground} - E_{\rm metastable}$).}
        \setlength{\tabcolsep}{8pt}
        \renewcommand{\arraystretch}{1.3}
		\label{tab:cation_anion}
		\begin{tabular}{ccccc}
			\toprule

        Defect & Material & Charge & $\Delta$E~(eV) & $\Sigma$Disp.~(\AA) \\
			\midrule
			{\ce{Sb_S}} & {\ce{Sb2S3}}
            & +3 & -0.39 & 15.8\\

            {\ce{S_{Sb}}} & {\ce{Sb2S3}}
            & +3 & -1.22 & 9.0 \\

            {\ce{S_i}} & {\ce{Sb2S3}}
            & +3 & -0.45 & 11.5\\

            \ce{As_{Ga}} & GaAs & -2 & -0.37 & 5.2 \\

            \ce{Cd_{i}} & CdTe & +2 & -0.46 & 5.8 \\
			\botrule
		\end{tabular}
\footnotetext[1]{Metastable and ground state structures with bond distance labelling shown in SI Fig.~S13}
\end{center}
\end{table}

Cation-anion rebonding is also found in the antimony antisite in \ce{Sb2S3} ($\rm Sb_{S}^{+3}$), where the high-symmetry metastable structure and the ground state differ by the formation of an additional Sb-S bond (SI Figure S13).
This extra cation-anion bond has a distance of \SI{2.5}{\AA}, again comparable to the bulk Sb-S bond length of 2.5-2.8 \AA, and lowers the energy by \SI{0.4}{eV} (\cref{tab:cation_anion}). Beyond antisites, this behaviour is also expected for \emph{extrinsic} substitutional defects and dopants, where the same preference for heteroionic bonds can drive reconstructions to distorted, lower-energy arrangements.

This behaviour is not exclusive to substitution-type defects, however, with similar reconstructions undergone by interstitial defects. For instance, the sulfur interstitial ($\rm S_{i}^{+3}$) in \ce{Sb2S3} displaces to form a $\rm S_i-Sb$ bond which lowers the energy by 0.45 eV (\cref{tab:cation_anion}, SI Fig. S13).
Similar interactions drive the reconstruction for the cadmium interstitial in CdTe ($\rm Cd_{i}^{+2}$), where $\rm Cd_{i}^{+2}$ moves to a Te (rather than Cd) tetrahedral coordination, again with bond lengths (\SI{2.85}{\AA}) similar to the bulk cation-anion bond length (\SI{2.84}{\AA}) and lowering the energy by \SI{0.46}{eV}. Beyond the explicit formation of these heteroionic bonds, the change in the interstitial position also results in more favourable electrostatic interactions, as reflected by the lower Madelung energy of the ground state ($\Delta E_{\textrm{Madelung}} =$ \SI{-2.0}{eV}).
While this configuration is also found by considering a range of potential interstitial sites without distortion, the identified reconstruction demonstrates the ability of this approach to locate major structural distortions, where both the position of the defect atom and its coordination change significantly (summed atomic displacements of \SI{5.8}{\AA} and $\rm Cd_i^{+2}$ moving by \SI{0.86}{\AA}).

\subsection{Crystal field \& Jahn-Teller}
For defects in materials with a stronger ionic character, crystal field or Jahn-Teller effects can also drive symmetry-breaking reconstructions. In this category, we focus on the distortions introduced by a series of divalent metal dopants (Be, Ni, Pd, Pt, Cu) in ceria (\ce{CeO2}).
Previous studies had shown these dopants to favour the formation of a charge-compensating oxygen vacancy (\kvc{V}{O}{+2}\!\!) and undergo significant reconstructions, which were only found by testing a range of chemically-guided manual distortions for each dopant\cite{Kehoe_2011}.

Accordingly, we tested our method by applying it to this system, finding it to successfully reproduce all previously-reported ground state structures, as well as identifying a novel lower-energy reconstruction for the Ni dopant. Here, Ni and Pd are found to distort from an originally cubic coordination to a more favourable square planar arrangement (SI Fig.~S14). This is also the case for Pt, however unlike the other dopants this ground state configuration is also found by a standard relaxation.
For Ni and Pd, crystal field effects drive the displacement of the dopant by 1/4 of a unit cell (\SI{1.2}{\AA}) from the centre of the cube towards one of the faces (\cref{fig:distortion_rationales}, SI Fig.~S14). By lowering the energy of the occupied $d$ orbitals (as depicted in the electron energy diagram of SI Fig.~S15), the reconstruction leads to an overall stabilisation of 0.30 and \SI{0.87}{eV} for Ni and Pd, respectively.
Notably, the nickel distortion was overlooked by the previous study\cite{Kehoe_2011}, likely due to limited exploration of the PES and the shallower and narrower energy basin -- stemming from reduced crystal field stabilisation energy (\cref{tab:crystal_field}) due to weaker hybridisation between the anions and less diffuse 3$d$ orbitals (compared to 4$d$ and 5$d$ for Pd and Pt). \\
Finally, in the case of copper, a $d^9$ metal, it is the Jahn-Teller effect which drives a reconstruction towards a \emph{distorted} square-planar arrangement (\cref{fig:distortion_rationales}). By splitting the partially-occupied electron levels, it lowers the energy of the occupied $d$ orbitals, as shown in the orbital energy diagram of SI Fig.~S16, and leads to an overall stabilisation of 0.67 eV.

\begin{table}[hb]
    \begin{center}
    \caption{Crystal field and Jahn-Teller driven distortions. Energy difference and summed atomic displacements ($\Sigma$Disp.) between the ground state identified by our method and the metastable configuration found when relaxing the ideal, undistorted defect structure (i.e. $\rm \Delta E = E_{\rm ground} - E_{\rm metastable}$).}
    \setlength{\tabcolsep}{8pt}
    \renewcommand{\arraystretch}{1.3}
    \label{tab:crystal_field}
    \begin{tabular}{cccc}
         \toprule
         Defect & Material &  $\Delta$E~(eV) & $\Sigma$Disp.~(\AA) \\
         \midrule
         $\rm Ni_{Ce}^{-2}$ + \kvc{V}{O}{2+} & \ce{CeO2} & -0.30  &  2.2 \\
         $\rm Pd_{Ce}^{-2}$ + \kvc{V}{O}{2+} & \ce{CeO2} & -0.87  & 5.8 \\
         $\rm Cu_{Ce}^{-2}$ + \kvc{V}{O}{2+} & \ce{CeO2} & -0.67 &  3.7 \\
         \botrule
    \end{tabular}
\footnotetext[1]{Metastable and ground state structures with bond distance labelling shown in SI Fig.~S14}
\end{center}
\end{table}

\subsection{Electrostatically-driven}
Finally, for certain interstitials or substitutional defects, symmetry-breaking distortions can yield lower energy structures through optimising electrostatic interactions. Compared to cation-anion rebonding, which is driven by a combination of ionic and covalent bonding interactions, here \emph{no} explicit new bonds are formed, but rather the lattice electrostatic (Madelung) energy is lowered by defect rearrangement. The recurrence of this distortion motif for size-mismatched substitutions is related to their disruption of the nearby lattice framework (and thus long-range electrostatics), making reconstructions to reduce the lattice strain favourable.
For instance, this behaviour was observed for the beryllium dopant in \ce{CeO2}, which also forms a charge-compensating oxygen vacancy, i.e. $\rm Be_{Ce}^{-2}+$\kvc{V}{O}{+2}\!\!\! (as witnessed for other divalent dopants\cite{Kehoe_2011,Hiley_2015,Hegde_2015}).
Surprisingly, instead of adopting the tetrahedral coordination of its parent oxide, beryllium distorts to a trigonal environment (SI Fig.~S17 (a,b)). This behaviour appears to be driven by the significant size mismatch between beryllium and cerium (with ionic radii of $\rm r_{Be^{+2}}=0.59$~\AA~and  $\rm r_{Ce^{+4}}=1.01$~\AA), requiring significant lattice distortion to attain the optimum Be-O distances in the tetrahedral arrangement. To adopt the tetrahedral coordination, three O atoms significantly displace from their lattice sites towards Be, straining the other Ce-O bonds by 0.2 \AA.
In contrast, the trigonal configuration enables optimum Be-O separation while maintaining near ideal distances for the nearby Ce-O bonds, thereby optimising the overall ionic interactions. This is reflected by the Madelung energy, which is 3.2 eV lower in the ground state configuration, and the overall energy lowering of 0.34 eV.

Interstitials can also exhibit these electrostatically-driven reconstructions, with their higher mobility allowing for displacement to more favourable Madelung potential sites.
For example, the main difference between the metastable and ground state structures of the tellurium interstitial ($\rm Te_{i}^{-2}$) in cadmium telluride (\ce{CdTe}) lies in its coordination environment. While in the metastable configuration $\rm Te_i$ is tetrahedrally coordinated by other Te anions (distances of \SI{3.4}{\AA}), in the ground state the Te atoms rearrange to a split configuration, both occupying a hexagonal void and minimising interactions with neighbouring Te (distances of 3.5, 3.5, 3.6, \SI{4.0}{\AA}) (SI Fig.~S17 (c,d)). This reduction of unfavourable anion-anion interactions is again witnessed in the Madelung energy, which is 2 eV lower for the ground state, and drives an overall energy lowering of \SI{0.20}{eV}. Although these examples are primarily driven by optimising electrostatic interactions, the different distortion motifs in Fig.~3 are not mutually exclusive. Often several effects can contribute to a certain distortion, as observed for $\rm Cd_i^{+2}$ in CdTe, where the distortion leads to cation-anion rebonding (via explicit replacement of cation-cation bonds with cation-anion) but \emph{also} lowering the lattice electrostatic energy (by surrounding the interstitial with oppositely charged ions).

\begin{table}[ht]
    \begin{center}
    \caption{Electrostatically-driven reconstructions. Energy difference and summed atomic displacements ($\Sigma$Disp.) between the ground state identified by our method and the metastable configuration found when relaxing the ideal, undistorted defect structure (i.e. $\rm \Delta E = E_{\rm ground} - E_{\rm
    metastable}$).}
    \setlength{\tabcolsep}{8pt}
    \renewcommand{\arraystretch}{1.3}
    \label{tab:electrostatic}
    \begin{tabular}{cccc}
         \toprule
         Defect & Material &  $\Delta$E~(eV) & $\Sigma$Disp.~(\AA) \\
         \midrule
         $\rm Te_{i}^{-2}$  & \ce{CdTe} & -0.20  & 13.0  \\
         $\rm Cd_{i}^{+2}$ & \ce{CdTe} & -0.46 & 5.8 \\
         $\rm Be_{Ce}^{-2}$ + \kvc{V}{O}{+2} & \ce{CeO2} & -0.34  & 19.7 \\
         \botrule
    \end{tabular}
\footnotetext[1]{Metastable and ground state structures with bond distance labelling shown in SI Figs.~S17}
\end{center}
\end{table}

Beyond these motifs, our approach can also be employed to identify defect bound polarons, as exemplified in the supporting information for \kvc{V}{O}{0} in \ce{CeO2}, \kvc{V}{O}{0} and \kvc{Ti}{i}{0} in rutile \ce{TiO2}, and \kvc{V}{In}{-1} in \ce{In2O3} (SI Section VI). For ceria and rutile, the two electrons donated by the defect localise on lattice cations reducing them to Ce/Ti(III). This leads to many competing states depending on both the defect-polaron and polaron-polaron distances. While the different localisation arrangements are successfully identified by our approach, the complexity of the PES (hosting many competing low energy minima with small energy and structural differences) warrants further study.

\subsection{Impact on defect properties}
In this section we demonstrate how these reconstructions can affect calculated defect properties.
We take the charge transition level diagram for antimony vacancies in \ce{Sb2S3} as an exemplar, and compare the formation energies and defect levels calculated for the ground (\kv{V}{Sb}) and metastable states (\kvc{V}{Sb}{*}\!), for both symmetry-inequivalent vacancy positions (\kv{V}{Sb,1} and \kv{V}{Sb,2}; SI Fig. S7). As shown in \cref{fig:TLD_vac_sb,tab:dimer}, the highly favourable dimerisation reconstructions undergone by several charge states (+2, +1, 0, -1) significantly lower the formation energy of \kv{V}{Sb}, by 0.8 -- 2.6 eV depending on charge state. As a result, the predicted concentration under typical growth conditions (T = \SI{550}{K})\cite{Huang_more_2021} increases by $\exp(\frac{\Delta E}{k_BT}) \simeq$ \textbf{21} orders of magnitude for \kvc{V}{Sb,2}{+1} (SI Table IV). Furthermore, the reconstructions also affect the \emph{nature} and \emph{position} of the charge transition levels. The neutral state of \kv{V}{Sb,2} is now predicted to be thermodynamically unfavourable at all Fermi levels, which leads to the disappearance of the (+1/0) and (0/-3) transition levels (\cref{fig:TLD_vac_sb}).
Similarly, for \kv{V}{Sb,1}, the reconstructions render the singly-positive vacancy stable within the bandgap, resulting in two new transition levels ((+2/+1) and (+1/-1)) (\cref{fig:TLD_vac_sb}, SI Table V).

\begin{figure}[ht]
    \centering
    \includegraphics[width=1.0\linewidth]{figures/Sb2S3/TLD_kumagai_s_rich.png}
    \caption{Defect formation energy (left) and vertical energy level (right) diagram for the antimony vacancies in \ce{Sb2S3}, under sulfur rich conditions\cite{lian_revealing_2021} ($\mu_{\rm S}$ = 0, $\mu_{\rm Sb}$=-\SI{0.55}{eV}).
    The two symmetry inequivalent sites are depicted in purple (\kv{V}{Sb,1}) and gold (\kv{V}{Sb,2}). For each site, the ground state structures are shown with solid lines (\kv{V}{Sb}), while the metastable states are shown with faded dotted lines (\kvc{V}{Sb}{*}). The valence band maximum (VBM) and conduction band minimum (CBM) are shown in blue and orange, respectively.}
    \label{fig:TLD_vac_sb}
\end{figure}
More significant, however, is the change in the energetic position of the levels. The greater stabilisation of the positive charge states, leads to the levels shifting \emph{deeper} into the bandgap (SI Table V). For instance, the (-1/-3) transition of \kv{V}{Sb,1} shifts 0.3 eV higher in the bandgap, revealing it to be a highly amphoteric defect with strong self-charge-compensating character (\cref{fig:TLD_vac_sb}) -- in fact now aligning with the behaviour of the other intrinsic defects in \ce{Sb2(S/Se)3}\cite{Cai_2020,guo_scalable_2019}. This change in the position of the transition levels can have important consequences when modelling defects in photovoltaic materials, as mid-gap states often act as carrier traps that promote non-radiative electron-hole recombination and decrease performance.
This deep, amphoteric character of the antimony vacancies was missed by previous theoretical studies on \ce{Sb2S3} defects,\cite{Cai_2020,guo_scalable_2019} due to the local minimum trapping which our approach aims to combat, giving significantly underestimated concentrations and shallower transition levels. Overall, this demonstrates the potent sensitivity of predicted concentrations and transitions levels on the underlying defect structures, highlighting the crucial importance of correct defect structure identification for quantitative and reliable defect modelling.

Beyond thermodynamic properties, these reconstructions can also affect calculated rates of non-radiative electron/hole capture. Indeed, charge capture rates depend intimately on the structural PESs of the charge states involved, as well as the position of the transition level. This effect has been recently demonstrated for the neutral cadmium vacancy in CdTe\cite{Kavanagh_2021} as well as for the neutral lead interstitial in \ce{CH3NH3PbI3}\cite{Zhang_2020} (MAPI). For the latter, the timescale of non-radiative charge recombination varies by an order of magnitude depending on whether the Pb interstitial forms a dimer (ground state structure) or remains in a non-bonded position (metastable configuration).
Moreover, even when defect reconstructions do not lower the energy significantly, this can still result in completely different capture behaviour, as observed for the tellurium interstitial in CdTe\cite{kavanagh2022impact} and the sulfur substitution in silicon\cite{Cai_2021}. For $\rm S_{Si}$, a small structural distortion (with a negligible energy difference) significantly affects its capture behaviour, giving a capture rate now in agreement with experiment\cite{Cai_2021} and once again highlighting the critical role of exploring the defect configurational landscape.

\subsection{Locating metastable structures}
Thus far, we have focused on atomic reconstructions that lower the energy and lead to a new \emph{ground state} structure, which is missed with a standard relaxation from the high symmetry geometry.
While defect properties such as doping are often determined by the ground state configuration, low energy metastable structures can also be important to performance in device applications. For instance, they often represent transition states in the ion migration process\cite{Krasikov_2018} (crucial for battery materials and semiconductor doping), and can impact non-radiative carrier recombination in solar cells and LEDs, behaving as intermediate species to the charge trapping process\cite{Kavanagh_2021,Yang_2016,kavanagh2022impact}. They can produce anomalous properties, such as persistent photo-conductivity and photo-induced capacitance quenching in semiconductors\cite{Coutinho_2020}.
Accordingly, we investigated the ability of our approach to locate relevant low-energy metastable configurations by considering the DX centres in GaAs (\kvc{Si}{Ga}{-1}, \kvc{Sn}{Ga}{-1}, \kvc{S}{As}{-1}, \kvc{Te}{As}{-1}).

For Si, Sn and Te impurities, our method successfully identifies all low-energy metastable structures reported by previous studies,\cite{MaoHua_2005,Kim_2019,Dobaczewski_1995,Yamaguchi_1991,Li_2005,Saito_1992,Kundu_2019} while for S, it identifies two of the three structures previously found.\cite{Du_dx_2005,Kundu_2019}
For instance, in the case of Si, we correctly identify the broken bond configuration (DX-BB)\cite{MaoHua_2005,Kim_2019,Dobaczewski_1995,Yamaguchi_1991,Li_2005,Saito_1992}, which entails a $C_{3\textrm{v}}$ Jahn-Teller distortion with the dopant displacing along the [111] direction thereby breaking a Si-As bond (\cref{fig:group_IV_dopants} (b)). We find it to lie 0.34 eV higher in energy than the ground state $T_d$ configuration (\cref{tab:DX_centres}), in agreement with earlier local DFT (LDA) calculations which found it \SI{0.5}{eV} higher in energy\cite{MaoHua_2005,Li_2005}.
A similar bond-breaking $C_{3\textrm{v}}$ distortion is also found for the other group IV dopant (Sn), though now with two possible low energy configurations (DX-BB-$\alpha$ and DX-BB-$\beta$). While the former corresponds to the conventional DX behaviour with major off-centring of the dopant atom, in the latter it is mainly a neighbouring As which displaces to an interstitial position (\cref{fig:group_IV_dopants} (d, e)). We find the $\alpha$ configuration to lie slightly lower in energy than $\beta$ (\SI{0.26}{eV} vs \SI{0.41}{eV} above the $T_d$ ground state) (\cref{tab:DX_centres}), agreeing with previous local DFT calculations which found DX-$\alpha$ to be \SI{0.4}{eV} higher in energy than $T_d$\cite{MaoHua_2005}.

\begin{figure}[ht]
    \centering
    \includegraphics[width=0.9\textwidth]{figures/GaAs/gaas_dopant_IV.png}
    \caption{Ground state ($T_d$) and low energy metastable configurations identified for \kvc{Si}{Ga}{-1} and \kvc{Sn}{Ga}{-1} in GaAs. The DX-BB (DX-BB-$\alpha$) configuration consists of a $C_{3\textrm{v}}$ distortion, where Si (Sn) displaces away from the original Ga position, breaking a dopant-As bond.  In the DX-BB-$\beta$ configuration, a Sn-As bond is also broken, but in this case As undergoes the largest displacement.
    Si in blue, Sn in grey and As in purple. The arrows illustrate how the atoms reconstruct from the $T_d$ configuration and the black spheres depict the original position of the displaced atoms in the $T_d$ structure. }
    \label{fig:group_IV_dopants}
\end{figure}

Regarding the sulfur dopant, there are several metastable configurations. Similar to the other species, it can adopt a broken bond arrangement (DX-BB, \cref{fig:group_vi_dopants} (b)), where one of the dopant neighbours displaces off-site and breaks a S-Ga bond. In addition, it can adopt two configurations with cation-cation bonding (CCB) -- corresponding to dimerisation reconstructions. As depicted in \cref{fig:group_vi_dopants}, two of the neighbouring Ga can displace towards each other and form a Ga-Ga bond (\SI{2.5}{\AA}), with the dopant remaining either in the original position (DX-CCB-$\alpha$) or displacing slightly off-site (DX-CCB-$\beta$). The dimer (DX-CCB) configurations are found to be more favourable than the broken bond (DX-BB) one, with energies of \SI{0.30}{eV} (DX-CCB-$\alpha$, DX-CCB-$\beta$) and \SI{0.44}{eV} (DX-BB) relative to the ground state $T_d$ structure. Again, these results agree with previous local DFT (LDA) calculations, which found relative energies of \SI{0.5}{eV} for DX-CCB ($\alpha$ \& $\beta$) and \SI{0.6}{eV} for DX-BB, relative to $T_d$\cite{Du_dx_2005,Kundu_2019}.
We note that our method did not locate the DX-CCB-$\beta$ arrangement, likely due to a soft PES (with an energy barrier of only \SI{25}{meV} between alpha and beta, SI Section VIII), the close similarity of structure and energies for DX-CCB-$\alpha/\beta$, and the bias toward \emph{ground state} configurations. This highlights a limitation of our approach, where identifying several \emph{metastable} defect structures on a complex PES may require a more exhaustive exploration (e.g. distorting different number of neighbours or using a denser grid of distortions).
\begin{figure}[ht]
    \centering
    \includegraphics[width=0.9\textwidth]{figures/GaAs/gaas_dopants_VI.pdf}
    \caption{Ground state ($T_d$) and low-energy metastable configurations (DX-BB, DX-CCB-$\alpha$ and DX-CCB-$\beta$) identified for \kvc{S}{As}{-1} and \kvc{Te}{As}{-1} in GaAs.  In the DX-BB configuration, a dopant-Ga bond is broken,
    while the DX-CCB configurations correspond to cation-cation bond (CCB) formation.
    S in yellow, Te in gold, Ga in green and As in purple.
    }
    \label{fig:group_vi_dopants}
\end{figure}

Finally, for \kvc{Te}{As}{-1}, we identify DX-BB as the lowest energy metastable structure (\cref{fig:group_vi_dopants} (f)), in agreement with previous theoretical\cite{MaoHua_2005,Kundu_2019} and experimental\cite{Dobaczewski_1995} studies.
We calculate an energy difference of \SI{0.25}{eV} between the metastable $C_{3\textrm{v}}$ and ground state $T_d$ configurations, similar to the value of \SI{0.38}{eV} obtained with local DFT\cite{MaoHua_2005}. Overall, these results demonstrate the ability of the method to identify low-energy metastable configurations at negligible additional cost.

\begin{table}[ht]
    \centering
    \caption{Energy difference and summed atomic displacements ($\Sigma$Disp.) between the identified metastable configurations and the ground state $T_d$ for the DX centres in GaAs. For $\rm S_{As}^{-1}$, we include a configuration not found by our method (DX-CCB-$\beta$*) but reported in a previous study\cite{Kundu_2019}.}
    \label{tab:DX_centres}
    \setlength{\tabcolsep}{7pt}
    \renewcommand{\arraystretch}{1.4}
    \begin{tabular}{ccccc}
         \toprule
         Defect & Ground state & Metastable & $\Delta$E~(eV) & $\Sigma$Disp.~(\AA) \\
         \midrule
         $\rm Si_{Ga}^{-1}$  & $T_d$ & DX-BB & 0.34 & 2.0 \\
         \hline
         \multirow{2}{*}{$\rm Sn_{Ga}^{-1}$}  & \multirow{2}{*}{$T_d$}
         & DX-BB-$\alpha$ & 0.26 & 2.7 \\
         & & DX-BB-$\beta$ & 0.41 & 2.0 \\
         \hline
         \multirow{3}{*}{$\rm S_{As}^{-1}$}
         & \multirow{3}{*}{$T_d$} & DX-BB & 0.44 & 1.4 \\
         & & DX-CCB-$\alpha$ & 0.30 & 4.6 \\
         & & DX-CCB-$\beta$* & 0.30 &  5.5 \\
         \hline
         $\rm Te_{As}^{-1}$  & $T_d$ & DX-BB & 0.25 & 1.9\\
         \botrule
    \end{tabular}
\end{table}

\section{Conclusions}
In summary, we present a method to explore the configurational space of point defects in solids and identify ground state and low-energy metastable structures. Based on the defects tested, if computational resources only allow limited calculations to be performed, we suggest structural perturbations of $\pm30\%$ using our method provides a higher chance of finding the true ground state defect configuration over starting from the unperturbed bulk structure. Beyond its simplicity and automated application, the low computational cost and the lack of system-dependent parameters make it more practical than current alternative structure-searching methods (comparisons are provided in SI Section IV). The applicability to both standard and high-throughput defect investigations is demonstrated by the range of materials studied herein.

By exploring a variety of defects and materials, the key physico-chemical factors that drive defect reconstructions were also highlighted.
For systems with mixed ionic-covalent bonding (such as those involving the Ge, Sn, Sb, Bi cations), we expect `rebonding' reconstructions to prevail, with the defect neighbours displacing to yield novel homoionic (dimer) or heteroionic (cation-anion) bonds. Furthermore, if the crystals also display low symmetry (e.g. one-dimensional connectivity in SbSeI, SbSI, and SbSBr), these reconstructions will likely be more significant and prevalent, as exemplified by the antimony chalcogenides (\ce{Sb2(S/Se)3}).
Here, its open and flexible structure hosts several coordination environments, with the empty spaces between the chains enabling atomic displacements without major strain on neighbouring sites, yielding many energy-lowering reconstructions away from the high-symmetry local minimum.
Notably, through the introduction of new bonds, these reconstructions can stabilise unexpected charge states, highlighting the impact on the \emph{qualitative} behaviour of defects.
For crystals with stronger ionic character, distortions can either be driven by novel homoionic bonds (peroxides in \ce{In2O3}, \ce{ZnO} and \ce{TiO2}) or Jahn-Teller/crystal field stabilisation effects (\ce{CeO2}). Finally, optimising ionic interactions can also result in energy lowering rearrangements, especially for cases of significant size mismatch between dopant and host atoms, or for interstitials, which distort to minimise Coulombic repulsion with neighbouring ions.

Regarding future improvements, the approach could be enhanced with a machine learning model, which could identify subsets of likely reconstructions to improve sampling efficiency. Similarly, local symmetry analysis could be incorporated to suggest potential subgroup distortions from the initial point group symmetry (e.g. $T_d \rightarrow C_{3\textrm{v}}$, $C_{2\textrm{v}}$, $D_{2\textrm{d}}$ ...) and then generate distorted structures based on this. This feature would likely be ill-suited for low-symmetry materials such as \ce{Sb2(S/Se)3}, however, as the wide range of symmetry-inequivalent distortions could become prohibitively expensive to compute with accurate levels of theory.

Overall, our results demonstrate the prevalence of energy-lowering reconstructions for defects, that are often missed through local optimisation from a high symmetry configuration. The major structural and energetic differences highlight the crucial impact on defect properties.
Beyond thermodynamic properties, the modification of the structural PES will completely change recombination, absorption and luminescence behaviour. Consequently, navigating the configurational landscape is key for accurate predictions of defect properties and their impact on materials performance, ranging from energy technologies (thermoelectric/photovoltaic efficiency, battery conductivity and catalytic activity) to defect-enabled applications such as lasing and quantum computing.

\backmatter
{\bf Supplementary information.}
Computational details; Parameter optimisation of the defect structure searching approach; Comparison with other structure searching approaches; Figures of the metastable and ground state structures for the identified energy lowering distortions; Application of the method to defect bound polarons; Concentrations and charge transition levels predicted for the ground state and metastable structures of antimony vacancies in \ce{Sb2S3}; Energy barrier between the DX-CCB-$\alpha$ and DX-CCB-$\beta$ configurations of $\rm S_{As}^{-1}$ in GaAs.

\section*{Declarations}
{\bf Data \& code availability.}
The code used to generate and analyse defect distortions is available from \url{https://github.com/SMTG-UCL/ShakeNBreak}.
The identified ground state and metastable structures are available from the Zenodo repository with DOI 10.5281/zenodo.6558244.

{\bf Author contributions.}
Conceptualisation \& Project Administration: Seán R. Kavanagh, David O.Scanlon. Investigation and methodology: Irea Mosquera-Lois, Seán R. Kavanagh. Supervision: Seán R. Kavanagh, Aron Walsh, David O. Scanlon. Writing - original draft: Irea Mosquera-Lois. Writing - review \& editing: All authors. Resources and funding acquisition: Aron Walsh, David O. Scanlon. These author contributions are defined according to the CRediT contributor roles taxonomy.

{\bf Acknowledgments.}
I.M.L. thanks La Caixa Foundation for funding a postgraduate scholarship (ID 100010434,  fellowship code LCF/BQ/EU20/11810070).
S.R.K. acknowledges the EPSRC Centre for Doctoral Training in the Advanced Characterisation of Materials (CDT-ACM)(EP/S023259/1) for funding a PhD studentship. DOS acknowledges support from the EPSRC (EP/N01572X/1) and from the European Research Council, ERC (Grant No. 758345).
Via membership of the
UK’s HEC Materials Chemistry Consortium, which is funded
by the EPSRC (EP/L000202, EP/R029431, EP/T022213),
this work used the UK Materials and
Molecular Modelling (MMM) Hub (Thomas EP/P020194
and Young EP/T022213).

{\bf Competing interests.}
The authors declare no competing interests.

\section{Computational details}\label{sec:comp_details}
\renewcommand{\arraystretch}{0.8}
\begin{table}[ht]
	\begin{center}
		\caption{Computational parameters used for each material: basis set energy cut-off, {\bf k}-point grid for bulk (b) structure and supercell (s) defect calculations, supercell expansions of either the primitive (p) or the conventional (c) unit cells, percentage of exact HF exchange ($\alpha$) used within the HSE hybrid DFT functional and the valence electrons considered for each element. The scheme of Grimme et al.\cite{Grimme_2010} (D3) was included to account for the van der Waals interactions present in \ce{Sb2S/Se3}.}
		\label{tab:bulk_struct_computational_details}
		\setlength{\tabcolsep}{6pt}
		\renewcommand{\arraystretch}{1.30}
		\begin{tabular*}{\textwidth}{ccccll}
			\hline \hline
			{\bf Material} & {\bf Cut-off (eV)} & {\bf k-grid} &{\bf Supercell}
			&  {\bf $\bf \alpha$\%} &
			{\bf Valence electrons} \\
			\hline
			CdTe & 450 &
			\begin{tabular}{l}
				4,4,4 (b,c) \\
				2,2,2 (s)
			\end{tabular}
			& 2,2,2 (c)
			& 0.345 &
			\begin{tabular}{l}
				Cd: $\rm 4d^{10} 5s^{2}$ \\
				Te: $\rm 5s^2 5p^4$
			\end{tabular}
			\\
			\hline
			GaAs &300&
			\begin{tabular}{l}
				7,7,7 (b,p) \\
				2,2,2 (s)
			\end{tabular}
    		& 3,3,3 (p)
    		& 0.280 &
			\begin{tabular}{l}
    			Ga: $\rm 3d^{10} 4s^2 4p^1$ \\
    			As: $\rm 3s^2 3p^3$ \\
            	Si: $\rm 3s^2 3p^2$ \\
            	Sn: $\rm 5s^{2} 4d^{10} 5p^2$\\
            	S: $\rm 3s^2 3p^4$ \\
            	Te: $\rm 5s^2 5p^4$
			\end{tabular}
			\\
			\hline
			\ce{CeO2}  & 550 &
			\begin{tabular}{l}
				4,4,4 (b,c) \\
				2,2,2 (s)
			\end{tabular}
			& 2,2,2 (c)
		    & 0.250
		    &\begin{tabular}{l}
				Ce: $\rm 5s^2 5p^6 4f^1 5d^1 6s^2$ \\
				O: $\rm 2s^2 2p^4$ \\
				Be: $\rm 2s^2$\\
				Ni: $\rm 3d^9 4s^1$\\
				Pd: $\rm 4d^{10} $\\
				Pt: $\rm 5d^9 6s^1$\\
				Cu: $\rm 3d^{10} 4s^1$
    		\end{tabular}
    		\\% conventional cell
    		\hline
    		\ce{Sb2Se3} & 300 &
    		\begin{tabular}{l}
				4,2,2 (b,c)\\
				2,2,2 (s)
			\end{tabular}
			& 3,1,1 (c) & 0.250 + D3\tnote{a}& 	\begin{tabular}{l}
				Sb: $\rm 5s^2 5p^3$ \\
				Se: $\rm 4s^2 4p^4$
			\end{tabular} \\
			\hline
			\ce{Sb2S3} &  300 &
			\begin{tabular}{l}
				3,2,2 (b,c)\\
                1,2,2 (s)
			\end{tabular}
			& 3,1,1 (c) & 0.250 + D3\tnote{a}&
			\begin{tabular}{l}
				Sb: $\rm 5s^2 5p^3$ \\
				S: $\rm 3s^2 3p^4$ \\
			\end{tabular} \\
			\hline
			\ce{In2O3} &  500 &
			\begin{tabular}{l}
				 3,3,3 (b,c)\\
                 3,3,3 (s)
			\end{tabular}
			& 1,1,1 (c) & 0.250&
			\begin{tabular}{l}
				In: $\rm 4d^{10} 5s^2 5p^1$ \\
				O: $\rm 2s^2 2p^4$ \\
			\end{tabular} \\
			\hline
			\ce{ZnO} &  500 &
			\begin{tabular}{l}
				 12,12,6 (b,c)\\
                 4,4,3 (s)
			\end{tabular}
			& 3,3,2 (c) & 0.250 &
			\begin{tabular}{l}
				Zn: $\rm 3d^{10} 4s^2$ \\
				O: $\rm 2s^2 2p^4$
			\end{tabular} \\
			\hline
			\ce{Si} &  300 &
			\begin{tabular}{l}
			4,4,4 (b,c)\\
			2,2,2 (s)
			\end{tabular}
			& 2,2,2 (c) & 0.110 &
			\begin{tabular}{l}
				Si: $\rm 3s^{2} 3p^2$
			\end{tabular} \\
			\hline
			\ce{a-\ce{TiO2}} &  500 &
			\begin{tabular}{l}
			4,4,2 (b,c)\\
			2,2,2 (s)
			\end{tabular}
			& 3,3,1 (c) & 0.250 &
			\begin{tabular}{l}
				Ti: $\rm 3p^{6} 3d^2 4s^2$\\
				O: $\rm 2s^2 2p^4$
			\end{tabular} \\
			\hline
			\ce{r-\ce{TiO2}} &  500 &
			\begin{tabular}{l}
			4,3,3 (b,c)\\
			2,2,2 (s)
			\end{tabular}
			& 4,2,2 (c) & 0.250 &
			\begin{tabular}{l}
				Ti: $\rm 3p^{6} 3d^2 4s^2$\\
				O: $\rm 2s^2 2p^4$
			\end{tabular} \\
	\hline\hline
\end{tabular*}
\end{center}
\end{table}

\newpage
\section{Bulk crystals}
\renewcommand{\arraystretch}{1.2}
\begin{table}[ht]
\begin{center}
		\caption{Calculated lattice parameters (in \AA) of the conventional cells for the studied materials and
		percentage differences from the experimental lattice parameters.}
		\label{tab:bulk_struct_parametes}
		\setlength{\tabcolsep}{8pt}
		\renewcommand{\arraystretch}{1.30}
		\begin{tabular}{cccccccc}
			\hline \hline
			{\bf Material} & {\bf a} & {\bf $\Delta$a\%} &{\bf b} & {\bf $\Delta$b\%} & {\bf c} & {\bf $\Delta$c\%} & {\bf Ref.} \\
			\hline
			CdTe & 6.543 & 1 & 6.543& 1 & 6.543 & 1 & Strauuss\cite{Strauss_1977}
			\\
			\hline
			GaAs &5.662& -0.1 & 5.662& -0.1& 5.662 &-0.1  & Madelung\cite{Madelung2004}
			\\
            \hline
			\ce{CeO2} \tnote{1} & 5.394 & -0.3 &5.394 &-0.3 & 5.394 & -0.3  & Rossignol\cite{Rossignol_2003}
			\\
			\hline
			\ce{Sb2Se3} & 3.961 & -0.6 & 11.494 & -1.3 & 11.928 & 1.1 & Voutsa\cite{Voutsas_1985}	\\
			\hline
			\ce{Sb2S3} & 3.841 & 0.1 &  11.063 & -1.5 & 11.362 & 0.4 & Bayliss\cite{Bayliss}	\\
			\hline
			\ce{In2O3} & 10.205 & 0.8 &  10.205 & 0.8 & 10.205 & 0.8 & González\cite{Gonzalez_2001}	\\
			\hline
			\ce{ZnO} & 3.25 & -0.04 & 3.25  & -0.04 & 5.20 & -0.18 & Kisi\cite{Kisi_1989}	\\
			\hline
			Si & 5.449 & 0.3 & 5.449 & 0.3 & 5.449 & 0.3 & Bond\cite{Bond_1960}\\
			\hline
			a-\ce{TiO2} & 3.774 & -0.3 & 3.774 & -0.3 & 9.579 & 0.7& Burdett\cite{Burdett_1987}\\
			\hline
			r-\ce{TiO2} & 2.950 & -0.3 & 4.597 & 0.05 & 4.597 & 0.05 & Shiiba\cite{Shiiba_2010}\\
			\hline \hline
		\end{tabular}
\end{center}
\end{table}

\newpage
\section{Defect Structure Searching (\texttt{ShakeNBreak}) approach: Parameter optimisation}
\begin{figure}[ht]
    \centering
    \includegraphics[width=1.0\textwidth]{BDM_parameters_tests/V_Te_heatmap.pdf}
    \caption{Relative energy of final structures for \kvc{V}{Te}{0} in CdTe (either `Cd dimer' (-0.3 eV), `Tetrahedral' (0 eV) or a $\rm C_{3\textrm{v}}$ reconstruction (-0.1 eV)), for different rattle standard deviations ({\bf a}) and number of distorted defect neighbours ({\bf b}). The wider interval of bond distortions leading to the defect ground state is obtained with  a standard deviation of 0.25 \AA ~localised to the atoms within 5 \AA ~from the defect ($0.25_{\rm loc}$). Regarding the number of neighbours, best performance is obtained when distorting two cadmium atoms, as expected considering that the defect has two extra electrons in the Cd dangling bonds.}
    \label{fig:BDM_param_opt_V_Te}
\end{figure}

\begin{figure}[ht]
    \centering
    \includegraphics[width=1.0\textwidth]{BDM_parameters_tests/V_Sb,2_heatmap.pdf}
    \caption{Relative energy of final structures for \kvc{V}{Sb,2}{0} in \ce{Sb2S3} (either `S dimer' (-1.25 eV) or `High-symmetry' configuration (0 eV)), for different rattle standard deviations ({\bf a}) and number of distorted defect neighbours ({\bf b}). Here, the bond distortion parameters have a minor influence (with two and three distorted neighbours performing slightly better), which suggests that any symmetry breaking is enough to escape the local minimum and find the favourable `S dimer' configuration.}
    \label{fig:BDM_param_opt_V_Sb}
\end{figure}

\begin{figure}[ht]
    \centering
    \includegraphics[width=1.0\textwidth]{BDM_parameters_tests/S_i_-1_heatmap.pdf}
    \caption{Relative energy of final structures for $\rm S_{i}^{-1}$ in \ce{Sb2S3} (either two different arrangements of `S dimer' (\SI{-0.55}{eV}, \SI{-0.38}{eV}) or weak S-Sb coordination (\SI{0}{eV})), for different rattle standard deviations ({\bf a}) and number of distorted defect neighbours ({\bf b}). Notably, the lowest energy structure is only obtained when applying a total rattle standard deviation of \SI{0.25}{\AA}. In this case, the number of distorted neighbours seems to have a minor role -- with three and one performing slightly better.}
    \label{fig:BDM_param_opt_S_i}
\end{figure}

\subsection{Comparison of local and total rattle}
\begin{figure}[ht]
\centering
    \begin{subfigure}{0.45\linewidth}
    \centering
    \includegraphics[width=\textwidth]{BDM_parameters_tests/V_Sb,2_0_rattle_local_total.pdf}
    \caption{\small $V_{\rm Sb}^0$}
    \end{subfigure}
    \begin{subfigure}{0.45\linewidth}
    \centering
    \includegraphics[width=\textwidth]{BDM_parameters_tests/S_i_-1_rattle_local_total.pdf}
    \caption{$\rm S_{\rm i}^{-1}$}
    \end{subfigure}
    \caption{\small Total number of ionic steps for each bond distortion with a local (restricted to 5 \AA~ sphere about the defect, $\sigma = 0.25$) and a total rattle ($\sigma = 0.25$) in the relaxation of $V_{\rm Sb}^0$ (a) and $\rm S_{\rm i}^{-1}$ (b) in \ce{Sb2S3}. Surprisingly, the local rattle does not lead to a significant decrease in the number of ionic steps compared to its total counterpart.} \label{fig:ionic_steps_local_total_rattle}
\end{figure}

\section{Comparison with other structure searching approaches}
To compare the performance of our method with existing approaches in the literature, it was applied to the neutral silicon self-interstitial and the neutral oxygen vacancy in anatase. These systems were selected as they were previously investigated using the evolutionary approach of Arrigoni and Madsen.\cite{Arrigoni_evolutionary_2021}
\subsection{Silicon self-interstitial}
The high technological relevance of the silicon self-interstitial has motivated a large number of studies on its structural and migration properties. These have identified several low energy configurations: Si in an tetrahedral interstitial ($\rm Si_T$), Si in a hexagonal interstitial ($\rm Si_H$) and the split $<110>$ configuration ($\rm Si_{<110>}$), where two Si move from their original site and form a dumbbell configuration along the $<110>$ direction\cite{Centoni_2005,Ganchenkova_2015,Lee_1998,Needs_1999,Stewart_2020,Rinke_2009,Bruneval_2012,Gao_2013,Budde_1998,Al-Mushadani_2003,Al-Mushadani_2003,Mattsson_2008,Leung_1999}. These are shown in \cref{fig:Si_i}. Previous studies agree that the hexagonal and split configurations are the most stable, differing by a small energy difference (order of meV), with the latter likely corresponding with the ground state\cite{Budde_1998,Al-Mushadani_2003,Morris_2008,Centoni_2005,Bloch_1993,Bar-Yam_1984}. Significantly higher in energy lies the tetrahedral structure ($\approx0.4$ eV) \cite{Morris_2008,Rinke_2009,Bruneval_2012,Gao_2013}.

\begin{figure}[ht]
	\hspace*{\fill}
	\begin{subfigure}[b]{0.30\textwidth}
		\includegraphics[width=\textwidth]{Si_i/Int_Si_1_Td.png}
		\caption{$\rm Si_T$}
	\end{subfigure}
	\hspace*{\fill}
	\begin{subfigure}[b]{0.30\textwidth}
		\includegraphics[width=\textwidth]{Si_i/Int_Si_1_0_Unperturbed_selection.png}
		\caption{$\rm Si_H$}
	\end{subfigure}
	\hspace*{\fill}
	\begin{subfigure}[b]{0.3\textwidth}
		\includegraphics[width=\textwidth]{Si_i/Int_Si_1_0_-50_selec.png}
		\caption{$\rm Si_{<110>}$}
	\end{subfigure}
	\hspace*{\fill}
	\caption{\small Lowest energy structures for the silicon self-interstitial: a) $\rm Si_T$ b) $\rm Si_H$ and c) $\rm Si_{<110>}$. The silicon interstitial is shown with a different pattern and the original tetrahedral position is shown in grey.} \label{fig:Si_i}
\end{figure}

By applying our method, we identified the two lowest energy structures, thereby exhibiting similar results to the evolutionary approach of Arrigoni and Madsen, yet with a simpler implementation. In agreement with their result, we identified the ground state as the hexagonal configuration. We find it to lie 7 meV lower in energy than the split arrangement, opposed to their result of 23 meV using local DFT (LDA) and $\boldsymbol{\Gamma}$-point only {\bf k}-point sampling. As expected, the latter agrees better with our initial result (31 meV), obtained prior to optimising the final structures with a denser {\bf k}-mesh. On this point, it is noteworthy how the approximate exploration of the PES (i.e. the $\boldsymbol{\Gamma}$-point approximation) qualitatively described the landscape despite the minute energy differences between local minima. These minor energy differences between structures explain the debate across different studies (and energy functionals) regarding the actual ground state.\cite{Leung_1999,Rinke_2009,Arrigoni_2021,Morris_2008,Mattsson_2008} Semi-local functionals often favour the split configuration\cite{Morris_2008,Mattsson_2008,Centoni_2005,Al-Mushadani_2003,Bloch_1993,Bar-Yam_1984}, while higher levels of theory (QMC\cite{Leung_1999} or \ce{G_0W_0} corrections\cite{Rinke_2009}) agree that the hexagonal structure lies lower in energy, by 160 and 60 meV, respectively.\\
Finally, we note that a tetrahedral configuration ($\rm Si_T$) was found to have no local stability with our hybrid DFT functional, with unperturbed relaxation of this initial geometry without symmetry constraints yielding the hexagonal arrangement ($\rm Si_H$), as also reported in other studies\cite{Leung_1999}.

\subsection{Neutral oxygen vacancy in anatase}
The key role of anatase in photo-catalysis\cite{Schneider_2014,Linsebigler_1995}, solar cells\cite{Gratzel_2011,Bach_1998}, spintronic devices\cite{Janisch_2005} and as a promising transparent conductive oxide\cite{Hitosugi_2005,Furubayashi_2005} have motivated intense study of its intrinsic defects\cite{Na-Phattalung_2006}. In particular, significant efforts have been dedicated to the oxygen vacancy\cite{Bouzoubaa_2005,Shao_2014,Setvin_2014,Morgan_2010,Morgan_2009,Finazzi_2008,Mattioli_2008,Deak_2011,Deak_2012,Arrigoni_2020,Yang_2010}, as it renders intrinsic anatase n-type\cite{Deak_2015}.
Several studies\cite{Morgan_2009,Arrigoni_2020,Finazzi_2008,Mattioli_2008} have reported two possible configurations: the simple vacancy (analogous to the ideal defect structure, Fig. \ref{fig:V_O^0} (a)) and the split configuration, where one of the neighbouring oxygen atoms moves towards the vacancy (Fig. \ref{fig:V_O^0} (b));
with the latter lying 0.38 eV lower in energy (using HSE(15\%))\cite{Arrigoni_2020}.
In terms of the electronic structure, the former is characterised by two localised electrons in the vacancy site while for the latter, one electron is localised on a neighbouring Ti while the other one is excited to a delocalised conduction band state.
Notably, this lower energy configuration has been missed by previous hybrid studies\cite{Deak_2012,Boonchun_2016}, as a standard relaxation from the ideal structure gets trapped on the simple vacancy basin.

\begin{figure}[ht]
	\hspace*{\fill}
	\begin{subfigure}[b]{0.21\textwidth}
		\includegraphics[width=\textwidth]{V_O_anatase/Unperturbed_simple.png}
		\caption{Simple \ce{V_{O}^0}}
	\end{subfigure}
	\hspace*{\fill}
	\begin{subfigure}[b]{0.22\textwidth}
		\includegraphics[width=\textwidth]{V_O_anatase/0.0_BDM_split_NUP_2.png}
		\caption{Split \ce{V_{O}^0}}
	\end{subfigure}
	\hspace*{\fill}
	\begin{subfigure}[b]{0.22\textwidth}
		\includegraphics[width=\textwidth]{V_O_anatase/0.0_BDM_NUP_0_delocalized}
		\caption{Delocalised \ce{V_{O}^0}}
	\end{subfigure}
	\hspace*{\fill}
	\caption{\small Lowest energy structures for the neutral oxygen vacancy in anatase \ce{TiO2}: a) Simple \ce{V_{O}^0} b) Split \ce{V_{O}^0} and c) Delocalised \ce{V_{O}^0}. Ti atoms in blue, O in red, \ce{V_{O}} in black and displaced O neighbours represented with a different pattern.} \label{fig:V_O^0}
\end{figure}

By applying their evolutionary algorithm, Arrigoni and Madsen identified, besides these structures,
a new metastable configuration, termed the delocalised vacancy since the two electrons are delocalised in the conduction band (Fig. \ref{fig:V_O^0} (c)).
Lying 59 meV higher in energy than the split structure, it is characterised by two neighbouring oxygen atoms moving towards the vacancy.
These reduce their bond lengths from an initial value of 2.45 \AA~to 2.12 and 2.21 \AA. In comparison, our method also identified these structures, finding the simple vacancy and delocalised vacancy to lie 0.37 and 0.03 eV higher in energy than the split structure, respectively -- in good agreement with the result of Arrigoni (0.38, 0.06 eV).
Hence, both approaches rendered similar configurations and relative stabilities.

\section{Symmetry breaking reconstructions}
\begin{figure}[ht]
    \centering
    \includegraphics[width=0.5\textwidth]{Sb2S3_diagram}
    \caption{\small The crystal structure of \ce{Sb2S3} (and \ce{Sb2Se3}) comprises chains of [\ce{Sb4S6}]$\rm _{n}$ ([\ce{Sb4Se6}]$\rm _{n}$) (termed ribbons), which are bonded by weak van der Waals forces (dashed lines). Each ribbon has two and three symmetry inequivalent sites for antimony and sulfur, respectively, with the Sb cations occupying the centre of a pyramid formed by the closest S anions.}
    \label{fig:diagram_Sb2S3}
\end{figure}

\subsection{Rebonding: dimerisation}

\begin{figure}
    \includegraphics[width=0.8\linewidth]{reconstructions/cation_cation_dimers.pdf}
    \caption{Ground state (left: a,c) and metastable (right: b,d) structures identified by our method and by relaxing the high-symmetry configuration, respectively, for cation-cation dimerisation. (Energies and displacements reported in Table 1). Vacancy in black, Cd in blue, Sb in orange and S in yellow.}
    \label{fig:structs_cation_cation}
\end{figure}

\begin{figure}[ht]
	\includegraphics[width=0.75\linewidth]{reconstructions/anion_anion_dimers.pdf}
    \caption{Ground state (left: a,c,e,g,i) and metastable (right: b,d,f,h,j) structures identified by our method and by relaxing the high-symmetry configuration, respectively, for anion-anion dimerisation. (Energies and displacements reported in Table 1). Te in gold, Sb in orange, S in yellow and Se in green. Vacancy shown in shaded black and $\rm S_i$ displayed in a different pattern. Pseudo-bonds between a vacancy and its neighbours shown with dotted lines, and distances in \AA.}
    \label{fig:structs_anion_anion}
\end{figure}

\begin{figure}[ht]
    \includegraphics[width=0.7\linewidth]{reconstructions/anion_anion_peroxides.pdf}
    \caption{Ground state (left: a,c,e) and metastable (right: b,d,f) structures identified by our method and by relaxing the high-symmetry configuration, respectively, for the anion-anion dimerisation in \ce{In2O3}, \ce{ZnO} and anatase \ce{TiO2}. (Energies and displacements reported in Table 1). In in purple, Zn in grey, Ti in blue and O in red with $\rm O_i$ shown in a different pattern for clarity.}
    \label{fig:structs_anion_anion_peroxides}
\end{figure}

\begin{table}[ht]
    \caption{Integrated Crystal Orbital Hamilton Population (ICOHP) for the S-S/Se-Se bonds formed by the under-coordinated neighbours of \kv{V}{Sb} in \ce{Sb2S/Se3}.}
    \centering
    \setlength{\tabcolsep}{8pt}
    \label{tab:V_Sb_ICOHP}
    \begin{tabular}{ccc|cc}
    \hline \hline
    \multirow{3}{*}{Charge} & \multicolumn{4}{c}{\ce{ICOHP (eV)}}\\
    \hline
    & \multicolumn{2}{c}{\ce{Sb2S3}} & \multicolumn{2}{c}{\ce{Sb2Se3}}\\
    & Site 1 & Site 2 & Site 1 & Site 2\\
    \hline
         -1 & -6.87 & -6.84 & -4.97 & -4.96\\
         0 & -9.15 & -7.74 & -6.60 & -5.54\\
         +1 & -13.36 & -13.41 & -6.69& -10.12\\
         +2 & -14.50 & -14.84 & -11.09 & -10.83\\
        \hline \hline
    \end{tabular}
\end{table}

\begin{figure}[ht]
    \includegraphics[width=0.9\linewidth]{Sb2S3/COHP_V_Sb,2.pdf}
    \caption{Crystal Orbital Hamilton Population (COHP) analysis for the sulfur-sulfur bonds formed by the vacancy neighbours in the ground state structures of \kv{V}{Sb,2} in \ce{Sb2S3}, illustrating the stronger bonding character of the S-S dimers for the positive charge states.}
    \label{fig:COHP_V_Sb,1_Sb2S3}
\end{figure}

\begin{figure}[ht]
    \includegraphics[width=0.9\linewidth]{COHP_peroxides_int_O_In2O3.pdf}
    \caption{Crystal Orbital Hamilton Population (COHP) analysis for the oxygen dimer bonds in the ground state structures of \kv{O}{i} in \ce{In2O3}. The orbital character of the different states is assigned by comparison with the molecular orbital diagram of a peroxide anion. For positive charge state, the hole is localised on the antibonding $\pi$* state, which appears within the band gap.}
    \label{fig:COHP_peroxides_O_i_In2O3}
\end{figure}

\begin{figure}[ht]
	\includegraphics[width=0.8\textwidth]{reconstructions/cation_anion_bonding.pdf}
    \caption{Ground state (left: a,c,e,g) and metastable (right: b,d,f,h) structures identified by our method and by relaxing the high-symmetry configuration, respectively, for the cation-anion rebonding reconstruction. (Energies and displacements reported in Table 2). Vacancy in black, Te in gold, Cd in blue, Sb in orange, S in yellow, Ga in green and As in purple. Interstitials shown with a different pattern and distances in \AA.}
    \label{fig:structs_cation_anion}
\end{figure}

\subsection{Crystal field and Jahn-Teller effects}

\begin{figure}[ht]
	\includegraphics[width=0.7\textwidth]{reconstructions/jahn_teller_crystal_field.pdf}
    \caption{Ground state (left: a,c,e) and metastable (right: b,d,f) structures identified by our method and by relaxing the high-symmetry configuration, respectively, for crystal field and Jahn-Teller reconstructions in ceria. (Energies and displacements reported in Table 3). \kv{V}{O} in black, Ce in green, O in red, Ni in light grey, Pd in dark grey and Cu in blue.}
    \label{fig:structs_crystal_field}
\end{figure}

\begin{figure}[ht]
    \begin{center}
	\includegraphics[width=0.6\textwidth]{figures/CeO2/CeO2_Pt_Ni_electron_diagram.png}
	\caption{\small Electron energy level diagram for $d^8$ dopants on \ce{CeO2} showing the crystal field splitting for the initial cubic coordination and the more favourable square-planar arrangement, which leads to a gain in electronic energy.}\label{fig:d8_electron_diagram}
	\end{center}
\end{figure}

\begin{figure}[ht]
\includegraphics[width=0.85\textwidth]{CeO2/d9_electron_diagram.png}
\caption{Electron energy level diagram for a $d^9$ dopant, showing the advantage of the Jahn-Teller distortion as it lowers the energy of the partially-occupied $d_{x^2-y^2}$ orbital, in comparison with the square-planar arrangement.}\label{fig:d9_electron_diagram}
\end{figure}

\clearpage
\newpage
\subsection{Electrostatically driven}
\begin{figure}[ht]
	\includegraphics[width=0.8\textwidth]{reconstructions/electrostatically_driven.pdf}
	\caption{Ground state (left: a,c,e) and metastable (right: b,d,f) structures identified by our method and by relaxing the high-symmetry configuration, respectively, for electrostatically driven reconstructions. (Energies and displacements reported in Table 4). Be in blue, Ce in green, O in red, Te in gold and Cd in blue. Vacancy shown in shaded black.}
	\label{fig:electrostatically_driven}
\end{figure}

\section{Defect bound polarons}
\subsection{Neutral oxygen vacancy in \ce{CeO2}}
In order to test the ability of the method to identify defect bound polarons, we first considered the neutral oxygen vacancy in \ce{CeO2}. Upon vacancy formation, two electrons localise on two Ce ions, reducing them to Ce(III). The location of the Ce(III) ions is however not clear, with some studies reporting both Ce(III) as nearest neighbours of the vacancy (NN, NN)\cite{keating_analysis_2012,Fabris_2005,Castleton_2007,Nakayama_2012}, next nearest neighbours (NNN, NNN)\cite{Wang_2009,Shoko_2010}, or even a combination of the two (NN, NNN)\cite{allen_2014}. We therefore applied the method to this defect to test whether it was able to identify these configurations. In order to thoroughly sample both spin alignments, we applied it twice: setting the number of unpaired electrons to 2 (spin-aligned, $\uparrow\uparrow$) and also to 0 (anti-aligned, $\uparrow\downarrow$) (Fig. \ref{fig:vac_O_ceo2}, \ref{fig:vac_O_0_ceo2_density_plots}). This results in all previously reported configurations being identified: both Ce(III) in the first coordination shell (NN, NN), both in the second coordination shell (NNN, NNN), one in the first and the other in the second (NN, NN) and also combinations of first/second and third coordination shells (NN, N(3) and NNN, N(3)). The energy differences between these states are of the order of meV, explaining the debate in the literature regarding the most stable configuration. These results demonstrate the ability of the method to identify different polaronic states, even when their energy differences are small.
\begin{figure}[ht]
	\includegraphics[width=0.8\textwidth]{CeO2/vac_O_0/snb_vac_O_0.pdf}
	\caption{Relative energy (in meV) of the different configurations identified for the neutral oxygen vacancy in \ce{CeO2}. The method was applied both constraining the difference of the number of electrons in the up and down spin component to 2 (solid line) and also to 0 (dashed line). Standard relaxation from the high symmetry structure shown with a diamond (Unperturbed). The different colours indicate where the two Ce(III) ions are located relative to the vacancy: nearest neighbour (NN), next nearest neighbour (NNN) or in the third coordination shell (N(3)).}
	\label{fig:vac_O_ceo2}
\end{figure}

\begin{figure}[ht]
    \begin{subfigure}[b]{0.3\textwidth}
		\includegraphics[width=\textwidth]{CeO2/vac_O_0/NN_NN_nupdown_0.png}
		\caption{NN, NN ($\uparrow\downarrow$) }
	\end{subfigure}
    \begin{subfigure}[b]{0.3\textwidth}
		\includegraphics[width=\textwidth]{CeO2/vac_O_0/NN_NNN_nupdown_2.png}
		\caption{NN, NNN ($\uparrow\uparrow$) }
	\end{subfigure}
	\begin{subfigure}[b]{0.3\textwidth}
		\includegraphics[width=\textwidth]{CeO2/vac_O_0/NNN_NNN_nupdown_2.png}
		\caption{NNN, NNN ($\uparrow\uparrow$) }
	\end{subfigure}
	\begin{subfigure}[b]{0.3\textwidth}
		\includegraphics[width=\textwidth]{CeO2/vac_O_0/NN_N3_nupdown_-1.png}
		\caption{NN, N(3) ($\uparrow\downarrow$)}
	\end{subfigure}
	\begin{subfigure}[b]{0.3\textwidth}
		\includegraphics[width=\textwidth]{CeO2/vac_O_0/NNN_N3_nupdown_-1.png}
		\caption{NNN, N(3) ($\uparrow\uparrow$)}
	\end{subfigure}
    \caption{Structure with spin density plot for the different configurations identified with our method for \kvc{V}{O}{0} in \ce{CeO2}. \kv{V}{O} shown in black, Ce in green and O in red. The spin density of different channels is shown with different colours. In all cases, the isosurfaces correspond to 10.5\% of the maximum charge density.}
    \label{fig:vac_O_0_ceo2_density_plots}
\end{figure}

\subsection{Neutral oxygen vacancy in \ce{TiO2}}
A similar situation occurs for the neutral oxygen vacancy in rutile \ce{TiO2}. Upon vacancy formation, the two electrons donated by the vacancy can localise on different Ti ions, reducing them to Ti(III). To test whether our approach could find the different polaronic configurations and investigate the influence of enforcing magnetisation constraints, we applied the method with different setups: i) without any magnetisation constraints, ii) setting the number of unpaired electrons to 2 (spin-aligned, $\uparrow\uparrow$) and also to 0 (anti-aligned, $\uparrow\downarrow$). As shown in Figure \ref{fig:vac_O_tio2}, $\uparrow\uparrow$ and $\uparrow\downarrow$ show negligible energy differences, in agreement with previous studies\cite{Deak_2012,Morgan_2010}.

The most favourable configurations correspond to the Ti(III) ions located in the second or third coordination shell (Fig. \ref{fig:vac_O_tio2_structures}), as reported by a previous HSE06 study\cite{Deak_2011}. This however differs from other computational studies which employed the Hubbard correction and found both Ti(III) to lie in the first coordination shell (N(1), N(1))\cite{Morgan_2010}. To verify our method was not missing this state, we performed additional geometry optimisations initialising the magnetic moments of two of the vacancy nearest neighbours. These configurations relaxed to a state with both Ti(III) ions located further away from the vacancy (first and second coordination shell), demonstrating that the N(1), N(1) state is not locally stable with this functional and supercell size, as previously reported by another HSE06 study\cite{Deak_2011}. \\
Finally, we note that all lowest energy states are successfully identified by the unconstrained run in this case, with comparable performance in the case of the spin-aligned ($\uparrow\uparrow$) constraint.
\begin{figure}[ht]
	\includegraphics[width=1.0\textwidth]{TiO2_rutile/vac_2_O_0.pdf}
	\caption{Relative energy (in eV) of the different configurations identified for the neutral oxygen vacancy in rutile \ce{TiO2}. The method was applied by either constraining the difference of the number of electrons in the up and down spin component to 2 (solid line), to 0 (dashed line) and without constraints (dotted line). The different colours indicate the distance between the two Ti(III) ions while the marker shapes correspond to where the Ti(III) are located relative to the vacancy: first coordination shell (N(1), i.e. nearest neighbour), second coordination shell (N(2), i.e. next nearest neighbour) and so on. As shown, spin-aligned and anti-aligned states have negligible energy differences.}
	\label{fig:vac_O_tio2}
\end{figure}

\begin{figure}[ht]
	\includegraphics[width=0.75\textwidth]{TiO2_rutile/vac_O_0_polarons.pdf}
	\caption{Lowest energy configurations identified for \kvc{V}{O}{0}\!\! in anatase \ce{TiO2}. The labels indicate the bond distortion leading to that state, magnetisation constraints and distance between Ti(III) sites. The spin density associated to the states introduced by \kvc{V}{O}{0}\!\! is shown, with different colours to differentiate spin channels. In all cases, the isosurfaces correspond to 25\% of the maximum charge density. \kv{V}{O} in black, Ti in blue and O in red.}
	\label{fig:vac_O_tio2_structures}
\end{figure}

\subsection{Neutral titanium interstitial in \ce{TiO2}}
As with the oxygen vacancy, the titanium interstitial can lead to different states depending on where the donated electrons localise. The identified configurations are shown in Figure \ref{fig:int_ti_tio2} and \ref{int_ti_tio2_structures}. Performing a geometry optimisation from the high-symmetry structure results in most of the charge localised on the interstitial and its Ti neighbours (1 electron shared between $\rm Ti_i$ and a neighbouring Ti, 2 electrons localised on two NN and 1 electron localised further away, Fig. \ref{int_ti_tio2_structures} (a)). This state is similar to the configuration reported by previous hybrid\cite{Deak_2011,Finazzi_2008} and GGA+U studies\cite{Stausholm_2010}. In contrast, our approach finds lower energy states where three of the donated electrons localise on Ti ions further away from the defect while the remaining electron is shared between the interstitial and a neighbouring Ti.
\begin{figure}[ht]
	\includegraphics[width=1.0\textwidth]{TiO2_rutile/int_ti_0.pdf}
	\caption{Relative energy (in eV) of the different configurations identified for the neutral titanium interstitial in rutile \ce{TiO2}. Standard relaxation from the high symmetry structure shown with a diamond (Unperturbed). The method was applied without magnetisation constraints. The different colours indicate the position of the Ti ions where the additional charge is localised, relative to $\rm Ti_{i}$: first coordination shell (N(1)), second coordination shell (N(2)) and so on. We find negligible energy difference between $\uparrow\downarrow$ and $\uparrow\uparrow$ (2 unpaired electrons) arrangements. We note that certain configurations with similar localisation patterns differ in their energy due to small structural differences and/or the degree of charge localisation.}
	\label{fig:int_ti_tio2}
\end{figure}

\begin{figure}[ht]
	\includegraphics[width=1.0\textwidth]{TiO2_rutile/Int_Ti_0_polarons.pdf}
	\caption{Low energy structures identified for the neutral titanium interstitial in rutile \ce{TiO2}. The spin density associated to the $\rm Ti_i$ states is shown, with different colors indicating different spin channels. In all cases, the isosurfaces correspond to 30\% of the maximum charge density.}\label{int_ti_tio2_structures}
\end{figure}

\subsection{Singly negative indium vacancy in \ce{In2O3}}
Finally, we also considered the singly negative charged indium vacancy in \ce{In2O3}, where the method was applied without magnetisation constraints. As shown in Figure \ref{fig:vac_in_in2o3}, a standard relaxation from the ideal structure  results in a spin-aligned state ($\uparrow\uparrow$), with two holes localised on two of the vacancy neighbours. In contrast, we find an \ce{anti-aligned} state ($\uparrow\downarrow$) to be more stable (by 60 meV). Compared to spin-aligned, in the anti-aligned case the two oxygens with a hole localised are displaced further away from each other (by 0.1 \AA). While for this simple PES relaxing with magnetisation constraints would also identify the $\uparrow\downarrow$ state, these results demonstrate that applying the method without magnetisation constraints can successfully identify both configurations. In general, these results exemplify the ability of the method to identify different polaronic states, even for defects with a complex PES with several low energy minima.

\begin{figure}[ht]
	\includegraphics[width=0.7\textwidth]{In2O3/V_In_-1.pdf}
	\caption{Relative energy (in meV) and structures of the different configurations identified for the singly negative indium vacancy in \ce{In2O3}. Standard relaxation from the high symmetry structure shown with a diamond (Unperturbed). The colourbar represents the structural difference between each structure and the `Unperturbed' one, measured as the sum of the atomic displacements between structures. \kv{V}{In} in black and O in red. The spin density of different channels is shown with different colours.}
	\label{fig:vac_in_in2o3}
\end{figure}

\section{Impact on defect properties}
\begin{table}[ht]
    \centering
    \caption{Concentrations (in $\rm cm^{-3}$) of the stable charge states for the ground and metastable structures of \kv{V}{Sb} in \ce{Sb2S3}, for typical growth conditions (T = 550 K) and the Fermi level 0.97 eV above the VBM, as determined experimentally\cite{lian_revealing_2021}. Dashes (`-') signify unstable charge states.}
    \setlength{\tabcolsep}{8pt}
    \label{tab:vac_sb_conc}
    \begin{tabular}{c|c|c||c|c|c}
         \hline \hline
         \multicolumn{3}{c}{\kv{V}{Sb,1}} &  \multicolumn{3}{c}{\kv{V}{Sb,2}}\\
         Charge & Ground state & Metastable & Charge & Ground state & Metastable \\
         \hline
         +2  & $ 2.1\times10^{-2} $ & $5.7\times10^{-17}$ &
         +2 & $4.4\times10^{-3} $  & $5.0\times10^{-22}$\\
         +1	& $ 4.2\times10^{2}$ & - &
         +1 & $ 6.3\times10^{6}$ & $5.9\times10^{-15}$\\
         0	& - & - &
         0 & - & $1.8\times10^{-7}$ \\
         -1 & $ 8.4 \times10^{8}$ & $2.3\times10^3$ &
         -1 & - & $3.8\times10^{-1}$ \\
        -3	& $1.1\times10^{14}$ & $1.1\times10^{14}$ &
        -3 & $1.1\times10^{12}$ & $1.1\times10^{12}$\\
        \hline \hline
    \end{tabular}
\end{table}

\begin{table}[ht]
    \centering
    \caption{Positions of thermodynamic charge transition levels (in eV above the VBM) for the ground and metastable structures of \kv{V}{Sb} in \ce{Sb2S3}. Dashes (`-') signify thermodynamically-unstable transition levels.}
    \setlength{\tabcolsep}{8pt}
    \label{tab:vac_sb_charge_transitions}
    \begin{tabular}{c|c|c||c|c|c}
         \hline \hline
         \multicolumn{3}{c}{\kv{V}{Sb,1}} &  \multicolumn{3}{c}{\kv{V}{Sb,2}}\\
         Level & Ground state & Metastable & Level & Ground state & Metastable \\
         \hline
         (2/1)  & 0.50 & - & (2/1) & -0.03 & -0.14 \\
         (2/-1)	& -	& 0.26 & (1/0) & - & 0.15\\
         (1/-1)	& 0.63 & - & (0/-1) & - & 0.28 \\
         - & - & - & (1/-3) & 0.83 & - \\
        (-1/-3)	& 0.69 & 0.39& (-1/-3) & - & 0.29\\
        \hline \hline
    \end{tabular}
\end{table}

\section{Identifying metastable structures}
\begin{figure}[ht]
	\includegraphics[width=0.7\textwidth]{GaAs/NEB_DX_CCB_alpha_to_beta.pdf}
	\caption{Energy barrier (in eV) between $\rm DX-CCB-\alpha $ and $\rm DX-CCB-\beta $ for $ \rm S_{As}^{-1}$ in \ce{GaAs}, calculated with the nudged elastic band method (5 images).}
	\label{fig:NEB_DX_CCB_alpha_to_beta}
\end{figure}

\section{References}
\bibliographystyle{naturemag}