Hi Leon, To access the conformers of the molecule, try mh.GetConformers(). Thus, to check the number of conformers, try len(mh.GetConformers()). Alternatively, you may use mh.GetNumConformers() to directly get the number of conformers a molecule has. The cids variable is not affected by functions on the molecule object, that’s why it remains the same.
Best regards, Omar On Sat, Nov 23, 2019 at 1:10 AM topgunhaides . <sunzhi....@gmail.com> wrote: > Hi guys, > > I need to remove a conformer from the cids list? I tried the code below, > but it doesn't work. > > from rdkit import Chem > from rdkit.Chem import AllChem > > mh = Chem.AddHs(Chem.MolFromSmiles('OCCCN')) > cids = AllChem.EmbedMultipleConfs(mh, numConfs=10, maxAttempts=1000, > pruneRmsThresh=0.5, numThreads=0, > randomSeed=-1) > print(list(cids)) > mh.RemoveConformer(2) > print(list(cids)) > > Results: > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > > Did I do it wrong? Thanks! > > Best, > Leon > > _______________________________________________ > 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