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

Fix AUTOCORR2D descriptors #3512

Merged
merged 2 commits into from
Oct 27, 2020
Merged

Conversation

ricrogz
Copy link
Contributor

@ricrogz ricrogz commented Oct 20, 2020

Yesterday, looking at #3511, I became curious about the AUTOCORR2D descriptors: I noticed that while BCUT2D ones left over a cache (with a non-Python type), there wasn't one for the AUTOCORR2D descriptors.

Looking a bit further, I noticed these had to be explicitly set up... using a function that was missing an underscore (setupDescriptors()). From there, it was an interesting trip to find that the setup mechanism wasn't working... and neither was the test that was supposed to catch it, since it was over indented so that it was an inner function of the previous test, and therefore, never ran.

This is my attempt to fix it

@greglandrum greglandrum added this to the 2020_09_2 milestone Oct 21, 2020
Copy link
Member

@greglandrum greglandrum left a comment

Choose a reason for hiding this comment

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

LGTM, but @bp-kelley should probably also confirm

def testVectorDescriptorsInDescList(self):
# First try only bcuts should exist
descriptors = set([n for n,_ in Descriptors.descList])
names = set(["BCUT2D_%s"%i for i in ('MWHI',"MWLOW","CHGHI","CHGLO",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is code breaking it looks like

Copy link
Contributor

Choose a reason for hiding this comment

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

As it changes the function names in the descriptor list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, reformatting it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I probably shouldn't have copied the AUTOCORR format, but that's what I did :)

Copy link
Contributor

Choose a reason for hiding this comment

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

@ricrogz - sorry I misread the change! It was fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem! I wasn't quite sure whether you complained about the formatting, which was ugly, or whether the names of the descriptors were wrong... which was part of the problem here.

@bp-kelley bp-kelley merged commit 21ab0be into rdkit:master Oct 27, 2020
@ricrogz ricrogz deleted the fix_autocorr_descriptors branch October 27, 2020 17:18
greglandrum pushed a commit to greglandrum/rdkit that referenced this pull request Nov 2, 2020
* fix autocorr descriptors

* reformat names
greglandrum pushed a commit that referenced this pull request Nov 24, 2020
* fix autocorr descriptors

* reformat names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants