pyiron.dft.job.generic module¶
-
class
pyiron.dft.job.generic.
GenericDFTJob
(project, job_name)[source]¶ Bases:
pyiron.atomistics.job.atomistic.AtomisticGenericJob
-
calc_md
(temperature=None, n_ionic_steps=1000, n_print=1, time_step=1.0, retain_charge_density=False, retain_electrostatic_potential=False, **kwargs)[source]¶
-
calc_minimize
(electronic_steps=60, ionic_steps=100, max_iter=None, pressure=None, algorithm=None, retain_charge_density=False, retain_electrostatic_potential=False, ionic_energy_tolerance=None, ionic_force_tolerance=None, ionic_energy=None, ionic_forces=None, volume_only=False)[source]¶ - Parameters
ionic_energy_tolerance (float) – Maximum energy difference between 2 steps
ionic_force_tolerance (float) – Maximum force magnitude that each of atoms is allowed to have
e_tol (float) – same as ionic_energy_tolerance (deprecated)
f_tol (float) – same as ionic_force_tolerance (deprecated)
max_iter (int) – Maximum number of force evluations
pressure (float/list) – Targetpressure values
n_print (int) – Print period
Returns:
-
calc_static
(electronic_steps=100, algorithm=None, retain_charge_density=False, retain_electrostatic_potential=False)[source]¶ Returns:
-
property
encut
¶
-
property
exchange_correlation_functional
¶
-
property
fix_spin_constraint
¶
-
property
fix_symmetry
¶
-
get_density_of_states
(sigma=0.1, shift_by_fermi_energy=True, grid=None)[source]¶ Get density of states from a fully converged result. A Gaussian smeared histogram is returned
- Parameters
sigma (float) – Gaussian smearing parameter in energy unit.
shift_by_fermi_energy (bool) – Shift the histogram by the Fermi energy value. Setting this to False will return code specific absolute values which have physically no meaning.
grid (list/numpy.ndarray) – Energy grid. If None, the interval between maximum and minimum eigenvalues plus 5 x sigma with a step length of sigma will be taken.
- Returns
grid and density of states (n_spin x energy_grid)
- Return type
(dict)
-
get_electronic_structure
()[source]¶ Gets the electronic structure instance from the hdf5 file
- Returns
pyiron.atomistics.waves.electronic.ElectronicStructure instance
-
get_k_mesh_by_cell
(k_mesh_spacing, cell=None)[source]¶ Get k-mesh density according to the box size.
- Parameters
k_mesh_spacing (float) – K-point spacing in units of 2 * pi reciprocal Angstrom. (smaller values result in a denser mesh for a given structure).
cell (numpy.ndarray/list) – The cell shape
- Returns
Mesh size
- Return type
list/numpy.ndarray
-
get_magnetic_moments
(iteration_step=- 1)[source]¶ Gives the magnetic moments of a calculation for each iteration step.
- Parameters
iteration_step (int) – Step for which the structure is requested
- Returns
array of final magmetic moments or None if no magnetic moment is given
- Return type
numpy.ndarray/None
-
get_structure
(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 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
- Returns
The required structure
- Return type
-
property
k_mesh_center_shift
¶ Number of unreduced k-points per Angstrom of the lattice vector
- Returns
Number of k-points per Angstrom
- Return type
float
-
property
k_mesh_spacing
¶ Number of unreduced k-points per Angstrom of the lattice vector
- Returns
Number of k-points per Angstrom
- Return type
float
-
property
kpoint_mesh
¶
-
property
plane_wave_cutoff
¶
-
property
reduce_kpoint_symmetry
¶ Number of unreduced k-points per Angstrom of the lattice vector
- Returns
Number of k-points per Angstrom
- Return type
float
-
restart_for_band_structure_calculations
(job_name=None)[source]¶ Restart a new job created from an existing calculation by reading the charge density for band structure calculations.
- Parameters
job_name (str/None) – Job name
- Returns
New job
- Return type
new_ham (pyiron.dft.job.generic.GenericDFTJob)
-
save
()[source]¶ Save the object, by writing the content to the HDF5 file and storing an entry in the database.
- Returns
Job ID stored in the database
- Return type
(int)
-
set_encut
(encut)[source]¶ Sets the plane-wave energy cutoff :param encut: The energy cutoff in eV :type encut: float
-
set_kpoints
(mesh=None, scheme='MP', center_shift=None, symmetry_reduction=True, manual_kpoints=None, weights=None, reciprocal=True, k_mesh_spacing=None, n_path=None, path_name=None)[source]¶ Function to setup the k-points
- Parameters
mesh (list/numpy.ndarray) – Size of the mesh (ignored if scheme is not set to ‘MP’ or kpoints_per_reciprocal_
is set) (angstrom) –
scheme (str) – Type of k-point generation scheme (MP/GP(gamma point)/Manual/Line)
center_shift (list/numpy.ndarray/None) – Shifts the center of the mesh from the gamma point by the given vector in relative coordinates
symmetry_reduction (boolean) – Tells if the symmetry reduction is to be applied to the k-points
manual_kpoints (list/numpy.ndarray) – Manual list of k-points
weights (list/numpy.ndarray) – Manually supplied weights to each k-point in case of the manual mode
reciprocal (bool) – Tells if the supplied values are in reciprocal (direct) or cartesian coordinates (in
space) (reciprocal) –
k_mesh_spacing (float) – K-point spacing in units of 2 * pi reciprocal Angstrom. (smaller values result in a denser mesh for a given structure).
n_path (int) – Number of points per trace part for line mode
path_name (str) – Name of high symmetry path used for band structure calculations.
-
set_mixing_parameters
(method=None, n_pulay_steps=None, density_mixing_parameter=None, spin_mixing_parameter=None)[source]¶
-
property
spin_constraints
¶
-
property
xc
¶
-
-
pyiron.dft.job.generic.
get_k_mesh_by_density
(cell, k_mesh_spacing=0.5)[source]¶ Get k-mesh density according to the box size.
- Parameters
cell (numpy.ndarray/list) – The cell shape
k_mesh_spacing (float) – K-point spacing in units of 2 * pi reciprocal Angstrom. (smaller values result in a denser mesh for a given structure).
- Returns
Mesh size
- Return type
list/numpy.ndarray