pyiron.atomistics.master package

Submodules

pyiron.atomistics.master.convergence_volume module

class pyiron.atomistics.master.convergence_volume.ConvergenceVolume(project, job_name)[source]

Bases: pyiron.atomistics.master.serial.SerialMaster

Parameters
  • project

  • job_name

create_next(job_name=None)[source]
Parameters

job_name

Returns:

pyiron.atomistics.master.convergence_volume.convergence_goal(self, **qwargs)[source]

pyiron.atomistics.master.murnaghan module

class pyiron.atomistics.master.murnaghan.DebyeModel(murnaghan, num_steps=50)[source]

Bases: object

Calculate Thermodynamic Properties based on the Murnaghan output

debye_temperature
energy_vib(T, debye_T=None, low_T_limit=True)[source]
num_steps
polynomial(poly_fit=None, volumes=None)[source]
volume
class pyiron.atomistics.master.murnaghan.EnergyVolumeFit(volume_lst=None, energy_lst=None)[source]

Bases: object

Fit energy volume curves

Parameters
  • volume_lst (list/numpy.dnarray) – vector of volumes

  • energy_lst (list/numpy.dnarray) – vector of energies

.. attribute:: volume_lst

vector of volumes

.. attribute:: energy_lst

vector of energies

static birch(V, E0, B0, BP, V0)[source]

From Intermetallic compounds: Principles and Practice, Vol. I: Principles Chapter 9 pages 195-210 by M. Mehl. B. Klein, D. Papaconstantopoulos paper downloaded from Web

case where n=0

static birchmurnaghan_energy(V, E0, B0, BP, V0)[source]

BirchMurnaghan equation from PRB 70, 224107

energy_lst
fit_eos_general(volume_lst=None, energy_lst=None, fittype='birchmurnaghan')[source]

Fit on of the equations of state

Parameters
  • volume_lst (list/numpy.dnarray/None) – vector of volumes

  • energy_lst (list/numpy.dnarray/None) – vector of energies

  • fittype (str) – on of the following [‘birch’, ‘birchmurnaghan’, ‘murnaghan’, ‘pouriertarantola’, ‘vinet’]

Returns

dictionary with fit results

Return type

dict

fit_polynomial(volume_lst=None, energy_lst=None, fit_order=3)[source]

Fit a polynomial

Parameters
  • volume_lst (list/numpy.dnarray/None) – vector of volumes

  • energy_lst (list/numpy.dnarray/None) – vector of energies

  • fit_order (int) – Degree of the polynomial

Returns

dictionary with fit results

Return type

dict

static get_error(x_lst, y_lst, p_fit)[source]
Parameters
  • x_lst

  • y_lst

  • p_fit

Returns

numpy.dnarray

static murnaghan(V, E0, B0, BP, V0)[source]

