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 00038 /* -*-mode:c; c-style:bsd; c-basic-offset:4;indent-tabs-mode:nil; -*- */ 00039 00040 #if !defined(_GRID_READER_H_) 00041 #define _GRID_READER_H_ 1 00042 00043 #include "sparse_pattern.h" 00044 #include "grid_stream.h" 00045 #include "grid_interface.h" 00046 #include "grid_params.h" 00047 #include "grid_matrix.h" 00048 00049 struct DftGridReader; 00050 00051 Dft::Matrix* createGridMatrix(const Dft::FullMatrix& mat); 00052 Dft::Matrix* createGridMatrix(const Dft::SparseMatrix& mat); 00053 00054 DftGridReader* grid_open_full(const class GridGenMolInfo *mol_info, 00055 const Dft::GridParams& gss, 00056 Dft::SparsePattern *pattern, 00057 const Dft::Matrix* dmat, 00058 const BasisInfoStruct& bis); 00059 00060 bool grid_is_ready(); 00061 00062 int grid_getchunk_blocked(DftGridReader* grid_handle, int maxlen, 00063 int *nblocks, int *shlblocks, 00064 real (*coor)[3], real *weight); 00065 00066 #define grid_getchunk_plain(r,m,coor,w) \ 00067 (grid_getchunk_blocked((r),(m),NULL,NULL,(coor),(w))) 00068 void grid_close(DftGridReader *rawgrid); 00069 void grid_free_files(); 00070 void grid_set_tmpdir(const char *tmpdir); 00071 00072 #endif /* !defined(_GRID_READER_H_) */ 00073 00074