Skip to content
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

Merged
merged 2 commits into from
Jul 16, 2022

Conversation

aerkiaga
Copy link
Collaborator

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.

Signed-off-by: Aritz Erkiaga <aerkiaga3@gmail.com>
@ghutchis ghutchis added rendering enhancement feature changes / API changes labels Jul 15, 2022
Copy link
Member

@ghutchis ghutchis left a 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;
Copy link
Member

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()) {
Copy link
Member

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++) {
Copy link
Member

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:

Now some files will come in with problematic labels, but definitely check atom names first, because they'll save a lot of time.

@ghutchis
Copy link
Member

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 Residue for example to get the name of a particular atom) to skip this logic if it's available.

@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Ubuntu-2004.tar.gz
Win64.exe
Artifacts will only be retained for 90 days.

Signed-off-by: Aritz Erkiaga <aerkiaga3@gmail.com>
@aerkiaga
Copy link
Collaborator Author

aerkiaga commented Jul 15, 2022

I've replaced all the code with some that checks for atom names.

@ghutchis
Copy link
Member

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.

@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Ubuntu-2004.tar.gz
Win64.exe
Artifacts will only be retained for 90 days.

@ghutchis ghutchis merged commit 9531598 into OpenChemistry:master Jul 16, 2022
@aerkiaga aerkiaga deleted the salt-bridges branch July 16, 2022 01:24
@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Ubuntu-2004.tar.gz
Win64.exe
Artifacts will only be retained for 90 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature changes / API changes rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants