From 70d5301d26fa1a6118de858d32d95ba447eb0c02 Mon Sep 17 00:00:00 2001 From: rjacobs914 Date: Tue, 10 Oct 2017 14:34:03 -0500 Subject: [PATCH] compatibility updates --- VASP_PostProcessing.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/VASP_PostProcessing.py b/VASP_PostProcessing.py index 63a58bd..ed14547 100644 --- a/VASP_PostProcessing.py +++ b/VASP_PostProcessing.py @@ -180,8 +180,8 @@ def get_vacuum_energy(self, surface): def get_empirical_delta_workfunction(self): #Obtain the work function difference between the two surfaces using the Helmholtz equation #This code assumes the surface is oriented in the c-direction, so that a x b is the surface area - dipole = OutcarAnalyzer(self.outcar).get_dipole - lattice_parameters = PoscarAnalyzer(self.poscar).get_lattice_parameters + dipole = OutcarAnalyzer(self.outcar).get_dipole() + lattice_parameters = PoscarAnalyzer(self.poscar).get_lattice_parameters() area = lattice_parameters[0][0]*lattice_parameters[1][1] delta_workfunction = ((-181)*dipole)/area #units of eV, dipole is in eV-Ang, area, in Ang^2 return delta_workfunction @@ -191,7 +191,7 @@ def _parse_locpot(self): LOCPOTdata = LOCPOT.readlines() #Eliminate the header lines of the LOCPOT file - total_atoms = int(PoscarAnalyzer(self.poscar).get_total_atoms) + total_atoms = int(PoscarAnalyzer(self.poscar).get_total_atoms()) dataline = LOCPOTdata[total_atoms+9] Nx = int(dataline.split()[0]) Ny = int(dataline.split()[1]) @@ -570,6 +570,10 @@ def get_bandcenters(self, write_dicts_to_file=True): file = open(filename, "w") for key, value in band_center_dict.items(): file.write(str(key)+"="+str(value)+"\n") + if key == "O_p": + Opband = open("O_pband_values.txt", "w") + Opband.write(str(value)) + Opband.close() file.close() filename = "%s_bandcenters_occ.txt" % element file = open(filename, "w") @@ -1022,10 +1026,15 @@ def get_phase_diagram(self, use_custom_chem_pots=False, custom_chem_pot_dict=Non phasediagram = PhaseDiagram(entries=entries_in_system) phasediagram_analyzer = PDAnalyzer(phasediagram) - eabove_file = open("energy_above_hull.txt", "w") - eform_file = open("formation_energy.txt", "w") - decomp_file = open("decomposition_products.txt", "w") - stable_entries_file = open("stable_entries.txt", "w") + #eabove_file = open("energy_above_hull.txt", "w") + #eform_file = open("formation_energy.txt", "w") + #decomp_file = open("decomposition_products.txt", "w") + #stable_entries_file = open("stable_entries.txt", "w") + eabove_file = open("energy_above_hull_invest.txt", "w") + eform_file = open("formation_energy_invest.txt", "w") + decomp_file = open("decomposition_products_invest.txt", "w") + stable_entries_file = open("stable_entries_invest.txt", "w") + for entry in pd_entry_list: print "Analyzing entry:", entry