a Generalized Molecular Dynamics Analysis Tool
Gemdat is a Python library for the analysis of diffusion in solid-state electrolytes from Molecular Dynamics simulations. Gemdat is built on top of Pymatgen, making it straightforward to integrate it into your Pymatgen-based workflows.
With Gemdat, you can:
To install:
pip install gemdat
The source code is available from Github.
Suggestions, improvements, and edits are most welcome.
The following snippet to analyze the diffusion trajectory from VASP data.
from gemdat import Trajectory
trajectory = Trajectory.from_vasprun('../example/vasprun.xml')
trajectory.plot_displacement_per_element()
diff_trajectory = trajectory.filter('Li')
diff_trajectory.plot_displacement_per_atom()
diff_trajectory.plot_displacement_histogram()
diff_trajectory.plot_frequency_vs_occurence()
diff_trajectory.plot_vibrational_amplitudes()
Characterize transitions and jumps between sites:
from gemdat.io import load_known_material
sites = load_known_material('argyrodite', supercell=(2, 1, 1))
transitions = trajectory.transitions_between_sites(
sites=sites,
floating_specie='Li',
)
jumps = transitions.jumps()
jumps.plot_jumps_vs_distance()
jumps.plot_jumps_vs_time()
jumps.plot_collective_jumps()
jumps.plot_jumps_3d()
jumps.jump_diffusivity(dimensions=3)
To calculate different metrics, such as tracer diffusivity:
from gemdat import TrajectoryMetrics
metrics = TrajectoryMetrics(diff_trajectory)
metrics.tracer_diffusivity(dimensions=3)
metrics.haven_ratio(dimensions=3)
metrics.tracer_conductivity(dimensions=3)
metrics.particle_density()
metrics.vibration_amplitude()
Check out our Contributing Guidelines to get started with development.
The code in this repository is based on Matlab code to analyse Molecular Dynamics simulations.
For background information on how some of the properties are calculated, check out the accompanying paper:
Developing a Generalized Molecular Dynamics Analysis Tool