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

Importing rdkit.Chem still loads Qt libraries into memory #3694

Closed
ricrogz opened this issue Jan 5, 2021 · 1 comment · Fixed by #3696
Closed

Importing rdkit.Chem still loads Qt libraries into memory #3694

ricrogz opened this issue Jan 5, 2021 · 1 comment · Fixed by #3696
Labels

Comments

@ricrogz
Copy link
Contributor

ricrogz commented Jan 5, 2021

Even after applying #3659 rdmolops.so is still linking to Qt libraries, at least on Linux.

It seems like these are transitive dependencies brought in by MolDraw2D: even if rdmolops itself doesn't make use of Qt, it defines MolToSVG(), which adds a dependency on MolDraw2D, so that it gets loaded whenever rdmolops is, and this also brings in the Qt libraries. As mentioned in #3658, this causes problems in systems where Qt is not available.

The best way I can think of to solve this issue is moving MolToSVG() to rdkit.Chem.Draw. I don't love that, because all the "MolTo..." functions are collected together in rdkit.Chem, but it would solve the issue, and since SVG is not really a structure file format (i.e. we cannot import a molecule back from it, there's no "MolFromSVG()"), it kind of makes sense to put it together with the rest of the drawing stuff.

Does that make sense?

@ricrogz ricrogz added the bug label Jan 5, 2021
@greglandrum
Copy link
Member

Yeah, I'm fine with this being moved to rdMolDraw2D. It shouldn't have ended up in MolOps in the first place.

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 a pull request may close this issue.

2 participants