~nickpapior/siesta/trunk-kpoint-dos

« back to all changes in this revision

Viewing changes to Src/rhooda.f

  • Committer: Alberto Garcia
  • Date: 2004-11-25 18:49:43 UTC
  • Revision ID: Arch-1:siesta@uam.es--2004%siesta-devel--reference--0.11--patch-1
Siesta 0.11 -- imported from CVS
Import from cvs using date instead of siesta-0-11-release tag, since
the Pseudo structure was not properly integrated at that time and
did not get the tag.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
      subroutine rhooda( NO, endC,  listC,  C, NSPmax, NSP, NP, Datm,
 
1
C $Id: rhooda.f,v 1.4 1999/01/31 11:43:38 emilio Exp $
 
2
 
 
3
      subroutine rhooda( NO, indxuo, endC,  listC,  C,
 
4
     .                   NSPmax, NSP, NP, Datm,
2
5
     .                   RHOatm )
3
6
 
4
7
C ********************************************************************
7
10
C Written by P.Ordejon and J.M.Soler. May'95.
8
11
C *********************** INPUT **************************************
9
12
C integer NO              : Number of basis orbitals
 
13
C integer indxuo(NO)      : Index of equivalent atom in unit cell
10
14
C integer endC(NO)        : Accumulated umber of nonzero elements in
11
15
C                           each row of C
12
16
C integer listC(*)        : List of nonzero elements in each row of C
21
25
 
22
26
      implicit none
23
27
 
24
 
      integer          NO, NP, NSP, NSPmax, endC(0:NO), listC(*)
 
28
      integer          NO, NP, NSP, NSPmax
 
29
      integer          endC(0:NO), indxuo(NO), listC(*)
25
30
      real             C(NSPmax,*), RHOatm(NSP,NP)
26
31
      double precision Datm(NO)
27
32
 
28
 
      integer          i, in, ip, isp
 
33
      integer          i, in, ip, isp, iu
29
34
      double precision Ci
30
35
 
31
36
C     Initialize RHOatm
37
42
 
38
43
C     Loop on orbitals
39
44
      do 50 i = 1, NO
 
45
        iu = indxuo(i)
40
46
 
41
47
C       Loop on mesh points of orbital i
42
48
        do 40 in = 1+endC(i-1), endC(i)
45
51
C         Loop over sub-points
46
52
          do 30 isp = 1, NSP
47
53
            Ci = C(isp,in)
48
 
            RHOatm(isp,ip) = RHOatm(isp,ip) + Datm(i) * Ci * Ci
 
54
            RHOatm(isp,ip) = RHOatm(isp,ip) + Datm(iu) * Ci * Ci
49
55
   30     continue
50
56
 
51
57
   40   enddo