principia_materia.io_interface.compute_job module
- class principia_materia.io_interface.compute_job.ComputeJob(path, structure=None, jobinput=None, joboutput=None)
Bases:
object
A computation job.
An abstract class that provides a framework to write interfaces to various compute engines to work with this package.
This class holds 1 compute job. It is capable of processing configurations, creating a compute job, parsing certain output of the compute job, and more. Due to the large size of common computation runs, the outputs of the compute job are parse only when they are needed.
- copy_files(filenames, out=None)
Copy static files from config directory to the job directory.
- Parameters:
out (str, optional, default to None) – The directory to create the compute job in. If
out
is None, useself.path
.filenames (str) – The filenames or the patterns of the filenames of the files to copy.
- create_job(out=None, is_static=True, displacement=None, velocities=None)
Create configuration files needed to run a compute job.
- Parameters:
out (str, optional, default to None) – The directory to create the compute job in. If
out
is None, useself.path
.is_static (bool, optional, default to True) – Whether the compute job is a static calculation.
displacement (array of float, optional, default to None) – The displacement to the crystal.
velocities (array of float, optional, default to None) – The initial velocities of the atoms of the crystal.
- get_born_effective_charges()
Get Born effective charges from compute result.
- abstract get_cutoff()
- get_dielectric_tensor()
Get dielectric tensor from compute result.
- get_energy()
Get energy from compute result.
- get_forces()
Get forces from compute result.
- get_kmesh()
- get_magnetic_moments()
Get magnetic moments from compute result.
- get_natoms()
Get number of atoms from compute result.
- get_relaxation_displacement()
Get relaxation displacement from compute result.
- get_stress()
Get stress from compute result.
- initialize_configuration(config_path=None)
Initialize configurations of the compute jobs.
Configurations of a compute jobs includes cutoff energy, kpoint mesh, error tolorence, magnetic moments, etc.
- Parameters:
config_path (str, path to directory) – The directory where configuration of compute job is stored.
- abstract property is_job_finished
- property path
- rescale_kmesh()
Rescale kmesh according to supercell.
- set_kmesh(kmesh)
- abstract set_output(output)
Set the path to the output file of a computation job.
- property structure