Hello, I think the place the hydrogens get lost is during the "MolFromMolBlock" operation. Try to add the flag *removeHs=False.* best wishes, wim
On Tue, Dec 20, 2022 at 10:56 AM Omar H94 <omar8...@gmail.com> wrote: > Dear Petro, > > Try using: Chem.AddHs(mol, addCoords=True) to get hydrogen atoms with 3D > coordinates. > > Regards, > Omar > > On Tue, 20 Dec 2022 at 12:18 PM Khoroshyy Petro <khoros...@gmail.com> > wrote: > >> Hi, list. >> I use the code below to generate conformers. >> The thing is that If I generate conformers, they are without hydrogens, >> and when I add hydrogens, they are all in the center of the ring >> overlapping. >> What am I doing wrong? >> Thanks. >> Petro. >> >> from rdkit import Chem >> from rdkit import RDConfig >> from rdkit.Chem import AllChem >> from rdkit.Chem import rdMolAlign >> from rdkit.Chem import rdShapeHelpers >> from rdkit.Chem import rdMolDescriptors >> from rdkit.Chem import PyMol >> from rdkit.Chem import Draw >> params = Chem.rdDistGeom.srETKDGv3() >> params.randomSeed = 0xf00d >> params.clearConfs = True >> m = Chem.MolFromSmiles(''C1CCCCCCC1'') >> m2=Chem.AddHs(m) >> cids = AllChem.EmbedMultipleConfs(m2, numConfs=10, params=params) >> rmslist = [] >> AllChem.AlignMolConformers(m2, RMSlist=rmslist) >> print(rmslist) >> res = [] >> for i in range(5): >> mb = Chem.MolToMolBlock(m2, confId=i) >> >> mb_h = Chem.AddHs(Chem.MolFromMolBlock(mb)) >> res.append(mb_h) >> >> >> -- >> ______________________________ >> Petro Khoroshyy >> _______________________________________________ >> 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 >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss