Skip to content

Commit

Permalink
skip termini mods if none atoms are different
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrunewald committed Mar 4, 2024
1 parent 3e4a737 commit b6acc73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions polyply/src/molecule_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ def find_termini_mods(meta_molecule, molecule, force_field):
for attr in ['atype', 'mass']:
if target_attrs[attr] != ref_attrs[attr]:
replace_dict[node][attr] = target_attrs[attr]
# a little dangerous but mostly ok; if there are no changes to
# the atoms we can continue
if len(replace_dict) == 0:
continue

# bonded interactions could be different too so we need to check them
overwrite_inters = defaultdict(list)
Expand Down

0 comments on commit b6acc73

Please sign in to comment.