gruenewald-lab / CGsmiles

Coarse-Grained Smiles (CGsmiles) for representing abitrarily complex molecules using a compact line notation
4 stars 1 forks source link

[2] Aromatic fragments #5

Closed fgrunewald closed 5 months ago

fgrunewald commented 6 months ago

Pysmiles does not allow partial aromatic fragments (for good reason) yet we still want to do them. Thus here we have a workaround. If two atoms are marked as aromatic we simply convert them to regular elements and later change it back. It's stupid but works.

Example Case Martini3 p-cresol:

cgsmiles_str = "{[#TN6]1[#TC5][#TC5A][#TC5]1}.{#TN6=[$][$]cO,#TC5=[$]cc[$],#TC5A=[$][$]cc}"

The aromatic ring is fragmented into four fragments.

fgrunewald commented 5 months ago

no need for this anymore; the recent pysmiles changes fix everything