Hotfix/pdb2amber neutralization - #121
Open
David-Araripe wants to merge 6 commits into
Open
Conversation
…ake the default out-of-sphere neutralization protocol aligned with the one used in the benchmark experiments. The settings changed in the neutralization protocol is namely `--neutralize_boundary_offset` which is now set to 0, similar to what we had done in https://github.com/qusers/qligfepv2-BenchmarkExperiments
…xperiments while maintaining better inclusion / exclusion definition (as in fortran's `qprep`) - restore the `default neutralize_boundary_offset` parameter in qprep_prot to use 3.0 as default (chage in the previous commit) - improve the neutralization detection: previous commit used residue centroids to define included/excluded, but it now also checks for explicit charge group definitions
…esidues and potential duplication in case both 1HB, HB1 atoms are declared (would create two HB1; the definition in the forcefield)
…oming from the .lib file;
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.
Summary
This PR hardens protein preparation in two areas:
pdb2amber/qprep.Motivation
Input structures from different preparation tools can use different atom-numbering conventions, particularly for protonated carboxylates, neutral arginine/lysine, methyl hydrogens, and terminal oxygens. Some of these differences previously produced duplicate or incorrectly bonded atom identities after renaming.
Boundary neutralization also needs to use the same inclusion/exclusion reference as Q. A residue centroid or a single hard-coded atom does not reproduce Q consistently across force fields because AMBER and OPLS have different charge-group declarations (see FF/*.lib).
The need for these changes was flagged by @goodstudyqaq who SHAKE failures on the GPU kernel. The culprit was incorrect atom naming in the benchmarking repository, where a hydrogen that should belong to OE2 was incorrectly attached to OE1. This wasn't picked up in fortran as SHAKE allowed very high coordinate correction there.
Changes
PDB-to-AMBER atom normalization
HZ2/HZ3names.Force-field-aware boundary neutralization
sphere radius - 3 Åare neutralized..libfile andswitch_atomsfrom its.prmoptions.switch_atoms off): geometric center of the formal charge group.switch_atoms on): first atom of the explicit formal charge group.Force-field parsing
parse_lib()to retain[charge_groups]and residue names containing punctuation, such asNAR+.parse_prm_options()for reading options such asswitch_atoms.Testing
PYTHONPATH="$PWD/src" python -m pytest -q \ test/qligfep/test_pdb_to_amber.py \ test/qligfep/test_qprep_cli.py \ test/qligfep/test_io.py