Layer-resolved density of states (LDOS)
This page documents the Layer Density of States (LDOS) workflow in detail, including required files, parsing behavior, layer assignment, Layer DOS, Heatmap DOS, structure controls, plotting, and export.
The workflow is code-agnostic: upload the output files from your DFT simulation, parse, tune your plot
settings, and export a publication-ready figure. Where useful, this page uses the VASP file names
(vasprun.xml) and an AlGaN structure as examples.
For full styling controls (figure, title, axes, grid, legend, etc.), see Plot Settings.
Input and parsing #
Layer DOS plotting requires atom-projected DOS data and structural metadata, including atomic coordinates
and
species. In this documentation, VASP files are used as an example. For VASP, use vasprun.xml or
a combination of DOSCAR and POSCAR. For SIESTA, use .PDOS.xml and
STRUCT_OUT.
Although this section resembles uploading files to a website, your files never leave your computer. Parsing and plotting run locally in your browser. Below is the list of files currently required by the web app to generate LDOS figures.
| File | Required | Purpose |
|---|---|---|
DOSCAR
|
Yes | Total and projected density-of-states values used for plain and projected DOS plotting, and the Fermi level reference used by DOS mode (VASP example). |
POSCAR
|
No | Provides species/count metadata for grouped atom tables (VASP example). |
After selecting the files, click Parse to process the data.
Layer Definition #
Direction: choose x, y, or z as the Cartesian axis used to group atoms. The selected axis determines the coordinate column in the table and the spatial direction in the plot.
Number of layers: enter an integer from 1 to the number of atoms. Detect layer count estimates a suitable count from the atomic coordinates; Generate layers builds the initial assignment for that count.
Layer: edit an atom's number to move it to another layer. Atom is the source atom index; click Species to correct an element name. The coordinate column gives the Cartesian position in Å. To next layer gives the distance between neighboring layer centers; the last layer has no following distance.
The AlGaN example has 46 atoms in 22 layers. The first and last layers contain three atoms each; the middle 20 layers contain two atoms each. The table below restores the missing layer assignments from the supplied example.
Layer Definition
Generate an initial assignment from real Cartesian atomic coordinates, then adjust individual atoms as needed. Changes are used only when Plot is clicked.
| Layer | Atom | Species | z (Å) | To next layer (Å) |
|---|---|---|---|---|
| 46 | 11.6463 | 3.3876 | ||
| 23 | 13.6215 | |||
| 8 | 14.2678 | |||
| 24 | 16.2430 | 2.6215 | ||
| 9 | 16.8893 | |||
| 25 | 18.8645 | 2.6215 | ||
| 10 | 19.5107 | |||
| 26 | 21.4859 | 2.6215 | ||
| 11 | 22.1322 | |||
| 27 | 24.1074 | 2.6215 | ||
| 12 | 24.7537 | |||
| 28 | 26.7289 | 2.6215 | ||
| 13 | 27.3752 | |||
| 29 | 29.3504 | 2.6215 | ||
| 14 | 29.9967 | |||
| 30 | 31.9719 | 2.6215 | ||
| 15 | 32.6182 | |||
| 31 | 34.5934 | 2.6215 | ||
| 16 | 35.2397 | |||
| 32 | 37.2148 | 2.6215 | ||
| 17 | 37.8611 | |||
| 33 | 39.8363 | 2.6215 | ||
| 18 | 40.4826 | |||
| 34 | 42.4578 | 2.6215 | ||
| 19 | 43.1041 | |||
| 35 | 45.0793 | 2.6215 | ||
| 20 | 45.7256 | |||
| 36 | 47.7008 | 2.6215 | ||
| 21 | 48.3471 | |||
| 37 | 50.3223 | 2.5708 | ||
| 22 | 50.9686 | |||
| 38 | 52.9437 | 2.4650 | ||
| 1 | 53.4887 | |||
| 39 | 55.4087 | 2.4650 | ||
| 2 | 55.9537 | |||
| 40 | 57.8737 | 2.4650 | ||
| 3 | 58.4187 | |||
| 41 | 60.3387 | 2.4650 | ||
| 4 | 60.8837 | |||
| 42 | 62.8037 | 2.4650 | ||
| 5 | 63.3487 | |||
| 43 | 65.2687 | 3.1958 | ||
| 6 | 65.8137 | |||
| 44 | 67.7337 | — | ||
| 7 | 68.2787 | |||
| 45 | 70.1987 |
Layer DOS #
Layer DOS sums atom-projected DOS within each assigned layer and draws a trace for every layer. The controls below come from the same templates used by the plotting page.
Display and Layer DOS options
Layer DOS tab: selects line-based, layer-resolved rendering. Plot plain DOS: shows each layer's total DOS. Plot projected DOS: shows the selected atom-and-orbital contributions in each layer. Both options can be plotted together.
Smoothing factor: set line interpolation from 0 to 1; the default 0 uses the original energy samples. Scale DOS bin widths by layer spacing: use the physical distances between layers instead of equal-width layer positions. In this mode, spatial axis limits are distances in Å; otherwise, they select layer numbers. Energy orientation: place energy on the vertical or horizontal axis.
Projections and Smart Plotting Order
Add a projection, then select its atoms and orbitals in the projection table. For each layer, LDOS sums only the selected atoms that belong to that layer. Its Line/Marker tile sets line style and width, marker and size. The separate Fill tile enables shading and sets fill opacity and plot order; the fill uses the projection color selected in the Coloring tile.
Smart Plotting Order: ranks filled projections separately in each layer and each energy region bounded by zero total layer DOS. Within a region, the fill with the smallest integrated absolute area draws on top, so a smaller contribution remains visible. Unfilled curves are not reordered. A manually entered Plot Order turns off Smart Plotting Order; clear the manual value to enable it again.
Spins / DOS Limits tile
Spin ↑ / Spin ↓: choose the spin channels to include; at least one must remain selected. Spin ↓ is disabled for non-spin-polarized data. DOS Limits: enter lower and upper density values or adjust the paired slider handles. The displayed unit follows the DOS unit in Plot Settings.
Line and Fill tiles
Line: choose solid, dashed, or dotted styling and set width in pixels; leaving width blank uses an automatic size based on the figure dimensions. Color and Opacity change the trace appearance. Plot Order controls which traces draw on top. The separate Fill tile shades the area beneath each layer DOS trace and provides its own color, opacity, and plot order controls.
Layer Lines tile
Show Layers: display or hide layer guide lines. The line style, width, color, opacity, and plot order control the appearance of those guides.
Fermi level tile
Show fermi: toggle the Fermi reference. Shift: offset the parsed Fermi
energy so plotted energies follow E - (EF + shift). Line style, width, color,
opacity, and plot order style the reference line. A blank shift defaults to zero in the plot; the field
shows zero as a placeholder. The shift unit follows the selected energy unit.
Show bandgap tile
Show bandgap: display flat valence and conduction edge lines across each layer in Layer DOS. The edges come from each layer's total DOS, using the same threshold and interpolation as regular DOS. Where the estimated gap is zero, both edges meet at the Fermi reference.
Set the line color, style, and width. Fill can be None, Solid, or Hash; Hash draws diagonal lines between the edges. Opacity controls the solid fill or hash lines from 0 (transparent) to 1 (opaque) and defaults to 0.25.
Heatmap DOS #
Heatmap DOS maps estimated spatial DOS intensity across the selected layer direction and energy. It is an approximation from atom-projected partial DOS.
Heatmap display
Choose the Heatmap DOS tab in General Options to replace layer traces with the spatial heatmap. The warning reminds you that values between atomic planes are interpolated estimates.
Interpolation tile
Interpolate: enable or disable spatial interpolation. Method: use linear, 1D cubic spline, or 2D cubic spline interpolation. Vacuum (Å): beyond this distance from an atom plane, vacuum samples have zero LDOS. Sampling factor: controls the density of spatial samples; automatic estimation uses the visible energy spacing and plot size, while an entered value overrides it.
Coloring tile
Two color: choose the colors for low and high DOS values. Colormap: choose a continuous palette for the intensity scale. Reverse: invert the selected colormap. The color-bar controls in Plot Settings style the scale shown beside the figure.
Spin, limits, guides, and energy orientation
Spins / DOS Limits: choose spin ↑, spin ↓, or both, and set the density range mapped to the heatmap colors. The same tile is shown in the Layer DOS section; its unit follows the selected DOS unit.
Layer Lines: show or hide layer guides over the heatmap and set their line style, width, color, opacity, and plot order. Fermi level: show or hide the Fermi reference, apply an energy shift, and style its line. The Layer Lines and Fermi level previews above use the same controls.
Energy orientation: place energy on the vertical or horizontal axis. The selected orientation also changes the arrangement of the structure panel and LDOS plot.
Structure plot #
The structure panel uses the parsed coordinates and the same layer assignments as LDOS. These examples are filled from the AlGaN structure so the table previews resemble the live page after parsing.
Structure and layout controls
Total DOS plot: add the input file's total DOS beside the LDOS plot. Figure Layout places it left or right in vertical orientation and above or below in horizontal orientation. The LDOS and Total DOS area ratios divide the figure between those two regions. When Structure is shown, Total DOS aligns with the LDOS data panel. Selected projections also appear in Total DOS. Energy ticks and labels are placed on the outer edge of the combined figure. For spin-polarized data, the DOS panel uses Add by default to sum the selected spin channels; choose Separate to display them as mirrored curves. LDOS and Total DOS share one legend and the energy limits. The Limits and axis settings panels show separate LDOS and DOS controls for the density and spatial axes; changing the shared energy window also updates the automatic DOS range. Smart ordering applies to both plots when selected. Structure plot: show or hide the structure panel. Layers: draw layer markers on the structure. Boundary Box: show the cell outline. Axes: show coordinate axes. Projection direction: choose a direction perpendicular to the layer axis; with z layers, x and y are available. Area ratio: allocate width between Structure and LDOS; the example uses 0.20 and 0.80.
Atoms tile
| Name | Color | Size (px) |
|---|---|---|
Name: edit a species label. Color: set the atom color; the example uses the first four colors of the default Shine palette, and changing the Color palette in Plot Settings updates species colors on the live page. Size (px): override the automatic atom size. The example uses Al 13, Ga 16, N 9, and H 6 pixels. Apply to All: add the entered pixel offset to all atom sizes.
Bonds tile
| Bond | Length (Å) | |
|---|---|---|
| Ga - N | ||
| Al - N | ||
| Al - H | ||
| N - H | ||
| Al - Al | ||
| Al - Ga | ||
| Ga - Ga | ||
| Ga - H | ||
| H - H | ||
| N - N |
Show: enable or disable each species pair. Bond: names the pair. Length (Å): sets the maximum distance for drawing that bond, not its measured length. The example values use the live page's default rule: 1.2 times the sum of the two covalent radii, rounded to 0.01 Å. For the parsed AlGaN coordinates, Ga–N and Al–N have atom pairs inside their default cutoffs and are enabled initially; the other pairs remain available to configure.
Structure Style tile
Atom Outline: toggle the outline and set its width, color, and opacity. Bond Lines: set bond width, color, and opacity. Widths are in pixels; opacity ranges from 0 (transparent) to 1 (opaque).
Plot and export #
Plot applies current layer assignments and settings. Reset clears the current configuration. After plotting, Download exports PNG, JPEG, or SVG; SVG keeps figure elements editable in vector software.
Warnings and errors #
Missing input: choose an LDOS source and provide structure coordinates. VASP needs
atom-projected DOS in DOSCAR or vasprun.xml; SIESTA needs .PDOS.xml
and STRUCT_OUT.
Invalid layer count: enter an integer from 1 to the number of atoms, then regenerate layers. Missing spins: keep at least one spin channel selected.
Heatmap geometry or range: use a lattice vector aligned with the layer direction and select an energy range containing at least two distinct values. Export before plotting: render a figure before downloading.