From 088e3e6d2abc7b3d77841ad70d7d9e7aaa1aec25 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Thu, 17 Oct 2024 20:20:04 -0700 Subject: [PATCH] handle when geometry is available but vib file is not present --- pynta/coveragedependence.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pynta/coveragedependence.py b/pynta/coveragedependence.py index 44389ae5..9b8b702c 100644 --- a/pynta/coveragedependence.py +++ b/pynta/coveragedependence.py @@ -1842,7 +1842,11 @@ def load_coverage_delta(d,ad_energy_dict,slab,metal,facet,sites,site_adjacency,t admol,neighbor_sites,ninds = generate_TS_2D(atoms, ts_info_path, metal, facet, sites, site_adjacency, len(slab), imag_freq_path=os.path.join(d,"vib.0.traj"), max_dist=np.inf, allowed_structure_site_structures=allowed_structure_site_structures) except (SiteOccupationException,TooManyElectronsException, ValueError) as e: return None,None,None,None - vibdata = get_vibdata(os.path.join(d,out_file_name+".xyz"),os.path.join(d,vib_file_name+".json"),len(slab)) + try: + vibdata = get_vibdata(os.path.join(d,out_file_name+".xyz"),os.path.join(d,vib_file_name+".json"),len(slab)) + except FileNotFoundError: + return admol,neighbor_sites,ninds,None + Ecad = atoms.get_potential_energy() - slab.get_potential_energy() + vibdata.get_zero_point_energy()