Skip to content

Commit

Permalink
allow acat surrogate_metal specification
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Dec 20, 2023
1 parent 3076b4b commit 160f9d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 8 additions & 3 deletions pynta/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def __init__(self,path,rxns_file,surface_type,metal,label,launchpad_path=None,fw
TS_opt_software_kwargs=None,
lattice_opt_software_kwargs={'kpts': (25,25,25), 'ecutwfc': 70, 'degauss':0.02, 'mixing_mode': 'plain'},
reset_launchpad=False,queue_adapter_path=None,num_jobs=25,max_num_hfsp_opts=None,#max_num_hfsp_opts is mostly for fast testing
Eharmtol=3.0,Eharmfiltertol=30.0,Ntsmin=5,frozen_layers=2,fmaxopt=0.05,fmaxirc=0.1,fmaxopthard=0.05,c=None):
Eharmtol=3.0,Eharmfiltertol=30.0,Ntsmin=5,frozen_layers=2,fmaxopt=0.05,fmaxirc=0.1,fmaxopthard=0.05,c=None,
surrogate_metal=None):

self.surface_type = surface_type
if launchpad_path:
Expand All @@ -57,6 +58,10 @@ def __init__(self,path,rxns_file,surface_type,metal,label,launchpad_path=None,fw
self.facet = metal + surface_type
self.fws = []
self.metal = metal
if surrogate_metal is None:
self.surrogate_metal = metal
else:
self.surrogate_metal = surrogate_metal
self.adsorbate_fw_dict = dict()
self.software_kwargs = software_kwargs

Expand Down Expand Up @@ -157,7 +162,7 @@ def analyze_slab(self):
full_slab = self.slab
cas = SlabAdsorptionSites(full_slab, self.surface_type,allow_6fold=False,composition_effect=False,
label_sites=True,
surrogate_metal=self.metal)
surrogate_metal=self.surrogate_metal)

self.cas = cas

Expand Down Expand Up @@ -460,7 +465,7 @@ def setup_transition_states(self,adsorbates_finished=False):
"gratom_to_molecule_atom_maps":{sm: {str(k):v for k,v in d.items()} for sm,d in self.gratom_to_molecule_atom_maps.items()},
"gratom_to_molecule_surface_atom_maps":{sm: {str(k):v for k,v in d.items()} for sm,d in self.gratom_to_molecule_surface_atom_maps.items()},
"nslab":self.nslab,"Eharmtol":self.Eharmtol,"Eharmfiltertol":self.Eharmfiltertol,"Ntsmin":self.Ntsmin,
"max_num_hfsp_opts":self.max_num_hfsp_opts})
"max_num_hfsp_opts":self.max_num_hfsp_opts, "surrogate_metal":self.surrogate_metal})
reactants = rxn["reactant_names"]
products = rxn["product_names"]
parents = []
Expand Down
5 changes: 3 additions & 2 deletions pynta/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ class MolecularTSEstimate(FiretaskBase):
required_params = ["rxn","ts_path","slab_path","adsorbates_path","rxns_file","path","metal","facet",
"name_to_adjlist_dict", "gratom_to_molecule_atom_maps",
"gratom_to_molecule_surface_atom_maps","opt_obj_dict",
"vib_obj_dict","IRC_obj_dict","nslab","Eharmtol","Eharmfiltertol","Ntsmin","max_num_hfsp_opts"]
"vib_obj_dict","IRC_obj_dict","nslab","Eharmtol","Eharmfiltertol","Ntsmin","max_num_hfsp_opts","surrogate_metal"]
optional_params = ["out_path","spawn_jobs","nprocs",]
def run_task(self, fw_spec):
gratom_to_molecule_atom_maps = {sm: {int(k):v for k,v in d.items()} for sm,d in self["gratom_to_molecule_atom_maps"].items()}
Expand All @@ -489,11 +489,12 @@ def run_task(self, fw_spec):
Ntsmin = self["Ntsmin"]
max_num_hfsp_opts = self["max_num_hfsp_opts"]
slab_path = self["slab_path"]
surrogate_metal = self["surrogate_metal"]
slab = read(slab_path)

cas = SlabAdsorptionSites(slab,facet,allow_6fold=False,composition_effect=False,
label_sites=True,
surrogate_metal=metal)
surrogate_metal=surrogate_metal)

adsorbates_path = self["adsorbates_path"]

Expand Down

0 comments on commit 160f9d2

Please sign in to comment.