-
Notifications
You must be signed in to change notification settings - Fork 105
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
RDKit Conversion Issue #756
Comments
I can confirm the above with this minimal env. This is python 3.13. # pixi.toml
[project]
authors = ["Zachary Charlop-Powers <>"]
channels = ["conda-forge"]
name = "test"
platforms = ["osx-arm64"]
version = "0.1.0"
[tasks]
[dependencies]
rdkit = ">=2024.9.5,<2025"
ipython = ">=8.32.0,<9"
[pypi-dependencies]
biotite = { git = "https://github.com/biotite-dev/biotite", rev = "4c7204afd07c489117243fd8ad4a67f787a4a820" }
pixi run ipython
# paste code from above. |
Hi, thanks for reporting. @Croydon-Brixton also encountered this problem (#741 (comment)) and already prepared a fix (padix-key#13). The reason is that the To get actual coordinates you have to predict them and (optionally) add hydrogen atoms. from rdkit.Chem import MolFromSmiles
from rdkit.Chem.rdDistGeom import EmbedMolecule
from rdkit.Chem.rdForceFieldHelpers import UFFOptimizeMolecule
from rdkit.Chem.rdmolops import AddHs
ERTAPENEM_SMILES = "C[C@@H]1[C@@H]2[C@H](C(=O)N2C(=C1S[C@H]3C[C@H](NC3)C(=O)NC4=CC=CC(=C4)C(=O)O)C(=O)O)[C@@H](C)O"
mol = MolFromSmiles(ERTAPENEM_SMILES)
# RDKit uses implicit hydrogen atoms by default, but Biotite requires explicit ones
mol = AddHs(mol)
# Create a 3D conformer
conformer_id = EmbedMolecule(mol)
UFFOptimizeMolecule(mol)
ertapenem = rdkit_interface.from_mol(mol, conformer_id) |
Beautiful. Thank you. |
Hi @padix-key ,
As a follow up to zachcp/moltite#1, I just tried to use this new feature and the conversion gives me an empty stack. I can track this down if needed but do you think you could confirm if this is reproducible on your end?
The text was updated successfully, but these errors were encountered: