On 14/12/2022 17:37, Thomas wrote:
Is there a way to get the SMILES used to generate the molecule (NOT the canonical one)?
Not as far as I know.
If I generate a molecule from a SMILES, a call to GetAtoms() returns the atoms in the order of the input SMILES. I'd like to retrieve that SMILES, so I can play with it using the info from GetAtoms or GetBonds. Is that possible?
after you create your mol, add a property: mol = Chem.MolFromSmiles(smiles) mol.SetProp("SMILES", smiles) then use mol.GetProp("SMILES") when you need it later. Paul. _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss