00001 /* Ergo, version 3.2, a program for linear scaling electronic structure 00002 * calculations. 00003 * Copyright (C) 2012 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek. 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 * 00018 * Primary academic reference: 00019 * KohnâSham Density Functional Theory Electronic Structure Calculations 00020 * with Linearly Scaling Computational Time and Memory Usage, 00021 * Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek, 00022 * J. Chem. Theory Comput. 7, 340 (2011), 00023 * <http://dx.doi.org/10.1021/ct100611z> 00024 * 00025 * For further information about Ergo, see <http://www.ergoscf.org>. 00026 */ 00027 00028 #ifndef BASISINFO_BASIC_HEADER 00029 #define BASISINFO_BASIC_HEADER 00030 00031 00032 #include "realtype.h" 00033 #include "monomial_info.h" 00034 #include "hermite_conversion_prep.h" 00035 00036 #ifndef BASIS_FUNC_POLY_MAX_DEGREE 00037 #error The constant BASIS_FUNC_POLY_MAX_DEGREE must be defined. 00038 #endif 00039 #if BASIS_FUNC_POLY_MAX_DEGREE<6 00040 #define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY 12 00041 #define MAX_NO_OF_POLY_12_TERMS 180 00042 #define MAX_NO_OF_BASIS_FUNC_POLYS 50 00043 #else 00044 #define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY 16 00045 #define MAX_NO_OF_POLY_12_TERMS 360 00046 #define MAX_NO_OF_BASIS_FUNC_POLYS 100 00047 #endif 00048 00049 typedef struct 00050 { 00051 ergo_real coeff; 00052 char monomialInts[4]; /* nx, ny, nz */ 00053 int monomialID; 00054 } basis_func_term_struct; 00055 00056 typedef struct 00057 { 00058 int noOfTerms; 00059 basis_func_term_struct termList[MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY]; 00060 ergo_real scaledSolidHarmonicPrefactor; 00061 } basis_func_poly_struct; 00062 00063 typedef struct 00064 { 00065 int id_1; 00066 int id_2; 00067 ergo_real coeff; 00068 } poly_12_term_struct; 00069 00070 typedef struct 00071 { 00072 int noOfTerms; 00073 poly_12_term_struct termList[MAX_NO_OF_POLY_12_TERMS]; 00074 } poly_12_struct; 00075 00080 struct IntegralInfo 00081 { 00082 basis_func_poly_struct basis_func_poly_list[MAX_NO_OF_BASIS_FUNC_POLYS]; 00083 int no_of_basis_func_polys; 00084 monomial_info_struct monomial_info; 00085 hermite_conversion_info_struct hermite_conversion_info; 00086 00087 IntegralInfo(); 00088 ~IntegralInfo(); 00089 }; 00090 00091 namespace JK { 00092 /* Struct ExchWeights holds parameters for CAM-style range-separated HF 00093 exchange. We use the following short-long range split 00094 (alpha+beta*erf(mu*r))*HF_exchange. 00095 */ 00096 struct ExchWeights 00097 { 00098 ergo_real alpha; 00099 ergo_real beta; 00100 ergo_real mu; 00101 int computeRangeSeparatedExchange; 00103 ExchWeights() : 00104 alpha(0), 00105 beta(0), 00106 mu(0), 00107 computeRangeSeparatedExchange(0) 00108 {} 00109 00110 }; 00111 00112 }; 00113 00114 00115 int get_poly_info_from_shell_type(int* polyid_start, int* poly_count, int shellType); 00116 00117 int get_no_of_basis_func_polys_used_from_no_of_shell_types(int no_of_shell_types); 00118 00119 int get_shell_type_from_basis_func_poly_id(int basfuncpolyid); 00120 00121 00122 #endif