diff --git a/parser/parser-phonopy/Get_Force_Constants.py b/parser/parser-phonopy/Get_Force_Constants.py index d932878b13e11bfbfe80cb8538f58eae01ad6e9a..bcb644f2de94d891f907955587c779117ea1a70d 100644 --- a/parser/parser-phonopy/Get_Force_Constants.py +++ b/parser/parser-phonopy/Get_Force_Constants.py @@ -89,7 +89,11 @@ if __name__ == '__main__': #### #### constructing FORCE_CONSTANTS - set_of_forces, phonopy_obj = Collect_Forces_aims(cell_obj, supercell_matrix, displacement, sym) + set_of_forces, phonopy_obj, Relative_Path = Collect_Forces_aims(cell_obj, supercell_matrix, displacement, sym) + Prep_Path = name.split("phonopy-FHI-aims-displacement-") + Whole_Path = [] + for Path in Relative_Path: + Whole_Path.append("%s%s" % (Prep_Path[0], Path)) phonopy_obj.set_forces(set_of_forces) phonopy_obj.produce_force_constants() FC2 = phonopy_obj.get_force_constants() diff --git a/parser/parser-phonopy/PhononModulesNomad.py b/parser/parser-phonopy/PhononModulesNomad.py index ef85c2a65ad799f6714e09df19ce81154c46dfdb..a658f88368f58b2818a961699d376cb5ac3c20e0 100644 --- a/parser/parser-phonopy/PhononModulesNomad.py +++ b/parser/parser-phonopy/PhononModulesNomad.py @@ -108,6 +108,7 @@ def Collect_Forces_aims(cell_obj, supercell_matrix, displacement, sym, tol = 1e- space_group = phonopy_obj.symmetry.get_international_table() #print (space_group) set_of_forces = [] + Relative_Path = [] for directory, supercell in zip(directories, supercells): aims_out = os.path.join(directory, directory + ".out") if not os.path.isfile(aims_out): @@ -126,6 +127,7 @@ def Collect_Forces_aims(cell_obj, supercell_matrix, displacement, sym, tol = 1e- #print ("!!! No phonon calculations found") sys.exit(1) os.chdir("../") + Relative_Path.append(aims_out) supercell_calculated = read_aims_output(aims_out) if ( (supercell_calculated.get_number_of_atoms() == supercell.get_number_of_atoms()) and (supercell_calculated.get_atomic_numbers() == supercell.get_atomic_numbers()).all() and @@ -151,7 +153,7 @@ def Collect_Forces_aims(cell_obj, supercell_matrix, displacement, sym, tol = 1e- else: #print ("!!! calculated varies from expected supercell in FHI-aims output %s" % aims_out) sys.exit(2) - return set_of_forces, phonopy_obj + return set_of_forces, phonopy_obj, Relative_Path class Get_Properties():