ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
sccs_fixed_src.h
Go to the documentation of this file.
1#ifndef SCCS_FIXED_SRC_H
2#define SCCS_FIXED_SRC_H
3
4#include <memory>
5#include <vector>
6
7class UnitCell;
8namespace ModuleBase { template <typename T> class Vector3; }
9namespace ModulePW { class PW_Basis; }
10namespace unitcell { struct AtomData; }
11namespace ModuleSccs { struct SccsConfig; }
12namespace elecstate
13{
14// Owns ion/core Gaussian densities, Cartesian grid coordinates and the
15// solvent-aware probe kernel (empty without the filling). The cell,
16// grid and SCCS configuration are fixed for one PotSccs, which is rebuilt every
17// ionic step; update rebuilds only for different atoms and returns true when
18// the previous sources were reused. The probe depends only on the fixed cell
19// and grid, so a kernel of the previous ionic step can be handed over.
21{
22public:
25 bool update(const UnitCell& cell,
26 const ModulePW::PW_Basis& basis,
27 const std::vector<unitcell::AtomData>& atoms,
28 const ModuleSccs::SccsConfig& config);
29 // Empty until the first update; views live until the next update.
30 const std::vector<double>& ionic_density() const;
31 const std::vector<double>& core_density() const;
32 const std::vector<ModuleBase::Vector3<double>>& positions() const;
33 const std::vector<double>& probe_kernel() const;
34 // Same value on every pool rank; the kernel itself is empty on a rank
35 // without local G vectors.
36 bool probe_ready() const;
37 // Called with the same ready flag on every pool rank, before update.
38 void reuse_probe(const std::vector<double>& kernel);
39private:
40 struct Data;
41 std::unique_ptr<Data> data_;
42};
43} // namespace elecstate
44#endif
3 elements vector
Definition vector3.h:21
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Provide the basic information about unitcell.
Definition unitcell.h:16
const std::vector< double > & core_density() const
Definition sccs_fixed_src.cpp:82
void reuse_probe(const std::vector< double > &kernel)
Definition sccs_fixed_src.cpp:86
const std::vector< double > & probe_kernel() const
Definition sccs_fixed_src.cpp:84
const std::vector< double > & ionic_density() const
Definition sccs_fixed_src.cpp:81
std::unique_ptr< Data > data_
Definition sccs_fixed_src.h:41
const std::vector< ModuleBase::Vector3< double > > & positions() const
Definition sccs_fixed_src.cpp:83
bool probe_ready() const
Definition sccs_fixed_src.cpp:85
SccsFixedSources()
Definition sccs_fixed_src.cpp:44
bool update(const UnitCell &cell, const ModulePW::PW_Basis &basis, const std::vector< unitcell::AtomData > &atoms, const ModuleSccs::SccsConfig &config)
Definition sccs_fixed_src.cpp:50
Definition clebsch_gordan_coeff.cpp:8
Definition pw_op.cpp:3
Definition sccs_fixed_src.h:11
Definition read_atoms_hlp_test.cpp:13
Free functions for extracting atom/orbital info from Atom array.
Definition bcast_cell.cpp:8
Definition sccs_parameters.h:28
Definition sccs_fixed_src.cpp:34
Cartesian atom information in type-major order, matching ABACUS atom indices.
Definition cell_tools.h:21