pyiron_contrib.protocol.compound.molecular_dynamics module

class pyiron_contrib.protocol.compound.molecular_dynamics.ConfinedMD(**kwargs)[source]

Bases: MolecularDynamics

Similar to the MolecularDynamics protocol, ConfinedMD performs MD on a structure. The difference, is that the

atoms are confined to their lattice sites. This is especially helpful when vacancies are present in the structure, and atoms diffuse via the vacancies. This protocol prevents this diffusion from happening.

Input attributes:
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.)

use_reflection (boolean): Turn on or off SphereReflection (Default is True.) total_steps (int): The total number of times SphereReflection is called so far. (Default is 0.)

For inherited input and output attributes, refer the MolecularDynamics 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.molecular_dynamics.HarmonicMD(**kwargs)[source]

Bases: CompoundVertex

Runs molecular dynamics, but treats the atoms in the structure as harmonic oscillators. Calculates the forces

on each atom, and the total potential energy of the structure. If the spring constant is specified, the atoms act as Einstein atoms (independent of each other). If the Hessian / force constant matrix is specified, the atoms act as Debye atoms.

Input attributes:

ref_job_full_path (str): Path to the pyiron job to use for evaluating forces and energies. structure (Atoms): The structure evolve. 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.) time_step (float): MD time step in fs. (Default is 1.) 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.)

spring_constant (float): A single spring / force constant that is used to compute the restoring forces

on each atom. (Default is 1.)

force_constants (NxN matrix): The Hessian matrix, obtained from, for ex. Phonopy. (Default is None, treat

the atoms as independent harmonic oscillators (Einstein atoms.).)

Output attributes:

energy_pot (float): Total potential energy of the system in eV. energy_kin (float): Total kinetic energy of the system in eV. positions (numpy.ndarray): Atomic positions in angstroms. velocities (numpy.ndarray): Atomic velocities in angstroms/fs. forces (numpy.ndarray): Atomic forces in eV/angstrom. Note: These are the potential gradient forces; thermostat

forces (if any) are not saved.

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_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.

class pyiron_contrib.protocol.compound.molecular_dynamics.MolecularDynamics(**kwargs)[source]

Bases: CompoundVertex

Runs molecular dynamics. This isn’t particularly useful as almost every source code/plain job can do this on its

own, but rather this is intended for testing and teaching. It also serves as a useful starting point for developing algorithms with modified dynamics.

Input attributes:

ref_job_full_path (str): Path to the pyiron job to use for evaluating forces and energies. structure (Atoms): The structure evolve. 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.) time_step (float): MD time step in fs. (Default is 1.) 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.)

pressure (float): The pressure in GPa to be simulated (Default is None GPa) pressure_style (string): ‘isotropic’ or ‘anisotropic’. (Default is ‘anisotropic’) pressure_damping_timescale (float): Damping timescale in fs. (Default is None, no barostat is used.) compressibility (float): The compressibility of water in bar-1 (Default is 4.57e-5 bar-1) previous_volume (float): The default volume. (Defaults is None.) energy_kin (float): The default energy_kin. (Default is None.)

Output attributes:

energy_pot (float): Total potential energy of the system in eV. energy_kin (float): Total kinetic energy of the system in eV. positions (numpy.ndarray): Atomic positions in angstroms. velocities (numpy.ndarray): Atomic velocities in angstroms/fs. forces (numpy.ndarray): Atomic forces in eV/angstrom. Note: These are the potential gradient forces; thermostat

forces (if any) are not saved.

pressure (float): The isotropic pressure in GPa. volume (float): The volume of the system in Ang3.

DefaultWhitelist = {'calc_static': {'output': {'energy_pot': 1, 'forces': 1000}}, 'verlet_positions': {'output': {'positions': 1000}}, 'verlet_velocities': {'output': {'energy_kin': 1, 'velocities': 1000}}}
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_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.

class pyiron_contrib.protocol.compound.molecular_dynamics.ProtoConfinedMD(project=None, job_name=None)[source]

Bases: Protocol, ConfinedMD

class pyiron_contrib.protocol.compound.molecular_dynamics.ProtoHarmMD(project=None, job_name=None)[source]

Bases: Protocol, HarmonicMD

class pyiron_contrib.protocol.compound.molecular_dynamics.ProtoMD(project=None, job_name=None)[source]

Bases: Protocol, MolecularDynamics