Skip to content

Commit 4ad3262

Browse files
committed
fix(abacus): use --config flag for phonopy 4.1.0 load mode compatibility
phonopy 4.1.0 ignores positional conf file arguments when in 'load mode' (triggered by phonopy_disp.yaml). This caused band.yaml/mesh.yaml to not be generated during the Post step for ABACUS phonon and gruneisen properties. Fix: pass band.conf explicitly via --config flag, which phonopy 4.1.0 correctly reads as a configuration file even in load mode. Tested with Cu FCC (ABACUS DFT, 2x2x2 supercell): - phonon: band.yaml + band.dat + mesh.yaml generated successfully - gruneisen: FORCE_CONSTANTS + mesh.yaml (3 volumes) generated successfully
1 parent 0b4bdba commit 4ad3262

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apex/core/property/Gruneisen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ def _ensure_abacus_volume_outputs(
963963
if not os.path.isfile("FORCE_CONSTANTS"):
964964
raise FileNotFoundError(f"FORCE_CONSTANTS was not created in {helper_dir}")
965965
if not os.path.isfile("mesh.yaml"):
966-
subprocess.check_call(Phonon.phonopy_command("band.conf"), shell=True)
966+
subprocess.check_call(Phonon.phonopy_command("phonopy_disp.yaml --config band.conf"), shell=True)
967967
self._write_band_dat()
968968
finally:
969969
os.chdir(cwd)

apex/core/property/Phonon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ def _compute_lower(self, output_file, all_tasks, all_res):
622622
if not os.path.exists("FORCE_SETS"):
623623
raise FileNotFoundError("FORCE_SETS was not created")
624624
print('FORCE_SETS is created')
625-
subprocess.check_call(self.phonopy_command("band.conf"), shell=True)
625+
subprocess.check_call(self.phonopy_command("phonopy_disp.yaml --config band.conf"), shell=True)
626626
self.write_band_dat()
627627

628628
elif self.inter_param["type"] == 'vasp':

0 commit comments

Comments
 (0)