MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
twobodytensorinfo.h
1//
2// twobodytensorinfo.h
3//
4// Copyright (C) 2009 Martin Torheyden
5//
6// Author: Martin Torheyden <mtorhey@vt.edu>
7//
8// This file is part of the SC Toolkit.
9//
10// The SC Toolkit is free software; you can redistribute it and/or modify
11// it under the terms of the GNU Library General Public License as published by
12// the Free Software Foundation; either version 2, or (at your option)
13// any later version.
14//
15// The SC Toolkit is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU Library General Public License for more details.
19//
20// You should have received a copy of the GNU Library General Public License
21// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
22// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23//
24// The U.S. Government is granted a limited license as per AL 91-7.
25//
26
27
28#ifndef TWOBODYTENSORINFO_H_
29#define TWOBODYTENSORINFO_H_
30
31#include <util/ref/ref.h>
32#include <util/misc/scexception.h>
33#include <chemistry/qc/basis/tbint.h>
34
35namespace sc {
37 class TwoBodyTensorInfo : public RefCount {
38 public:
39 enum tbtensor_type { tbint = 0, geminalcoeff = 1 };
40 private:
41 tbtensor_type twobodytensor_type_;
42 TwoBodyOper::type twobodyint_type_;
43 public:
44 TwoBodyTensorInfo(tbtensor_type twobodytensor_type){
45 if(twobodytensor_type==tbint) {
46 throw ProgrammingError("Error in TwoBodyTensorInfo::TwoBodyTensorInfo -- if twobodytensor_type==tbint TwoBodyOper::type must be specified.",__FILE__,__LINE__);
47 }
48 twobodytensor_type_ = twobodytensor_type;
49 }
50 TwoBodyTensorInfo(TwoBodyOper::type twobodyint_type) { twobodytensor_type_ = tbint; twobodyint_type_ = twobodyint_type; }
51 virtual ~TwoBodyTensorInfo(){}
52 tbtensor_type twobodytensor_type() const { return(twobodytensor_type_); }
53 TwoBodyOper::type twobodyint_type() const {
54 if(twobodytensor_type_!=tbint)
55 throw ProgrammingError("Error in TwoBodyTensorInfo::twobodyint_type() -- twobodyint_type_ can only be returned if twobodytensor_type_==tbint.",__FILE__,__LINE__);
56 return(twobodyint_type_);
57 }
58 };
59
60}
61
62#endif /*TWOBODYTENSORINFO_H_*/
This is thrown when a situations arises that should be impossible.
Definition scexception.h:92
The base class for all reference counted objects.
Definition ref.h:192
Provides information about the type of a two body tensor.
Definition twobodytensorinfo.h:37
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
type
types of known two-body operators
Definition operator.h:318

Generated at Wed Sep 25 2024 02:45:30 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.