KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
NAD_Kernel.cpp
Go to the documentation of this file.
1#include "kids/Kernel.h"
12#include "kids/Kernel_Update.h"
13
14namespace PROJECT_NS {
15
16// CMM Solver Builder
17std::shared_ptr<Kernel> NAD_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
44 std::shared_ptr<Kernel> kele;
45 if (false) {
46 // } else if (NAD_Kernel_name == "CMM") {
47 // kele = std::shared_ptr<Kernel_Elec_CMM>(new Kernel_Elec_CMM());
48 // } else if (NAD_Kernel_name == "SQC") {
49 // kele = std::shared_ptr<Kernel_Elec_SQC>(new Kernel_Elec_SQC());
50 // } else if (NAD_Kernel_name == "MMD") {
51 // kele = std::shared_ptr<Kernel_Elec_MMD>(new Kernel_Elec_MMD());
52 // } else if (NAD_Kernel_name == "SH") {
53 // kele = std::shared_ptr<Kernel_Hopping>(new Kernel_Hopping());
54 // } else if (NAD_Kernel_name == "MMSH") {
55 // kele = std::shared_ptr<Kernel_Elec_MMSH>(new Kernel_Elec_MMSH());
56 } else if (NAD_Kernel_name == "NAD") {
57 kele = std::shared_ptr<Kernel_Elec_NAD>(new Kernel_Elec_NAD());
58 // } else if (NAD_Kernel_name == "MCE") {
59 // kele = std::shared_ptr<Kernel_GWP>(new Kernel_GWP(kmodel, krepr, kforc));
60 } else {
61 throw std::runtime_error("unknown Elec Kernel");
62 }
63 kinte->appendChild(kele);
64
65 kinte->appendChild(kforc);
66 kinte->appendChild(ku_p);
67 kinte->appendChild(std::shared_ptr<Kernel_Conserve>(new Kernel_Conserve()));
68
69 std::shared_ptr<Kernel_Iter> kiter(new Kernel_Iter());
70 kiter->appendChild(krecd); // stacked in iteration
71 kiter->appendChild(kinte); // stacked in iteration
72
73 // /// CMM kernel
74 ker->appendChild(std::shared_ptr<Kernel_Load_DataSet>(new Kernel_Load_DataSet()))
75 .appendChild(std::shared_ptr<Kernel_Random>(new Kernel_Random()))
76 .appendChild(std::shared_ptr<Kernel_Read_Dimensions>(new Kernel_Read_Dimensions()))
77 .appendChild(std::shared_ptr<Kernel_Prioritization>(new Kernel_Prioritization({kmodel, kinte}, 1)))
78 .appendChild(std::shared_ptr<Kernel_Prioritization>( //
79 new Kernel_Prioritization({kmodel, krepr, kele, kforc, krecd}, 2)))
80 .appendChild(kiter)
81 .appendChild(std::shared_ptr<Kernel_Dump_DataSet>(new Kernel_Dump_DataSet()));
82 return ker;
83}
84
85}; // 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
Minimal iterator for integration of the equations of motion.
Definition Kernel_Iter.h:11
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_Kernel(std::shared_ptr< Kernel > kmodel, std::string NAD_Kernel_name)