For some applications it is useful to have a tool which could, for
example, subtract one density from the other. This possibility is
provided by option 6 of the main menu (both VASP
and SIESTA are supported!). In fact, if two densities,
and are given, it is possible to calculate
a new density on the grid, , that is their linear combination:
The following menu opens:
....... DENSITIES MANIPULATION MENU .................
... CALCULATE the density from A,B-densities as: ....
final(grid) = 1.000 * A(grid) -1.000 * B(grid)
<<< active code = VASP >>>
1. file name of the A-density = CHGCAR_a
2. file name of the B-density = CHGCAR_b
3. file name of the final density = CHGCAR_ab
4. coefficient c1= 1.00000000000000
5. coefficient c1= -1.00000000000000
6. calculate and write the final density
7. quit
------>
The file names in options 1-3 are initially suggested by the current DFT code, however, they can be changed in those options. The coefficients and are specified in 4 and 5, while the actual calculation and saving of the density to the file is performed in 6. The sum of the density over all grid points (in units of electrons) is shown after the calculation for information, e.g.:
6. calculate and write the final density <= DONE
.....> Total charge in CHGCAR = 8.00000219907003 <.....
.....> Total charge in 1 = 8.00000219907003 <.....
.....> Final charge in 2 = 0.00000000000000D+000 <.....
In this example two identical densities were used (both corresponding to 8 electrons) and , so that their linear combination gives zero density.