Skip to content

Commit

Permalink
adapt configuration energies task to constant single decomposition
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Jan 9, 2025
1 parent e6ce4cb commit 5ebf05b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pynta/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,15 +954,8 @@ def run_task(self, fw_spec):

try:
nodes = read_nodes(tree_file)
root = [n for n in nodes.values() if n.parent is None][0]
if len(root.children) == 1: #pairwise only tree
tree = MultiEvalSubgraphIsomorphicDecisionTreeRegressor([adsorbate_interaction_decomposition],
tree = MultiEvalSubgraphIsomorphicDecisionTreeRegressor([adsorbate_interaction_decomposition],
nodes=nodes)
elif len(root.children) == 2:
tree = MultiEvalSubgraphIsomorphicDecisionTreeRegressor([adsorbate_interaction_decomposition,adsorbate_triad_interaction_decomposition],
nodes=nodes)
else:
raise ValueError

with open(os.path.join(path,"Configurations",admol_name+".json"),'r') as f:
configs = [Molecule().from_adjacency_list(m,check_consistency=False) for m in json.load(f)]
Expand Down

0 comments on commit 5ebf05b

Please sign in to comment.