Ah ok. Just a note that you can fragment the actual structure with Open
Babel and you will get the same results. There's a page in the docs on
this:
https://open-babel.readthedocs.io/en/latest/Aromaticity/Aromaticity.html.
On Tue, 21 Feb 2023 at 18:05, Thomas wrote:
> Thank you Noel, the -a opti
Thank you Noel, the -a option solved my issue.
I made a program that fragments molecular structures by fragmenting the
SMILES string instead of the actual structure. Therefore, the resulting
SMILES fragments can be a bit messed up, still I want them to match the
original structure.
Furthermore, th
It would be useful to know what problem you are trying to solve here.
OB does not support canonical Kekule SMILES, if you expect different
resonance forms to give the same canonical Kekule SMILES. Of course, you
can just write out an canonical aromatic SMILES, read it back in, and then
write it ou
Thank you Noel.
I wanted to get the canonical SMILES, without changing the aromaticity of
the input SMILES:
mol = pybel.readstring('smi', 'O=C(NCCN(C)C)C1=CC=CN2C(=O)c3c3(N=C12)')
mol.write(opt={"k": True, 'c':True})
'CN(CCNC(=O)C1=CC=CN2C1=NC1C=CC=CC=1C2=O)C\t\n'
mol.write(opt={'c':True})
'CN
Hi Thomas,
OB does not sanitize molecules when reading from SMILES (or any other
format). By default it writes aromatic SMILES though, but it sounds like
you want Kekule SMILES - see the obabel -Hsmi for the list of options. In
this case you want 'k':
$ obabel -:"O=C1C=COC(=C1(O))C" -xk -osmi
O=C