greglandrum / rdkit-blog

RDKit blog
https://greglandrum.github.io/rdkit-blog/
7 stars 2 forks source link

rdkit-blog/posts/2023-03-02-clustering-conformers #15

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

RDKit blog - Clustering conformers

Tutorial on how to cluster molecular conformers.

https://greglandrum.github.io/rdkit-blog/posts/2023-03-02-clustering-conformers.html

LingjieBao1998 commented 1 year ago

Good Post!

steto123 commented 5 months ago

Really nice Post and blog, But i have a question:

Is there a simple way to save one conformer from each cluster to a sdf file or in different .mol files?

For example i have the following source code fragment:

Build SDWriter

writer = rdmolfiles.SDWriter('output.sdf')

write molecule in to SDF-file

for mol in mols: writer.write(mol)

close Writer

writer.close()

in my example mols is generate form a SMILES List mols = [Chem.MolFromSmiles(smiles) for smiles in smiles_list]

but i find no way to fill mols with one conformer from each cluster.

Many thanks for help (i hope)

Steffen