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 #include "basisinfo.h" 00039 00040 /* 00041 get_no_of_primitives_for_density is a helper function for 00042 get_density. Call get_no_of_primitives_for_density to find out 00043 how long the result list needs to be. 00044 A negative return value indicates failure. 00045 */ 00046 int get_no_of_primitives_for_density(ergo_real cutoff, 00047 const ergo_real *dmat, 00048 const BasisInfoStruct & basisInfo); 00049 00050 /* 00051 get_density creates the list resultRho using information from 00052 basisInfo and dmat, using given threshold. 00053 A negative return value indicates failure. 00054 */ 00055 int get_density(const BasisInfoStruct & basisInfo, 00056 const ergo_real* dmat, /* density matrix */ 00057 ergo_real cutoff, /* threshold */ 00058 int maxCountRho, /* maxcount for result list */ 00059 DistributionSpecStruct* resultRho); 00060 00061 ergo_real integrate_density_in_box(int nPrims, 00062 DistributionSpecStruct* rho, 00063 ergo_real mid_x, 00064 ergo_real mid_y, 00065 ergo_real mid_z, 00066 ergo_real box_width); 00067 00068 ergo_real integrate_density_in_box_2(int nPrims, 00069 DistributionSpecStruct* rho, 00070 ergo_real* minVect, 00071 ergo_real* maxVect, 00072 std::vector<int> monomialIntsAdd = std::vector<int>(3, 0)); 00073