BornEffectiveCharge¶
- class py4vasp.data.BornEffectiveCharge(raw_data)¶
Bases:
py4vasp.data._base.DataBase
The Born effective charge tensors coupling electric field and atomic displacement.
You can use this class to extract the Born effective charges of a linear response calculation.
- Parameters
raw_born_effective_charge (RawBornEffectiveCharge) – Dataclass containing the raw Born effective charge data.
Methods Summary
from_dict
(dict_)Initialize refinement class from data dictionary
from_file
([file])Read the data dictionary from the given file.
print
()Print a string representation of this class to standard output.
read
()Read structure information and Born effective charges into a dictionary.
to_dict
()Read structure information and Born effective charges into a dictionary.
Methods Documentation
- classmethod from_dict(dict_)¶
Initialize refinement class from data dictionary
- Parameters
data_dict (dict) – Data dictionary that contains one or more different raw data sources.
- classmethod from_file(file=None)¶
Read the data dictionary from the given file.
You want to use this method if you want to avoid using the Calculation wrapper, for example because you renamed the output of the VASP calculation.
- Parameters
file (str or Path or raw.File) – Filename from which the data is extracted. If not present the default filename is used. Alternatively, you can open the file yourself and pass the File object. In that case, you need to take care the file is properly closed again and be aware the generated instance of this class becomes unusable after the file is closed.
- Returns
The returned instance handles opening and closing the file for every function called on it, unless a File object in which case this is left to the user.
- Return type
DataBase
- print()¶
Print a string representation of this class to standard output.
- read()¶
Read structure information and Born effective charges into a dictionary.
The structural information is added to inform about which atoms are included in the array. The Born effective charges array contains the mixed second derivative with respect to an electric field and an atomic displacement for all atoms and possible directions.
- Returns
Contains structural information as well as the Born effective charges.
- Return type
dict
- to_dict()¶
Read structure information and Born effective charges into a dictionary.
The structural information is added to inform about which atoms are included in the array. The Born effective charges array contains the mixed second derivative with respect to an electric field and an atomic displacement for all atoms and possible directions.
- Returns
Contains structural information as well as the Born effective charges.
- Return type
dict