1 // ENG1_QM.H : quantum mechanics "engine" base classes. 2 3 // Copyright (C) 1998 Tommi Hassinen. 4 5 // This package is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 2 of the License, or 8 // (at your option) any later version. 9 10 // This package is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 15 // You should have received a copy of the GNU General Public License 16 // along with this package; if not, write to the Free Software 17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 19 /*################################################################################################*/ 20 21 #ifndef ENG1_QM_H 22 #define ENG1_QM_H 23 24 class setup1_qm; 25 26 class eng1_qm; 27 28 /*################################################################################################*/ 29 30 #include "atom.h" 31 #include "bond.h" 32 33 #include "model.h" 34 #include "engine.h" 35 36 #include "notice.h" 37 38 /*################################################################################################*/ 39 40 // THE ID NUMBERS SHOULD NOT CHANGE!!! the numbering logic is the following: 41 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 42 // use bits 0xFF00 to select the eng class, and bits 0x00FF as ID numbers. 43 44 // 0xFF00 determines the eng class... 45 46 #define ENG1_QM_MOPAC 0x0100 // eng1_qm_mopac 47 #define ENG1_QM_MPQC 0x0200 // eng1_qm_mpqc 48 49 // 0x00FF determines the hamiltonian/basis set... 50 51 #define MOPAC_MNDO 0x01 52 #define MOPAC_MINDO3 0x02 53 #define MOPAC_AM1 0x03 54 #define MOPAC_PM3 0x04 55 56 #define MPQC_STO3G 0x01 57 #define MPQC_STO6G 0x02 58 #define MPQC_3_21G 0x03 59 #define MPQC_3_21GS 0x04 60 #define MPQC_4_31G 0x05 61 #define MPQC_4_31GS 0x06 62 #define MPQC_4_31GSS 0x07 63 #define MPQC_6_31G 0x08 64 #define MPQC_6_31GS 0x09 65 #define MPQC_6_31GSS 0x0A 66 #define MPQC_6_311G 0x0B 67 #define MPQC_6_311GS 0x0C 68 #define MPQC_6_311GSS 0x0D 69 70 /// A setup class for MM submodels; should always pass the atoms/bonds of MM submodel to eng. 71 72 class setup1_qm : virtual public setup 73 { 74 protected: 75 76 static const i32u eng_id_tab[]; 77 static const char * eng_name_tab[]; 78 79 public: 80 81 setup1_qm(model *); 82 ~setup1_qm(void); 83 84 void UpdateAtomFlags(void); // virtual 85 86 static i32u static_GetEngineCount(void); 87 static i32u static_GetEngineIDNumber(i32u); 88 static const char * static_GetEngineName(i32u); 89 static const char * static_GetClassName(void); 90 91 i32u GetEngineCount(void); // virtual 92 i32u GetEngineIDNumber(i32u); // virtual 93 const char * GetEngineName(i32u); // virtual 94 const char * GetClassName_lg(void); // virtual 95 96 engine * CreateEngineByIndex(i32u); // virtual 97 98 static bool CheckSettings(setup *); 99 }; 100 101 /*################################################################################################*/ 102 103 /** A base class for molecular QM calculations. 104 105 The qm1-models can have different basis functions and other such different details, 106 so it is not as straightforward to draw planes/surfaces for those than for molecular 107 mechanics models. Therefore qm1-engine classes must provide us the values we need 108 for planes/surfaces. 109 */ 110 111 class eng1_qm : virtual public engine 112 { 113 protected: 114 115 i32u * l2g_qm; // the local-to-global lookup table. 116 117 f64 * tss_ref_str; // this is for transition state search only; DO NOT DELETE HERE!!! 118 f64 tss_force_const; // this is for transition state search only... 119 f64 tss_delta_ene; // this is for transition state search only... 120 121 friend class transition_state_search; 122 123 public: 124 125 eng1_qm(setup *, i32u); 126 virtual ~eng1_qm(void); 127 SetTorsionConstraint(atom *,atom *,atom *,atom *,f64,f64,bool)128 virtual bool SetTorsionConstraint(atom *, atom *, atom *, atom *, f64, f64, bool) { assertion_failed(__FILE__, __LINE__, "not yet implemented!"); } RemoveTorsionConstraint(atom *,atom *,atom *,atom *)129 virtual bool RemoveTorsionConstraint(atom *, atom *, atom *, atom *) { assertion_failed(__FILE__, __LINE__, "not yet implemented!"); } 130 131 virtual fGL GetVDWSurf(fGL *, fGL *); // virtual 132 }; 133 134 /*################################################################################################*/ 135 136 #endif // ENG1_QM_H 137 138 // eof 139