-
Notifications
You must be signed in to change notification settings - Fork 35
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
Update OverlapCalculator.py #214
Conversation
adding the functionality to use the Kuhn-Munkres algorithm to update the tracked root. can be activated through the calc-argument "min_cost: True" and default is False currently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please capitalize the beginnings of the comments.
# to make the assignment more reasonable and omit potential | ||
# double assignments from rows being treated isolated | ||
self.log( | ||
"Analyzing full overlap matrix and find most reasonable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add one space after reasonable
"another row mapping to the same state had a higher " | ||
"overlap." | ||
) | ||
max_overlap = ref_root_row[new_root] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this line and move (the same) line 803 outside the else block.
Currently it is also highly confusing in these few lines of code as |
92f2f54
to
dc99913
Compare
as originally described in #214. fix: pysisplot -o was broken
as originally described in #214. fix: pysisplot -o was broken
adding the functionality to use the Kuhn-Munkres algorithm to update the tracked root.
can be activated through the
calc
-argumentmin_cost: True
and default isFalse
currently.As an example, let's assume we are tracking excited state number 8 (
old 8
) and in row 7 and 8 and also column 7 and 8 of an overlap matrix between two optimization steps, there are the following values:For
old 8
we see thatnew 7
andnew 8
are very similar and, based on the current algorithm, we would choosenew 8
because of its higher overlap (56% vs. 54%) in this row and, therefore, not update the root. However, if we take a look at the column fornew 8
, we see thatold 7
andnew 8
have a much higher overlap of 71% (vs. 56%). As such,new 8
is more likely to beold 7
thanold 8
and vice versa.Using the Kuhn-Munkres algorithm, each old excited state gets mapped to only one new excited state based on the whole overlap matrix which should be more reasonable than taking only a single row into consideration while ignoring all other information.
I did not outsource the new code into a new function ... sorry :D