Skip to content

Phase, charge and colour

One meaning per colour, on every page

ColourMeansWhere
amber / tealthe sign of ψ: amber ψ > 0, teal ψ < 0orbital surfaces in the 3D viewer, π orbitals on the pKa maps, the studio, the overlap and molecule pages
red / blueelectron-rich / electron-poor: more or fewer electrons, negative or positive electric potential, charge gained or lostπ interference and potential in the 3D viewer, charge-shift and potential maps, the catalogue's polarity overlay
violetπ electron densitypKa maps, 3D π density, the catalogue's conjugation corridor
whitedirection of a lone pair3D viewer, molecule page

Red and blue follow the convention of electrostatic-potential maps in chemistry textbooks, so they are never used for the sign of ψ. (Until 16.0 the 3D viewer drew ψ in red and blue, the studio in orange and blue, the pKa maps in teal and amber, and the catalogue marked electron-rich atoms cyan. Four pages, three conventions.)

1. Wavefunction phase is not electrical charge

The two surface colours of an orbital encode opposite signs of the local wavefunction,

\[ \psi(\mathbf r)>0,\qquad \psi(\mathbf r)<0. \]

The overall phase is arbitrary:

\[ \psi \longrightarrow -\psi \]

does not change the density

\[ \rho(\mathbf r)\propto |\psi(\mathbf r)|^2. \]

Therefore a lone pair should not be described as having "more negative phase" merely because it is electron-rich, and a teal lobe is not negatively charged.

2. Electron richness

For a doubly occupied localized orbital, electron density scales conceptually as

\[ \rho_j(\mathbf r)\propto 2|\psi_j(\mathbf r)|^2. \]

The current viewer does not yet sum all localized orbital densities into a self-consistent molecular electron density. White lone-pair arrows are therefore qualitative localization markers rather than density isosurfaces. The π fields of the 3D viewer do show a computed density: the π electrons of the Hückel layer.

3. Charge-sensitive radial heuristic

/api/model now returns for each atom:

json
{
  "formal_charge": -1,
  "partial_charge": -0.63,
  "partial_charge_model": "Gasteiger_or_formal_fallback"
}

Where possible, partial_charge is an RDKit Gasteiger charge. If that estimate is unavailable, the integer formal charge is used.

For radial visualization the API also returns radial_charge_proxy. For a heavy atom this is its Gasteiger charge plus the Gasteiger charges of directly bonded hydrogens. This avoids a misleading protonated-amine case in which the raw nitrogen Gasteiger value may be negative even though the N+H site is cationic, while still allowing resonance-distributed carboxylate oxygens to remain similarly negative.

When charge-sensitive radial extent is switched on in the 3D viewer (it is off by default since 16.1, so that by default the viewer draws exactly the functions the orbital layer uses), every exponent of the atom's radial function is scaled,

\[ \zeta_k^{\mathrm{display}} = \zeta_k \exp(0.12\, q_i), \]

with the factor clipped to

\[ 0.78 \le \exp(0.12q_i)\le1.28. \]

Thus:

  • \(q_i<0\) makes the drawn orbital more diffuse;
  • \(q_i>0\) contracts it.

This is intentionally modest and changes the drawing only. It gives the renderer chemically sensible directionality for ionic/polar environments without claiming that an empirical partial charge is a substitute for a self-consistent electronic-structure calculation.

4. Why Gasteiger rather than only formal charge?

Formal charge is a bookkeeping integer and can depend on resonance drawing. For example, one Lewis form of a carboxylate assigns \(-1\) to one oxygen even though the physical charge is distributed over both oxygens.

Gasteiger charges are still heuristic, but distribute polarity through the molecular graph and are therefore a better visualization control than raw formal charges alone.

5. Future physically stronger model

The next level would obtain atomic populations or an electrostatic potential from an actual quantum-chemical model and use those quantities independently of the orbital phase display. In that model the viewer would keep three separate visual channels:

  1. orbital phase;
  2. electron density / occupancy;
  3. electrostatic potential or partial charge.

Keeping these concepts separate prevents the common error of equating "blue orbital phase" with "negative charge".

Source: CHARGE_AND_COLOR_MODEL.md in the server package · updated