Disallow redundant bonds in BondList#829
Conversation
Linford24
left a comment
There was a problem hiding this comment.
A check for same atom binding to itself was added to both the BondList constructor and add_bond method.
BondList
|
Addresses first part of #812 |
padix-key
left a comment
There was a problem hiding this comment.
Thanks for the fix. However, I see a problem with the performance: Iterating over bonds directly happens in pure Python, which can be quite time consuming. Hence I'd rather suggest to use a memoryviewinstead which cython compiles into C code.
Are you familiar with these Cython details? Otherwise I also can make the amendments here.
|
Yes please. This PR only addresses the first part. The second part regarding the chem_comp bond will be in a separate PR as you suggested and I will be push soon |
|
I am not familiar with the Cython details but I would be glad if you could brief me on them so I implement the suggestion myself and get to learn it as well |
|
Meanwhile, I am reading about the change you suggested. Would get back with the revised amendments |
…ad of directly iterating over bonds in pure Python.
Linford24
left a comment
There was a problem hiding this comment.
Added iteration over bonds with memoryview instead of pure Python
|
Sorry for the late response, I was sick for a few days. I think these two tutorial pages give a sufficient overview of Cython's memory views: https://cython.readthedocs.io/en/latest/src/userguide/numpy_tutorial.html If you look at It tells Cython to convert |
|
I'm much glad you're fit again. I'm going through the tutorials |
No description provided.