pyiron package¶
Subpackages¶
- pyiron.atomistics package
- Subpackages
- pyiron.atomistics.generic package
- pyiron.atomistics.job package
- pyiron.atomistics.master package
- pyiron.atomistics.md_analysis package
- pyiron.atomistics.structure package
- Submodules
- pyiron.atomistics.structure.atom module
- pyiron.atomistics.structure.atoms module
- pyiron.atomistics.structure.ovito module
- pyiron.atomistics.structure.periodic_table module
- pyiron.atomistics.structure.phonopy module
- pyiron.atomistics.structure.pyironase module
- pyiron.atomistics.structure.sparse_list module
- Module contents
- pyiron.atomistics.thermodynamics package
- pyiron.atomistics.volumetric package
- Module contents
- Subpackages
- pyiron.base package
- Subpackages
- pyiron.base.database package
- pyiron.base.generic package
- pyiron.base.job package
- Submodules
- pyiron.base.job.core module
- pyiron.base.job.executable module
- pyiron.base.job.generic module
- pyiron.base.job.interactive module
- pyiron.base.job.jobstatus module
- pyiron.base.job.jobtype module
- pyiron.base.job.path module
- pyiron.base.job.script module
- pyiron.base.job.wrapper module
- Module contents
- pyiron.base.master package
- pyiron.base.project package
- pyiron.base.pyio package
- pyiron.base.server package
- pyiron.base.settings package
- Module contents
- Subpackages
- pyiron.dft package
- pyiron.lammps package
- pyiron.testing package
- pyiron.vasp package
Submodules¶
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.
Parameters: - 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
()[source]¶ Copy the project object - copying just the Python object but maintaining the same pyiron path
Returns: copy of the project object Return type: Project
-
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.
Parameters: - 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
Returns: The required structure instance
Return type:
-
static
create_element
(parent_element, new_element_name=None, spin=None, potential_file=None)[source]¶ Parameters: - 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
Returns: 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
Parameters: - 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
Returns: job object depending on the job_type selected
Return type:
-
static
create_structure
(element, bravais_basis, lattice_constant)[source]¶ Parameters: - element –
- bravais_basis –
- lattice_constant –
Returns:
-
static
create_surface
(element, surface_type, size=(1, 1, 1), vacuum=1.0, center=False, **kwargs)[source]¶ Generates surfaces instances based on the ase.build.surface 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.:
Returns: surface (atomistics.structure.atoms.Atoms instance)
-
get_structure
(job_specifier, 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 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
Returns: atomistics.structure.atoms.Atoms object
-
import_single_calculation
(project_to_import_from, rel_path=None, job_type='Vasp')[source]¶ Parameters: - rel_path –
- project_to_import_from –
- job_type (str) – Type of the calculation which is going to be imported
-
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.
Parameters: - 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.
Returns: Either the full GenericJob object or just a reduced JobCore object
Return type: