Hi German, GetNumConjGrps is not a function of the Chem module, but a method of the ResonanceMolSupplier class. You have to create a resonance mol supplier object first, for example:
>>> supp = Chem.ResonanceMolSupplier(mol) >>> supp.GetNumConjGrps() 2 Hope this helps, Ivan On Tue, Sep 28, 2021 at 3:38 PM German Barcenas < germanbarce...@u.boisestate.edu> wrote: > Hello, > > I am trying to use: > https://www.rdkit.org/docs/source/rdkit.Chem.rdchem.html#rdkit.Chem.rdchem.ResonanceMolSupplier.GetNumConjGrps > > But I keep getting this error message: > > module 'rdkit.Chem' has no attribute 'GetNumConjGrps > > > I'd like to use this to find the conjugated group number as well as their > group size ( amount of bonds) to parse some structures. > > > Here's a snippet of my code > > > from rdkit import Chem > > > > conjchaintest='c1ccccc1C=C-C(CC=C-C=Cc2ccc2)CC-C=CCC=C-C=C-C=C-C=C-C(c3ccccc3)' > m=Chem.MolFromSmiles(conjchaintest) > originalSanitized=Chem.SanitizeMol(m,catchErrors=True) > res=Chem.ResonanceMolSupplier(m) > groups=Chem.GetNumConjGrps(ResonanceMolSupplier(m)) > > And from here the error is given. I am using RDKit:2021.03.2. I'm not > sure what the issue is here because the documentation says that > GetNumConjGrps is a part of the Chem module. Am I calling it wrong? > > Thanks, > > -- > German Barcenas > Ph.D Candidate | Materials Science and Engineering > Materials Modeling and Theory Group > Boise State University > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss