Skip to content

Electronic / polarity overlay

What changed in v3

The earlier overlay used a second absolutely positioned SVG over the RDKit drawing. Although both used nominally the same 760 × 430 coordinate system, responsive CSS could scale and center the RDKit SVG differently from the overlay container. That is why the coloured fields could visibly drift away from the atoms.

The v3 implementation appends the electronic layer directly into the SVG generated by RDKit.

Therefore the mapping is now

\[ \text{RDKit atom draw coordinate} \longrightarrow \text{overlay primitive in the same SVG coordinate system}. \]

Responsive resizing affects the molecule and overlay together, so there is no independent coordinate transform to keep synchronized.

Colour legend

  • Red — locally electron-rich / negative-polarity tendency.
  • Blue — locally electron-poor / electrophilic tendency.
  • Violet — conjugated / π-delocalized corridor.
  • Green ring — hydrogen-bond donor-capable heteroatom.

These colours are the site-wide charge colours (see Phase, charge and colour); they are never used for orbital phase.

Scientific status

The map is currently based on functional-group SMARTS plus qualitative local-chemistry rules. It is not a computed electron density, electrostatic potential, or partial-charge surface.

The UI is intentionally designed so a later quantitative source (partial charges, electrostatic potential, or another model) can replace the rule strengths without changing the rendering concept.

Ether catalogue rule

The shared functional-group catalogue now includes:

[OD2;H0]([CX4,c])[CX4,c]

This detects neutral non-acyl ethers with an oxygen attached to two sp3 or aromatic carbon centres. It intentionally avoids classifying ester oxygen as a generic ether.

Inductive paths and mesomeric annotations

The map now carries a second, explicitly symbolic layer:

  • gold dashed arrows denote a qualitative −I path through sigma bonds;
  • magenta dotted arrows denote a qualitative +M donation path where a catalogue rule requires direct conjugation.

These arrows are not a continuous field calculation. They are annotations derived from matched functional motifs and are kept visually distinct from the local delta-plus/delta-minus circles.

Halogens are rendered as polarized C–X groups. For saturated alkyl halides, the dominant catalogue effect is −I. Aryl halides additionally receive a +M annotation because lone-pair donation into the aromatic pi system is possible despite the overall deactivating −I effect.

Source: ELECTRONIC_OVERLAY.md in the server package · updated