MADNESS 0.10.1
pcm.h
Go to the documentation of this file.
1/*
2 This file is part of MADNESS.
3
4 Copyright (C) 2007,2010 Oak Ridge National Laboratory
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 2 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, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 For more information please contact:
21
22 Robert J. Harrison
23 Oak Ridge National Laboratory
24 One Bethel Valley Road
25 P.O. Box 2008, MS-6367
26
27 email: harrisonrj@ornl.gov
28 tel: 865-241-3937
29 fax: 865-572-0680
30 */
31
32#ifndef SRC_APPS_CHEM_PCM_H_
33#define SRC_APPS_CHEM_PCM_H_
34
35#include <memory>
36
41
42#ifdef MADNESS_HAS_PCM
43#include <PCMSolver/pcmsolver.h>
44#endif
45
46namespace madness {
47
48/// interface class to the PCMSolver library
49
50/// PCMSolver, an API for the Polarizable Continuum Model electrostatic problem.
51/// Main authors: R. Di Remigio, L. Frediani, K. Mozgawa
52class PCM {
53
54public:
55
56 /// default ctor
57 PCM() = default;
58
59 /// constructor for the interface to PCM
60
61 /// @param[in] world the world
62 /// @param[in] mol the molecule (coordinates and charges of the nuclei)
63 /// @param[in] pcm_data pcm input data as read from the input file
64 /// @param[in] verbose print the PCM header
65 PCM(World& world, const Molecule& mol, const std::string pcm_data,
66 const bool verbose);
67
68 /// compute the potential induced by the surrounding solvent
69
70 /// @param[in] coulomb_potential the (positive) potential caused by the electron density
71 /// @param[in] dynamic compute the contribution to a response kernel
72 /// @return the pcm potential with correct sign: J - K + V_nuc + V_pcm
74 const bool dynamic=false) const;
75
76 /// compute the PCM energy based on the most recent call of compute_pcm_potential
77 double compute_pcm_energy() const;
78
79private:
80#ifdef MADNESS_HAS_PCM
81 /// the main pcmsolver object
82 std::shared_ptr<pcmsolver_context_t> pcm_context;
83
84 /// default input generator
85 PCMInput pcmsolver_input() const;
86#endif
87
88 /// compute the molecular electrostatic potential from the nuclei
90 const Tensor<double>& coordinates, const int grid_size,
91 const Tensor<double>& grid) const;
92
93 /// symmetry info for PCM, needs to be memory controlled by the PCM class
95
96 /// molecular coordinates, needs to be memory controlled by the PCM class
98
99 /// nuclear charges of the molecule, needs to be memory controlled by the PCM class
101
102 /// file name for the total (nuclear + electronic) molecular electronic potential
103 std::string mep_lbl;
104
105 /// file name for the total (nuclear + electronic) apparent surface charge
106 std::string asc_lbl;
107
108
109};
110
111} /* namespace madness */
112
113#endif /* SRC_APPS_CHEM_PCM_H_ */
Definition molecule.h:124
interface class to the PCMSolver library
Definition pcm.h:52
std::string mep_lbl
file name for the total (nuclear + electronic) molecular electronic potential
Definition pcm.h:103
Tensor< double > charges
nuclear charges of the molecule, needs to be memory controlled by the PCM class
Definition pcm.h:100
std::string asc_lbl
file name for the total (nuclear + electronic) apparent surface charge
Definition pcm.h:106
Tensor< int > symmetry_info
symmetry info for PCM, needs to be memory controlled by the PCM class
Definition pcm.h:94
real_function_3d compute_pcm_potential(const real_function_3d &coulomb_potential, const bool dynamic=false) const
compute the potential induced by the surrounding solvent
Definition pcm.cc:279
PCM()=default
default ctor
double compute_pcm_energy() const
compute the PCM energy based on the most recent call of compute_pcm_potential
Definition pcm.cc:286
Tensor< double > coordinates
molecular coordinates, needs to be memory controlled by the PCM class
Definition pcm.h:97
Tensor< double > nuclear_mep(int nr_nuclei, const Tensor< double > &charges, const Tensor< double > &coordinates, const int grid_size, const Tensor< double > &grid) const
compute the molecular electrostatic potential from the nuclei
Definition pcm.cc:291
A tensor is a multidimension array.
Definition tensor.h:317
A parallel world class.
Definition world.h:132
Provides typedefs to hide use of templates and to increase interoperability.
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
Defines and implements most of Tensor.
Implement the madness:Vector class, an extension of std::array that supports some mathematical operat...