Skip to content

Instantly share code, notes, and snippets.

@whitead
Created March 21, 2024 21:26
Show Gist options
  • Save whitead/46466c25fa81c0c73b1120f06e63fb6c to your computer and use it in GitHub Desktop.
Save whitead/46466c25fa81c0c73b1120f06e63fb6c to your computer and use it in GitHub Desktop.
Randomize SMILES
from rdkit.Chem import MolFromSmiles, MolToSmiles
smi = "..."
MolToSmiles(MolFromSmiles(smi), canonical=False, doRandom=True, isomericSmiles=True, kekuleSmiles=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment