Skip to content

Commit

Permalink
Update chemical potentials tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Jan 20, 2025
1 parent 1570ba2 commit 65ff919
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 332 deletions.
2 changes: 1 addition & 1 deletion doped/chemical_potentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -2234,7 +2234,7 @@ def _from_vaspruns(
def _estimate_uncompressed_vasprun_size(vasprun_path: PathLike) -> float:
return (os.path.getsize(vasprun_path) / 1e6) * (20 if vasprun_path.endswith(".gz") else 1)

vasprun_sizes_MB = [_estimate_uncompressed_vasprun_size(v) for v in self.vasprun_paths]
vasprun_sizes_MB = [_estimate_uncompressed_vasprun_size(v) for v in self.vasprun_paths] or [0]
if sum(vasprun_sizes_MB) - max(vasprun_sizes_MB) > 50:
# only multiprocess as much as makes sense:
processes = min(max(1, cpu_count() - 1), sum(1 for s in vasprun_sizes_MB if s > 20) - 1)
Expand Down
18 changes: 18 additions & 0 deletions tests/data/ZrO2_LaTeX_Tables/La_default.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
\begin{table}[h]
\centering
\caption{Formation energies per formula unit ($\Delta E_f$) of \ce{ZrO2} and all competing phases, with k-meshes used in calculations. Only the lowest energy polymorphs are included.}
\label{tab:competing_phase_formation_energies}
\begin{tabular}{ccccc}
\hline
Formula & Space Group & E$_{\textrm{Hull}}$ (eV/atom) & k-mesh & $\Delta E_f$ (eV/fu) \\ \hline
\ce{ZrO2} & P2$_{1}$/c & 0.000 & 3$\times$3$\times$3 & -10.975 \\
\ce{La} & P6$_{3}$/mmc & 0.000 & 10$\times$10$\times$3 & 0.000 \\
\ce{Zr} & P6$_{3}$/mmc & 0.000 & 9$\times$9$\times$5 & 0.000 \\
\ce{O2} & P4/mmm & 0.000 & 2$\times$2$\times$2 & 0.000 \\
\ce{La2O3} & Ia$\overline{3}$ & 0.000 & 3$\times$3$\times$3 & -18.017 \\
\ce{Zr3O} & R$\overline{3}$c & 0.000 & 5$\times$5$\times$5 & -5.987 \\
\ce{La2Zr2O7} & Fd$\overline{3}$m & 0.000 & 3$\times$3$\times$3 & -40.877 \\
\ce{Zr2O} & P312 & 0.019 & 5$\times$5$\times$2 & -5.729 \\
\hline
\end{tabular}
\end{table}
15 changes: 15 additions & 0 deletions tests/data/ZrO2_LaTeX_Tables/default.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
\begin{table}[h]
\centering
\caption{Formation energies per formula unit ($\Delta E_f$) of \ce{ZrO2} and all competing phases, with k-meshes used in calculations. Only the lowest energy polymorphs are included.}
\label{tab:competing_phase_formation_energies}
\begin{tabular}{ccccc}
\hline
Formula & Space Group & E$_{\textrm{Hull}}$ (eV/atom) & k-mesh & $\Delta E_f$ (eV/fu) \\ \hline
\ce{ZrO2} & P2$_{1}$/c & 0.000 & 3$\times$3$\times$3 & -10.975 \\
\ce{Zr} & P6$_{3}$/mmc & 0.000 & 9$\times$9$\times$5 & 0.000 \\
\ce{O2} & P4/mmm & 0.000 & 2$\times$2$\times$2 & 0.000 \\
\ce{Zr3O} & R$\overline{3}$c & 0.000 & 5$\times$5$\times$5 & -5.987 \\
\ce{Zr2O} & P312 & 0.019 & 5$\times$5$\times$2 & -5.729 \\
\hline
\end{tabular}
\end{table}
18 changes: 18 additions & 0 deletions tests/data/ZrO2_LaTeX_Tables/no_prune.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
\begin{table}[h]
\centering
\caption{Formation energies per formula unit ($\Delta E_f$) of \ce{ZrO2} and all competing phases, with k-meshes used in calculations.}
\label{tab:competing_phase_formation_energies}
\begin{tabular}{ccccc}
\hline
Formula & Space Group & E$_{\textrm{Hull}}$ (eV/atom) & k-mesh & $\Delta E_f$ (eV/fu) \\ \hline
\ce{ZrO2} & P2$_{1}$/c & 0.000 & 3$\times$3$\times$3 & -10.975 \\
\ce{Zr} & P6$_{3}$/mmc & 0.000 & 9$\times$9$\times$5 & 0.000 \\
\ce{O2} & P4/mmm & 0.000 & 2$\times$2$\times$2 & 0.000 \\
\ce{Zr3O} & R$\overline{3}$c & 0.000 & 5$\times$5$\times$5 & -5.987 \\
\ce{ZrO2} & Pbca & 0.008 & 3$\times$3$\times$1 & -10.951 \\
\ce{Zr3O} & P6$_{322}$ & 0.013 & 5$\times$5$\times$5 & -5.935 \\
\ce{Zr2O} & P312 & 0.019 & 5$\times$5$\times$2 & -5.729 \\
\ce{Zr} & Ibam & 0.025 & 6$\times$6$\times$6 & 0.025 \\
\hline
\end{tabular}
\end{table}
12 changes: 12 additions & 0 deletions tests/data/ZrO2_LaTeX_Tables/splits_2.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
\begin{table}[h]
\centering
\caption{Formation energies per formula unit ($\Delta E_f$) of \ce{ZrO2} and all competing phases, with k-meshes used in calculations. Only the lowest energy polymorphs are included.}
\label{tab:competing_phase_formation_energies}
\begin{tabular}{ccccc|ccccc}
\hline
Formula & Space Group & E$_{\textrm{Hull}}$ (eV/atom) & k-mesh & $\Delta E_f$ (eV/fu) & Formula & Space Group & E$_{\textrm{Hull}}$ (eV/atom) & k-mesh & $\Delta E_f$ (eV/fu) \\ \hline
\ce{ZrO2} & P2$_{1}$/c & 0.000 & 3$\times$3$\times$3 & -10.975 & \ce{O2} & P4/mmm & 0.000 & 2$\times$2$\times$2 & 0.000 \\
\ce{Zr} & P6$_{3}$/mmc & 0.000 & 9$\times$9$\times$5 & 0.000 & \ce{Zr3O} & R$\overline{3}$c & 0.000 & 5$\times$5$\times$5 & -5.987 \\
\hline
\end{tabular}
\end{table}
Loading

0 comments on commit 65ff919

Please sign in to comment.