| [0b990d] | 1 | //
 | 
|---|
 | 2 | // scfden.h
 | 
|---|
 | 3 | //
 | 
|---|
 | 4 | // Copyright (C) 1996 Limit Point Systems, Inc.
 | 
|---|
 | 5 | //
 | 
|---|
 | 6 | // Author: Edward Seidl <seidl@janed.com>
 | 
|---|
 | 7 | // Maintainer: LPS
 | 
|---|
 | 8 | //
 | 
|---|
 | 9 | // This file is part of the SC Toolkit.
 | 
|---|
 | 10 | //
 | 
|---|
 | 11 | // The SC Toolkit is free software; you can redistribute it and/or modify
 | 
|---|
 | 12 | // it under the terms of the GNU Library General Public License as published by
 | 
|---|
 | 13 | // the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
 | 14 | // any later version.
 | 
|---|
 | 15 | //
 | 
|---|
 | 16 | // The SC Toolkit is distributed in the hope that it will be useful,
 | 
|---|
 | 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
 | 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
 | 19 | // GNU Library General Public License for more details.
 | 
|---|
 | 20 | //
 | 
|---|
 | 21 | // You should have received a copy of the GNU Library General Public License
 | 
|---|
 | 22 | // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
 | 
|---|
 | 23 | // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
|---|
 | 24 | //
 | 
|---|
 | 25 | // The U.S. Government is granted a limited license as per AL 91-7.
 | 
|---|
 | 26 | //
 | 
|---|
 | 27 | 
 | 
|---|
 | 28 | #ifndef _chemistry_qc_scf_scfops_h
 | 
|---|
 | 29 | #define _chemistry_qc_scf_scfops_h
 | 
|---|
 | 30 | 
 | 
|---|
 | 31 | #ifdef __GNUC__
 | 
|---|
 | 32 | #pragma interface
 | 
|---|
 | 33 | #endif
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 | #include <math/scmat/elemop.h>
 | 
|---|
 | 36 | #include <math/scmat/blocked.h>
 | 
|---|
 | 37 | 
 | 
|---|
 | 38 | #include <chemistry/qc/scf/scf.h>
 | 
|---|
 | 39 | 
 | 
|---|
 | 40 | namespace sc {
 | 
|---|
 | 41 | 
 | 
|---|
 | 42 | class SCFEnergy : public SCElementOp2 {
 | 
|---|
 | 43 |   private:
 | 
|---|
 | 44 |     double eelec;
 | 
|---|
 | 45 |     int deferred_;
 | 
|---|
 | 46 |     
 | 
|---|
 | 47 |   public:
 | 
|---|
 | 48 |     SCFEnergy();
 | 
|---|
 | 49 |     ~SCFEnergy();
 | 
|---|
 | 50 | 
 | 
|---|
 | 51 |     int has_collect();
 | 
|---|
 | 52 |     void defer_collect(int h);
 | 
|---|
 | 53 |     void collect(const Ref<MessageGrp>&grp);
 | 
|---|
 | 54 |     double result();
 | 
|---|
 | 55 |     void reset();
 | 
|---|
 | 56 | 
 | 
|---|
 | 57 |     void process(SCMatrixBlockIter&i, SCMatrixBlockIter&j);
 | 
|---|
 | 58 | };
 | 
|---|
 | 59 | 
 | 
|---|
 | 60 | class LevelShift : public BlockedSCElementOp {
 | 
|---|
 | 61 |   protected:
 | 
|---|
 | 62 |     SCF *scf_;
 | 
|---|
 | 63 |     double shift;
 | 
|---|
 | 64 | 
 | 
|---|
 | 65 |   public:
 | 
|---|
 | 66 |     LevelShift(SCF*);
 | 
|---|
 | 67 |     ~LevelShift();
 | 
|---|
 | 68 | 
 | 
|---|
 | 69 |     int has_side_effects();
 | 
|---|
 | 70 |     void set_shift(double);
 | 
|---|
 | 71 |     
 | 
|---|
 | 72 |     void process(SCMatrixBlockIter&);
 | 
|---|
 | 73 | };
 | 
|---|
 | 74 | 
 | 
|---|
 | 75 | class ALevelShift : public LevelShift {
 | 
|---|
 | 76 |   public:
 | 
|---|
 | 77 |     ALevelShift(SCF*);
 | 
|---|
 | 78 |     ~ALevelShift();
 | 
|---|
 | 79 |     void process(SCMatrixBlockIter&);
 | 
|---|
 | 80 | };
 | 
|---|
 | 81 | 
 | 
|---|
 | 82 | class BLevelShift : public LevelShift {
 | 
|---|
 | 83 |   public:
 | 
|---|
 | 84 |     BLevelShift(SCF*);
 | 
|---|
 | 85 |     ~BLevelShift();
 | 
|---|
 | 86 |     void process(SCMatrixBlockIter&);
 | 
|---|
 | 87 | };
 | 
|---|
 | 88 | 
 | 
|---|
 | 89 | // MO lagrangian
 | 
|---|
 | 90 | //       c  o  v
 | 
|---|
 | 91 | //  c  |FC|FC| 0|
 | 
|---|
 | 92 | //     ----------
 | 
|---|
 | 93 | //  o  |FC|FO| 0|
 | 
|---|
 | 94 | //     ----------
 | 
|---|
 | 95 | //  v  | 0| 0| 0|
 | 
|---|
 | 96 | //
 | 
|---|
 | 97 | class MOLagrangian : public BlockedSCElementOp2 {
 | 
|---|
 | 98 |   private:
 | 
|---|
 | 99 |     SCF *scf_;
 | 
|---|
 | 100 | 
 | 
|---|
 | 101 |   public:
 | 
|---|
 | 102 |     MOLagrangian(SCF* s);
 | 
|---|
 | 103 |     ~MOLagrangian();
 | 
|---|
 | 104 | 
 | 
|---|
 | 105 |     int has_side_effects();
 | 
|---|
 | 106 | 
 | 
|---|
 | 107 |     void process(SCMatrixBlockIter& bi1, SCMatrixBlockIter& bi2);
 | 
|---|
 | 108 | };
 | 
|---|
 | 109 | 
 | 
|---|
 | 110 | }
 | 
|---|
 | 111 | 
 | 
|---|
 | 112 | #endif
 | 
|---|
 | 113 | 
 | 
|---|
 | 114 | // Local Variables:
 | 
|---|
 | 115 | // mode: c++
 | 
|---|
 | 116 | // c-file-style: "ETS"
 | 
|---|
 | 117 | // End:
 | 
|---|