From PRB 28,5480 (1983

static pouriertarantola(V, E0, B0, BP, V0)[source]
static vinet_energy(V, E0, B0, BP, V0)[source]

Vinet equation from PRB 70, 224107

volume_lst
class pyiron.atomistics.master.murnaghan.Murnaghan(project, job_name='murnaghan')[source]

Bases: pyiron.atomistics.master.parallel.AtomisticParallelMaster

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 meta jobs derived from the ParallelMaster.

equilibrium_energy
equilibrium_volume
fit
fit_birch_murnaghan(vol_erg_dic=None)[source]
fit_murnaghan(vol_erg_dic=None)[source]
fit_polynomial(fit_order=3, vol_erg_dic=None)[source]
fit_vinet(vol_erg_dic=None)[source]
get_structure(iteration_step=-1)[source]

Returns: Structure with equilibrium volume

list_structures()[source]
plot(num_steps=100, plt_show=True)[source]
poly_fit(fit_order=3, vol_erg_dic=None)[source]
class pyiron.atomistics.master.murnaghan.MurnaghanInt(project, job_name)[source]

Bases: pyiron.atomistics.master.murnaghan.Murnaghan

class pyiron.atomistics.master.murnaghan.MurnaghanJobGenerator(job)[source]

Bases: pyiron.base.master.parallel.JobGenerator

static job_name(parameter)[source]
modify_job(job, parameter)[source]
parameter_list

Returns: (list)

pyiron.atomistics.master.murnaghan.birch(V, E0, B0, BP, V0)[source]

From Intermetallic compounds: Principles and Practice, Vol. I: Principles Chapter 9 pages 195-210 by M. Mehl. B. Klein, D. Papaconstantopoulos paper downloaded from Web

case where n=0

pyiron.atomistics.master.murnaghan.birchmurnaghan_energy(V, E0, B0, BP, V0)[source]

BirchMurnaghan equation from PRB 70, 224107

pyiron.atomistics.master.murnaghan.debye_function(x)[source]
pyiron.atomistics.master.murnaghan.debye_integral(x)[source]
pyiron.atomistics.master.murnaghan.fit_leastsq(p0, datax, datay, fittype='vinet')[source]

Least square fit

Parameters
  • p0 (list) – [E0, B0, BP, V0] list of fit parameters

  • datax (float/numpy.dnarray) – volumes to fit

  • datay (float/numpy.dnarray) – energies corresponding to the volumes

  • fittype (str) – on of the following [‘birch’, ‘birchmurnaghan’, ‘murnaghan’, ‘pouriertarantola’, ‘vinet’]

Returns

[E0, B0, BP, V0], [E0_err, B0_err, BP_err, V0_err]

Return type

list

pyiron.atomistics.master.murnaghan.fitfunction(parameters, vol, fittype='vinet')[source]

Fit the energy volume curve

Parameters
  • parameters (list) – [E0, B0, BP, V0] list of fit parameters

  • vol (float/numpy.dnarray) – single volume or a vector of volumes as numpy array

  • fittype (str) – on of the following [‘birch’, ‘birchmurnaghan’, ‘murnaghan’, ‘pouriertarantola’, ‘vinet’]

Returns

single energy as float or a vector of energies as numpy array

Return type

(float/numpy.dnarray)

pyiron.atomistics.master.murnaghan.murnaghan(V, E0, B0, BP, V0)[source]

From PRB 28,5480 (1983

pyiron.atomistics.master.murnaghan.pouriertarantola(V, E0, B0, BP, V0)[source]

Pourier-Tarantola equation from PRB 70, 224107

pyiron.atomistics.master.murnaghan.vinet_energy(V, E0, B0, BP, V0)[source]

Vinet equation from PRB 70, 224107

pyiron.atomistics.master.parallel module

class pyiron.atomistics.master.parallel.AtomisticParallelMaster(project, job_name)[source]

Bases: pyiron.base.master.parallel.ParallelMaster, pyiron.atomistics.job.atomistic.AtomisticGenericJob

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

The required structure

Return type

pyiron.atomistics.structure.atoms.Atoms

structure

Returns:

class pyiron.atomistics.master.parallel.GenericOutput[source]

Bases: collections.OrderedDict

class pyiron.atomistics.master.parallel.MapJobGenerator(job)[source]

Bases: pyiron.base.master.parallel.JobGenerator

modify_job(job, parameter)[source]
parameter_list

Returns: (list)

class pyiron.atomistics.master.parallel.MapMaster(project, job_name)[source]

Bases: pyiron.atomistics.master.parallel.AtomisticParallelMaster

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 meta jobs derived from the ParallelMaster.

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

Restore the ParameterMaster from an HDF5 file

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

  • group_name (str) – HDF5 subgroup name - optional

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

Store the ParameterMaster in an HDF5 file

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

  • group_name (str) – HDF5 subgroup name - optional

pyiron.atomistics.master.phonopy module

class pyiron.atomistics.master.phonopy.PhonopyJob(project, job_name)[source]

Bases: pyiron.atomistics.master.parallel.AtomisticParallelMaster

Parameters
  • project

  • job_name

collect_output()[source]

Returns:

dos_energies

Returns:

dos_total

Returns:

dynamical_matrix

Returns:

dynamical_matrix_at_q(q)[source]
Parameters

q

Returns:

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

Restore the PhonopyJob from an HDF5 file

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

  • group_name (str) – HDF5 subgroup name - optional

get_hesse_matrix()[source]

Returns:

get_thermal_properties(t_min=1, t_max=1500, t_step=50, temperatures=None)[source]
Parameters
  • t_min

  • t_max

  • t_step

  • temperatures

Returns:

list_structures()[source]
plot_dos(ax=None, *args, **qwargs)[source]
Parameters
  • *args

  • ax

  • **qwargs

Returns:

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 executed within the GenericJob class and depending on the run_mode of the Parallelmaster and its child jobs a more specific run function is selected.

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

Store the PhonopyJob in an HDF5 file

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

  • group_name (str) – HDF5 subgroup name - optional

write_phonopy_force_constants(file_name='FORCE_CONSTANTS', cwd=None)[source]
Parameters
  • file_name

  • cwd

Returns:

class pyiron.atomistics.master.phonopy.PhonopyJobGenerator(job)[source]

Bases: pyiron.base.master.parallel.JobGenerator

static job_name(parameter)[source]
modify_job(job, parameter)[source]
parameter_list

Returns: (list)

class pyiron.atomistics.master.phonopy.PhonopyMaster(project, job_name)[source]

Bases: pyiron.atomistics.master.phonopy.PhonopyJob

Parameters
  • project

  • job_name

class pyiron.atomistics.master.phonopy.PhonopyMaster2(project, job_name)[source]

Bases: pyiron.atomistics.master.phonopy.PhonopyJob

Parameters
  • project

  • job_name

pyiron.atomistics.master.phonopy.atoms_to_phonopy(atom)[source]

Convert ASE-like Atoms to Phonopy Atoms :param atom: ASE-like Atoms

Returns

Phonopy Atoms

pyiron.atomistics.master.phonopy.phonopy_to_atoms(ph_atoms)[source]

Convert Phonopy Atoms to ASE-like Atoms :param ph_atoms: Phonopy Atoms object

Returns: ASE-like Atoms object

class pyiron.atomistics.master.phonopy.thermal(temps, fe, entropy, cv)[source]

Bases: object

Parameters
  • temps

  • fe

  • entropy

  • cv

pyiron.atomistics.master.serial module

class pyiron.atomistics.master.serial.GenericOutput[source]

Bases: collections.OrderedDict

class pyiron.atomistics.master.serial.SerialMaster(project, job_name)[source]

Bases: pyiron.base.master.serial.SerialMasterBase, pyiron.atomistics.job.atomistic.AtomisticGenericJob

The serial master class is a metajob consisting of a dynamic list of jobs which are executed in serial mode. The job is derived from the GenericMaster.

Parameters
  • project (ProjectHDFio) – ProjectHDFio instance which points to the HDF5 file the job is stored in

  • job_name (str) – name of the job, which has to be unique within the project

.. attribute:: job_name

name of the job, which has to be unique within the project

.. attribute:: status
execution status of the job, can be one of the following [initialized, appended, created, submitted, running,

aborted, collect, suspended, refresh, busy, finished]

.. attribute:: job_id

unique id to identify the job in the pyiron database

.. attribute:: parent_id

job id of the predecessor job - the job which was executed before the current one in the current job series

.. attribute:: master_id

job id of the master job - a meta job which groups a series of jobs, which are executed either in parallel or in serial.

.. attribute:: child_ids

list of child job ids - only meta jobs have child jobs - jobs which list the meta job as their master

.. attribute:: project

Project instance the jobs is located in

.. attribute:: project_hdf5

ProjectHDFio instance which points to the HDF5 file the job is stored in

.. attribute:: job_info_str

short string to describe the job by it is job_name and job ID - mainly used for logging

.. attribute:: working_directory

working directory of the job is executed in - outside the HDF5 file

.. attribute:: path

path to the job as a combination of absolute file system path and path within the HDF5 file.

.. attribute:: version

Version of the hamiltonian, which is also the version of the executable unless a custom executable is used.

.. attribute:: executable

Executable used to run the job - usually the path to an external executable.

.. attribute:: library_activated

For job types which offer a Python library pyiron can use the python library instead of an external executable.

.. attribute:: server

Server object to handle the execution environment for the job.

.. attribute:: queue_id

the ID returned from the queuing system - it is most likely not the same as the job ID.

.. attribute:: logger

logger object to monitor the external execution and internal pyiron warnings.

.. attribute:: restart_file_list

list of files which are used to restart the calculation from these files.

.. attribute:: job_type
Job type object with all the available job types: [‘ExampleJob’, ‘SerialMaster’, ‘ParallelMaster’, ‘ScriptJob’,

‘ListMaster’]

.. attribute:: child_names

Dictionary matching the child ID to the child job name.

.. attribute:: start_job

The first job of the series.

.. attribute:: input

The input of the start job - the first job of the series.

get_structure(iteration_step=-1)[source]

Returns:

structure

Returns:

pyiron.atomistics.master.structure module

class pyiron.atomistics.master.structure.StructureJobGenerator(job)[source]

Bases: pyiron.base.master.parallel.JobGenerator

JobGenerator for the StructureListMaster - this class implements the functions to generate the parameter list, modify the individual jobs according to the parameter list and generate the new job names according to the parameter list.

static job_name(parameter)[source]

Generate job name for a give set of parameters

Parameters

parameter – For the StructureListMaster the structures are simply numbered - struct_0, struct_1, …

Returns

job name for the next job

Return type

str

modify_job(job, parameter)[source]

Modify the next job by setting the structure for the specific parameter

Parameters
  • job (GenericJob) – next job object to be executed

  • parameter – includes the atomistic structure

Returns

Return type

GenericJob

parameter_list

Returns: (list): [[index(int), pyiron.atomistics.structure.atoms.Atoms], …]

class pyiron.atomistics.master.structure.StructureListMaster(project, job_name)[source]

Bases: pyiron.base.master.parallel.ParallelMaster

The GenericMaster is the template class for all meta jobs - meaning all jobs which contain multiple other jobs. It defines the shared functionality of the different kind of job series.

Parameters
  • project (ProjectHDFio) – ProjectHDFio instance which points to the HDF5 file the job is stored in

  • job_name (str) – name of the job, which has to be unique within the project

.. attribute:: job_name

name of the job, which has to be unique within the project

.. attribute:: status
execution status of the job, can be one of the following [initialized, appended, created, submitted,

running, aborted, collect, suspended, refresh, busy, finished]

.. attribute:: job_id

unique id to identify the job in the pyiron database

.. attribute:: parent_id

job id of the predecessor job - the job which was executed before the current one in the current job series

.. attribute:: master_id

job id of the master job - a meta job which groups a series of jobs, which are executed either in parallel or in serial.

.. attribute:: child_ids

list of child job ids - only meta jobs have child jobs - jobs which list the meta job as their master

.. attribute:: project

Project instance the jobs is located in

.. attribute:: project_hdf5

ProjectHDFio instance which points to the HDF5 file the job is stored in

.. attribute:: job_info_str

short string to describe the job by it is job_name and job ID - mainly used for logging

.. attribute:: working_directory

working directory of the job is executed in - outside the HDF5 file

.. attribute:: path

path to the job as a combination of absolute file system path and path within the HDF5 file.

.. attribute:: version

Version of the hamiltonian, which is also the version of the executable unless a custom executable is used.

.. attribute:: executable

Executable used to run the job - usually the path to an external executable.

.. attribute:: library_activated

For job types which offer a Python library pyiron can use the python library instead of an external executable.

.. attribute:: server

Server object to handle the execution environment for the job.

.. attribute:: queue_id

the ID returned from the queuing system - it is most likely not the same as the job ID.

.. attribute:: logger

logger object to monitor the external execution and internal pyiron warnings.

.. attribute:: restart_file_list

list of files which are used to restart the calculation from these files.

.. attribute:: job_type
Job type object with all the available job types: [‘ExampleJob’, ‘SerialMaster’, ‘ParallelMaster’,

‘ScriptJob’, ‘ListMaster’]

.. attribute:: child_names

Dictionary matching the child ID to the child job name.

collect_output()[source]

Implemented for compatibilty

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

Restore the StructureListMaster object in the HDF5 File

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

  • group_name (str) – HDF5 subgroup name - optional

run_if_interactive_non_modal()[source]

Implemented for compatibilty

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

Store the StructureListMaster object in the HDF5 File

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

  • group_name (str) – HDF5 subgroup name - optional

Module contents