00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifdef __GNUG__
00029 #pragma interface
00030 #endif
00031
00032 #ifndef _chemistry_qc_psi_input_h
00033 #define _chemistry_qc_psi_input_h
00034
00035 using namespace std;
00036
00037 #include <fstream>
00038 #include <string>
00039 #include<util/ref/ref.h>
00040 #include<chemistry/molecule/molecule.h>
00041 #include<chemistry/qc/basis/basis.h>
00042
00043 namespace sc {
00044
00045 class PsiExEnv;
00046 class CorrelationTable;
00047
00050
00051 class PsiInput: public RefCount {
00052
00053 string filename_;
00054 std::ofstream file_;
00055 int me_;
00056
00057 int indentation_;
00058
00059
00060 PsiInput() {};
00061
00062
00063 bool can_run_on_me() { return me_ == 0; }
00064
00065 public:
00066 PsiInput(const string& name);
00067 ~PsiInput();
00068 void open();
00069 void close();
00070 void print(std::ostream&o=ExEnv::out0());
00071
00072 void begin_section(const char * s);
00073 void end_section();
00074 void write_indent();
00075 void incindent(int);
00076 void decindent(int);
00077 void write_comment(const char *);
00078 void write_keyword(const char *, const char *);
00079 void write_keyword(const char *, bool);
00080 void write_keyword(const char *, int);
00081 void write_keyword(const char *, double);
00082 template <typename T> void write_keyword_array(const char *, int, const std::vector<T>&);
00083 void write_keyword_array(const char *, int, int *);
00084 void write_keyword_array(const char *, int, double *);
00085 void write_string(const char *);
00086 void write_key_wq(const char *, const char *);
00087
00089 void write_basis(const Ref<GaussianBasisSet>&);
00091 void write_basis_sets(const Ref<GaussianBasisSet>&);
00092 void write_geom(const Ref<Molecule>&);
00093
00094 void write_defaults(const Ref<PsiExEnv>&, const char *dertype);
00095 };
00096
00097 }
00098
00099 #endif