-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Initial salt bridge implementation #1021
Conversation
Signed-off-by: Aritz Erkiaga <aerkiaga3@gmail.com>
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.
Some of this seems really complicated when you can check the atom names...
for (const auto &a: r.residueAtoms()) { | ||
if (molecule.formalCharge(a.index()) != 0) | ||
continue; | ||
bool gammaOxygen = false; |
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.
Before you do this, don't you want to check the atom name to ignore "N" "CA" "C" and "O" atoms?
(It might be worth having Residue::isBackboneAtom()
and Residue::isSideChainAtom()
methods.
|
||
// Add predicted charged atoms from residues | ||
for (const auto &r: molecule.residues()) { | ||
for (const auto &a: r.residueAtoms()) { |
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.
Do you want to filter by residue? For example, this isn't important for ALA
or GLY
right?
bool alphaDoubleBond = false; | ||
auto bonds = molecule.getAtomBonds(a.index()); | ||
auto orders = molecule.getAtomOrders(a.index()); | ||
for (Index i = 0; i < bonds.size(); i++) { |
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 add some comments about what you're doing here. You're trying to find particular atoms, right?
Do you want to look at residue atom names? Residue::atomNameMap()
for example.
Check out LigandExpo:
- http://ligand-expo.rcsb.org/ld-search.html
- e.g. http://ligand-expo.rcsb.org/reports/H/HIS/HIS_D3L3.gif
Now some files will come in with problematic labels, but definitely check atom names first, because they'll save a lot of time.
I don't think any of this code is bad but I think you should check the atom names (and/or add some methods to |
Here are the build results |
Signed-off-by: Aritz Erkiaga <aerkiaga3@gmail.com>
I've replaced all the code with some that checks for atom names. |
I think a few of those should be fractional charges, but for the salt bridge visualization, the magnitude doesn't matter as far as I can tell, just + / - vs. + / +… So for now, it looks good to me. We'll make sure it compiles cleanly and merge. |
Here are the build results |
Here are the build results |
This displays interactions between oppositely charged atoms, as well as same-charge ("bad contacts"). Charged residues with no real formal charge in the molecule are also interpreted as charged.
Signed-off-by: Aritz Erkiaga aerkiaga3@gmail.com
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.