From 4ad326270d846298fc757976e5093e353c897d8e Mon Sep 17 00:00:00 2001 From: Letian88 Date: Fri, 3 Jul 2026 09:15:49 +0800 Subject: [PATCH] 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 --- apex/core/property/Gruneisen.py | 2 +- apex/core/property/Phonon.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apex/core/property/Gruneisen.py b/apex/core/property/Gruneisen.py index 2bf0462..f4842f5 100644 --- a/apex/core/property/Gruneisen.py +++ b/apex/core/property/Gruneisen.py @@ -963,7 +963,7 @@ def _ensure_abacus_volume_outputs( if not os.path.isfile("FORCE_CONSTANTS"): raise FileNotFoundError(f"FORCE_CONSTANTS was not created in {helper_dir}") if not os.path.isfile("mesh.yaml"): - subprocess.check_call(Phonon.phonopy_command("band.conf"), shell=True) + subprocess.check_call(Phonon.phonopy_command("phonopy_disp.yaml --config band.conf"), shell=True) self._write_band_dat() finally: os.chdir(cwd) diff --git a/apex/core/property/Phonon.py b/apex/core/property/Phonon.py index 1951b4f..f9e317e 100644 --- a/apex/core/property/Phonon.py +++ b/apex/core/property/Phonon.py @@ -622,7 +622,7 @@ def _compute_lower(self, output_file, all_tasks, all_res): if not os.path.exists("FORCE_SETS"): raise FileNotFoundError("FORCE_SETS was not created") print('FORCE_SETS is created') - subprocess.check_call(self.phonopy_command("band.conf"), shell=True) + subprocess.check_call(self.phonopy_command("phonopy_disp.yaml --config band.conf"), shell=True) self.write_band_dat() elif self.inter_param["type"] == 'vasp':