pyiron.atomistics.job.structurecontainer module

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

Bases: pyiron.atomistics.job.atomistic.AtomisticGenericJob

Container to save a list of structures in HDF5 together with tags.

Add new structures with append(), they are added to structure_lst. The HDF5 is written when run() is called.

append(structure_or_job)[source]

Add new structure to structure list.

The added structure will available in structure_lst. If the structure is added via a job, retrieve the latest structure and add its id to pyiron.atomistics.generic.Atoms.info.

Parameters

structure_or_job (AtomisticGenericJob/Atoms) – if AtomisticGenericJob add from get_structure(), otherwise add just the given Atoms

Returns

item added to structure_lst

Return type

dict

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.

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.

run_static()[source]

The run static function is called by run to execute the simulation.

property structure

first (or only) structure set in the container

Setter

Atoms, AtomisticGenericJob if a job is given take the last structure and add the job id to its pyiron.atomistics.structure.Atoms.info

Type

Atoms

property structure_lst

list of Atoms

Type

InputList

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

Store the GenericJob in an HDF5 file

Parameters
  • hdf (ProjectHDFio) – HDF5 group object - optional

  • group_name (str) – HDF5 subgroup name - optional

write_input()[source]

Write the input files for the external executable. This method has to be implemented in the individual hamiltonians.