Dear All RDKiters,
I have a simple question about generating all possible smiles of a given
molecule:
RDKit provides only 4 differents smiles for my molecule “CCC1CC1“:
C1C(CC)C1
CCC1CC1
C1(CC)CC1
C(C)C1CC1
While by hand we can write those 7 smiles:
CCC1CC1
C(C)C1CC1
C(C1CC1)C
C1CC(CC)1
C1C(CC)C1
C1CC1CC
C(CC)1CC1
I use this function for the enumeration:
def allsmiles(smil):
m = Chem.MolFromSmiles(smil) # Construct a molecule from a SMILES string.
if m is None:
return smil
N = m.GetNumAtoms()
if N==0:
return smil
try:
n= np.random.randint(0,high=N)
t= Chem.MolToSmiles(m, rootedAtAtom=n, canonical=False)
except :
return smil
return t
n= 50
SMILES = [“CCC1CC1”]
SMILES_mult = [allsmiles(S) for S in SMILES for i in range(n)]
Why we cannot generate all the 7 smiles ?
Thanks guys,
Best regards,
Guillaume
***********************************************************************************
DISCLAIMER
This email and any files transmitted with it, including replies and forwarded
copies (which may contain alterations) subsequently transmitted from Firmenich,
are confidential and solely for the use of the intended recipient. The contents
do not represent the opinion of Firmenich except to the extent that it relates
to their official business.
***********************************************************************************
------------------------------------------------------------------------------
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