00001 #ifndef QCHEMSF_H
00002 #define QCHEMSF_H
00003
00004 #include <iostream>
00005 #include <iomanip>
00006 #include <fstream>
00007 #include <cstdio>
00008 #include <vector>
00009 #include <cstring>
00010 #include <math.h>
00011
00012 #include "qchem.h"
00013 #include "stringtools.h"
00014 #include "pTable.h"
00015 #include "constants.h"
00016 #include "utils.h"
00017
00018 class QChemSF {
00019
00020 private:
00021
00022 int nscffail;
00023 int firstrun;
00024
00025 int runNum;
00026 int runend;
00027 string qcinfile;
00028 string inpfile;
00029 string qcoutfile;
00030 string qcoutfileh;
00031 string scrdir;
00032 string scrBaseDir;
00033 string runName;
00034 string runName0;
00035 string fileloc;
00036
00037 int natoms;
00038 int* anumbers;
00039 string* anames;
00040
00041
00042 int nstates;
00043 double* grad1;
00044 double* grad2;
00045 double* grad3;
00046 double* grad4;
00047 double* E;
00048
00049 double read_output(string filename);
00050 double read_grad(string filename);
00051 void xyz_read(string filename);
00052 void xyz_save(string filename);
00053 double get_energy();
00054 void get_grads();
00055 int scangradient(string file, double* grad, int natoms);
00056
00057 public:
00058
00059 int read_hess(double* hess);
00060 double calc_grads(double* coords);
00061 double getE(int ws);
00062 void getGrad(int ws, double* grad);
00063 void alloc(int natoms);
00064 void init(string infilename, int natoms, int* anumbers, string* anames, int run, int rune);
00065 void freemem();
00066 void write_xyz_grad(double* coords, double* grad, string filename);
00067
00068 int ncpu;
00069 int gradcalls;
00070
00071 double energy0;
00072 double energy;
00073
00074 };
00075
00076 #endif