pyiron.project module

class pyiron.project.Project(path='', user=None, sql_query=None)[source]

Bases: pyiron.base.project.generic.Project

The project is the central class in pyiron, all other objects can be created from the project object.

  • path (GenericPath, str) – path of the project defined by GenericPath, absolute or relative (with respect to current working directory) path

  • user (str) – current pyiron user

  • sql_query (str) – SQL query to only select a subset of the existing jobs within the current project

.. attribute:: root_path

the pyiron user directory, defined in the .pyiron configuration

.. attribute:: project_path

the relative path of the current project / folder starting from the root path of the pyiron user directory

.. attribute:: path

the absolute path of the current project / folder

.. attribute:: base_name

the name of the current project / folder

.. attribute:: history

previously opened projects / folders

.. attribute:: parent_group

parent project - one level above the current project

.. attribute:: user

current unix/linux/windows user who is running pyiron

.. attribute:: sql_query

an SQL query to limit the jobs within the project to a subset which matches the SQL query.

.. attribute:: db

connection to the SQL database

.. attribute:: job_type
Job Type object with all the available job types: [‘StructureContainer’, ‘StructurePipeline’, ‘AtomisticExampleJob’,

‘ExampleJob’, ‘Lammps’, ‘KMC’, ‘Sphinx’, ‘Vasp’, ‘GenericMaster’, ‘SerialMaster’, ‘AtomisticSerialMaster’, ‘ParallelMaster’, ‘KmcMaster’, ‘ThermoLambdaMaster’, ‘RandomSeedMaster’, ‘MeamFit’, ‘Murnaghan’, ‘MinimizeMurnaghan’, ‘ElasticMatrix’, ‘ConvergenceVolume’, ‘ConvergenceEncutParallel’, ‘ConvergenceKpointParallel’, ’PhonopyMaster’, ‘DefectFormationEnergy’, ‘LammpsASE’, ‘PipelineMaster’, ’TransformationPath’, ‘ThermoIntEamQh’, ‘ThermoIntDftEam’, ‘ScriptJob’, ‘ListMaster’]


Copy the project object - copying just the Python object but maintaining the same pyiron path


copy of the project object

Return type


static create_ase_bulk(name, crystalstructure=None, a=None, c=None, covera=None, u=None, orthorhombic=False, cubic=False)[source]

Creating bulk systems using ASE bulk module.

Crystal structure and lattice constant(s) will be guessed if not provided.

name: str

Chemical symbol or symbols as in ‘MgO’ or ‘NaCl’.

crystalstructure: str

Must be one of sc, fcc, bcc, hcp, diamond, zincblende, rocksalt, cesiumchloride, fluorite or wurtzite.

a: float

Lattice constant.

c: float

Lattice constant.

c_over_a: float

c/a ratio used for hcp. Default is ideal ratio: sqrt(8/3).

u: float

Internal coordinate for Wurtzite structure.

orthorhombic: bool

Construct orthorhombic unit cell instead of primitive cell which is the default.

cubic: bool

Construct cubic unit cell if possible.

static create_atoms(symbols=None, positions=None, numbers=None, tags=None, momenta=None, masses=None, magmoms=None, charges=None, scaled_positions=None, cell=None, pbc=None, celldisp=None, constraint=None, calculator=None, info=None, indices=None, elements=None, dimension=None, species=None, **qwargs)[source]

Creates a atomistics.structure.atoms.Atoms instance.

  • elements (list/numpy.ndarray) – List of strings containing the elements or a list of atomistics.structure.periodic_table.ChemicalElement instances

  • numbers (list/numpy.ndarray) – List of atomic numbers of elements

  • symbols (list/numpy.ndarray) – List of chemical symbols

  • positions (list/numpy.ndarray) – List of positions

  • scaled_positions (list/numpy.ndarray) – List of scaled positions (relative coordinates)

  • pbc (boolean) – Tells if periodic boundary conditions should be applied

  • cell (list/numpy.ndarray) – A 3x3 array representing the lattice vectors of the structure

  • momenta (list/numpy.ndarray) – List of momentum values

  • tags (list/numpy.ndarray) – A list of tags

  • masses (list/numpy.ndarray) – A list of masses

  • magmoms (list/numpy.ndarray) – A list of magnetic moments

  • charges (list/numpy.ndarray) – A list of point charges

  • celldisp

  • constraint (list/numpy.ndarray) – A list of constraints

  • calculator – ASE calculator

  • info (list/str) – ASE compatibility

  • indices (list/numpy.ndarray) – The list of species indices

  • dimension (int) – Dimension of the structure

  • species (list) – List of species


The required structure instance

Return type


static create_element(parent_element, new_element_name=None, spin=None, potential_file=None)[source]
  • parent_element (str, int) – The parent element eq. “N”, “O”, “Mg” etc.

  • new_element_name (str) – The name of the new parent element (can be arbitrary)

  • spin (float) – Value of the magnetic moment (with sign)

  • potential_file (str) – Location of the new potential file if necessary


