Re: [Rdkit-discuss] How to prevent a SMILES from starting with a specific atom?

2021-05-11 Thread Andrew Dalke
On May 12, 2021, at 05:08, Francois Berenger  wrote:
> Or, more generally, flag a given atom in a molecule
> and ask rdkit to not start the corresponding SMILES with
> this atom, any unflagged atom being fine.

Perhaps do the opposite and use rootedAtAtom to have RDKit start with a 
specific atom that you know is fine?

https://www.rdkit.org/docs/source/rdkit.Chem.rdmolfiles.html#rdkit.Chem.rdmolfiles.MolToSmiles

   • rootedAtAtom: (optional) if non-negative, this forces the SMILES to start
   at a particular atom. Defaults to -1.


Andrew
da...@dalkescientific.com




___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] How to prevent a SMILES from starting with a specific atom?

2021-05-11 Thread Francois Berenger

Hello,

I have some molecules with unspecified atoms ('*' in SMILES notation).

I would like that when such a molecule is written out, the resulting
SMILES never starts by one of those atoms (since the molecule
also has plenty of "normal" atoms).

Is it possible to do that with rdkit?

Or, more generally, flag a given atom in a molecule
and ask rdkit to not start the corresponding SMILES with
this atom, any unflagged atom being fine.

Thanks a lot!
F.


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss