Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When more than 2 molecules are used with TIES, the tried strategies a… #333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ties/topology_superimposer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,11 +1394,13 @@ def _smart_netqtol_pair_picker(self, strategy):
diff_sorted = self._sort_pairs_into_categories_qnettol(diff_q_pairs, best_cases_num=len(self))

# for other strategies, take the key directly, but only if there is one
if diff_sorted[strategy]:
if strategy in diff_sorted:
pairs_in_category = diff_sorted[strategy]
else:

if strategy not in diff_sorted or len(pairs_in_category) == 0:
# if there is no option in that category, revert to greedy
pairs_in_category = diff_sorted['greedy']

return pairs_in_category[0]

def _sort_pairs_into_categories_qnettol(self, pairs, best_cases_num=6):
Expand Down
Loading