Investigation of electrochemical reaction pathways in new battery electrolyte compositions is important for identifying methods to improve electric vehicle battery performance and lifetime1. However, such studies are often difficult because battery electrolytes are often made by mixing different components, such as solvent, salt, and additive molecules, which interact with themselves and with different surfaces (cathode and anode electrodes) under different battery operating voltages and temperatures2. In experiments, some of the irreversible electrolyte electrochemical decomposition reactions are easier to investigate because they produce small gas molecule byproducts which are released from the electrolyte solution into the air (correspondingly making it easier to probe using experimental techniques such as gas chromatography3,4,5). However, many of these byproducts are larger molecules or complex organic-inorganic solid mixtures, such as complex organolithium polymer compounds6, which will not be released into the environment as gas molecules. This makes it difficult to study these more complex electrochemical reaction pathways experimentally2.
Ab-initio modeling, such as density functional theory (DFT), is a promising method to study potential electrochemical degradation pathways in the electrolyte in silico7. However, simple DFT energy minimization of complex electrolyte structure (liquid mixture with experimentally reasonable electrolyte component concentrations in a periodic boundary condition box) will mostly fail to generate low-energy structures corresponding to physically meaningful electrochemical reaction byproducts. The DFT-minimized structures typically have higher energy and represent non-physical byproducts that correspond to incorrect electrochemical degradation pathways, because the structures are trapped in local energy minimums during the DFT energy minimization procedure. Methods such as ab-initio molecular dynamics (AIMD)8,9, neural network force field10,11,12,13,14,15,16, or DFT-based metadynamics17,18,19 are often used to explore more diverse electrolyte structures, which may include more meaningful electrochemical reaction byproducts. Computational screening to generate electrolyte components that are predicted to be electrochemically more stable is also often attempted20. However, all these methods have their own drawbacks, such as: requiring large and lengthy computational resources7, large amount of ab-initio training data13 or prior knowledge about the eventual electrochemical reaction byproducts to bias the simulation into specific results21.
We have recently introduced a method to perform ab-initio structure energy minimization in a multi-scale manner by connecting the energy gradients obtained from any ab-initio method, such as DFT atomic forces calculated using Vienna Ab-initio Simulation Package (VASP) software22, with the structure transformation function gradients calculated using PyTorch (3T-VASP)23,24. This approach enables the user to simply set up a simulation box filled with multiple types and counts of electrolyte component molecules and run an external atomic energy and force calculator (such as a classical force field or VASP DFT). The structure energy minimization is then automatically performed in a multi-scale manner, which respects the natural structure transformation modes of the relevant molecules (translations and rotations of different segments of the molecule). Because a 3T-VASP simulation is typically 'completed' within 100-150 static DFT calls while generating physically meaningful reaction byproducts (many of these were experimentally observed in prior literature)24, it is possible to run many different ensembles of 3T-VASP trajectories to generate potentially meaningful electrochemical reaction pathways and byproducts in the electrolyte for further computational or experimental investigation. The principles and math behind the multi-scale gradient structure minimization have been discussed in depth in a prior publication24. In this work, we aim to further detail the 3T-VASP software architecture and computational workflow, the setup of the computing environment necessary to run 3T-VASP, the preparation of input files for 3T-VASP simulation of new systems, the monitoring of 3T-VASP simulations, and the example of output trajectories.
First, it is necessary to understand the overall architecture of the 3T-VASP software, as shown in Figure 1. 3T-VASP works by identifying and exploiting the natural structure transformation modes in the molecule (because these are structure transformations that are easier for the molecules to perform while maintaining relatively low ab-initio structure energy)24. While it is possible to manually program these structure transformation modes for each new molecule species (it is cumbersome to do so), 3T-VASP offers to automate this process for the user by exploiting the information available in the classical force field file representing the molecule24. Once these structure transformation modes are determined for the desired electrolyte molecule components, the user needs to specify the periodic boundary condition box and its lattice vector parameters (the box may originally be empty, or partially filled with individual cations or electrode surface) to be further filled with desired types and numbers of other electrolyte molecules (such as solvents, salt ions, additives). The 3T algorithm will then use either classical force field (a built-in classical force field calculator is included with 3T-VASP) or the computing environment's VASP software to calculate atomic energy and forces to perform multi-scale structure transformation, which can minimize the structure energy in a modest number of static DFT calls24. This computational cost reduction makes it possible to repeat the electrochemical reaction trajectory and byproduct generation for large number of initial structures.

Figure 1: Computational workflow of 3T-VASP. (A) Preprocessing of 3T-VASP input structures (periodic boundary condition lattice and small molecules). The small molecule force field parametrization can be done either automatically using SwissParam webserver, manually modified after LigParGen webserver parametrization, or loaded from a cache based on previously finished parametrization. The micro and macro group segmentation of 3T algorithm is done automatically by parsing the molecule substructures based on their rotatable bonds. The PBC lattice input file is in the format of VASP POSCAR file and should be designed to have enough empty physical space to pack the desired number of input molecules. The PBC lattice can be an empty box filled with a few ions or a surface structure with some empty space. (B) The desired types and numbers of small molecules are put into the empty space in the PBC lattice using PackMol. (C) Multi-scale gradient 3T structure minimization using built-in force field calculator (3T-FF, mostly to enable liquid dispersion and create a physically reasonable initial structure for 3T-VASP without allowing for chemical reactions). (D) Multi-scale gradient 3T structure minimization using external software such as the VASP calculator (3T-VASP enables electrochemical reactions to proceed). Please click here to view a larger version of this figure.
Various open-source external software, such as GROningen Machine for Chemical Simulations (GROMACS), a classical force field-based molecular dynamics software, which is useful for running large-scale molecular dynamics simulations25 and InterMol, a Python library codebase developed by Shirts et al. for molecular dynamics file format conversions26, are utilized to enable automated molecule force field parametrization and rotatable bond extraction. VASP is used to enable electrochemical reaction during the ab initio phase (3T-VASP cycles). The steps needed to install these dependencies are presented in this article.