Skip to content

Commit af1dad6

Browse files
authored
Merge pull request #28 from wuz75/rpafix
updated RPA calculation parsing when ALGO=CHI
2 parents f70d648 + b706f59 commit af1dad6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/pymatgen/io/vasp/outputs.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,11 @@ def dielectric(self) -> tuple[list, list, list]:
670670
real_partyz, real_partxz]], [[imag_partxx, imag_partyy, imag_partzz,
671671
imag_partxy, imag_partyz, imag_partxz]]).
672672
"""
673-
return self.dielectric_data["density"]
673+
keys=self.dielectric_data.keys()
674+
if "density" not in keys:
675+
return self.dielectric_data['INVERSE MACROSCOPIC DIELECTRIC TENSOR (including local field effects in RPA (Hartree))']
676+
else:
677+
return self.dielectric_data["density"]
674678

675679
@property
676680
def optical_absorption_coeff(self) -> list[float] | None:
@@ -711,7 +715,8 @@ def converged_electronic(self) -> bool:
711715
)
712716
# In a response function run there is no ionic steps, there is no SCF step
713717
if final_elec_steps == 0:
714-
raise ValueError("there is no ionic step in response function ALGO=CHI.")
718+
final_elec_steps=[]
719+
warnings.warn("there is no ionic step in response function ALGO=CHI.")
715720

716721
if self.incar.get("LEPSILON"):
717722
idx = 1
@@ -1358,6 +1363,7 @@ def update_charge_from_potcar(self, path: PathLike | bool) -> None:
13581363
"G0W0",
13591364
"GW",
13601365
"BSE",
1366+
"CHI",
13611367
# VASP renamed the GW tags in v6.
13621368
"QPGW",
13631369
"QPGW0",

0 commit comments

Comments
 (0)