mpqcin.h
00001
00002 #ifndef _mpqcin_h
00003 #define _mpqcin_h
00004
00005 #include <vector>
00006 #include <iostream>
00007
00008 #include <util/keyval/keyval.h>
00009 #include <chemistry/molecule/molecule.h>
00010
00011 class MPQCInFlexLexer;
00012
00013 namespace sc {
00014
00015 class IPV2;
00016
00017 template <class T>
00018 class MPQCInDatum {
00019 int set_;
00020 T val_;
00021 public:
00022 MPQCInDatum(const T&v): val_(v), set_(0) {}
00023 const T &operator =(const T&v) { set_ = 1; val_ = v; return val_; }
00024 void reset(const T &val) { set_ = 0; val_ = val; }
00025 int set() const { return set_; }
00026 T val() const { return val_; }
00027 };
00028
00029 class MPQCIn {
00030 MPQCInFlexLexer *lexer_;
00031 Ref<Molecule> mol_;
00032 MPQCInDatum<int> gradient_;
00033 MPQCInDatum<int> frequencies_;
00034 MPQCInDatum<int> optimize_;
00035 MPQCInDatum<int> mult_;
00036 MPQCInDatum<int> redund_coor_;
00037 MPQCInDatum<int> opt_type_;
00038 MPQCInDatum<int> restart_;
00039 MPQCInDatum<int> checkpoint_;
00040 MPQCInDatum<int> charge_;
00041 MPQCInDatum<int> atom_charge_;
00042 MPQCInDatum<int> molecule_bohr_;
00043 MPQCInDatum<char *> basis_;
00044 MPQCInDatum<char *> auxbasis_;
00045 MPQCInDatum<char *> method_;
00046 MPQCInDatum<char *> method_xc_;
00047 MPQCInDatum<char *> method_grid_;
00048 MPQCInDatum<char *> symmetry_;
00049 MPQCInDatum<char *> memory_;
00050 MPQCInDatum<std::vector<int> *> alpha_;
00051 MPQCInDatum<std::vector<int> *> beta_;
00052 MPQCInDatum<std::vector<int> *> docc_;
00053 MPQCInDatum<std::vector<int> *> socc_;
00054 MPQCInDatum<std::vector<int> *> frozen_docc_;
00055 MPQCInDatum<std::vector<int> *> frozen_uocc_;
00056
00057 int nirrep_;
00058
00059 void write_energy_object(std::ostream&, const char *keyword,
00060 const char *method,
00061 const char *basis, int coor,
00062 bool need_cints = false);
00063 void write_basis_object(std::ostream&, const char *keyword,
00064 const char *basis);
00065 void write_vector(std::ostream &ostrs,
00066 const char *keyvalname,
00067 const char *name,
00068 MPQCInDatum<std::vector<int> *>&vec,
00069 int require_nirrep);
00070
00071 static int checking_;
00072 public:
00073 MPQCIn();
00074 ~MPQCIn();
00075
00076 char *parse_string(const char *s);
00077 int check_string(const char *s);
00078
00079 int ylex();
00080 int yparse();
00081 void error(const char* s);
00082 void error2(const char* s, const char* s2);
00083 void yerror(const char* s);
00084 void yerror2(const char* s, const char *);
00085
00086 void begin_molecule();
00087 void end_molecule();
00088 void add_atom(char *, char *, char *, char *);
00089 void set_charge(char *);
00090 void set_method(char *);
00091 void set_basis(char *);
00092 void set_auxbasis(char *);
00093 void set_multiplicity(char *);
00094 void set_memory(char *);
00095 void set_optimize(int);
00096 void set_opt_type(int);
00097 void set_atom_charge(char *);
00098 void set_molecule_unit(char *);
00099 void set_method_xc(char *);
00100 void set_method_grid(char *);
00101 void set_symmetry(char *);
00102 void set_redund_coor(int);
00103 void set_gradient(int);
00104 void set_frequencies(int);
00105 void set_restart(int);
00106 void set_checkpoint(int);
00107 void set_molecule_bohr(int);
00108 void set_docc(std::vector<int> *);
00109 void set_socc(std::vector<int> *);
00110 void set_alpha(std::vector<int> *);
00111 void set_beta(std::vector<int> *);
00112 void set_frozen_docc(std::vector<int> *);
00113 void set_frozen_uocc(std::vector<int> *);
00114 std::vector<int> *make_nnivec(std::vector<int> *, char *);
00115
00116 static int checking() { return checking_; }
00117 };
00118
00119 }
00120
00121 #endif
Generated at Sat Dec 18 15:14:22 2004 for MPQC
2.2.3 using the documentation package Doxygen
1.3.7-20040617.