Net charge abfe -fix alchemical ion selection heuristic#1992
Draft
aqemia-benedict-tan wants to merge 2 commits into
Draft
Net charge abfe -fix alchemical ion selection heuristic#1992aqemia-benedict-tan wants to merge 2 commits into
aqemia-benedict-tan wants to merge 2 commits into
Conversation
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed some problems with the alchemical ion selection in the
net_charge_abfefeature branch for an experimental implementation of ABFE calculations for charged ligands.Issue 1: the previous implementation searches for ions by element name:
openfe/openfe/protocols/openmm_afe/equil_binding_afe_method.py
Line 1070 in d55d90c
Fix 1: select alchemical ions based on residue name ('NA', 'CL', 'K', et.c) - this excludes the ligand atoms as these have the residue name 'UNK'
Issue 2: the previous search volume for candidate ions uses a search shell with 1.0-1.1 nm distance radius. For a large protein, the closest ion can often be >1.1 nm away from the ligand - this returns no candidate ions.
Fix 2: we can keep the 1.0 nm minimum distance but expand the maximum limit to a PBC safe distance. The safe limit is obtained by reading in the unit cell vectors and computing the cell inradius. The inradius minus a small buffer should ensure that we only select ions within the unit cell. The implementation should work for any triclinic cell.
Testing:
The new
_get_alchemical_ionmethod was tested usingtest_ion_selection.py . Ion selection was performed for the ejm_52charg and jmc_32charg ligands from the OpenFE Benchmark (equilibration performed using the default
AbsoluteBindingProtocol. The test verified the following:Note: the current 1.0 nm minimum distance applies to the pairwise ligand-counterion distances over all ligand atoms scanned using
FindHostAtoms. This means that ions with a distance of <1.0 nm can be selected, as is the case for jmc_32charg (0.87 nm). This may be confusing for the user. We could easily fix this by filtering the atoms pairs explicitly with a minimum distance cutoff.Developers certificate of origin