Molecular dynamics (MD) simulations of fast-ion conductors render + the trajectories of the atoms comprising them. However, extracting + meaningful insights from this data is often a challenge since most + common analysis techniques rely on active supervision of the + simulations and definition of arbitrary material-dependent parameters, + thus frustrating high-throughput screenings. In particular, to the + best of our knowledge, determination of exact ionic migration paths + and the level of coordination between mobile particles in diffusive + events has not been previously addressed in a systematic and + quantitative manner, despite its central role in the understanding and + design of high-performance solid-state electrolytes. Here, we + introduce a completely unsupervised approach for analyzing ion-hopping + events in MD simulations. Based on k-means clustering, our algorithm + identifies with precision which particles diffuse and when during a + simulation, thus identifying their exact migration paths. This + analysis also allows for the quantification of correlations between + many diffusing ions as well as of key atomistic descriptors like the + duration/length of diffusion events and residence times. Moreover, the + present implementation introduces an optimized code for computing the + full ion diffusion coefficient, that is, entirely considering ionic + correlations, thus going beyond the dilute limit approximation.
+Fast-ion conductors (FIC) are materials in which some of their
+ constituent atoms diffuse with large drift velocities comparable to
+ those found in liquids
+ (
The repository is divided into three independent + functionalities:
+-
+
The minimal input needed (besides the file containing the actual
+ atomistic trajectories) consists in an
The script allows graphing the identified diffusion paths for each
+ simulated particle and provides the confidence interval associated
+ with the results retrieved by the algorithm. An example of the
+ analysis performed on an
Example of the performance of our unsupervised algorithm
+ at extracting the diffusive path for an arbitrary particle in an
+ AIMD simulation of SrCoO3-x at a temperature of 400K.
+ Green and orange dots reproduce two different ionic vibrational
+ centers while the blue dots represent the ion diffusion path between
+ them.
+
Moreover, users may find information regarding their previous
+ executions of the scripts in the
Mainly, our code is based on the sklearn
+ (
The (full) ionic diffusion coefficient consists of two parts
+ (
The ionic conductivity (
where
All the ionic displacements appearing in Eq. (2) can be computed
+ just once and stored in a four-dimensional array, thus allowing for
+ simple vectorization and fast processing with python libraries
+ (e.g., numpy) as compared to traditional calculation loops. Then,
+ for a simulation with
being
Note that we keep
In terms of memory resources, this implementation scales linearly + with the length of the temporal window, the total duration of the + simulation and the number of mobile ions.
+Our method for identifying vibrational centers from sequential + ionic configurations relies on k-means clustering, an unsupervised + machine learning algorithm. This method assumes isotropy in the + fluctuations of non-diffusive particles. Importantly, our approach + circumvents the need for defining arbitrary, materials-dependent + threshold distances to analyze ionic hops.
+K-means algorithm constructs spherical groups that, for every
+ subgroup
where
This approach is particularly well-suited for crystals, as atoms
+ typically fluctuate isotropically around their equilibrium
+ positions. For materials where atoms exhibit strong anisotropic
+ vibrations, IonDiff also permits the selection of alternative
+ clustering schemes, such as spectral clustering, which is effective
+ for cases where group adjacency is significant. Nevertheless, in a
+ previous work
+ (
The number of clusters, or equivalently, ionic vibrational + centers, determined by IonDiff for a molecular dynamics (MD) + simulation is the one that maximizes the average silhouette ratio. + This metric assesses the similarity of a point within its own + cluster and its dissimilarity in comparison to other clusters. The + average silhouette ratio is defined as:
+where:
+Once the number of vibrational centers, along with their
+ real-space location and temporal evolution, are determined, ionic
+ diffusion paths are delineated as the segments connecting two
+ distinct vibrational centers over time
+
To quantitatively evaluate the correlations and level of + concertation between a variable number of mobile ions, we developed + the following algorithm. Beginning with a given sequence of ionic + configurations from a molecular dynamics simulation, we compute the + correlation matrix for diffusive events. Initially, we assign a + value of “1” to each diffusing particle and “0” to each vibrating + particle at every time frame. This binary assignment is facilitated + by the ionic hop identification algorithm introduced earlier.
+Due to the discrete nature of the ionic trajectories and to
+ enhance numerical convergence in subsequent correlation analysis,
+ the multistep time functions are approximated using Gaussians with
+ widths equal to their half-maxima (commonly known as the
+ “full-width-at-half-maximum” or FWHM method used in signal
+ processing). Subsequently, we compute the
+
Moreover, uncorrelated ion hops occurring simultaneously could be + erroneously interpreted as correlated. To address these practical + challenges, we compute a reference correlation matrix based on a + randomly distributed sequence of ionic hops, with the Gaussian FWHM + matching the mean diffusion time determined during the simulation. + It is important to note that due to the finite width of the + Gaussians, this reference matrix is not exactly the identity + matrix.
+Next, covariance coefficients in the original correlation matrix + larger (smaller) than the corresponding random reference values were + considered as true correlations (random noise) and rounded off to + one (zero) for simplification. To ensure an accurate assessment of + many-ion correlations, different hops of the same ion are treated as + independent events. Ultimately, this process results in a + correlation matrix comprising ones and zeros, facilitating the + determination of the number of particles that remain concerted + during diffusion.
+C.C. acknowledges support from the Spanish Ministry of Science, + Innovation, and Universities under the fellowship RYC2018-024947-I and + PID2020-112975GB-I00 and grant TED2021-130265B-C22. C.L. acknowledges + support from the Spanish Ministry of Science, Innovation, and + Universities under the FPU grant, and the CSIC under the “JAE Intro + SOMdM 2021” grant program. The authors thankfully acknowledge the + computer resources at MareNostrum, and the technical support provided + by Barcelona Supercomputing Center (FI-1-0006, FI-2022-2-0003, + FI-2023-1-0002, FI-2023-2-0004, and FI-2023-3-0004). R.R. acknowledges + financial support from the MCIN/AEI/10.13039/501100011033 under grant + no. PID2020-119777GB-I00, the Severo Ochoa Centres of Excellence + Program (CEX2019-000917-S), and the Generalitat de Catalunya under + grant no. 2017SGR1506.
+