Hello, I'd like to enumerate all possible permutations of symmetric atoms. Consider the following code:
phenol = Chem.MolFromSmiles("Oc1ccccc1") equivalencies = list(Chem.CanonicalRankAtoms(mol, breakTies=False)) print(equivalencies) [0, 6, 4, 2, 1, 2, 4] Atoms that have the same value in list "equivalencies" are symmetric. For phenol, the equivalent atoms correspond to a 180 degree rotation of the aromatic ring over the axis containing the carbon-oxygen bond. The possible permutations, expressed as atom indices, are: [0, 1, 2, 3, 4, 5, 6] [0, 1, 6, 5, 4, 3, 2] By permutations, I mean that it is possible to replace the coordinates of the atoms and produce a realistic molecule. A brute force approach comes to mind, where one would enumerate all possible combinations, and exclude those that change the molecular graph. In the example above there are four possible combinations, because there are two groups of two symmetric atoms. An example of an "invalid" combination is swapping the third and seventh atoms without swapping the fourth and sixth atoms: [0, 1, 6, 3, 4, 5, 2] This would be excluded as it breaks the bond between the third and fourth atoms (among other bonds). Is there a method in the RDKit to enumerate the valid permutations? Thank you, Diogo
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss