Analyzing Jumps¶
This notebook shows the various parameters that can be set to analyze jumps. As input a Structure (from a cif file, or autogenerated) and a vasprun file need to be provided.
Here we look at the jumps of Li through the argyrodite host system.
In [1]:
Copied!
from gemdat import Trajectory, load_known_material
from gemdat.utils import VASPRUN
# Use your own data:
# VASPRUN = 'path/to/your/vasprun.xml'
trajectory = Trajectory.from_vasprun(VASPRUN)
diff_trajectory = trajectory.filter('Li')
sites = load_known_material('argyrodite', supercell=(2, 1, 1))
from gemdat import Trajectory, load_known_material
from gemdat.utils import VASPRUN
# Use your own data:
# VASPRUN = 'path/to/your/vasprun.xml'
trajectory = Trajectory.from_vasprun(VASPRUN)
diff_trajectory = trajectory.filter('Li')
sites = load_known_material('argyrodite', supercell=(2, 1, 1))
Specifying jumps¶
In the codeblock below we use the site_inner_fraction
parameter to set the fraction of the radius of a site to which an atom must go before counting as a jump.
We use the minimal_residence
parameter to specify the number of timesteps that an atom has to remain on a site before being counted as jump
In [2]:
Copied!
transitions = trajectory.transitions_between_sites(
sites=sites,
floating_specie='Li',
site_inner_fraction=1.0,
)
jumps = transitions.jumps(minimal_residence=0)
transitions = trajectory.transitions_between_sites(
sites=sites,
floating_specie='Li',
site_inner_fraction=1.0,
)
jumps = transitions.jumps(minimal_residence=0)
In [3]:
Copied!
jumps.plot_jumps_vs_distance(n_parts=4)
jumps.plot_jumps_vs_distance(n_parts=4)
In [4]:
Copied!
jumps.plot_jumps_3d()
jumps.plot_jumps_3d()
Change these parameters, and recalculate the jumps¶
As you can see from the resulting plots, the long jumps disappeared, and fewer jumps are recorded
In [5]:
Copied!
transitions = trajectory.transitions_between_sites(
sites=sites,
floating_specie='Li',
site_inner_fraction=0.25,
)
jumps = transitions.jumps(minimal_residence=10)
transitions = trajectory.transitions_between_sites(
sites=sites,
floating_specie='Li',
site_inner_fraction=0.25,
)
jumps = transitions.jumps(minimal_residence=10)
In [6]:
Copied!
jumps.plot_jumps_vs_distance(n_parts=4)
jumps.plot_jumps_vs_distance(n_parts=4)
In [7]:
Copied!
jumps.plot_jumps_3d()
jumps.plot_jumps_3d()
In [8]:
Copied!
jumps.plot_collective_jumps()
jumps.plot_collective_jumps()
In [9]:
Copied!
jumps.plot_jumps_vs_time(n_parts=4)
jumps.plot_jumps_vs_time(n_parts=4)