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
perf: features.contact #220
Conversation
All tests run fine locally, not sure why they fail here |
@@ -58,17 +59,12 @@ def _find_matching_residue_class(self, residue: Residue): | |||
return None | |||
|
|||
def get_vanderwaals_parameters(self, atom: Atom): | |||
type_ = self._get_type(atom) |
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.
Don't we need type_ var?
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.
It's used for getting the right vanderwaals parameters from the table file.
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.
As far as I could see it was only used internally by the get_vanderwaals_parameters
function. However, this function basically did nothing else than read the type_ and get the parameters, so instead I merged get_type
into get_vanderwaals_parameters
.
I tested that old and new add_features
functions (from atomic_contact, which uses this) give the exact same result on ~5 test cases, so am fairly confident that it is still being read correctly.
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.
Seems good, but the build is failing. Please fix it before merging :)
I noticed that this code is actually slower than the original in assigning features. I tested this by looping some tests from test_query and checking how long it takes to run. I realize that this is (probably) because before that calculations (e.g. I can look into finding a way to combine what happened before with the simplified code base, or we can revert to how it was or leave it as is. What do you think? |
I would just revert it. It would have been a nice addition but I wouldn't lose too much time on this |
I resolved it. Didn't take that long and wanted to use some stuff from this PR anyway. |
…ank-core into add_features_for_residues
Massively simplified code for addition of edge features in features.atomic_contact.
Also fixed mistake in LJ potential calculation
Removed old functions from tools.pdb, which I think were intended for or once upon a time used for generating edge features, but is now done in feature.atomic_contact
closes #207 and #218