# Computational Supporting Dataset: Exploiting Cationic Vacancies for Increased Energy Densities in Dual-Ion Batteries Benjamin J. Morgan (ORCID: [0000-0002-3056-8233](https://orcid.org/0000-0002-3056-8233)) This dataset contains DFT data and analysis scripts used to generate results supporting the paper “Exploiting Cationic Vacancies for Increased Energy Densities in Dual-Ion Batteries”: [DOI TODO](). The dataset contains inputs and outputs for a series of VASP calculations on Mg/Li-intercalated F-doped anatase TiO2, and scripts for processing this DFT data to produce the related manuscript figures. To run the data analysis contained in this dataset, run the following commands from the top level directory: ``` pip install requirements snakemake clean snakemake -j ``` ## Overview Schematic of the data flow and sub-workflows for this data analysis. This needs a sufficiently wide window to render correctly. ``` ┌─────────────────────────────────────┐ ┌─────────────────────────────────────┐ ┌─────────────────────────────────────┐ │ VASP calculation data ├────────────────────▶│ collected data │──┬─────────────────▶│ figures │ └─────────────────────────────────────┘ └─────────────────────────────────────┘ │ └─────────────────────────────────────┘ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ ┌─────────────────────────────────┐ │ summary.smk │ ┌─────────────────────────────────┐ │ │ plotting.smk ┌─────────────────────────────────┐ │ Li / Mg elemental reference │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─▶│ vasp_summary.yaml │─ ─ ┼ ─ ─ ─ ─ ─ ─ ─ ─ ─│▶│ *.pdf │ │ │ └─────────────────────────────────┘ │ │ └─────────────────────────────────┘ │ │ ▲ └─────────────────────────────────┘ ┌─────────────────────────────────┐ linking.smk ┌─────────────────────────────────┐ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ stoichiometric TiO2 │ ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┼▶│ *.cif │ │ │ │ └─────────────────────────────────┘ ▲ └─────────────────────────────────┘ │ ┌─────────────────────────────────────┐ │ ┌─────────────────────────────────┐ │ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ └────────┼────────▶│ notebooks │ │ single vacancy [4F_O+V_Ti] TiO2 │ └─────────────────────────────────────┘ │ └─────────────────────────────────┘ │ │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌─────────────────────────────────┐ ┌─────────────────────────────────────┐ ┌─────────────────────────────────┐ │ │ double vacancy [4F_O+V_Ti] TiO2 │ │ └ ─ ─ ─ ─ ─│ scripts │ ─ ─ ─ ─ ─ ┘ │ │ Li-Mg-F-TiO2.ipynb │ │ └─────────────────────────────────┘ └─────────────────────────────────────┘ └─────────────────────────────────┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ``` ## Contents - `vasp_calculations`: Inputs and outputs for VASP calculations. See the [README](vasp_calculations/README.md) for more details. - `scripts`: Python scripts used in the data processing and plotting. - `collected_data`: A set of symbolic links to the key output data in the full VASP dataset. These files are generated by the data processing workflow. - `figures`: Plotted data. - `notebooks`: A Jupyter notebook containing thermodynamic calculations of Li and Mg electrochemical potentials where competing insertion motifs are in equilibrium, ## Dependencies The data processing depends on the following packages: - numpy - vasppy >= 0.4.1.0 - surfinpy - snakemake - PyYAML To install these using `pip` run ``` pip install -r requirements.txt ``` Running the Jupyter notebook requires the following additional packages: - jupyter - version-information To install these using `pip` run ``` pip install -r notebooks/requirements.txt ``` Packages can be installed using the “frozen” versions used in for the published dataset, via ``` pip install -r frozen_requirements.txt ``` Full system information and Python enviroment used for the published dataset is listed in [`system_info.txt`](system_info.txt). ## Data processing workflow Data processing is managed using [`snakemake`](https://snakemake.readthedocs.io), and uses the Python scripts in the `scripts` directory. The full data analysis workflow can be rerun with: ``` snakemake clean snakemake -j ``` This workflow consists of two steps: 1. Data collation: All the VASP output files needed used in subsequent structure analysis are copied to `collected_data` as symbolic links. This uses the `vasp_summary` script from the [`vasppy`](https://pypi.org/project/vasppy/) package. This step generates: - `vasp_summary.yaml`: A YAML file describing key input parameters and metadata for all the VASP calculations. This file includes md5 checksums for all the files copied to the `collected_data` directory that are used in the subsequent step. - `collected_data/*`: A set of symbolic links to the VASP output files used in subsequent plotting. - `system_information.txt`: System information details, generated at the time of running the analysis workflow. This file includes information about platform architecture, the Python interpreter used for running the analysis scripts, and a list of installed Python modules and version numbers. 2. Figure plotting: This step generates a series of figures showing plots of thermodynamic intercalation products for a range of lithium and magnesium electrochemical potentials. The figure plotting step can be run without reprocessing the full DFT dataset with: ``` snakemake -s plotting.smk clean snakemake -s plotting.smk ``` The volume-energy fits performed for each system to the Murnaghan equation of state can be rerun using the `murn.snake` snakefile: ``` snakemake -s murn.smk clean snakemake -s murn.smk ```