1 /*-------------------------------------------------------------------
2 Copyright 2011 Ravishankar Sundararaman
3 Copyright 1996-2003 Sohrab Ismail-Beigi
4 
5 This file is part of JDFTx.
6 
7 JDFTx is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 JDFTx is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with JDFTx.  If not, see <http://www.gnu.org/licenses/>.
19 -------------------------------------------------------------------*/
20 
21 #ifndef JDFTX_ELECTRONIC_EVERYTHING_H
22 #define JDFTX_ELECTRONIC_EVERYTHING_H
23 
24 #include <core/GridInfo.h>
25 #include <core/MinimizeParams.h>
26 #include <core/Coulomb.h>
27 #include <electronic/Control.h>
28 #include <electronic/Basis.h>
29 #include <electronic/IonInfo.h>
30 #include <electronic/Symmetries.h>
31 #include <electronic/ElecInfo.h>
32 #include <electronic/ElecVars.h>
33 #include <electronic/Energies.h>
34 #include <electronic/ExCorr.h>
35 #include <electronic/Dump.h>
36 #include <electronic/SCFparams.h>
37 #include <electronic/IonicDynamicsParams.h>
38 #include <memory>
39 
40 //! @addtogroup ElectronicDFT
41 //! @{
42 
43 //! Container class that contains, well, everything.
44 class Everything
45 {
46 public:
47 	Control cntrl;  //!< control variables
48 	Dump dump;      //!< output options
49 	GridInfo gInfo; //!< main grid descriptor
50 	std::shared_ptr<GridInfo> gInfoWfns; //!< tighter grid sufficient for wavefunction operations
51 	std::vector<Basis> basis; //!< wavefunction basis for all k points
52 	IonInfo iInfo;   //!< ionic system
53 	Symmetries symm; //!< symmetries
54 	Symmetries symmUnperturbed; //!< symmetries of unperturbed system in vibration calculations (symm is set to mode=SymmNone in these calculations)
55 	ExCorr exCorr; //!< Exchange and correlation functional
56 	std::vector<std::shared_ptr<ExCorr> > exCorrDiff; //!< Other exchange and correlation functionals for comparison
57 	std::shared_ptr<class ExactExchange> exx; //!< Exact exchange
58 	ElecInfo eInfo; //!< Auxiliary electronic information
59 	ElecVars eVars; //!< Electroic variables
60 	Energies ener;  //!< Energy components
61 
62 	MinimizeParams elecMinParams; //!< electronic minimization parameters
63 	MinimizeParams ionicMinParams; //!< ionic minimization parameters
64 	MinimizeParams fluidMinParams; //!< fluid minimization parameters
65 	MinimizeParams latticeMinParams; //!< lattice minimization parameters
66 	MinimizeParams inverseKSminParams; //!< Inverse Kohn-sham minimization parameters
67 	IonicDynamicsParams ionicDynParams; //!< Molecular dynamics parameters
68 	SCFparams scfParams; //!< Self-consistent field mixing parameters
69 
70 	CoulombParams coulombParams; //!< Coulomb truncation parameters
71 	std::shared_ptr<Coulomb> coulomb; //!< Coulomb interaction (optionally truncated)
72 	std::shared_ptr<Coulomb> coulombWfns; //!< Coulomb interaction (optionally truncated) on wave-function grid
73 
74 	std::shared_ptr<VanDerWaals> vanDerWaals; //! Pair potential for vdw correction
75 	std::shared_ptr<class Vibrations> vibrations; //! Vibrational mode calculator
76 
77 	//! Call the setup/initialize routines of all the above in the necessray order
78 	void setup();
79 	void updateSupercell(bool force=false); //!< (re-)initialize coulombParams.supercell if necessary (or if forced)
80 };
81 
82 //! @}
83 #endif // JDFTX_ELECTRONIC_EVERYTHING_H
84