Densific

User guide
Back to the demo

1. What the demo does

Densific predicts the electron (charge) density of a crystal from its structure with DensTens, a deep-learning model. With Densific you can:

2. Log in

Use the user name public and the password that you are given via developers. The login stays valid for some days on the same browser. Click "Log out" on a shared computer.

3. Step by step

  1. Model. Select a model. The text below the list tells you about the model.
  2. Structure, Dataset tab. Type one of these and click "Search":
    • an mp-id, for example mp-1797400 (the dataset uses the task ids of the charge-density calculations, not always the material ids that you see on the Materials Project website);
    • a formula, for example Fe2O3 (all structures with this composition; the order of the elements is not important);
    • elements with spaces, for example Fe O (structures that contain these elements; the simplest first).
    Click a row to select it. The "Split" column tells you how the selected model used the structure: train, validation or test. Only test structures give a fair error. A structure with the tag "grid too large" cannot be used (see section 5).
  3. Structure, Build tab. Select a prototype, enter the elements and the lattice constant, and click "Fill the form". Then you can change the form:
    • Lattice vectors: three lines, three numbers each, in Å.
    • Atoms: one atom per line, the element and three fractional coordinates, for example Na 0 0 0.
    • Grid spacing: the distance between grid points in Å. A smaller value gives a finer grid and takes more time.
    Click "Show the structure" to check it in the 3D view.
  4. Run. Click "Predict the density". If you want the full-resolution file, select the check box first.

4. While the prediction runs

The log shows each step with its time: waiting for a GPU, the DFT data download, the symmetry analysis, the prediction and the post-processing. The GPU stops when nobody uses the demo. Then the first request must start a GPU, which takes 10–40 s. The next requests are faster (usually 1–5 s for normal structures). Large dataset structures take longer, because the DFT file can be more than 100 MB. If no L4 GPU is free, the job moves to another GPU type, and if no GPU is free at all, to a CPU. The CPU is slower (about 1 min for most structures), but you always get a result.

5. Results

ItemMeaning
NMAENormalised mean absolute error: 100 % × Σ|ρpred − ρDFT| / Σ|ρDFT|, on all grid points of the DFT grid. Only for dataset structures.
ElectronsThe integral of the density over the cell, for the prediction and for DFT. dN is the predicted minus the DFT value.
TimesTotal time, prediction time, GPU start, waiting time, data, post-processing and transfer. The prediction time is also given per grid point.
3D viewIsosurface of the prediction, the DFT density or the difference (prediction − DFT: red positive, blue negative). Use the slider to change the iso-level. Drag to turn, scroll to zoom.
2D slicesA plane at a fixed fractional coordinate along a, b or c. Prediction, DFT and difference use the same colour scale. The log scale shows the low-density regions better.

A train structure gets a note: its error is lower than the true test error. The 3D view and the slices use a coarser display grid (at most 80 points per axis). The NMAE uses the full grid. For very large DFT grids the prediction and the NMAE use a sub-grid (for example every second point along each axis); the log tells you when this occurs.

6. Full-resolution file (CHGCAR)

The file has the VASP CHGCAR format (gzip). As in VASP, the values are ρ × Vcell (electrons), with x the fastest index. The grid is the full prediction grid. The download link stays valid for 24 hours.

7. Limits

Atoms in a new structureat most 100
Grid points of a new structureat most 3,000,000
DFT grid points of a dataset structureat most 20,000,000
Grid spacing0.08–1.0 Å (default 0.15 Å)
Distance between two atomsat least 0.5 Å
Lattice vectorsat most 60 Å
Elementsonly elements that the model saw in training
Predictionsat most 20 per hour per user

8. Error messages

MessageWhat to do
Two atoms are closer than …Check the fractional coordinates and the lattice constant.
The model did not see these elements in trainingUse other elements. The model cannot predict them.
Too many atoms / too many grid pointsUse a smaller cell or a larger grid spacing.
The DFT grid of this structure has … pointsThe structure is too large for the demo. Select a different structure.
The DFT density of this structure is not availableThe Materials Project removed the file. Select a different structure.
The limit is … predictions per hourWait some minutes, then try again.
No worker became available in time / The job stoppedTry again some minutes later. If the problem continues, tell the developers.
The structure needs too much memoryUse a larger grid spacing or a smaller cell.
Internal errorTell the developers the time of the request. The admin can find the details.

9. Data, citation and privacy

Model: DensTens: paper reference to be added.

DFT data: Materials Project charge densities (A. Jain et al., APL Mater. 1, 011002, 2013; J.-X. Shen et al., Sci. Data 9, 661, 2022), from the Materials Project open data on AWS, licence CC BY 4.0. If you use DFT data from this demo, cite these papers.

Predictions are model output. They can contain errors. Do not use them as a replacement for DFT calculations.

Privacy: the site keeps a log of each visit: the time, the user name, the page or action (for example a search text, a prediction or a download), the result code and your browser type. For each prediction it also keeps the model, the mp-id or formula, the grid, the times and the error. The atom positions of a structure that you build are not kept in the log. The site does not record your IP address. We use this log to run the site (errors, misuse) and to count the use of the demo. Only the site administrators can see it. We do not give it to other persons. After 90 days the visit log is deleted. Result files are deleted after 24 hours. The site uses one cookie for the login only. For questions about your data, ask the developers.