Matrix Density building

Asked by Mamy-Rivo

Hi, everyone,
In BigDFT code, the density matrix is built in the subroutine partial_density or partial_density_free (included in the
surmho routine). In this partial_density subroutine, the density matrix rho_p is a matrix with four indices (n1i,n2i,nrhotot,nspinn).
Can someone please explain to me the meaning of these four indices? How are evaluated and arranged the density matrix elements with respect to these four indices? Thanks for advance.
Best regards.

Question information

Language:
English Edit question
Status:
Solved
For:
BigDFT Edit question
Assignee:
No assignee Edit question
Solved by:
Luigi Genovese
Solved:
Last query:
Last reply:
Revision history for this message
Best Luigi Genovese (luigi-genovese) said :
#1

Hi Rivo,

there if probably a misunderstanding there.
Generally a DFT code does not extract the density matrix, but the charge density rho(r), namely the diagonal components of the density matrix for each of the points of the simulation domain.
That is what the partial_density routine calculates.
The four indices are in this case simply labelling the grid points in the three directions x,y and z. The fourth index is related to spin degrees of freedom, either collinear or non-collinear.

The O(N) version of the BigDFT code calculated the density matrix in the basis of the support functions (which might be nonorthogonal, so pay attention to the overlap), with a completely different set of routines and algorithm.

Many thanks

Luigi

Revision history for this message
Mamy-Rivo (shimumass) said :
#2

Thanks Luigi Genovese, that solved my question.