next up previous contents
Next: Search for the surface Up: Detailed description of options Previous: Option 4 of the   Contents

General linear combination of charge densities

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, $\rho_{a}$ and $\rho_{b}$ are given, it is possible to calculate a new density on the grid, $\rho_{ab}$, that is their linear combination:

\begin{displaymath}
\rho_{c}(i_{1},i_{2},i_{3})=c_{1}\rho_{a}(i_{1},i_{2},i_{3})+c_{1}\rho_{b}(i_{1},i_{2},i_{3})\end{displaymath}

where $c_{1}$ and $c_{2}$ are arbitrary constants. It is necessary that the two files containing densities $\rho_{a}$ and $\rho_{b}$ be compatible with each other (the same lattice vectors and grid, atomic positions can be different).

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 $c_{1}$and $c_{2}$ are specified in 4 and 5, while the actual calculation and saving of the density $\rho_{ab}$ 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 $c_{1}=-c_{2}=1$, so that their linear combination gives zero density.


next up previous contents
Next: Search for the surface Up: Detailed description of options Previous: Option 4 of the   Contents
Lev Kantorovich 2006-05-08