# psiexenv.h

    00001
    00002 #ifdef __GNUC__
    00003 #pragma interface
    00004 #endif
    00005
    00006 #ifndef _chemistry_qc_psi_exenv_h
    00007 #define _chemistry_qc_psi_exenv_h
    00008
    00009 using namespace std;
    00010
    00011 #include <string>
    00012 #include <chemistry/qc/psi/psiinput.h>
    00013 #include <chemistry/qc/psi/psifile11.h>
    00014
    00015 namespace sc {
    00016
    00018
    00019 class PsiExEnv: public DescribedClass {
    00020
    00021     // Static Psi info
    00022     static string inputname_;
    00023     static string file11name_;
    00024     static int ckptfile_;
    00025
    00026     // Defaults
    00027     static string defaultpsiprefix_;
    00028     static string defaultcwd_;
    00029     static string defaultfileprefix_;
    00030     static string defaultstdout_;
    00031     static string defaultstderr_;
    00032
    00033     // Calculation-specific info
    00034     string psiprefix_;
    00035     string cwd_;        // working directory where all files will be placed
    00036     string fileprefix_;
    00037     string stdout_;     // Standard output of psi modules
    00038     string stderr_;     // Standard error of psi modules
    00039     int nscratch_;
    00040     string *scratch_;
    00041     Ref<PsiInput> psiinput_;
    00042     Ref<PsiFile11> psifile11_;
    00043
    00044     // Add the following to the PATH environmental variable
    00045     void add_to_path(const string &);
    00046
    00047   public:
    00048     PsiExEnv(const Ref<KeyVal>&);
    00049     PsiExEnv(char *cwd, char *fileprefix, int nscratch, char **scratch);
    00050     ~PsiExEnv();
    00051
    00053     Ref<PsiInput> get_psi_input() const { return psiinput_;};
    00055     Ref<PsiFile11> get_psi_file11() const { return psifile11_;};
    00056
    00058     int run_psi();
    00060     int run_psi_module(char *);
    00061
    00063     string get_cwd() const { return cwd_;};
    00065     string get_fileprefix() const { return fileprefix_; };
    00067     int get_nscratch() const { return nscratch_; };
    00069     string get_scratch(int i) const { return scratch_[i]; };
    00070
    00071     void print(std::ostream&o=ExEnv::out0()) const;
    00072 };
    00073
    00074 }
    00075
    00076 #endif