Skip to content

Commit

Permalink
Moved locaion of adding frame to group
Browse files Browse the repository at this point in the history
  • Loading branch information
kmlefran committed Jan 30, 2024
1 parent 469c358 commit e103cd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion aiida_aimall/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
A plugin to interface AIMAll with AiiDA
"""

__version__ = "0.5.10"
__version__ = "0.5.11"
21 changes: 10 additions & 11 deletions aiida_aimall/workchains.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ def generate_cml_fragments(params, cml_Dict, n_procs, prev_smi):
out_frame = out_frame.drop("atom_types", axis=1)
out_frame = out_frame.drop("count", axis=1)
out_frame = out_frame.drop("numAttachments", axis=1)
g = load_group(identifier="fragment_frames")

node_frame = PDData(out_frame)
node_frame.store()
g.add_nodes(node_frame)

out_dict["cgis_frame"] = node_frame
out_dict["done_smi"] = List(done_smi)
return out_dict
Expand Down Expand Up @@ -310,16 +310,15 @@ def generate_fragments(self):
self.inputs.prev_smi,
)
g16_opt_group = load_group("inp_frag")
for (
key
) in ( # pylint:disable=consider-using-dict-items consider-iterating-dictionary
fdict.keys() # pylint:disable=consider-using-dict-items consider-iterating-dictionary
): # pylint:disable=consider-using-dict-items consider-iterating-dictionary
if key != "cgis_frame":
fdict[key].store()
struct_extras = EntityExtras(fdict[key])
for key, val in fdict.items():
if key not in ["done_smi", "cgis_frame"]:
val.store()
struct_extras = EntityExtras(val)
struct_extras.set("smiles", key)
g16_opt_group.add_nodes(fdict[key])
g16_opt_group.add_nodes(val)
elif key == "cgis_frame":
g = load_group(identifier="fragment_frames")
g.add_nodes(val)
self.ctx.fragments = fdict

# def submit_fragmenting(self):
Expand Down

0 comments on commit e103cd1

Please sign in to comment.