atomistics.structure.periodic_table.ChemicalElement instance

create_job(job_type, job_name)[source]

Create one of the following jobs: - ‘StructureContainer’: - ‘StructurePipeline’: - ‘AtomisticExampleJob’: example job just generating random number - ‘ExampleJob’: example job just generating random number - ‘Lammps’: - ‘KMC’: - ‘Sphinx’: - ‘Vasp’: - ‘GenericMaster’: - ‘SerialMaster’: series of jobs run in serial - ‘AtomisticSerialMaster’: - ‘ParallelMaster’: series of jobs run in parallel - ‘KmcMaster’: - ‘ThermoLambdaMaster’: - ‘RandomSeedMaster’: - ‘MeamFit’: - ‘Murnaghan’: - ‘MinimizeMurnaghan’: - ‘ElasticMatrix’: - ‘ConvergenceVolume’: - ‘ConvergenceEncutParallel’: - ‘ConvergenceKpointParallel’: - ’PhonopyMaster’: - ‘DefectFormationEnergy’: - ‘LammpsASE’: - ‘PipelineMaster’: - ’TransformationPath’: - ‘ThermoIntEamQh’: - ‘ThermoIntDftEam’: - ‘ScriptJob’: Python script or jupyter notebook job container - ‘ListMaster’: list of jobs

  • job_type (str) – job type can be [‘StructureContainer’, ‘StructurePipeline’, ‘AtomisticExampleJob’, ‘ExampleJob’, ‘Lammps’, ‘KMC’, ‘Sphinx’, ‘Vasp’, ‘GenericMaster’, ‘SerialMaster’, ‘AtomisticSerialMaster’, ‘ParallelMaster’, ‘KmcMaster’, ‘ThermoLambdaMaster’, ‘RandomSeedMaster’, ‘MeamFit’, ‘Murnaghan’, ‘MinimizeMurnaghan’, ‘ElasticMatrix’, ‘ConvergenceVolume’, ‘ConvergenceEncutParallel’, ‘ConvergenceKpointParallel’, ’PhonopyMaster’, ‘DefectFormationEnergy’, ‘LammpsASE’, ‘PipelineMaster’, ’TransformationPath’, ‘ThermoIntEamQh’, ‘ThermoIntDftEam’, ‘ScriptJob’, ‘ListMaster’]

  • job_name (str) – name of the job


job object depending on the job_type selected

Return type


static create_object(object_type)[source]



static create_structure(element, bravais_basis, lattice_constant)[source]
  • element

  • bravais_basis

  • lattice_constant


static create_surface(element, surface_type, size=(1, 1, 1), vacuum=1.0, center=False, **kwargs)[source]

Generates surfaces instances based on the module. :param element: Element name :type element: str :param surface_type: The string specifying the surface type generators available through ase (fcc111, :type surface_type: str :param hcp0001 etc.): :param size: Size of the surface :type size: turple :param vacuum: Length of vacuum layer added to the surface along the z direction :type vacuum: float :param center: Tells if the surface layers have to be at the center or at one end along the z-direction :type center: boolean :param **kwargs: Additional, arguments you would normally pass to the structure generator like ‘a’, ‘b’, :param ‘orthogonal’ etc.:


surface (atomistics.structure.atoms.Atoms instance)

get_structure(job_specifier, iteration_step=-1, wrap_atoms=True)[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 job_specifier: name of the job or job ID :type job_specifier: str, int :param iteration_step: Step for which the structure is requested :type iteration_step: int :param wrap_atoms: True if the atoms are to be wrapped back into the unit cell :type wrap_atoms: bool


atomistics.structure.atoms.Atoms object



import_from_path(path, recursive=True)[source]
  • path

  • recursive


import_single_calculation(project_to_import_from, rel_path=None, job_type='Vasp')[source]
  • rel_path

  • project_to_import_from

  • job_type (str) – Type of the calculation which is going to be imported

static inspect_emperical_potentials()[source]
static inspect_periodic_table()[source]
static inspect_pseudo_potentials()[source]
static list_publications(bib_format='dict')[source]

List the publications used in this project.


bib_format (str) – [‘dict’, ‘bibtex’, ‘apa’]


list of publications in Bibtex format.

Return type


load_from_jobpath(job_id=None, db_entry=None, convert_to_object=True)[source]

Internal function to load an existing job either based on the job ID or based on the database entry dictionary.

  • job_id (int) – Job ID - optional, but either the job_id or the db_entry is required.

  • db_entry (dict) – database entry dictionary - optional, but either the job_id or the db_entry is required.

  • convert_to_object (bool) – convert the object to an pyiron object or only access the HDF5 file - default=True accessing only the HDF5 file is about an order of magnitude faster, but only provides limited functionality. Compare the GenericJob object to JobCore object.


Either the full GenericJob object or just a reduced JobCore object

Return type

GenericJob, JobCore