GeinQSAR Studio
Home › Contour maps and atom cubes

Contour maps and atom cubes

How to read a KEFRA contour map and an atom-class cube map, how the contour levels are chosen, how to set up the view, and how the figures for a paper are made.

A 3D-QSAR model can be drawn in space around a ligand, showing where the model predicts that more bulk, more positive charge, a donor or a hydrophobic group would raise or lower the activity. That picture is the reason most people build a 3D model at all, and it is also the easiest part of a study to over-interpret. A KEFRA model is drawn as contour lobes, one pair per field; an atom-based model is drawn as the cubes of its lattice.

What is mapped

An atom-based cube model has one coefficient for every lattice cube and atom class. A KEFRA model has no lattice coefficients: its kernel model is projected back into space as an activity field for each property, sampled on a lattice drawn for the map alone. Both are read in the same way.

For the cubes the mapped quantity is StDev x Coeff, the usual 3D-QSAR map convention: the regression coefficient of a lattice point multiplied by the standard deviation of the field at that point over the training set. It is the change in predicted activity when the field at that point rises by one training standard deviation, so it is large only where the molecules of the series differ and the difference matters (Cramer, Patterson and Bunce 1988). A bare coefficient is misleading, because lattice points differ enormously in how much they vary across the series; a point inside every molecule can have a large coefficient and no influence on any prediction.

A map is read against a ligand. A green lobe next to a substituent says that a larger substituent in that direction is predicted to help; a yellow lobe says that the space is predicted to be full. The map describes the training series in the frame of its alignment: it says nothing about regions no training compound reaches, and a lobe where only one compound has an atom rests on that compound alone.

Colours

FieldFavoured lobeDisfavoured lobe
StericGreen: more bulk raises the predicted activity.Yellow: more bulk lowers it.
ElectrostaticBlue: more positive charge raises the predicted activity.Red: more negative charge raises it.
HydrophobicYellow: a hydrophobic group raises the predicted activity.White: a hydrophobic group lowers it.
H-bond donorCyan: a donor raises the predicted activity.Purple: a donor lowers it.
H-bond acceptorMagenta: an acceptor raises the predicted activity.Red: an acceptor lowers it.

These are the colours of the Classic preset, the convention such maps are usually published in. It uses yellow and red twice (sterically disfavoured and hydrophobic favoured; negative charge favoured and acceptor disfavoured), which is harmless as long as every field has its own view. The Colours drop-down of the Appearance section offers three presets: Classic; Distinct, which gives every lobe of a view with several fields a colour of its own; and Activity (green / red), green where the property raises the predicted activity and red where it lowers it, every field in its own shade. Until you pick one, the program uses Activity. The legend always names the colours that are drawn and the iso-level of each lobe, so a reader never has to guess.

A KEFRA map of the thrombin inhibitors of the Sutherland benchmark (the authors' alignment, charges and training set) around compound 02, exported at 174 mm and 300 dpi. All six fields are drawn at once in the Activity colours, green where more of the property raises the predicted activity and red where it lowers it, each field in its own shade, and each lobe encloses at most 1 % of the lattice. The legend names every field with the level of both its lobes. A figure like this says where the model is sensitive; it takes the panels below to say to what.
A KEFRA map of the thrombin inhibitors of the Sutherland benchmark (the authors' alignment, charges and training set) around compound 02, exported at 174 mm and 300 dpi. All six fields are drawn at once in the Activity colours, green where more of the property raises the predicted activity and red where it lowers it, each field in its own shade, and each lobe encloses at most 1 % of the lattice. The legend names every field with the level of both its lobes. A figure like this says where the model is sensitive; it takes the panels below to say to what.
The same model as a figure with one field per panel, (A) steric to (F) aromatic ring, with one camera for all six panels, one shared legend below and one scale bar. Look at (D): the H-bond donor field has its one favoured lobe out at the benzamidine, away from the body of the molecule, which the combined view above cannot show.
The same model as a figure with one field per panel, (A) steric to (F) aromatic ring, with one camera for all six panels, one shared legend below and one scale bar. Look at (D): the H-bond donor field has its one favoured lobe out at the benzamidine, away from the body of the molecule, which the combined view above cannot show.

Contour levels

How the two levels of a field are chosen changes what a map shows more than anything else, so the definition is a control of its own (Levels in the Contour levels section) and is stated in the legend of every exported figure, for example "Steric (each lobe encloses at most 1 % of the lattice; ligand 02)". The report lists the definition and the two levels of every field.

DefinitionMeaningWhen to use it
Lattice shareThe default. Each lobe encloses the same small share of all lattice points: at the 99th percentile the top 1 % for the favoured lobe and the bottom 1 % for the disfavoured one. A lobe never encloses more than half of the points of its sign, so a field with few points of one sign still shows a lobe. Percentile runs from 90 to 99.9.Almost always: it gives lobes of comparable size, about the volume of a substituent at 1 %, on every field.
Non-zeroThe favoured level is the given percentile of the positive values, the disfavoured level the mirrored percentile of the negative values; only lattice points that carry a value count. Starts at the 70th percentile.Contribution maps of one compound, where most points of one sign lie close to zero.
ClassicalThe 80th and 20th percentile of all lattice values, the usual 3D-QSAR definition. Starts at 80.To compare with an older paper that used it.
By handThe two levels are the values of the Favoured and Disfavoured sliders, in map units. Moving a slider selects this definition.To show the same levels on two models.

The default is a share of the lattice because maps differ in how much of the lattice they use. On a map that is non-zero at a few per cent of the lattice points the classical 80th and 20th percentile falls close to zero, and on a smooth map that is non-zero almost everywhere a percentile of the non-zero points encloses a third of the whole box; in both cases the lobes merge into a shell around the ligand. Field chooses which field's two levels the sliders show. When you describe a figure, quote the definition its legend gives.

The surfaces are not contoured directly on the lattice, which gives faceted shapes that depend on where the points fall. The lattice is refined with an interpolating cubic spline and the surfaces extracted by marching cubes with normals from the analytic gradient. For a Gaussian lobe sampled at 2 Å, the enclosed volume then deviates from the exact value by 0.1 %, against 21 % for direct contouring.

Contribution of one compound

With Quantity set to One compound and a compound chosen in Compound, the map shows where the compound's own field gains or loses predicted activity relative to the average training compound: (x - mean) x coefficient for the cubes, and for KEFRA the field of the compound minus the training mean, times the model. Summed over the map, the values give the prediction of the compound minus the mean training activity. The legend then reads Raises the prediction and Lowers the prediction. Because most points of one sign lie close to zero, these maps are best drawn with the Non-zero definition.

Contribution map of compound 73, the most active thrombin inhibitor (observed 8.480), at the 90th percentile of the non-zero points: green and blue where its steric and electrostatic field raise its prediction, yellow and red where they lower it.
Contribution map of compound 73, the most active thrombin inhibitor (observed 8.480), at the 90th percentile of the non-zero points: green and blue where its steric and electrostatic field raise its prediction, yellow and red where they lower it.
Contribution map of corticosterone, the most active steroid of the set (observed 7.881), at the 90th percentile of the non-zero points: green where its bulk raises its prediction.
Contribution map of corticosterone, the most active steroid of the set (observed 7.881), at the 90th percentile of the non-zero points: green where its bulk raises its prediction.

The steroid model

Contour map of the steroid model built by the wizard from SMILES, around aldosterone, at 1 % of the lattice per lobe, with the level of every lobe in the legend.
Contour map of the steroid model built by the wizard from SMILES, around aldosterone, at 1 % of the lattice per lobe, with the level of every lobe in the legend.
The same model with one field per panel, steric (A) and electrostatic (B), with aldosterone as the ligand and the levels in the shared legend.
The same model with one field per panel, steric (A) and electrostatic (B), with aldosterone as the ligand and the levels in the shared legend.
The alignment behind the steroid maps: every compound of the series as thin lines around aldosterone, with no field drawn. The nuclei coincide; the spread is in the side chain at C17 and the substituents.
The alignment behind the steroid maps: every compound of the series as thin lines around aldosterone, with no field drawn. The nuclei coincide; the spread is in the side chain at C17 and the substituents.
The alignment behind the thrombin maps, the authors' own, around compound 02. The benzamidine groups at the bottom right overlay closely; the substituents on the left spread more.
The alignment behind the thrombin maps, the authors' own, around compound 02. The benzamidine groups at the bottom right overlay closely; the substituents on the left spread more.

A figure of the alignment alone belongs next to every map in a paper: it shows where the series has atoms, and therefore where a lobe can mean something.

Atom-class cubes

An atom-based model counts, for every cube of the lattice, the volume filled by the atoms of each of six classes. Its map draws the cubes themselves. Within a class, one colour marks cubes where an atom of that class raises the predicted activity (blue, Favourable) and the other where it lowers it (red, Unfavourable).

LetterClassAtoms
DHydrogen-bond donor hydrogenA hydrogen bonded to N, O, P or S.
HHydrophobic / non-polarCarbon, hydrogen on carbon, halogen.
NNegative ionicA formally negative atom.
PPositive ionicA formally positive atom.
WElectron withdrawingNitrogen or oxygen, which includes the acceptors.
XOtherEverything else.

The published class list overlaps (a carboxylate oxygen is both N and W), so each atom is assigned to one class by the priority N, P, D, W, H, X.

ControlDefaultMeaning
ShowOne classOne class: a single class in blue and red, the way atom-based maps are published, chosen in Class. All classes: every ticked class in its own colour pair.
Percentile90 %Cubes below this percentile of |value| are hidden, so the default shows the strongest tenth of the model. An atom-based model has thousands of columns, and drawing more of them fills the view with a solid block. Moving it sets both thresholds.
Favourable, UnfavourableThe two thresholds separately: cubes at or above the first are drawn favourable, at or below minus the second unfavourable.
ShownThe number of cubes drawn out of all cubes of the model.
The atom-based model of the thrombin inhibitors, one class per panel (A to F), cubes above the 90th percentile of |value|, ligand 02. The hydrophobic class (B) carries the model: a block of blue cubes around the upper part of the ligand, where non-polar atoms raise the activity. Negative ionic (C) and formally positive (D) cubes are almost all red.
The atom-based model of the thrombin inhibitors, one class per panel (A to F), cubes above the 90th percentile of |value|, ligand 02. The hydrophobic class (B) carries the model: a block of blue cubes around the upper part of the ligand, where non-polar atoms raise the activity. Negative ionic (C) and formally positive (D) cubes are almost all red.
The cubes of the hydrogen-bond donor class (D) in the dashboard around compound 02, with the class thresholds at 0.0037 and 40 of 3364 cubes shown. The inspector lists the share of every class: hydrophobic 49.3 %, electron withdrawing 17.3 %, donor 15.8 %.
The cubes of the hydrogen-bond donor class (D) in the dashboard around compound 02, with the class thresholds at 0.0037 and 40 of 3364 cubes shown. The inspector lists the share of every class: hydrophobic 49.3 %, electron withdrawing 17.3 %, donor 15.8 %.

Cubes with the pharmacophore features of the ligand

Pharmacophore features in the Molecules section perceives the acceptor, donor, hydrophobic, ionic and aromatic features of the ligand and draws them as glyphs over the map, so a cube or a lobe can be read against the feature that sits there. These are the features of that one ligand, not a pharmacophore hypothesis.

The hydrophobic class (H), the class with the largest share (49.3 %), with the features of ligand 02 drawn over it and labelled: the hydrophobic sites H12, H13 and H14 sit inside the blue cubes, while the donors of the amidine on the right lie outside them.
The hydrophobic class (H), the class with the largest share (49.3 %), with the features of ligand 02 drawn over it and labelled: the hydrophobic sites H12, H13 and H14 sit inside the blue cubes, while the donors of the amidine on the right lie outside them.
Every class at once, each in its own colour pair, with the same features. The legend lists twelve cube colours; a picture like this is for exploring, not for a paper.
Every class at once, each in its own colour pair, with the same features. The legend lists twelve cube colours; a picture like this is for exploring, not for a paper.

The display controls

The Maps tab opens the way a map is usually published: smooth translucent lobes, the ligand as ball and stick with its polar hydrogens, the legend in the corner, no lattice box, and the camera on the best view of what is drawn, framed tightly. The panel beside the viewer has these sections.

SectionControls
MapQuantity: Model or One compound. Compound: the compound of a contribution map. Ligand: the compound drawn inside the map, or None; it does not change the map. One box per field of a contour map.
Contour levelsLevels, Percentile, Field, Favoured, Disfavoured, as above.
Atom classes, Cube thresholdCube maps only, as above.
MoleculesAll aligned molecules: every aligned compound as thin lines. Style (default ball and stick) and Hydrogens (default polar only) of the ligand. Coloured carbons and Carbon colour: one colour for the carbons of the ligand instead of element grey. Pharmacophore features. Ligand on top (on): keeps the ligand readable through the map; on a dark background the map is thinned over the ligand, on a white or light background the ligand keeps its own colours and the part a lobe hides shows through.
AppearanceContour maps: Colours (the presets above), Lobe values (off; see below), Style (Solid, Mesh, Dots), Opacity (0.78), Lattice box, and Own lobe colours with a Favoured and a Disfavoured colour for the field chosen under Contour levels. Cube maps: Opacity (1: solid), Fade distant cubes, Cube edges.
View, AnnotationsAs in every 3D view; see The 3D workspace.

A control panel whose controls continue below its lower edge shows a More below sign until they have been scrolled into view, so a setting cannot be missed because the window is short.

How much each lobe is worth

A coloured lobe says where, not how much. Lobe values in the Appearance section labels every lobe with the contribution it makes to the predicted activity, compared with the average compound, and names the nearest atom and group of the ligand, and it lists the lobes in a table under the view with their map values. A label is plated green where the lobe raises the predicted activity and red where it lowers it, while the surfaces keep the colours of the field, so the direction and the field can be read at the same time.

The table holds the lobes that carry at least 1 % of the largest contribution, at most twenty of them, and the rest go to the Excel form of the report. That is what turns a map into a statement about a functional group: not that a region is favourable, but that this substituent in this position accounts for this much of the prediction.

A KEFRA map of the steroids with Pharmacophore features ticked: the acceptors A1, A4 and A5, the donor D7 and the hydrophobic site H8 of aldosterone are drawn and labelled over the lobes, and the legend adds the feature colours. The ligand is drawn ball and stick with polar hydrogens only, on top of the map.
A KEFRA map of the steroids with Pharmacophore features ticked: the acceptors A1, A4 and A5, the donor D7 and the hydrophobic site H8 of aldosterone are drawn and labelled over the lobes, and the legend adds the feature colours. The ligand is drawn ball and stick with polar hydrogens only, on top of the map.
The same model with the steric and electrostatic maps drawn together in the Activity colours: green where more of the property raises the predicted activity, red where it lowers it, each field in its own shade. The legend names the fields that are drawn. The ligand keeps its colours where a lobe covers it, and the panel shows More below because its controls continue past its lower edge.
The same model with the steric and electrostatic maps drawn together in the Activity colours: green where more of the property raises the predicted activity, red where it lowers it, each field in its own shade. The legend names the fields that are drawn. The ligand keeps its colours where a lobe covers it, and the panel shows More below because its controls continue past its lower edge.
The cube map of the steroid atom-based model in the dashboard: the donor-hydrogen class (D) around aldosterone, green where a donor hydrogen in that cube raises the predicted activity and red where it lowers it, 36 of 1304 cubes above the 90th percentile.
The cube map of the steroid atom-based model in the dashboard: the donor-hydrogen class (D) around aldosterone, green where a donor hydrogen in that cube raises the predicted activity and red where it lowers it, 36 of 1304 cubes above the 90th percentile.
The same cubes with the pharmacophore features of the ligand: the red cubes on the right sit at the donors D6 and D7.
The same cubes with the pharmacophore features of the ligand: the red cubes on the right sit at the donors D6 and D7.
Focus mode (F11) on the Maps tab: the side panels of the window are hidden and the map and its panel have the whole window. The scale bar adapts to 2 Å.
Focus mode (F11) on the Maps tab: the side panels of the window are hidden and the map and its panel have the whole window. The scale bar adapts to 2 Å.
Full screen (Ctrl+F11): only the view, its toolbar and the legend. Esc or the same button leaves it.
Full screen (Ctrl+F11): only the view, its toolbar and the legend. Esc or the same button leaves it.

Figures for a paper

The camera button of the viewer toolbar opens the 3D figure dialog. The figure is rendered off screen at its own size and resolution, not copied from the screen, so it is sharp at any size, and the preview in the dialog is the same figure at a low resolution. The figures on this page were made that way, at 174 mm and 300 dpi. The choices that matter for a map:

Every control of the dialog is described on Publication figures. A good caption names the model and its alignment, the ligand, the level definition and what the colours mean, which is everything the legend of the figure also carries.