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
add small molecule charge change support with test #973
Conversation
@dominicrufa : Looks like the tests are failing for this -- can you fix the errors and make sure you run the relevant tests locally with |
I just reviewed. It mostly looks good, but I find the locations of all the helper functions confusing:
Why don't we just place all these helper functions in a new file called |
One other thing to note here is that once biopolymer support is added to OpenFF, we can take another pass at overhauling and simplifying this code substantially: We will simply be able to compute the total charge of the |
@dominicrufa : Just a reminder that we'd love to finish this up if possible! |
…nd refactoring charge changes.
topology_proposal.new_topology.residue_topology.name) | ||
if charge_diff != 0: # then handle this. | ||
new_water_indices_to_ionize = get_water_indices(charge_diff = charge_diff, | ||
new_positions = new_positions, |
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.
new_positions = new_positions, | |
new_positions = new_positions, |
if charge_diff != 0: # then handle this. | ||
new_water_indices_to_ionize = get_water_indices(charge_diff = charge_diff, | ||
new_positions = new_positions, | ||
new_topology = topology_proposal.new_topology, |
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.
new_topology = topology_proposal.new_topology, | |
new_topology = topology_proposal.new_topology, |
new_water_indices_to_ionize = get_water_indices(charge_diff = charge_diff, | ||
new_positions = new_positions, | ||
new_topology = topology_proposal.new_topology, | ||
radius=0.8) |
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.
radius=0.8) | |
radius=0.8) |
charge_diff = get_charge_difference(self._ligand_oemol_old, self._ligand_oemol_new) | ||
if charge_diff != 0: # then handle this. | ||
new_water_indices_to_ionize = get_water_indices(charge_diff = charge_diff, | ||
new_positions = new_positions, |
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.
new_positions = new_positions, | |
new_positions = new_positions, |
if charge_diff != 0: # then handle this. | ||
new_water_indices_to_ionize = get_water_indices(charge_diff = charge_diff, | ||
new_positions = new_positions, | ||
new_topology = topology_proposal.new_topology, |
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.
new_topology = topology_proposal.new_topology, | |
new_topology = topology_proposal.new_topology, |
new_water_indices_to_ionize = get_water_indices(charge_diff = charge_diff, | ||
new_positions = new_positions, | ||
new_topology = topology_proposal.new_topology, | ||
radius=0.8) |
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.
radius=0.8) | |
radius=0.8) |
@dominicrufa : Looks good to me! Just added some commit suggestions to improve the formatting. |
# Conflicts: # perses/app/relative_point_mutation_setup.py
Just 3 tests failing for the same reason:
|
Tests just need to get updated, |
@mikemhenry these changes should be pretty straightforward to do, I'll be making those if that is ok with you all. Just to get this merged as soon as possible. |
@ijpulidos go ahead and turn on auto merge for this when you are ready! |
Description
add small-molecule charge change support and attempt to generalize the existing protein mutation charge change functionality to avoid code duplication
Motivation and context
adds this support
How has this been tested?
performs a
RelativeFEPSetup
on twoBace
ligands with unequal charge, performs energy validation and asserts both systems are neutral after modification