Dear Greg,
I have separate SDF files of conformers of the same molecule (they are called
xxxx_c0.sdf, xxxx_c1.sdf, xxxx_c2.sdf and so on), with a few properties for
each conformer. I am using the following code to read them into RDKit and align
them:
for conf in confs: # loop over my sdf files
suppl = Chem.SDMolSupplier(conf, removeHs = False)
if “_c0.sdf” in conf:
allconfs = suppl[0]
else:
for i,mol in enumerate(suppl):
allconfs.AddConformer(mol.GetConformer(), assignId = True)
And then I am using AllChem.AlignMolConformers(allconfs) to align the
conformers. It all works fine BUT: when I save the aligned conformers with the
SDWriter, all the conformers have the properties of the very first conformer.
What should I do to keep the original SDF properties of the conformers from
before the alignment? Does AddConformer lose the properties or is something
wrong with how I write them out? I am using the following to save the aligned
conformers into one sdf:
w = Chem.SDWriter(“aligned.sdf”)
for conf_id in range(len(allconf.GetConformers)):
w.write(allconfs, confId=conf_id)
w.close()
What should I do to have all the original SDF properties from the initial
conformers in the aligned.sdf file?
Many thanks and best regards,
Anikó
------------------------------------------------------------------------------
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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss