Skip to content

Add an initial bridge from ccdata to rdkit Mol objects - #1205

Draft
ghutchis wants to merge 2 commits into
cclib:masterfrom
ghutchis:add-rdkit-bridge
Draft

ghutchis wants to merge 2 commits into
cclib:masterfrom
ghutchis:add-rdkit-bridge

Conversation

@ghutchis

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
@ghutchis
ghutchis marked this pull request as draft May 16, 2023 16:01
@ghutchis

Copy link
Copy Markdown
Contributor Author

Work in progress

@ghutchis

Copy link
Copy Markdown
Contributor Author

Is it worth grabbing all the atomic coordinates or an option to select which set of coordinates to use for bond perception?

@berquist berquist added this to the v1.8 milestone May 16, 2023
@berquist

Copy link
Copy Markdown
Member

Is it worth grabbing all the atomic coordinates or an option to select which set of coordinates to use for bond perception?

We don't standardize on this yet, but in a few places we take the approach of having atomcoords_index: int = -1 or a similar name in the method call, so that you can specify ones other than the last set if desired.

Are you asking about that generally, or if bond perception should happen on a set of coordinates different from those initially loaded into the molecule (I guess a different rdkit conformer)?

@ghutchis

Copy link
Copy Markdown
Contributor Author

Using a specific index is a nice idea. I'll also add a parameter if someone wants to grab all the coordinates as separate conformers for some reason.

I'm basically looking for feedback / code review. For example, should I check the RDKit version string rather than trying to import the bond perception module?

@berquist
berquist self-requested a review May 16, 2023 20:23
@berquist

Copy link
Copy Markdown
Member

Ok, I understand better now. Historically we did try/except for imports before adding this find_package helper, but did do version checks for Python itself. The only other outlier was keeping OB behind try/except still in order to deal with the package restructuring at version 3.

It's really up to you, but my thinking is that find_package should always be the first layer that guides someone to install the package, then you can either do an explicit version check or have a try/except that implicitly checks the version if the importable API changed across version boundaries. If __version__ is available, that's probably cleanest.

@langner

langner commented May 16, 2023

Copy link
Copy Markdown
Member

Bumping this to next release (1.8.1 tentatively), since we want to push out 1.8 soonish.

@langner langner modified the milestones: v1.8, v1.8.1 May 16, 2023
@berquist

Copy link
Copy Markdown
Member

Would it help to move this long if I wrote some tests?

@berquist

Copy link
Copy Markdown
Member

This got lost in a Slack chat, but I am wary of us merging any code that does not come with tests.

@ghutchis

Copy link
Copy Markdown
Contributor Author

If you can help get some tests started, I can make sure they provide good coverage. Sorry for this getting lost in the shuffle.

@berquist

Copy link
Copy Markdown
Member

I need to install rdkit in our CI images.

@berquist berquist self-assigned this Jul 8, 2023
@berquist berquist linked an issue Aug 29, 2023 that may be closed by this pull request
@berquist berquist modified the milestones: v1.8.1, v2.0 Dec 19, 2023
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.

New bridge request: RDKit

3 participants