pyiron.atomistics.job package

Submodules

pyiron.atomistics.job.atomistic module

class pyiron.atomistics.job.atomistic.AtomisticGenericJob(project, job_name)[source]

Bases: pyiron.base.job.generic.GenericJob

animate_structure(spacefill=True, show_cell=True, stride=1, center_of_mass=False, particle_size=0.5)[source]

Animates the job if a trajectory is present

Parameters:
  • spacefill (bool) –
  • show_cell (bool) –
  • stride (int) –

    show animation every stride [::stride] use value >1 to make animation faster

    default=1
  • center_of_mass (bool) –
Returns:

nglview IPython widget

Return type:

animation

calc_md(temperature=None, pressure=None, n_ionic_steps=1000, time_step=None, n_print=100, delta_temp=1.0, delta_press=None, seed=None, tloop=None, rescale_velocity=True, langevin=False)[source]
calc_minimize(e_tol=1e-08, f_tol=1e-08, max_iter=1000, pressure=None, n_print=1)[source]
Parameters:
  • e_tol
  • f_tol
  • max_iter
  • pressure
  • n_print

Returns:

calc_static()[source]

Returns:

continue_with_final_structure(job_type=None, job_name=None)[source]
Parameters:
  • job_type
  • job_name

Returns:

continue_with_restart_files(job_type=None, job_name=None)[source]
Parameters:
  • job_type
  • job_name

Returns:

copy_to(project=None, new_job_name=None, input_only=False, new_database_entry=True)[source]
Parameters:
  • destination
  • new_job_name
  • input_only
  • new_database_entry

Returns:

db_entry()[source]

Generate the initial database entry

Returns:db_dict
Return type:(dict)
from_hdf(hdf=None, group_name=None)[source]

Recreates instance from the hdf5 file :param hdf: Path to the hdf5 file :type hdf: str :param group_name: Name of the group which contains the object :type group_name: str

get_encut()[source]
get_final_structure()[source]

Returns:

get_structure(iteration_step=-1)[source]

Gets the structure from a given iteration step of the simulation (MD/ionic relaxation). For static calculations there is only one ionic iteration step :param iteration_step: Step for which the structure is requested :type iteration_step: int

Returns:atomistics.structure.atoms.Atoms object
gui()[source]

Returns:

restart(snapshot=-1, job_name=None, job_type=None)[source]

Restart a new job created from an existing calculation. :param project: Project instance at which the new job should be created :type project: pyiron.project.Project instance :param snapshot: Snapshot of the calculations which would be the initial structure of the new job :type snapshot: int :param job_name: Job name :type job_name: str :param job_type: Job type :type job_type: str

Returns:New job
Return type:new_ham
set_encut(encut)[source]
set_kpoints(mesh=None, scheme='MP', center_shift=None, symmetry_reduction=True, manual_kpoints=None, weights=None, reciprocal=True)[source]
store_structure()[source]

Returns:

structure

type: Returns

to_hdf(hdf=None, group_name=None)[source]

Stores the instance attributes into the hdf5 file

trajectory(stride=1, center_of_mass=False, atom_indices=None, snapshot_indices=None)[source]
Parameters:
  • stride (int) – The trajectories are generated with every ‘stride’ steps
  • center_of_mass (list/numpy.ndarray) – The center of mass
  • atom_indices (list/numpy.ndarray) – The atom indices for which the trajectory should be generated
  • snapshot_indices (list/numpy.ndarray) – The snapshots for which the trajectory should be generated
Returns:

Trajectory instance

Return type:

pyiron.atomistics.job.atomistic.Trajectory

validate_ready_to_run()[source]

Returns:

view_structure(snapshot=-1, spacefill=True, show_cell=True)[source]
Parameters:
  • snapshot (int) – Snapshot of the trajectory one wants
  • spacefill (bool) –
  • show_cell (bool) –
Returns:

nglview IPython widget

Return type:

view

write_traj(filename, format=None, parallel=True, append=False, stride=1, center_of_mass=False, **kwargs)[source]

Writes the trajectory in a given file format based on the ase.io.write function.

Parameters:
  • filename (str) – Filename of the output
  • format (str) – The specific format of the output
  • parallel (bool) –
  • append (bool) –
  • stride (int) – Writes trajectory every stride steps
  • center_of_mass (bool) – True if the positions are centered on the COM
  • **kwargs – Additional ase arguments
class pyiron.atomistics.job.atomistic.GenericInput(input_file_name=None, table_name='generic')[source]

Bases: pyiron.base.generic.parameters.GenericParameters

load_default()[source]

Loads the default file content

class pyiron.atomistics.job.atomistic.GenericOutput(job)[source]

Bases: object

cells
computation_time
energy_pot
energy_tot
forces
positions
pressures
steps
temperature
unwrapped_positions
volume
class pyiron.atomistics.job.atomistic.Trajectory(positions, structure, center_of_mass=False, cells=None)[source]

Bases: object

A trajectory instance compatible with the ase.io class

Parameters:
  • positions (numpy.ndarray) – The array of the trajectory in cartesian coordinates
  • structure (pyiron.atomistics.structure.atoms.Atoms) – The initial structure instance from which the species info is derived
  • center_of_mass (bool) – False (default) if the specified positions are w.r.t. the origin
  • cells (numpy.ndarray) – Optional argument of the cell shape at every time step (Nx3x3 array) when the volume varies

pyiron.atomistics.job.interactive module

class pyiron.atomistics.job.interactive.GenericInteractive(project, job_name)[source]

Bases: pyiron.atomistics.job.atomistic.AtomisticGenericJob, pyiron.base.job.interactive.InteractiveBase

current_structure
get_structure(iteration_step=-1)[source]

Gets the structure from a given iteration step of the simulation (MD/ionic relaxation). For static calculations there is only one ionic iteration step :param iteration_step: Step for which the structure is requested :type iteration_step: int

Returns:atomistics.structure.atoms.Atoms object
initial_structure
interactive_cells_getter()[source]
interactive_cells_setter(cell)[source]
interactive_collect()[source]
interactive_energy_pot_getter()[source]
interactive_energy_tot_getter()[source]
interactive_enforce_structure_reset
interactive_forces_getter()[source]
interactive_indices_getter()[source]
interactive_indices_setter(indices)[source]
interactive_magnetic_forces_getter()[source]
interactive_open()[source]
interactive_positions_getter()[source]
interactive_positions_setter(positions)[source]
interactive_pressures_getter()[source]
interactive_spin_constraints_getter()[source]
interactive_spin_constraints_setter(spins)[source]
interactive_spins_getter()[source]
interactive_steps_getter()[source]
interactive_stress_getter()[source]
interactive_structure_setter(structure)[source]
interactive_temperatures_getter()[source]
interactive_time_getter()[source]
interactive_unwrapped_positions_getter()[source]
interactive_volume_getter()[source]
run_if_interactive()[source]

For jobs which executables are available as Python library, those can also be executed with a library call instead of calling an external executable. This is usually faster than a single core python job.

structure

type: Returns

class pyiron.atomistics.job.interactive.GenericInteractiveOutput(job)[source]

Bases: pyiron.atomistics.job.atomistic.GenericOutput

cells
energy_pot
energy_tot
forces
indices
positions
pressures
steps
temperature
time
unwrapped_positions
volume
class pyiron.atomistics.job.interactive.InteractiveInterface[source]

Bases: object

get_cell()[source]
get_energy_pot()[source]
get_energy_tot()[source]
get_forces()[source]
get_positions()[source]
get_pressure()[source]
get_temperature()[source]
run_interactive()[source]
set_cell(cell)[source]
set_energy_pot(energy_pot)[source]
set_energy_tot(energy_tot)[source]
set_forces(forces)[source]
set_positions(positions)[source]
set_pressure(pressure)[source]
set_temperature(temperature)[source]

pyiron.atomistics.job.interactivewrapper module

class pyiron.atomistics.job.interactivewrapper.InteractiveWrapper(project, job_name)[source]

Bases: pyiron.base.master.generic.GenericMaster

collect_logfiles()[source]

Collect the log files of the external executable and store the information in the HDF5 file. This method has to be implemented in the individual hamiltonians.

collect_output()[source]

Collect the output files of the external executable and store the information in the HDF5 file. This method has to be implemented in the individual hamiltonians.

db_entry()[source]

Generate the initial database entry

Returns:db_dict
Return type:(dict)
from_hdf(hdf=None, group_name=None)[source]

Restore the ParallelMaster from an HDF5 file

Parameters:
  • hdf (ProjectHDFio) – HDF5 group object - optional
  • group_name (str) – HDF5 subgroup name - optional
get_final_structure()[source]

Returns:

ref_job

Get the reference job template from which all jobs within the ParallelMaster are generated.

Returns:reference job
Return type:GenericJob
ref_job_initialize()[source]
structure
to_hdf(hdf=None, group_name=None)[source]

Store the ParallelMaster in an HDF5 file

Parameters:
  • hdf (ProjectHDFio) – HDF5 group object - optional
  • group_name (str) – HDF5 subgroup name - optional
validate_ready_to_run()[source]

Validate that the calculation is ready to be executed. By default no generic checks are performed, but one could check that the input information is complete or validate the consistency of the input at this point.

pyiron.atomistics.job.potentials module

An abstract Potential class to provide an easy access for the available potentials. Currently implemented for the OpenKim https://openkim.org database.

class pyiron.atomistics.job.potentials.PotentialAbstract(potential_df, default_df=None, selected_atoms=None)[source]

Bases: object

The PotentialAbstract class loads a list of available potentials and sorts them. Afterwards the potentials can be accessed through:

PotentialAbstract.<Element>.<Element> or PotentialAbstract.find_potentials_set({<Element>, <Element>}
Parameters:
  • potential_df
  • default_df
  • selected_atoms
find(element)[source]

Find the potentials

Parameters:element (set, str) – element or set of elements for which you want the possible LAMMPS potentials
Returns:of possible potentials for the element or the combination of elements
Return type:list
find_by_name(potential_name)[source]
list()[source]

List the available potentials

Returns:of possible potentials for the element or the combination of elements
Return type:list

pyiron.atomistics.job.structurecontainer module

class pyiron.atomistics.job.structurecontainer.StructureContainer(project, job_name)[source]

Bases: pyiron.atomistics.job.atomistic.AtomisticGenericJob

append(structure_to_append)[source]

Metajobs like GenericMaster, ParallelMaster, SerialMaser or ListMaster allow other jobs to be appended. In the GenericJob definition this is only a template function.

from_hdf(hdf=None, group_name=None)[source]

Recreates instance from the hdf5 file :param hdf: Path to the hdf5 file :type hdf: str :param group_name: Name of the group which contains the object :type group_name: str

run_if_interactive()[source]

For jobs which executables are available as Python library, those can also be executed with a library call instead of calling an external executable. This is usually faster than a single core python job.

structure

type: Returns

to_hdf(hdf=None, group_name=None)[source]

Stores the instance attributes into the hdf5 file

Module contents