ergo
grid_reader.h
Go to the documentation of this file.
1/* Ergo, version 3.8, a program for linear scaling electronic structure
2 * calculations.
3 * Copyright (C) 2019 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4 * and Anastasia Kruchinina.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Primary academic reference:
20 * Ergo: An open-source program for linear-scaling electronic structure
21 * calculations,
22 * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23 * Kruchinina,
24 * SoftwareX 7, 107 (2018),
25 * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26 *
27 * For further information about Ergo, see <http://www.ergoscf.org>.
28 */
29
38/* -*-mode:c; c-style:bsd; c-basic-offset:4;indent-tabs-mode:nil; -*- */
39
40#if !defined(_GRID_READER_H_)
41#define _GRID_READER_H_ 1
42
43#include "sparse_pattern.h"
44#include "grid_stream.h"
45#include "grid_interface.h"
46#include "grid_params.h"
47#include "grid_matrix.h"
48
49struct DftGridReader;
50
52Dft::Matrix* createGridMatrix(const Dft::SparseMatrix& mat);
53
54DftGridReader* grid_open_full(const class GridGenMolInfo *mol_info,
55 const Dft::GridParams& gss,
56 Dft::SparsePattern *pattern,
57 const Dft::Matrix* dmat,
58 const BasisInfoStruct& bis);
59
60bool grid_is_ready();
61
62int grid_getchunk_blocked(DftGridReader* grid_handle, int maxlen,
63 int *nblocks, int *shlblocks,
64 real (*coor)[3], real *weight);
65
66#define grid_getchunk_plain(r,m,coor,w) \
67 (grid_getchunk_blocked((r),(m),NULL,NULL,(coor),(w)))
68void grid_close(DftGridReader *rawgrid);
69void grid_free_files();
70void grid_set_tmpdir(const char *tmpdir);
71
72#endif /* !defined(_GRID_READER_H_) */
73
74
Definition: grid_matrix.h:53
Definition: grid_matrix.h:44
GridGenMolInfo is an abstract class providing information about the molecule so that the grid generat...
Definition: grid_interface.h:45
ergo_real real
Definition: test.cc:46
Grid Generator interface.
Generic matrix interface.
Code organizing various settings related to grids used for numerical integration.
void grid_free_files()
Frees all the cached data if any.
Definition: grid_reader.cc:135
DftGridReader * grid_open_full(const class GridGenMolInfo *mol_info, const Dft::GridParams &gss, Dft::SparsePattern *pattern, const Dft::Matrix *dmat, const BasisInfoStruct &bis)
Returns a handle to a grid file.
Definition: grid_reader.cc:282
Dft::Matrix * createGridMatrix(const Dft::FullMatrix &mat)
Definition: grid_reader.cc:78
bool grid_is_ready()
Definition: grid_reader.cc:160
void grid_set_tmpdir(const char *tmpdir)
Definition: grid_reader.cc:116
void grid_close(DftGridReader *rawgrid)
Closes the shared grid handle that is specifed as the argument.
Definition: grid_reader.cc:386
int grid_getchunk_blocked(DftGridReader *grid_handle, int maxlen, int *nblocks, int *shlblocks, real(*coor)[3], real *weight)
grid_getchunk_blocked() reads grid data also with screening information if only nblocks and shlblocks...
Definition: grid_reader.cc:325
Streaming grid generator.
Definition: allocate.cc:39
Class that can be used to store sparse matrix patterns.
Definition: basisinfo.h:112
Definition: grid_reader.cc:166
A structure describing the grid settings.
Definition: grid_params.h:59