integral.h
//
// integral.h --- definition of the Integral class
//
// Copyright (C) 1996 Limit Point Systems, Inc.
//
// Author: Edward Seidl <seidl@janed.com>
// Maintainer: LPS
//
// This file is part of the SC Toolkit.
//
// The SC Toolkit is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// The SC Toolkit is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public License
// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
//
// The U.S. Government is granted a limited license as per AL 91-7.
//
#ifndef _chemistry_qc_basis_integral_h
#define _chemistry_qc_basis_integral_h
#ifdef __GNUC__
#pragma interface
#endif
#include <stddef.h>
#include <util/state/state.h>
#include <util/group/message.h>
#include <chemistry/qc/basis/basis.h>
#include <chemistry/qc/basis/obint.h>
#include <chemistry/qc/basis/tbint.h>
namespace sc {
class SymmetryOperation;
class RefSymmSCMatrix;
class ShellRotation;
class CartesianIter;
class RedundantCartesianIter;
class RedundantCartesianSubIter;
class SphericalTransformIter;
class SphericalTransform;
class PointBag_double;
class PetiteList;
class Integral : public SavableState {
protected:
Integral(const Ref<GaussianBasisSet> &b1,
const Ref<GaussianBasisSet> &b2,
const Ref<GaussianBasisSet> &b3,
const Ref<GaussianBasisSet> &b4);
Ref<GaussianBasisSet> bs1_;
Ref<GaussianBasisSet> bs2_;
Ref<GaussianBasisSet> bs3_;
Ref<GaussianBasisSet> bs4_;
// the maximum number of bytes that should be used for
// storing intermediates
size_t storage_;
size_t storage_used_;
Ref<MessageGrp> grp_;
public:
Integral(StateIn&);
Integral(const Ref<KeyVal>&);
virtual ~Integral();
void save_data_state(StateOut&);
static Integral* initial_integral(int &argc, char **argv);
static void set_default_integral(const Ref<Integral>&);
static Integral* get_default_integral();
virtual Integral* clone() =0;
virtual int equiv(const Ref<Integral> &);
void set_storage(size_t i) { storage_=i; };
size_t storage_used() { return storage_used_; }
size_t storage_unused();
virtual size_t storage_required_eri(const Ref<GaussianBasisSet> &b1,
const Ref<GaussianBasisSet> &b2 = 0,
const Ref<GaussianBasisSet> &b3 = 0,
const Ref<GaussianBasisSet> &b4 = 0);
virtual size_t storage_required_grt(const Ref<GaussianBasisSet> &b1,
const Ref<GaussianBasisSet> &b2 = 0,
const Ref<GaussianBasisSet> &b3 = 0,
const Ref<GaussianBasisSet> &b4 = 0);
virtual size_t storage_required_eri_deriv(const Ref<GaussianBasisSet> &b1,
const Ref<GaussianBasisSet> &b2 = 0,
const Ref<GaussianBasisSet> &b3 = 0,
const Ref<GaussianBasisSet> &b4 = 0);
void adjust_storage(ptrdiff_t s) { storage_used_ += s; }
Ref<PetiteList> petite_list();
Ref<PetiteList> petite_list(const Ref<GaussianBasisSet>&);
ShellRotation shell_rotation(int am, SymmetryOperation&, int pure=0);
virtual void set_basis(const Ref<GaussianBasisSet> &b1,
const Ref<GaussianBasisSet> &b2 = 0,
const Ref<GaussianBasisSet> &b3 = 0,
const Ref<GaussianBasisSet> &b4 = 0);
// /////////////////////////////////////////////////////////////////////
// the following must be defined in the specific integral package
virtual CartesianIter * new_cartesian_iter(int) =0;
virtual RedundantCartesianIter * new_redundant_cartesian_iter(int) =0;
virtual RedundantCartesianSubIter*
new_redundant_cartesian_sub_iter(int) =0;
virtual SphericalTransformIter *
new_spherical_transform_iter(int l,
int inv=0, int subl=-1) =0;
virtual const SphericalTransform *
spherical_transform(int l,
int inv=0, int subl=-1) =0;
virtual Ref<OneBodyInt> overlap() =0;
virtual Ref<OneBodyInt> kinetic() =0;
virtual Ref<OneBodyInt> point_charge(const Ref<PointChargeData>&) =0;
virtual Ref<OneBodyOneCenterInt> point_charge1(const Ref<PointChargeData>&);
virtual Ref<OneBodyInt> nuclear() = 0;
virtual Ref<OneBodyInt> hcore() = 0;
virtual Ref<OneBodyInt> efield_dot_vector(const Ref<EfieldDotVectorData>&) =0;
virtual Ref<OneBodyInt> dipole(const Ref<DipoleData>&) =0;
virtual Ref<OneBodyInt> quadrupole(const Ref<DipoleData>&) =0;
virtual Ref<OneBodyDerivInt> overlap_deriv() =0;
virtual Ref<OneBodyDerivInt> kinetic_deriv() =0;
virtual Ref<OneBodyDerivInt> nuclear_deriv() =0;
virtual Ref<OneBodyDerivInt> hcore_deriv() =0;
virtual Ref<TwoBodyThreeCenterInt> electron_repulsion3();
virtual Ref<TwoBodyThreeCenterDerivInt> electron_repulsion3_deriv();
virtual Ref<TwoBodyTwoCenterInt> electron_repulsion2();
virtual Ref<TwoBodyTwoCenterDerivInt> electron_repulsion2_deriv();
virtual Ref<TwoBodyInt> electron_repulsion() =0;
virtual Ref<TwoBodyDerivInt> electron_repulsion_deriv() =0;
virtual Ref<TwoBodyInt> grt();
Ref<MessageGrp> messagegrp() { return grp_; }
};
}
#endif
// Local Variables:
// mode: c++
// c-file-style: "ETS"
// End: