Hi everyone,
I am stuck on the following issue: I have two files of different conformers for the same molecule. One is an NMR generated reference PDB, the other one is an sdf with conformers generated in RDKit. I would now like to merge the two files into one PDB preserving the initial atom numbering and naming from the reference file. If I simply add the generated conformers to the reference molecule using AddConformer() everything seems fine in the beginning (even when looking at the generated PDB files, the atom numbering/naming seems to be in order), however it does not update the coordinates accordingly, resulting in wrong atom typings and connection issues in the outfile (see attached out.pdb). 
Is there a way to automatically generate an atom mapping between the two or update the coordinates accordingly? Or maybe someone can think of an overall better solution to the issue?
Thanks and all the best!
refMol=Chem.MolFromPDBFile(refFile, removeHs=False)
confSupp=Chem.SDMolSupplier(confFile, removeHs=False)
for m in confSupp:
    refMol.AddConformer(m.GetConformer(0), assignId=True)
for i in range(0,refMol.GetNumConformers()):
    writer.write(refMol, confId=i)

Attachment: confs.sdf
Description: Binary data

Attachment: out.pdb
Description: Binary data

Attachment: ref.pdb
Description: Binary data

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Rdkit-discuss mailing list

Reply via email to