anchor.diff:        CALL MEMMAN(KRHO1,NACOB ** 2,'ADDS  ',2,'RHO1  ')  !done
   *.3.1: One-body spin density
         IF(ISPNDEN.GE.1) THEN
  -        CALL MEMMAN(KSRHO1,NACOB **2, 'ADDS  ',2,'SRHO1 ')
  +        CALL MEMMAN(KSRHO1,NACOB **2, 'ADDS  ',2,'SRHO1 ')  !done
         ELSE 
           KSRHO1 = 1
         END IF
         IF(ISPNDEN.GE.2) THEN
   *. Two-body spin-density matrices
           LENSS = (NACOB*(NACOB+1)/2) ** 2
  -        CALL MEMMAN(KRHO2AA,LENSS,'ADDS  ',2,'RHO2AA')
  +        CALL MEMMAN(KRHO2AA,LENSS,'ADDS  ',2,'RHO2AA')  !done
           LENAB = NACOB**4
  -        CALL MEMMAN(KRHO2AB,LENAB,'ADDS  ',2,'RHO2AB')
  -        CALL MEMMAN(KRHO2BB,LENSS,'ADDS  ',2,'RHO2AA')
  +        CALL MEMMAN(KRHO2AB,LENAB,'ADDS  ',2,'RHO2AB')  !done
  +        CALL MEMMAN(KRHO2BB,LENSS,'ADDS  ',2,'RHO2AA')  !done
         ELSE
           KRHO2AA = 1
           KROH2AB = 1
  
positive.code:               KRHO2 = 1
              END IF
              CALL DENSI2(IDENSI,dbl_mb(KRHO1),dbl_mb(KRHO2),
       &      KPVEC1,KPVEC2,0,0,EXPS2,ISPNDEN,WORK(KSRHO1),
       &      WORK(KRHO2AA),WORK(KRHO2AB),WORK(KRHO2BB),1)
            ELSE
              CALL REWINO(LUSC1)
              CALL REWINO(LUC)
              CALL COPVCD(LUC,LUSC1,dbl_mb(KVEC1),0,LBLK)
              CALL DENSI2(IDENSI,dbl_mb(KRHO1),dbl_mb(KRHO2),
       &          dbl_mb(KVEC1),dbl_mb(KVEC2),LUC,LUSC1,EXPS2,
       &          ISPNDEN,WORK(KSRHO1),WORK(KRHO2AA),WORK(KRHO2AB),
       &          WORK(KRHO2BB),1 )
            END IF ! ICISTR switch
        END IF ! densities should be calculated
  *
  
negative.code: *.4  Two-body density matrix
        LRHO2 = NACOB**2*(NACOB**2+1)/2
        IF(IDENSI.EQ.2.AND.ISVMEM.EQ.0) 
       &CALL MEMMAN(KRHO2,LRHO2     ,'ADDS  ',2,'RHO2  ')  !done
  C     IF(IDENSI.GE.1.OR.ISPNDEN.GE.1) THEN
  C       WRITE(6,*) 
  C    &  'Space for density matrices over all orbital-spaces allocated'
  C      END IF
  *. Array for giving the orbital spaces in which density should be calculated
         CALL MEMMAN(KDENSSPC,NGAS,'ADDL  ',1,'DENSPC')  !done
  *. Arrays for going between complete ST ordered orbitals and ST ordering 
  *. of the orbitals in the densities
         CALL MEMMAN(KDTFREORD,NTOOB,'ADDL  ',2,'DTFREO')  !done
         CALL MEMMAN(KFTDREORD,NTOOB,'ADDL  ',2,'FTDREO')  !done
  *.4. Integrals (ij!kk) -(ik!kj), pointer and space
  CJO   CALL MEMMAN(KPNIJ,NTOOB ** 2,'ADDS  ',1,'KPNIJ ')
  CJO   CALL MEMMAN(KIJKK,NTOOB**2 *(NTOOB+1) / 2, 'ADDS  '
  