KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
NAD_Adapt_Kernel.cpp
Go to the documentation of this file.
1#include "kids/Kernel.h"
5#include "kids/Kernel_GWP.h"
13#include "kids/Kernel_Update.h"
14
15namespace PROJECT_NS {
16
17std::shared_ptr<Kernel> NAD_Adapt_Kernel(std::shared_ptr<Kernel> kmodel, std::string NAD_Kernel_name) {
18 bool take_ownership_false = false;
19
20 // Root Kernel
21 std::shared_ptr<Kernel> ker(new Kernel(NAD_Kernel_name));
22
24 std::shared_ptr<Kernel> kinte(new Kernel("BAOAB_Integrator"));
25
26 std::shared_ptr<Kernel_Representation> krepr(new Kernel_Representation());
27 std::shared_ptr<Kernel_NADForce> kforc(new Kernel_NADForce());
28
29 std::shared_ptr<Kernel_Update_p> ku_p(new Kernel_Update_p(0.5));
30 std::shared_ptr<Kernel_Update_x> ku_x(new Kernel_Update_x(0.5));
31 std::shared_ptr<Kernel_Update_c> ku_c(new Kernel_Update_c(1.0));
32
34 std::shared_ptr<Kernel_Recorder> krecd(new Kernel_Recorder());
35
36 kinte->appendChild(ku_p);
37 kinte->appendChild(ku_x);
38 kinte->appendChild(ku_x);
39 kinte->appendChild(kmodel);
40 kinte->appendChild(krepr);
41 kinte->appendChild(ku_c);
42
43 std::shared_ptr<Kernel> kele;
44 if (false) {
45 // } else if (NAD_Kernel_name == "CMM") {
46 // kele = std::shared_ptr<Kernel_Elec_CMM>(new Kernel_Elec_CMM());
47 // } else if (NAD_Kernel_name == "SQC") {
48 // kele = std::shared_ptr<Kernel_Elec_SQC>(new Kernel_Elec_SQC());
49 // } else if (NAD_Kernel_name == "MMD") {
50 // kele = std::shared_ptr<Kernel_Elec_MMD>(new Kernel_Elec_MMD());
51 // } else if (NAD_Kernel_name == "SH") {
52 // kele = std::shared_ptr<Kernel_Hopping>(new Kernel_Hopping());
53 // } else if (NAD_Kernel_name == "MMSH") {
54 // kele = std::shared_ptr<Kernel_Elec_MMSH>(new Kernel_Elec_MMSH());
55 } else if (NAD_Kernel_name == "NAD") {
56 kele = std::shared_ptr<Kernel_Elec_NAD>(new Kernel_Elec_NAD());
57 // } else if (NAD_Kernel_name == "MCE") {
58 // kele = std::shared_ptr<Kernel_GWP>(new Kernel_GWP(kmodel, krepr, kforc));
59 } else {
60 throw std::runtime_error("unknown Elec Kernel");
61 }
62 kinte->appendChild(kele);
63
64 kinte->appendChild(kforc);
65 kinte->appendChild(ku_p);
66 kinte->appendChild(std::shared_ptr<Kernel_Conserve>(new Kernel_Conserve()));
67
68 std::shared_ptr<Kernel_Iter_Adapt> kiter(new Kernel_Iter_Adapt());
69 kiter->appendChild(krecd); // stacked in iteration
70 kiter->appendChild(kinte); // stacked in iteration
71
72 // /// CMM kernel
73 ker->appendChild(std::shared_ptr<Kernel_Load_DataSet>(new Kernel_Load_DataSet()))
74 .appendChild(std::shared_ptr<Kernel_Random>(new Kernel_Random()))
75 .appendChild(std::shared_ptr<Kernel_Read_Dimensions>(new Kernel_Read_Dimensions()))
76 .appendChild(std::shared_ptr<Kernel_Prioritization>(new Kernel_Prioritization({kmodel, kinte}, 1)))
77 .appendChild(std::shared_ptr<Kernel_Prioritization>( //
78 new Kernel_Prioritization({kmodel, krepr, kele, kforc, krecd}, 2)))
79 .appendChild(kiter)
80 .appendChild(std::shared_ptr<Kernel_Dump_DataSet>(new Kernel_Dump_DataSet()));
81 return ker;
82}
83
84}; // namespace PROJECT_NS
this file provide Kernel class
this file provides Kernel_Conserve class enabling energy tracing and conservation.
this file provides Kernel_Dump_DataSet class enabling dump dataset.
this file provides Kernel_Elec_NAD class for electronic dynamics and properties in nonadiabatic traje...
this file provides Kernel_NADForce class enabling force weighting from electronic properties.
this file provides Kernel_Prioritization class enabling reordering different kernels in parsing Param...
this file provides Kernel_Read_Dimensions class enabling reading and initializing the sizes and shape...
this file provides Kernel_Recorder class for trace data in dataset during the dynamics.
This class implements a process for energy conservation.
this class implements a process for dumping current data with stuctured format
initialization kernel for electonic DOFs in NAD
this class implements a process for loading data in state stucture
this class implements process of calculation of nuclear force for nonadiabatic dynamics
This class specifies the kernels that prioritizing other kernels.
Kernel_Random manipulation of random engine and numbers.
This class specifies the kernels that initialize the dimensions of data.
Kernel_Representationfor solving basis transformation for electronic problems.
this class provides the container and implementation of algorithms
Definition Kernel.h:60
< http://warp.povusers.org/FunctionParser/fparser.html
Definition Context.h:39
std::shared_ptr< Kernel > NAD_Adapt_Kernel(std::shared_ptr< Kernel > kmodel, std::string NAD_Kernel_name)