SUBROUTINE ETOTALORB ( IORB, PSI, POT, EXCP, E, F0, WGT1, WGT2, WK0, WK1, WK2, WK3, WK4, WK5, WK6, WK7, WK8, WK9, WK10, WK11, WK12, WK13 )

Argument Definitions (+ indicates altered content)
INTEGER            IORB
REAL*8             E(*),       EXCP(*),    F0(*),      POT(*)
REAL*8             PSI(*),     WGT1(*),    WGT2(*),    WK0(*)
REAL*8             WK1(*),     WK10(*),    WK11(*),    WK12(*)
REAL*8             WK13(*),    WK2(*),     WK3(*),     WK4(*)
REAL*8             WK5(*),     WK6(*),     WK7(*),     WK8(*)
REAL*8             WK9(*)
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.                            * 
                                                                        * 
 
### etotalOrb ### 
    Calculates total energy in the case of exchange potentials being 
    kept on a disk during SCF cycles, i.e. by summing up contributions 
    due to a given orbital
Source file:etotalOrb.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
DOUBLE PRECISION   DBLE
GENERIC*8          ABS
GENERIC*4          MIN
External Functions and Subroutines Called
REAL*8             DOT
SUBROUTINE         ADD,        COPY,       DIFFMU,     DIFFNU
SUBROUTINE         EXCONT,     EXINT,      PROD,       PROD2
SUBROUTINE         PUTIN,      PUTOUT,     SCAL
Local Variables (+ indicates altered content)
INTEGER           +IBEX,      +IBORB,     +IBORB1,    +IBORB2
INTEGER           +IBPOT,     +IBPOT1,    +IBPOT2,    +IEX
INTEGER           +IEX1,      +IORB1,     +IORB2,     +ISIEX
INTEGER           +ISIEX1,    +ISIORB,    +ISIORB1,   +ISIORB2
INTEGER           +ISIPOT,    +ISIPOT1,   +ISIPOT2,   +NGRID
INTEGER           +NMUT,      +NMUT1,     +NMUT2,     +NORB2
REAL*8            +EPSCHARGE, +OC,        +OC1,       +OC2
REAL*8             OCX1,       OCX2,      +W,         +WDCOUL
REAL*8            +WEX1,      +WEX2,      +WNDC,      +WONEEL
Referenced Common Block Variables (+ indicates altered content)
ADDRESS1           INTEGER            I1B(60),   I2B(60)
ADDRESS1           INTEGER            I3B(1830)
ADDRESS3           INTEGER            I1SI(60),  I2SI(60)
ADDRESS3           INTEGER            I3SI(1830)
ADDRESS5           INTEGER            I1MU(60)
COMPATAB           INTEGER            ILC(1830)
CONFIG             INTEGER            NEL,       NORB
CONSFP             REAL*8             ONE
CONSINT            INTEGER            IONE
DEBUG              INTEGER            IPRINT(1000)
ENERG              REAL*8             ENG(60),  +ENGT(60)
GRIDI              INTEGER            NNI
INPUTD2            REAL*8             R,         Z1
INPUTD2            REAL*8             Z2
IOCHAN             INTEGER            IOUT6
ORBIT              INTEGER            ISYMORB(60)
ORBIT              INTEGER            MM(60)
ORBITR             REAL*8             OCC(60)
SORWK              INTEGER           +ISYM
TOTTMP             INTEGER           +ICTOT,    +IREADY
TOTTMP             REAL*8            +EPOTT,    +ETOT
TOTTMP             REAL*8            +EVT,      +VIRRAT
TOTTMP             REAL*8            +VK(60),   +VKT
TOTTMP             REAL*8            +VN(60),   +VNT