SUBROUTINE INITADDR ( )

Description
                                                                        * 
  Copyright (C) 1996 Leif Laaksonen, Dage Sundholm                      * 
  Copyright (C) 1996-2010 Jacek Kobus               * 
                                                                        * 
  This program is free software; you can redistribute it and/or modify  * 
  it under the terms of the GNU General Public License version 2 as     * 
  published by the Free Software Foundation.                            * 
                                                                        * 
 
### initAddr ### 
    Determines dimensions of arrays and addresses of particular 
    orbitals and coulomb potentials in cw_orb and cw_coul arrays 
    addresses of exchange potentials v(i,j) in the cw_exch array. 
    With each cw_sth array is associated corresponding address array 
    defining its division into subarrays holding individual 
    orbitals/potentials: 
    cw_orb   - i1xx(iorb) 
    cw_coul  - i2xx(iorb) 
    cw_exch  - i3xx(k) 
    cw_suppl - iaddr4(isuppl) 
    cw_sctch - iaddr5(iscratch) 
    i1b(iorb)  - the address of the first element of orbital iorb within 
                 cw_orb array (starting address of the iorb-th orbital) 
    i1e(iorb)  - the address of the last element of orbital iorb within 
                 cw_orb array (ending address of orbital iorb) 
    i1si(iorb) - the size of the cw_orb subarray holding values of the 
                 iorb-th orbital 
    i1ng(iorb) - number of grids used by the iorb-th orbital (must be 
                 1 in x2dhf ver. 2.0) 
    i2b(iorb)  - the address of the first element of Coulomb potential 
                 iorb within cw_coul array (starting address of the iorb-th 
                 potential) 
    i2e(iorb)  - the address of the last element of Coulomb potential 
                 iorb within cw_coul array (ending address of the iorb-th 
                 potential) 
    i2si(iorb) - the size of the cw_coul subarray holding values of 
                 the iorb-th Coulomb pptential 
    i2ng(iorb) - number of grids used by the iorb-th potential (must 
                 be 1 in x2dhf ver. 2.0) 
    i3b(k)     - the address of the first element of the exchange potential for 
                 the k-th pair of orbitals (iorb1,iorb2): k=iorb1+iorb2*(iorb2-1)/2 
    i3e(k)     - the address of the last element of the exchange potential for 
                 the k-th pair of orbitals (iorb1,iorb2) 
    i3si(k)    - the size of the cw_exch subarray holding values of 
                 exchange potential for the k-th pair of orbitals 
    i3ng(k)    - number of grids needed to define the k-th exchange potential 
    ilc(k)     - 0, 1 or 2 indicating the number of exchange potentials for 
                 a given pair of orbitals 
    i3xk(iorb1,iorb2) 
               - the index k of exchange potential corresponding to the pair of 
                 orbitals iorb1 and iorb2 
    Subarrays of cw_suppl and cw_sctch are defined accordingly by i4xx 
    and i5xx arrays. 
    We assume no more than maxorb orbitals and Coulomb potentials and 
    consequently no more than (maxorb*(maxorb+1)/2) exchange 
    potentials.
Source file:initAddr.f
I/O Operations:
Unit ID  Unit No       Access  Form   Operation
      *                   SEQ  FMTD           W  
  IOUT6                   SEQ  FMTD           W  

Operation codes A=rewind,B=backspace,C=close,E=endfile
                I=inquire,O=open,R=read,W=write
Intrinsic Functions Called
GENERIC*4          MIN
Local Variables (+ indicates altered content)
INTEGER           +I,         +I3BEG,     +I3BFIN,    +I3BOFFSET
INTEGER           +IBEG,      +IEND,      +IORB,      +IORB1
INTEGER           +IORB2,     +IREC,      +K,         +L
INTEGER           +L1CUR,     +L2CUR,     +L3CUR,     +L5CUR
INTEGER           +MXSIZE8,   +NGDS,      +NGRID,     +NONS
Referenced Common Block Variables (+ indicates altered content)
ADDRESS1           INTEGER           +I1B(60),  +I2B(60)
ADDRESS1           INTEGER           +I3B(1830)
ADDRESS1           INTEGER           +I4B(20),  +I5B(20)
ADDRESS2           INTEGER           +I1E(60),  +I2E(60)
ADDRESS2           INTEGER           +I3E(1830)
ADDRESS2           INTEGER           +I4E(20),  +I5E(20)
ADDRESS3           INTEGER           +I1SI(60), +I2SI(60)
ADDRESS3           INTEGER           +I3SI(1830)
ADDRESS3           INTEGER           +I4SI(20), +I5SI(20)
ADDRESS4           INTEGER            I1NG(60),  I2NG(60)
ADDRESS4           INTEGER           +I3NG(1830)
ADDRESS4           INTEGER           +I4NG(20), +I5NG(20)
ADDRESS5           INTEGER           +I1MU(60), +I2MU(60)
ADDRESS5           INTEGER           +I3MU(1830)
ADDRESS6           INTEGER           +I3BREC(60,60)
ADDRESS6           INTEGER           +I3BRECK(60,60)
ADDRESS6           INTEGER           +I3BTV(60,60)
ADDRESS6           INTEGER           +I3NEXCP(60)
ADDRESS6           INTEGER           +I3XK(60,60)
ADDRESS6           INTEGER           +I3XPAIR(60,60)
ADDRESS6           INTEGER           +I3XREC1(1860)
ADDRESS6           INTEGER           +I3XREC2(1860)
COMPATAB           INTEGER           +ILC(1830)
CONFIG             INTEGER           +NEXCH,     NORB
DEBUG              INTEGER            IDBG(1000)
DEBUG              INTEGER            IPRINT(1000)
DIMES              INTEGER            MAXORB
GRIDI              INTEGER            IEMU(10),  MXNMU
GRIDI              INTEGER            MXSIZE,    NGRIDS
GRIDI              INTEGER            NNI
IADDRESS7          INTEGER           +I3ORB1(1860)
IADDRESS7          INTEGER           +I3ORB2(1860)
INPUTD1            INTEGER            IFORM,     IMETHOD
IOCHAN             INTEGER            IOUT6
LENGTHS            INTEGER            LENGTH1,   LENGTH2
LENGTHS            INTEGER            LENGTH3,   LENGTH4
LENGTHS            INTEGER            LENGTH5,   NSCTCH
LENGTHS            INTEGER            NSUPPL
ORBIT              INTEGER            LL(60)