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

AttributeError: 'Mol' object has no attribute 'pSmi' #1

Open
Saoge123 opened this issue Dec 27, 2024 · 0 comments
Open

AttributeError: 'Mol' object has no attribute 'pSmi' #1

Saoge123 opened this issue Dec 27, 2024 · 0 comments

Comments

@Saoge123
Copy link

Hi:
Thanks for your nice work.
The code works fine for most molecules, but there are some molecules that have following error.:

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from rBRICS_public import *
import rdkit

m = Chem.MolFromSmiles('COc1cc2c(C3=C/C(N(CCNC(N)=O)C(N3CC2)=O)=N\c4c(C)cc(C)cc4C)cc1OC')
res = list(rBRICSDecompose(m))
sorted(res)
      2 m = Chem.MolFromSmiles('COc1cc2c(C3=C/C(N(CCNC(N)=O)C(N3CC2)=O)=N\c4c(C)cc(C)cc4C)cc1OC')
      3 ""
----> 5 res = list(rBRICSDecompose(m,returnMols=True))
      6 res[0]
      7 smis = [Chem.MolToSmiles(x,True) for x in res]

File ~/rBRICS_public.py:688, in rBRICSDecompose(mol, allNodes, minFragmentSize, onlyUseReactions, silent, keepNonLeafNodes, singlePass, returnMols)
    686 matched=True
    687 for nats,prod in prodSeq:
--> 688   pSmi = prod.pSmi
    689   #print '\t',nats,pSmi
    690   if pSmi not in allNodes:

AttributeError: 'Mol' object has no attribute 'pSmi'

I am not sure what the reason is, but there is nothing abnormal when using Chem.BRICS for processing

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

No branches or pull requests

1 participant