00001 #ifndef MOPAC_H
00002 #define MOPAC_H
00003
00004 #include "stringtools.h"
00005 #include "pTable.h"
00006 #include "icoord.h"
00007
00008 #define SKIPMOPAC 0
00009
00010 class Mopac {
00011
00012 private:
00013
00014 int natoms;
00015 int* anumbers;
00016 string* anames;
00017 int nfrz;
00018 int nfrz0;
00019 int* frzlist;
00020 int* frzlistb;
00021
00022 int gradcalls;
00023 int rnum;
00024 string id;
00025
00026 void opt_header(ofstream& inpfile);
00027 void grad_header(ofstream& inpfile);
00028 void write_ic_input(ofstream& inpfile, int anum, ICoord icoords);
00029 double read_output(string filename);
00030 double read_grad(string filename);
00031 void xyz_read(string filename);
00032 void xyz_save(string filename);
00033
00034 public:
00035
00036 double opt();
00037 double opt(string filename);
00038 double opt(string filename, ICoord icoords);
00039 double grads(string filename);
00040 void alloc(int natoms);
00041 void init(int natoms, int* anumbers, string* anames, double* xyz);
00042 void reset(int natoms, int* anumbers, string* anames, double* xyz);
00043 void reset(double* xyz_i);
00044 void freemem();
00045 void write_xyz_grad(string filename);
00046
00047 void freeze(int* frzlist, int nfrz, int nfrz0);
00048
00049 double energy0;
00050 double energy;
00051
00052 double* xyz0;
00053 double* xyz;
00054 double* grad;
00055
00056 };
00057
00058 #endif