Skip to content

Commit

Permalink
Fixed a couple small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
tdprice-858 committed Oct 24, 2024
1 parent 1381b68 commit 64e4ede
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pynta/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,16 +414,17 @@ def write_min_en_species_db(
slab = read(slab_path)

try:
with open(os.path.join(ad_path, "info.json")) as f:
with open(os.path.join(path_to_ad, "info.json")) as f:
info = json.load(f)
except:
print(f"No information for {ad_path}")
print(f"No information for {path_to_ad}")
continue

adj_list = info['adjlist']
gasphase = len(info["gratom_to_molecule_surface_atom_map"]) == 0
spin = (Molecule().from_adjacency_list(info["adjlist"]).multiplicity - 1.0) / 2.0
name = info["name"]
os.chdir(path_to_ad)
ad_configs = [dir for dir in filter(os.path.isdir, os.listdir(path_to_ad))]

# Setting up empty dictionaries to collect information for each config
Expand Down Expand Up @@ -454,12 +455,11 @@ def write_min_en_species_db(
freq_dict[config] = freqs
DFT_en_dict[config] = energy
ad_dict[config] = energy + zpe
if not gasphase:
min_E_config = min(ad_dict, key=ad_dict.get)
atoms = atoms_dict[min_E_config]
data = {}
data['frequencies'] = freq_dict[min_E_config]
db.write(atoms, name=name, adj_list=adj_list, spin=spin, gasphase=gasphase, data=data)
min_E_config = min(ad_dict, key=ad_dict.get)
atoms = atoms_dict[min_E_config]
data = {}
data['frequencies'] = freq_dict[min_E_config]
db.write(atoms, name=name, adj_list=adj_list, spin=spin, gasphase=gasphase, data=data)



Expand Down

0 comments on commit 64e4ede

Please sign in to comment.