Skip to content

Commit

Permalink
compatibility updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rjacobs914 committed Oct 10, 2017
1 parent f0b413b commit 70d5301
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions VASP_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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])
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 70d5301

Please sign in to comment.