pyiron_contrib.protocol.compound.finite_temperature_string module

class pyiron_contrib.protocol.compound.finite_temperature_string.FTSEvolution(**kwargs)[source]

Bases: CompoundVertex

A serial Finite Temperature String (FTS) protocol to compute migration barriers between two stable system.

NOTE: 1. This protocol is as of now untested with DFT-type reference jobs, and only works for sure, with
Lammps-type reference jobs.
  1. Convergence criterion is NOT implemented for this protocol, because it runs serially, and would take

a VERY long time to achieve a good convergence.

Input attributes:

TODO: add a vertex to check if all the necessary inputs are provided. ref_job_full_path (string): The path to the saved reference job to use for calculating forces and energies. structure_initial (Atoms): The initial structure. structure_initial (Atoms): The final structure. temperature (float): Temperature to run at in K. n_steps (int): How many MD steps to run for. (Default is 100.) temperature_damping_timescale (float): Langevin thermostat timescale in fs. (Default is None, which runs NVE.) overheat_fraction (float): The fraction by which to overheat the initial velocities. This can be useful for

more quickly equilibrating a system whose initial structure is its fully relaxed positions – in which case equipartition of energy tells us that the kinetic energy should be initialized to double the desired value. (Default is 2.0, assume energy equipartition is a good idea.)

time_step (float): MD time step in fs. (Default is 1.) sampling_period (int): Account output every `sampling_period’ for the TI operations. (Default is 1, account

for every MD step.

thermalization_steps (int): Number of steps the system is thermalized for to reach equilibrium. (Default is

10 steps.)

n_images (int): Number of centroids / images. (Default is 5.) initial_positions (list/np.ndarray): The initial positions of the images (preferably from NEB).

Default is None)

cutoff_factor (float): The cutoff is obtained by taking the first nearest neighbor distance and multiplying

it by the cutoff factor. A default value of 0.4 is chosen, because taking a cutoff factor of ~0.5 sometimes let certain reflections off the hook, and we do not want that to happen. (Default is 0.4.)

mixing_fraction (float): How much of the images’ running average of position to mix into the centroid positions

each time the mixer is called. (Default is 0.1.)

relax_endpoints (bool): Whether or not to relax the endpoints of the string. (Default is False.) smooth_style (string): Apply ‘global’ or ‘local’ smoothing. ‘global’ smoothing considers an array of n_images

terms while applying smoothing to each image, while ‘local’ smoothing only considers the left and right neighbor of that image. (Default is ‘global’.)

nominal_smoothing (float): How much smoothing to apply to the updating centroid positions (endpoints are

not effected). The actual smoothing is the product of this nominal value, the number of images, and the mixing fraction, ala Vanden-Eijnden and Venturoli (2009). (Default is 0.1.)

use_reflection (boolean): Turn on or off SphereReflection. Using sphere reflection restricts each atom

in the simulation cell to evolve within the Wigner-Seitz cell of its reference position. This is helpful to restrict atom-hopping in the presence of a vacancy at higher temperatures. (Default is True.)

Output attributes:

energy_pot (list[float]): Total potential energy of the system in eV. positions (list[numpy.ndarray]): Atomic positions in angstroms for each centroid. forces (list[numpy.ndarray]): Atomic forces in eV/angstrom for each centroid.

define_execution_flow()[source]

Wire the logic for traversing the graph edges.

define_information_flow()[source]

Connect input and output information inside the graph. Also set the archive clock for all vertices.

define_vertices()[source]

Add child vertices to the graph.

get_barrier(frame=None, use_minima=True)[source]

Get the energy barrier from the 0th image to the highest energy (saddle state).

Parameters
  • frame (int) – A particular dump. (Default is None, the final dump.)

  • use_minima (bool) – Whether to use the minima of the energies to compute tha barrier. (Default is False, use the 0th value.)

Returns

the forward migration barrier.

Return type

(float)

get_forward_barrier(frame=None, use_minima=False)[source]

Get the energy barrier from the 0th image to the highest energy (saddle state).

Parameters
  • frame (int) – A particular dump. (Default is None, the final dump.)

  • use_minima (bool) – Whether to use the minima of the energies to compute tha barrier. (Default is False, use the 0th value.)

Returns

the forward migration barrier.

Return type

(float)

get_output()[source]

Define the output dictionary to be returned when the graph traversal completes. This synchronizes the behaviour of primitive vertices and compound vertices when they themselves are the child vertex in another graph.

get_reverse_barrier(frame=None, use_minima=False)[source]

Get the energy barrier from the final image to the highest energy (saddle state).

Parameters
  • frame (int) – A particular dump. (Default is None, the final dump.)

  • use_minima (bool) – Whether to use the minima of the energies to compute tha barrier. (Default is False, use the nth value.)

Returns

the backward migration barrier.

Return type

(float)

plot_string(ax=None, frame=None, plot_kwargs=None)[source]
Plot the string at an input frame. Here, frame is a dump of a step in the run. If `fts_job´ is the name

of the fts job, the number of dumps can be specified by the user while submitting the job, as:

>>> fts_job.set_output_whitelist(**{'calc_static_centroids': {'energy_pot': 20}})
and run the job. Here, it dumps (or records a frame) of `energy_pot´ from the `calc_static_centroids´ vertex

once every 20 steps.

Default is plot the string at the final frame, as only the final dump is recorded. (unless specified

otherwise by the user!)

class pyiron_contrib.protocol.compound.finite_temperature_string.FTSEvolutionParallel(**kwargs)[source]

Bases: FTSEvolution

A version of FTSEvolution where the evolution of each image is executed in parallel, thus giving a

substantial speed-up. Maximum efficiency for parallelization can be achieved by setting the number of cores the job can use to the number of images, ie., cores / images = 1. Setting the number of cores greater than the number of images gives zero gain, and is wasteful if cores % images != 0.

Input attributes:
sleep_time (float): A delay in seconds for database access of results. For sqlite, a non-zero delay maybe

required. (Default is 0 seconds, no delay.)

For inherited input and output attributes, refer the FTSEvolution protocol.

define_execution_flow()[source]

Wire the logic for traversing the graph edges.

define_information_flow()[source]

Connect input and output information inside the graph. Also set the archive clock for all vertices.

define_vertices()[source]

Add child vertices to the graph.

class pyiron_contrib.protocol.compound.finite_temperature_string.ProtoFTSEvoPar(project=None, job_name=None)[source]

Bases: Protocol, FTSEvolutionParallel

class pyiron_contrib.protocol.compound.finite_temperature_string.ProtoFTSEvoSer(project=None, job_name=None)[source]

Bases: Protocol, FTSEvolution