Skip to content

Commit 2fc40f8

Browse files
committed
Fix phonon task path resolution
1 parent 5b39ebf commit 2fc40f8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apex/core/property/Phonon.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def phonopy_band_string_2_band_list(band_str: str, band_label: str = None):
583583

584584
@staticmethod
585585
def check_same_copy(src, dst):
586-
if os.path.samefile(src, dst):
586+
if os.path.exists(dst) and os.path.samefile(src, dst):
587587
return
588588
shutil.copyfile(src, dst)
589589

@@ -627,7 +627,8 @@ def _compute_lower(self, output_file, all_tasks, all_res):
627627

628628
elif self.inter_param["type"] == 'vasp':
629629
self.check_same_copy("task.000000/band.conf", "band.conf")
630-
self.check_same_copy("task.000000/POSCAR-unitcell", "POSCAR-unitcell")
630+
if not os.path.exists("POSCAR-unitcell"):
631+
self.check_same_copy("task.000000/POSCAR-unitcell", "POSCAR-unitcell")
631632

632633
if self.approach == "linear":
633634
os.chdir(all_tasks[0])

0 commit comments

Comments
 (0)