Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Peter C Kroon <[email protected]>
  • Loading branch information
fgrunewald and pckroon authored Jul 8, 2024
1 parent 71027b5 commit 0fe7b91
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cgsmiles/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ def __init__(self,

# the number of resolutions available
self.resolutions = len(self.fragment_strs)
# turn the framgent strings into an iterator
self.fragment_strs = iter(self.fragment_strs)

# at this stage there are no atomnames for the nodes
new_names = nx.get_node_attributes(self.molecule, "fragname")
Expand Down Expand Up @@ -262,16 +260,12 @@ def resolve(self):

# get the next set of fragments
if self.fragment_strs:
fragment_str = next(self.fragment_strs)

# empty the fragment dict just as a precaution
self.fragment_dict = {}
fragment_str = self.fragment_strs[self.resolution_counter - 1] # -1 because the counter has already been incremented #FIXME

# read the fragment str and populate dict
self.fragment_dict.update(read_fragments(fragment_str,
all_atom=all_atom))
self.fragment_dict = read_fragments(fragment_str, all_atom=all_atom))
else:
self.fragment_dict = next(self.fragment_dicts)
self.fragment_dict = self.fragment_dicts[self.resolution_counter - 1] # FIXME

# set the previous molecule as meta_graph
self.meta_graph = self.molecule
Expand Down

0 comments on commit 0fe7b91

Please sign in to comment.