DOI: 10.6084/m9.figshare.27161754
title: Online Test-time Adaptation for Interatomic Potentials

description: Introduction:
There are two folders in this database for the paper Online Test-time Adaptation for Interatomic Potentials (arXiv:2405.08308), which introduce the method of test-time adaptation for interatomic potentials (TAIP). The data presented here include the dataset “TAIP_dataset” and the MD trajectories “MD_trajectories” used and shown in the paper. The extxyz format is used for the datasets and trajectories, storing the atomic coordinates, cells, potential energy, and atomic forces for each configuration. The contained files of these two folders will be illustrated as follows:
1. Water and Electrolyte Solution Datasets: TAIP_dataset.zip
These datasets consist of liquid water and electrolyte solution samples, curated to train and evaluate machine learning models for interatomic potentials used in the paper Online Test-time Adaptation for Interatomic Potentials.
Liquid Water Dataset: TAIP_dataset/TAIP_dataset.zip/Water
The liquid water dataset is divided into three sets: a training set of 1,000 snapshots, a validation set of 100 snapshots, and a test set of 500 snapshots. The training and validation sets were extracted from classical molecular dynamics (MD) simulations with the LAMMPS software package (Thompson et al., 2022) and the SPC/E force field (Berendsen et al., 1987). The snapshots in the training, validation, and test sets were sampled at 10 ps intervals from the simulation trajectory.
Additionally, another test set was created from 500 snapshots of hexagonal ice crystals. These were sampled using classical MD simulations with the LAMMPS software package (Thompson et al., 2022) and the SPC/E force field (Berendsen et al., 1987).
The classical simulations were run with a time step of 1 fs, using the Nose-Hoover thermostat (Hoover, 1996) and anisotropic Parrinello-Rahman barostat (Parrinello and Rahman, 1981). After equilibrating the system at 300 K and 1 atm, snapshots were collected every 10 ps during a 10 ns NVT simulation. Each snapshot contains 96 molecules (288 atoms). The energies and forces for these snapshots were calculated using density functional theory (DFT) with the cp2k package (Kühne et al., 2020), applying the PBE-GGA exchange-correlation functional (Perdew et al., 1996) with the PAW pseudo potential (Blöchl, 1994) and DFT-D3 dispersion corrections (Grimme et al., 2010).
Electrolyte Solution Dataset: TAIP_dataset/TAIP_dataset.zip/Etyde
The electrolyte solution dataset is based on previous work (Cui et al., 2024) and includes eight different electrolyte compositions, featuring lithium and sodium ions. These compositions are: LiPF6 in DME, NaPF6 in DME, LiTf2N in DME, NaTf2N in DME, LiPF6 in EC+DMC, NaPF6 in EC+DMC, LiTf2N in EC+DMC, and NaTf2N in EC+DMC, with ionic concentrations of 1 M and 4 M.
The training set contains 1,000 samples, and the validation set contains 500 samples, both randomly selected from the 1 M solutions. To assess model performance, two test sets, each containing 1,000 samples, were constructed: one from the remaining 1 M solutions and the other from the 4 M solutions.
2. Molecular Dynamics Simulation Trajectories: PaiNN.zip, SchNet.zip, and Test-Strategies.zip
The molecular dynamics (MD) trajectories using machine learning interatomic potentials (MLIPs) for four distinct systems: liquid water, hexagonal ice, and electrolyte solutions with concentrations of 1 M and 4 M. The MD simulations for evaluating the performance of TAIP are conducted using the Atomic Simulation Environment (ASE) Python library. SchNet and PaiNN are used, respectively, as the baseline models to produce the potential energy and interatomic forces. The trajectories using baseline models and models with TAIP method are storied in SchNet.zip and PaiNN.zip respectively.
The initial structures of liquid water, hexagonal ice, and electrolyte solutions are randomly sampled from the corresponding test dataset. We use the liquid water training set to train the models for simulations on liquid water and hexagonal ice systems and the 1 M electrolyte solution training set to train the models for simulations on 1 M and 4 M electrolyte solutions.
Further, five simulation trajectories are presented here using different adaptation strategies for the TAIP method, storied in Test-Strategies.zip/* (*= 1, 2, 3, 4, 5), including simulating without any adaptation (*/noadapt.xyz), with non-permanent adaptation (*/unsaved.xyz), with saved adaptation every simulation step (*/saved.xyz), with saved adaptation every 100 simulation steps (*/every100.xyz), and with saved adaptation when the loss of the simulation step given by SSL tasks is larger than a threshold (*/loss.xyz). The initial configurations are randomly sampled in the liquid water test dataset, and the MD simulation is conducted based on SchNet-TAIP model trained on the liquid water training set.
All simulations using MLIPs are set up with a timestep of 0.5 fs under canonical (NVT) ensembles, using the Berendsen thermostat as the temperature coupling method with a coupling temperature of 300 K and a decaying time constant of 100 fs. The velocity of each atom is initialized according to the Boltzmann distribution at 300 K.

References:
Thompson, A.P. et al. LAMMPS - A flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales. Comput. Phys. Commun. 271, 108171 (2022).
Berendsen, H.J., Grigera, J.R. & Straatsma, T.P. The missing term in effective pair potentials. J. Phys. Chem. 91, 6269–6271 (1987).
Hoover, W.G. & Holian, B.L. Kinetic moments method for the canonical ensemble distribution. Phys. Lett. A 211, 253–257 (1996).
Parrinello, M. & Rahman, A. Polymorphic transitions in single crystals: A new molecular dynamics method. J. Appl. Phys. 52, 7182–7190 (1981).
Kühne, T.D. et al. CP2K: An electronic structure and molecular dynamics software package - Quickstep: Efficient and accurate electronic structure calculations. J. Chem. Phys. 152, 194103 (2020).
Perdew, J.P., Burke, K. & Ernzerhof, M. Generalized gradient approximation made simple. Phys. Rev. Lett. 77, 3865–3868 (1996).
Blöchl, P.E. Projector augmented-wave method. Phys. Rev. B 50, 17953–17979 (1994).
Grimme, S., Antony, J., Ehrlich, S. & Krieg, H. A consistent and accurate ab initio parametrization of density functional dispersion correction (DFT-D) for the 94 elements H-Pu. J. Chem. Phys. 132, 154104 (2010).
Cui, T. et al. Geometry-enhanced pretraining on interatomic potentials. Nat. Mach. Intell. 1-9 (2024).