gaussshell.h
//
// gaussshell.h
//
// Copyright (C) 1996 Limit Point Systems, Inc.
//
// Author: Curtis Janssen <cljanss@limitpt.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_gaussshell_h
#define _chemistry_qc_basis_gaussshell_h
#ifdef __GNUC__
#pragma interface
#endif
#include <iostream>
#include <util/state/state.h>
#include <math/scmat/vector3.h>
#include <util/keyval/keyval.h>
namespace sc {
class CartesianIter;
class SphericalTransformIter;
class Integral;
class GaussianShell: public SavableState
{
public:
enum PrimitiveType { Normalized, Unnormalized };
enum GaussianType { Cartesian, Pure };
private:
int nprim;
int ncon;
int* l;
int* puream;
double* exp;
double** coef; // contraction coefficients for unnormalized primitives
// computed data:
int nfunc;
int min_am_;
int max_am_;
int ncart_;
int has_pure_;
void init_computed_data();
double shell_normalization(int);
void convert_coef();
void normalize_shell();
PrimitiveType keyval_init(const Ref<KeyVal>&,int,int);
static const char* amtypes;
static const char* AMTYPES;
int test_monobound(double &r, double &bound) const;
public:
GaussianShell(
int ncn,
int nprm,
double* e,
int* am,
int* pure,
double** c,
PrimitiveType pt = GaussianShell::Normalized,
bool do_normalize_shell = true);
GaussianShell(
int ncn,
int nprm,
double* e,
int* am,
GaussianType pure,
double** c,
PrimitiveType pt = GaussianShell::Normalized);
GaussianShell(const Ref<KeyVal>&);
GaussianShell(StateIn&);
GaussianShell(const Ref<KeyVal>&,int pure);
~GaussianShell();
void save_data_state(StateOut&);
int nprimitive() const { return nprim; }
int ncontraction() const { return ncon; }
int nfunction() const { return nfunc; }
int max_angular_momentum() const { return max_am_; }
int min_angular_momentum() const { return min_am_; }
int max_cartesian() const;
int am(int con) const { return l[con]; }
int max_am() const { return max_am_; }
int min_am() const { return min_am_; }
char amchar(int con) const { return amtypes[l[con]]; }
int nfunction(int con) const;
int ncartesian() const { return ncart_; }
int ncartesian_with_aminc(int aminc) const;
int ncartesian(int con) const { return ((l[con]+2)*(l[con]+1))>>1; }
int is_cartesian(int con) const { return !puream[con]; }
int is_pure(int con) const { return puream[con]; }
int has_pure() const { return has_pure_; }
double coefficient_unnorm(int con,int prim) const {return coef[con][prim];}
double coefficient_norm(int con,int prim) const;
double exponent(int iprim) const { return exp[iprim]; }
int values(CartesianIter **, SphericalTransformIter **,
const SCVector3& r, double* basis_values);
int grad_values(CartesianIter **, SphericalTransformIter **,
const SCVector3& R,
double* g_values,
double* basis_values=0) const;
int hessian_values(CartesianIter **, SphericalTransformIter **,
const SCVector3& R,
double* h_values, double* g_values=0,
double* basis_values=0) const;
double relative_overlap(const Ref<Integral>&,
int con, int func1, int func2) const;
double relative_overlap(int con,
int a1, int b1, int c1,
int a2, int b2, int c2) const;
int equiv(const GaussianShell *s);
double extent(double threshold) const;
double monobound(double r) const;
void print(std::ostream& =ExEnv::out0()) const;
};
}
#endif
// Local Variables:
// mode: c++
// c-file-style: "CLJ"
// End: