-
Notifications
You must be signed in to change notification settings - Fork 663
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
WIP: Sklearn kdtree #395
WIP: Sklearn kdtree #395
Conversation
Btw what are is the purpose of the depcreation test that is failing? Should it test that depcreated imports are still available? In that case I would remove that specific test because I have removed the module. |
I think the failing deprecation test is that KDTree used to live in |
I guess then I could readd the stub module and load the new |
The submodule .analysis is complete tools which can have MDA dependencies, On 1:24PM, Wed, 19 Aug 2015 kain88-de [email protected] wrote:
|
Once you found out where it should live I will finish my TODO-list to have this mergeable. Btw it is ok that I removed the |
We switch from the old copied and here maintained Biopython version of KDTree to the scikit-learn. For one this will result in a speed increase and secondly it will allow us to remove the old python 3 incompatible SWIG module. Plus less code to test and maintain. For spherical selections the tests fail right now because they are not ported yet.
Continue to get rid of the old KDTree module
This removes all appearences of the KDTree Module and it's Neighbor classes as well. I will reimplement the AtomNeighbor class again later.
This is a refactored implementation of this class based on using the sklearn KDTree. The search_all method is currently not implemented. The tests aren't currently passing that will be fixed in later commits.
PEP8-tify the functions I touched as well.
This way the KDTree removal doesn't require any new dependencies.
Explain that the KDTRee has been removed and that this now only loads the NeighborSearch package.
0ecfb56
to
318c20a
Compare
Tests are all passing now and I fixed the doc string for the atomneihgborsearch class. The I didn't test the density analysis because a unit-test for it doesn't exists. Anything else missing? |
@@ -0,0 +1,75 @@ | |||
import numpy |
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.
This file will need a header comment for the rst docs won't it?
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.
I added a header comment. I'm not very familiar with the rst docs. If I missed defining some rst specific stuff please tell me. I would also appreciate a link to the appropriate sphinx documentation for this.
[ci skip]
Ok header looks fine. What needs doing now is for the .rst stubs to be updated. If you go to Link to links: |
I also added a page for the new NeighborSearch module
I removed the old KDTree rst files and added a short one for the new NeighborSearch module. The formatting is different then from the other include in Plus I suddenly have all these import error where I have no real idea what might have caused them. This is an example for a failed import. I assume loading from ..exceptions import SelectionError, ..... in |
The problem here is that an import statement actually EXECUTES all the code that is defined inside of the modules __init__.py. The problem now is that the lib module was loaded before the execptions were loaded, note that lib/__init__.py now loads `NeighborSearch.py` which in return loads `AtomGroup.py` which loads `SelectionError` which is defined later int the top `__init__.py`. This means we have a circular import and everything just stops working. By importing the exeptions first everything will work fine.
Yup it was a circular import see 80078fe. |
Awesome |
- changed "Maintained by Oliver Beckstein and Elizabeth Denning" to "Maintained by the MDAnalysis Core Devs Team" - added Wouter Boomsma (for PR #976) - removed explicit mentions for KDTree (Hamelryck) because since 0.11.0 we do no longer include the actual code (see PR #395 and #383) - removed explicit mentions for helanal (Hall) because Ben Hall is a contributing author
JmhX7IYP+2pnu4iv7mzp+xy8W5x1pzFOZhzfS4LslB2Ac+4SENM1eAZebiZQYSYl qyYkj9bLS2RqC40dQVfAA4dMrAuWpNfgZkTeCCU7pm29TodN0hmljNG/rLoGG/iH ieA+pSultKwyryY0UZXHAMmNRIViEfy1VsjE2Hswc/AIiY9W1yfLONXVjtELjFsU jv4u1ljR+lhuP6ZllEwucKeD5ojQDyXBU9WXPi2bUwFEFpNdn5zXVRTV/kntb86d sbOE1TQpy+WeSNTyqmEtdjQRuLH21Jm9kTnWFjkKjw2lL+odUOAoOEC4tLSin30i 6KK2lVvSfXJi9e5XOL+nXWqvwr+jU5jqNV+PC60aEe9N1xhVapYroY84bIJwcuYQ 2Axu0vJWNLOpnLGAH7kYYaeEFJdsZt283kDy1paagWmXqyy3p3hh1VD8NEWWcXQ4 Da07VzZh61RvLHFWIzyXkizPjaCMCfCPIpwRACht5OJdRH0LwEhGRhJhSHEUdh7p WGNEQr5XVnd2Xb+dHfpBeq6a0vPmOv8oDXzRCnGpDeTjGE3kEQy8PGeDqm4dsD+B wOmeCYN/NmUnurpZrW2x151bKgCbcjwiTksCsIhZmN1kRHqAR+NkoHSUOiji6INw LvpyU91X7ji1yyYlhPTu =N0P/ -----END PGP SIGNATURE----- updated AUTHORS - changed "Maintained by Oliver Beckstein and Elizabeth Denning" to "Maintained by the MDAnalysis Core Devs Team" - added Wouter Boomsma (for PR MDAnalysis#976) - removed explicit mentions for KDTree (Hamelryck) because since 0.11.0 we do no longer include the actual code (see PR MDAnalysis#395 and MDAnalysis#383) - removed explicit mentions for helanal (Hall) because Ben Hall is a contributing author
Fixes #383
I have completely removed the old KDTree library. Functions that have used the old class
directly have been adopted to use the scikit-learn implementation. The
AtomNeighborSearch
classwas a nice abstraction that worked directly with
AtomGroups
, it is still available but internally ituses the new KDTree implementation. I tried to make the commits self contained which should make it easier to review this.
The tests have been updated for the new
AtomNeighborSearch
API.TODO:
AtomNeighborSearch