00001 /* Ergo, version 3.7, a program for linear scaling electronic structure 00002 * calculations. 00003 * Copyright (C) 2018 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, 00004 * and Anastasia Kruchinina. 00005 * 00006 * This program is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 * 00019 * Primary academic reference: 00020 * Ergo: An open-source program for linear-scaling electronic structure 00021 * calculations, 00022 * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia 00023 * Kruchinina, 00024 * SoftwareX 7, 107 (2018), 00025 * <http://dx.doi.org/10.1016/j.softx.2018.03.005> 00026 * 00027 * For further information about Ergo, see <http://www.ergoscf.org>. 00028 */ 00029 00039 /* -*-mode:c; c-style:k&r; c-basic-offset:4; indent-tabs-mode: nil -*- */ 00040 #ifndef BASISSET_HEADER 00041 #define BASISSET_HEADER 00042 00043 #include <vector> 00044 #include "realtype.h" 00045 #include "polydegree.h" 00046 00047 #define MAX_NO_OF_ATOM_TYPES 100 00048 00049 #ifndef BASIS_FUNC_POLY_MAX_DEGREE 00050 #error The constant BASIS_FUNC_POLY_MAX_DEGREE must be defined. 00051 #endif 00052 #if BASIS_FUNC_POLY_MAX_DEGREE<6 00053 #define MAX_NO_OF_SHELLS_PER_ATOM 44 00054 #else 00055 #define MAX_NO_OF_SHELLS_PER_ATOM 88 00056 #endif 00057 00058 #define MAX_NO_OF_CONTR 44 00059 00060 typedef struct 00061 { 00062 int type; 00063 int contrCount; 00064 int shell_ID; 00065 ergo_real exponentList[MAX_NO_OF_CONTR]; 00066 ergo_real coeffList[MAX_NO_OF_CONTR]; 00067 } basisset_shell_struct; 00068 00069 typedef struct 00070 { 00071 int noOfShells; 00072 basisset_shell_struct shells[MAX_NO_OF_SHELLS_PER_ATOM]; 00073 } basisset_atom_struct; 00074 00075 struct basisset_info { 00076 std::vector<basisset_atom_struct> atoms; 00077 basisset_info(); 00078 void clear(); 00079 // Stuff needed for Chunks&Tasks usage 00080 void write_to_buffer ( char * dataBuffer, size_t const bufferSize ) const; 00081 size_t get_size() const; 00082 void assign_from_buffer ( char const * dataBuffer, size_t const bufferSize); 00083 }; 00084 00085 int read_basisset_file(basisset_info & result, 00086 const char* fileName, 00087 int dirc, 00088 const char *dirv[], 00089 int print_raw); 00090 00091 00092 #endif