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

reject rdkit mols with queries #90

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions meeko/molsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,8 @@ def from_mol(cls, mol, keep_chorded_rings=False, keep_equivalent_rings=False,
raise ValueError("RDKit molecule has implicit Hs. Need explicit Hs.")
if mol.GetNumConformers() == 0:
raise ValueError("RDKit molecule does not have a conformer. Need 3D coordinates.")
if mol.HasQuery():
raise ValueError("RDKit molecules with queries are not supported. The molecule may originate from a SMARTS or a MOL/SDF with non-zero values in query fields of atoms or bonds")
rdkit_conformer = mol.GetConformer(conformer_id)
if not rdkit_conformer.Is3D():
warnings.warn("RDKit molecule not labeled as 3D. This warning won't show again.")
Expand Down
Loading