doped.gpaw module
Code to generate and parse GPAW defect calculations.
- class doped.gpaw.GPAWDefectRelaxSet(defect_entry: DefectEntry | Structure, charge_state: int | None = None, gpaw_settings: dict[str, Any] | None = None, **kwargs)[source]
Bases:
objectClass for generating input files (Python scripts) for GPAW defect relaxation.
- Parameters:
defect_entry (DefectEntry, Structure) – doped/pymatgen DefectEntry or Structure object.
charge_state (int) – Charge state of the defect. Overrides DefectEntry.charge_state.
gpaw_settings (dict) – Dictionary of GPAW settings. Defaults used if not specified: - “mode”: {“name”: “pw”, “ecut”: 400} - “xc”: “PBE” - “kpts”: {“size”: (1, 1, 1), “gamma”: True} - “txt”: “gpaw_output.txt” - “spinpol”: True - “fmax”: 0.05 - “optimizer”: “BFGS”
**kwargs – Additional keyword arguments.
- class doped.gpaw.GPAWDefectsParser(output_path: str = '.', bulk_path: str | None = None, dielectric: float | ndarray | None = None, subfolder: str | None = None)[source]
Bases:
objectClass for rapidly parsing multiple GPAW defect supercell calculations.
- Parameters:
output_path (str) – Path to directory containing defect folders.
bulk_path (str) – Path to bulk reference folder.
dielectric (float or matrix) – Dielectric constant for corrections.
subfolder (str) – Optional subfolder within each defect folder.
- parse_all() dict[str, DefectEntry][source]
Parses all defect folders in output_path.
- class doped.gpaw.GPAWParser(gpw_file: str)[source]
Bases:
objectParser for GPAW calculations to interface with doped.
Note
The Kumagai (eFNV) finite-size charge correction is applied by default during parsing, as it is generally preferred. However, the standard Freysoldt (FNV) correction is also fully supported. If preferred, users can manually apply it to the parsed defects using: defect_entry.get_freysoldt_correction()
- Parameters:
gpw_file (str) – Path to
GPAW.gpw(.gz)file.
- get_computed_entry() ComputedEntry[source]
Returns a ComputedEntry for the calculation.
- get_computed_structure_entry() ComputedStructureEntry[source]
Returns a ComputedStructureEntry for the calculation.
- doped.gpaw.get_gpaw_defect_entry(defect_path: str, bulk_path: str, dielectric: float | ndarray | None = None, charge_state: int = 0, bulk_parser: GPAWParser | None = None) DefectEntry[source]
Convenience function to create a DefectEntry from GPAW directories.
Assumes ‘relaxed.gpw(.gz)’ exists in both directories. # TODO: This should auto-detect the output file, with a name preference, as for VASP