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

Aromaticity and Gasteiger charges guessers #2926

Merged
merged 5 commits into from
Apr 23, 2021

Conversation

cbouy
Copy link
Member

@cbouy cbouy commented Aug 31, 2020

Part of #2468

Changes made in this Pull Request:

  • Add a guesser for the aromaticities TopologyAttr
  • Add a guesser for partial charges (Gasteiger)

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@cbouy
Copy link
Member Author

cbouy commented Aug 31, 2020

@richardjgowers @IAlibay @fiona-naughton Not sure who I'm supposed to ping now that GSoC ended 😅

@IAlibay IAlibay self-requested a review August 31, 2020 17:40
@IAlibay IAlibay self-assigned this Aug 31, 2020
Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm, but needs tests and usage docs (there's some example use docstring at the top that could be good to add to, although we might want to migrate to user guide, @lilyminium thoughts?).

Couple of comments, there's a long term thought about how we want our guessers to look like in a multi-converter world. Overall we might need to completely overhaul the guessers, so I'm not convinced it needs to be addressed here.

package/MDAnalysis/topology/guessers.py Show resolved Hide resolved
package/MDAnalysis/topology/guessers.py Show resolved Hide resolved
package/MDAnalysis/topology/guessers.py Show resolved Hide resolved
return np.array([atom.GetIsAromatic() for atom in atoms])


def guess_gasteiger_charges(atomgroup):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now it's fine, although long term we might want to consider how we want this to look API-wise. In a hypothetical world where we have converters for things like openbabel, we might end up with multiple possible charge assignment methods. It'd be nice to have them all accessible from the same entry point.

@IAlibay
Copy link
Member

IAlibay commented Aug 31, 2020

Forgot to add; can't speak for everyone, but I don't mind if you keep pinging me for the RDKit things. I get the email notifications whether or not you do so anyways :)

@codecov
Copy link

codecov bot commented Sep 1, 2020

Codecov Report

Merging #2926 (28998be) into develop (8a5ef48) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2926   +/-   ##
========================================
  Coverage    92.81%   92.81%           
========================================
  Files          170      170           
  Lines        22801    22811   +10     
  Branches      3239     3243    +4     
========================================
+ Hits         21162    21172   +10     
  Misses        1591     1591           
  Partials        48       48           
Impacted Files Coverage Δ
package/MDAnalysis/topology/guessers.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a5ef48...28998be. Read the comment docs.

@orbeckst orbeckst added the GSoC GSoC project label Sep 2, 2020
@IAlibay IAlibay added this to the 2.0 milestone Apr 6, 2021
@IAlibay
Copy link
Member

IAlibay commented Apr 10, 2021

Slowly going back into the RDKIT stuff.

@cbouy if you're still interested in progressing here, I think what's stalling the PR is the lack of tests.

@pep8speaks
Copy link

pep8speaks commented Apr 10, 2021

Hello @cbouy! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-04-10 16:29:49 UTC

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. @lilyminium can you have a glance at this?

@IAlibay IAlibay requested a review from lilyminium April 22, 2021 18:39
Copy link
Member

@lilyminium lilyminium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I am curious what the performance would be like for a molecule from a non-rdkit (e.g. PDB) format, but problems deriving aromaticity/charges should be solved in the RDKitConverter I would say.

@IAlibay
Copy link
Member

IAlibay commented Apr 23, 2021

Thanks @cbouy ! -- squash merging

@IAlibay IAlibay merged commit 32e3254 into MDAnalysis:develop Apr 23, 2021
@IAlibay
Copy link
Member

IAlibay commented Apr 23, 2021

😱 We forgot the changelog!
@cbouy can you add a changelog entry for this in #2942?

lilyminium pushed a commit to lilyminium/mdanalysis that referenced this pull request Apr 28, 2021
Towards MDAnalysis#2468 

## Work done in this PR
* Add aromaticity and Gasteiger charges guessers which work via the RDKIT converter.
jbarnoud added a commit that referenced this pull request May 3, 2021
* added get_connections

* modified tests for atoms.bonds/angles/dihedrals etc

* modified parsers and things to use get_connections or bonds

* updated CHANGELOG

* pep8

* undo half of PR 3160

* add intra stuff

* Update package/MDAnalysis/core/groups.py

Co-authored-by: Jonathan Barnoud <[email protected]>

* tighten up base class checking

* update docstring

* suppres warnings

* Use absolute file paths in ITPParser (#3108)

Fixes #3037

Co-authored-by: Lily Wang <[email protected]>

* Adds aromaticity and Gasteiger charges guessers (#2926)

Towards #2468 

## Work done in this PR
* Add aromaticity and Gasteiger charges guessers which work via the RDKIT converter.

* BLD: handle gcc on MacOS (#3234)

Fixes #3109 

## Work done in this PR
* gracefully handle the case where `gcc` toolchain
in use on MacOS has been built from source using `clang`
by `spack` (so it really is `gcc` in use, not `clang`)

## Notes
* we could try to add regression testing, but a few problems:
- `using_clang()` is inside `setup.py`, which probably
can't be safely imported because it has unguarded statements/
code blocks that run right away
- testing build issues is typically tricky with mocking, etc.
(though in this case, probably just need to move `using_clang()`
somewhere else and then test it against a variety of compiler
metadata strings

* Remove ParmEd Timestep writing "support" (#3240)

Fixes #3031

* Adding py3.9 to gh actions CI matrix (#3245)

* Fixes #2974
* Python 3.9 officially supported
* Add  Python 3.9 to testing matrix
* Adds macOS CI entry, formalises 3.9 support

* fix changelog

* special metaclass

* move function down

* tidy code

Co-authored-by: Jonathan Barnoud <[email protected]>
Co-authored-by: Aditya Kamath <[email protected]>
Co-authored-by: Cédric Bouysset <[email protected]>
Co-authored-by: Tyler Reddy <[email protected]>
Co-authored-by: Irfan Alibay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants