Explore a CUBE field
Isovalues, opacity, slice planes, contours and samples.
Choose the structure and the CUBE grid
In Structure source Dataset choose the positions to draw. In Electron-density CUBE Dataset choose the grid of the field. The empty choice leaves the field out at the next update. You can show two distinct Datasets together. To interpret the overlay, check that structure and grid share the same origin and coordinate system.
- Water RHF electron density
- Installs
density.waterand uses it in both selectors. The CUBE contains three atoms and the density computed with PySCF. After rendering, the range and the units are shown. - Diamond periodic RHF charge density
- Selects the
density.diamondfield and the paired CIFcrystal.cod.2101499. In Source and scientific metadata check that the two identities stay distinct. The CIF provides the lattice, the CUBE the field. - Water displacement signed difference
- Sets
density.water_difference. The difference contains positive and negative regions on the same computation grid. In the test, Density range runs from about−0.0469174to0.0485266and Field units reportse/Bohr^3.
Field Dataset, Field source SHA-256, Field URL and Field rights identify the field separately. The units of the scalar value remain those stated, even though the model coordinates are in ångström.

Choose isosurfaces and opacity
In Isovalues (semicolon-separated; signed values allowed) enter 1 to 32 numbers separated by semicolons. The initial value is 0.05. Use the point as the decimal separator. An isovalue describes the grid points with the same scalar value. Choose levels within Density range. For the water difference enter -0.0005; 0.0005 to see both signs. An empty field, non-numeric text and too many values produce an error. Correct them and update.
Density opacity sets the opacity of the isosurfaces from 0.05 to 1.0. The initial value is 0.48. Move towards the minimum to bring out the atoms and towards the maximum for an opaque surface. The opacity of the slice plane is handled separately by the viewer. Press Open / update 3D structure and density to apply the new values.
Orient and move the slice plane
Slice plane and relative position holds an x, y, z selector and a slider. The axis identifies the grid direction that stays fixed in the slice. The initial value is z. The slider has a relative scale from 0.02 to 0.98 and starts at 0.5. Move it towards one end to bring the plane closer to the corresponding edge. After every change press Open / update 3D structure and density. The three following sections use the difference CUBE and show how to check the result.
Slice along x
Select x to keep the first grid coordinate fixed. On the water CUBE, with relative position 0.25, the plane is parallel to yz and lies at x ≈ −1.173 Å. The test uses opacity 0.05.

Slice along y
Select y to keep the second grid coordinate fixed. With relative position 0.60, the test shows the plane parallel to xz at y ≈ 0.318 Å, with opaque isosurfaces.

Slice along z
Select z to keep the third grid coordinate fixed. With relative position 0.90, the plane is parallel to xy at z ≈ 1.724 Å in the water CUBE. This is a slice close to an edge, while the initial position 0.50 is at the centre. The values in ångström for other files depend on their grid.

Draw a level on the slice
In Contour value on slice enter a field value to draw a line on the plane. The initial value is 0.05. For the difference example set -0.00003. The level must be crossed by the field in the current plane. If the line is missing, change the level or the position and regenerate. Use the signs of the values to interpret the figure.
Read the value at a site
After rendering, select a single atom. The summary contains field value and the units if the site falls inside the grid and sampling succeeds. In the Water RHF electron density example, site O1 at the origin shows about 39.889 e/Bohr^3. If outside density grid appears, that site lies outside the chosen grid. Check the origin, the extent and the pairing between the two sources.

Repeat the example with a local file
Save the CUBE and import it with Import local CIF / CUBE…. Select the new Dataset in both menus, enter the signed levels and update each axis as above. The file comes from the PySCF 2.14.0 difference example with a 48 × 48 × 48 grid, released under the CC0-1.0 licence. The provenance file includes method, perturbation, range and hashes. Water difference CUBE (ZIP) · Computation provenance (ZIP).