KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
PROJECT_NS::Model_Interf_MNDO Class Referencefinal

#include <Model_Interf_MNDO.h>

Inheritance diagram for PROJECT_NS::Model_Interf_MNDO:
Inheritance graph
Collaboration diagram for PROJECT_NS::Model_Interf_MNDO:
Collaboration graph

Public Member Functions

virtual const std::string getName ()
 Get the name of the kernel.
 
virtual int getType () const
 Get the type of the kernel.
 
 Model_Interf_MNDO ()
 
virtual ~Model_Interf_MNDO ()
 
void setInputParam (std::shared_ptr< Param > &PM)
 Set input parameters for the kernel and its children.
 
void setInputDataSet (std::shared_ptr< DataSet > &DS)
 Set input data set for the kernel and its children.
 
std::shared_ptr< ParamgetParam () const
 Get the parameter associated with the kernel.
 
std::shared_ptr< DataSetgetDataSet () const
 Get the data set associated with the kernel.
 
StatusinitializeKernel (Status &stat)
 Prepare initial conditions for the kernel and its children.
 
StatusexecuteKernel (Status &stat)
 Execute the kernel's algorithm and those of its children.
 
StatusfinalizeKernel (Status &stat)
 Finalize the kernel and its children, performing any necessary cleanup.
 
int getID () const
 Get the ID of the kernel.
 
bool operator== (const Kernel &ker)
 Overloaded equality operator to compare two Kernel objects by their IDs.
 
KernelappendChild (std::shared_ptr< Kernel > ker)
 Append a kernel as the last child of the current tree node.
 
KernelinsertAt (std::vector< std::size_t > indexes, std::shared_ptr< Kernel > ker)
 Insert a kernel at specified indexes in the tree.
 
KernelremoveAt (std::vector< std::size_t > indexes)
 Remove kernels at specified indexes from the tree.
 
KernelupdateAt (std::vector< std::size_t > indexes, std::shared_ptr< Kernel > ker)
 Update the kernel at specified indexes in the tree.
 
std::tuple< Kernel *, std::size_t > getLastParentKernelAndChildOrder ()
 Retrieve the last parent kernel along with the order of its child kernels, if available.
 
std::shared_ptr< RuleSetgetRuleSet ()
 Get RuleSet associated with the Kernel.
 
const std::string generateInformationString (double total_time=-1.0f, int current_layer=0, int total_depth=0, int total_align_size=0)
 Generate a formatted string containing information about the kernel.
 

Static Public Member Functions

static int dump (Kernel *ker)
 
static int report (Kernel *ker)
 
static int mpi_reduce_info (Kernel *ker)
 
static const std::string serializeKernel (const Kernel &ker)
 Serialize a Kernel object into a string representation.
 
static std::shared_ptr< KerneldeserializeKernel (const std::string &str)
 Deserialize a string representation into a Kernel object.
 

Protected Member Functions

virtual StatusfinalizeKernel_impl (Status &stat)
 Virtual function to finalize the kernel implementation.
 

Protected Attributes

bool is_timing = false
 Flag indicating whether timing is enabled for this kernel.
 
bool has_parent = false
 Flag indicating whether the kernel has a parent.
 
int count_calc = 0
 Counter for the number of calculations performed by this kernel.
 
int count_exec = 0
 Counter for the number of executions performed by this kernel.
 
int kernel_id = 0
 ID of the kernel.
 
int kernel_type = 0
 Type of the kernel.
 
double exec_time = 0.0f
 Total execution time of the kernel.
 
int depth = 0
 Depth of the kernel in the tree structure.
 
int max_align_size = 0
 Maximum alignment size used by this kernel.
 
std::string kernel_name
 Name of the kernel.
 
std::shared_ptr< Param_param
 Shared pointer to the Param object associated with this kernel.
 
std::shared_ptr< DataSet_dataset
 Shared pointer to the DataSet object associated with this kernel.
 
std::shared_ptr< RuleSet_ruleset
 Recorded Rules associated with the Kernel.
 
Kernel_parent_kernel
 Pointer to the parent kernel.
 
std::size_t _order_in_parent
 Order of this kernel in its parent's children.
 
std::vector< std::shared_ptr< Kernel > > _child_kernels
 Vector containing shared pointers to the child kernels of this kernel.
 
std::vector< std::shared_ptr< Kernel > > _all_kernels
 Vector containing shared pointers to all descendant kernels of this kernel.
 

Private Member Functions

void setInputParam_impl (std::shared_ptr< Param > &PM)
 Virtual function to set input parameters for the kernel implementation.
 
void setInputDataSet_impl (std::shared_ptr< DataSet > &DS)
 Virtual function to set input data set for the kernel implementation.
 
StatusinitializeKernel_impl (Status &stat)
 ForceField_init for mndo.
 
StatusexecuteKernel_impl (Status &stat)
 Virtual function to execute the kernel implementation.
 
int parse_mndo (const std::string &mndoinp)
 this function parse mndo input (only support cartesian format)
 
std::string new_keyword (const MNDOKW_map &newkeyword)
 generate a new set of keywords
 
int new_task (const std::string &file, const std::string &task_flag)
 generate input file for a new task based on the template
 
int track_nac_sign ()
 this part track the sign of NAC between current step with the last step, in order to make sure nac changes continuously with time.
 
Statusparse_standard (const std::string &log, Status &stat)
 parse energy/gradients/nac from output
 
int parse_hessian (const std::string &log)
 parse frequency calculation log where the frequency should be calculated by specifying (JOP=2), (ICROSS=0) and (KPRINT=1)
 
int parse_hessian2 (const std::string &log)
 parse frequency calculation (JOP=2) and (KPRINT=1)
 
int calc_normalmode ()
 this function generates normalmode trajectories
 
int calc_samp ()
 this function generates initialization configuration
 
int calc_scan ()
 
void connectRelatedKernels (std::shared_ptr< Kernel > &ker)
 Connect related kernels to this kernel.
 

Static Private Member Functions

static std::map< std::string, Kernel * > & getDictOfKernels ()
 Get the dictionary of kernels (mapping from names to kernel pointers).
 
static std::vector< Kernel * > & getKernels ()
 Get the vector of all kernel pointers.
 

Private Attributes

kids_real temp
 
kids_real beta
 
bool diff_nac
 
std::string exec_file
 
std::string init_nuclinp
 
std::string savename
 
std::vector< std::string > mndo_data
 
std::string mndo_keyword
 
std::string mndo_comment
 
std::string mndo_addition
 
std::vector< MNDOKWkeyword
 
std::string task_control
 
std::string directory
 
bool classical_bath
 
kids_realx
 
kids_realp
 
int * atoms
 
kids_realx0
 
kids_realp0
 
kids_realx_sigma
 
kids_realp_sigma
 
kids_realw
 
kids_realmass
 
kids_realvpes
 
kids_realgrad
 
kids_realhess
 
kids_realTmod
 
kids_realV
 
kids_realdV
 
kids_realT
 
kids_realE
 
kids_realdE
 
kids_realnac
 
kids_realnac_prev
 
kids_realf_r
 
kids_realf_p
 
kids_realf_rp
 
int natom
 
int read_flag
 
int nciref
 
int ncigrd
 
int iroot
 
int lroot
 
bool refer
 
kids_bintsucc_ptr
 
kids_bintfrez_ptr
 
kids_bintlast_attempt_ptr
 
int * fail_type_ptr
 

Detailed Description

Definition at line 20 of file Model_Interf_MNDO.h.

Constructor & Destructor Documentation

◆ Model_Interf_MNDO()

PROJECT_NS::Model_Interf_MNDO::Model_Interf_MNDO ( )
inline

Definition at line 26 of file Model_Interf_MNDO.h.

◆ ~Model_Interf_MNDO()

virtual PROJECT_NS::Model_Interf_MNDO::~Model_Interf_MNDO ( )
inlinevirtual

Definition at line 28 of file Model_Interf_MNDO.h.

Member Function Documentation

◆ appendChild()

Kernel & Kernel::appendChild ( std::shared_ptr< Kernel > ker)
inherited

Append a kernel as the last child of the current tree node.

Parameters
kerThe kernel to append as the last child.
Returns
Reference to the modified kernel.

Definition at line 78 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, PROJECT_NS::Kernel::_order_in_parent, PROJECT_NS::Kernel::_ruleset, PROJECT_NS::Kernel::depth, PROJECT_NS::Kernel::getLastParentKernelAndChildOrder(), and PROJECT_NS::Kernel::max_align_size.

Referenced by PROJECT_NS::Kernel_Elec_NAD::Kernel_Elec_NAD(), PROJECT_NS::Kernel_Elec_Switch::Kernel_Elec_Switch(), PROJECT_NS::Kernel_GWP::Kernel_GWP(), PROJECT_NS::Model_ElectronTransfer::Model_ElectronTransfer(), and PROJECT_NS::Model_SystemBath::Model_SystemBath().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_normalmode()

int PROJECT_NS::Model_Interf_MNDO::calc_normalmode ( )
private

this function generates normalmode trajectories

Parameters
Requilibrium configuration
Returns
int

generate normal-mode trajectories

r = Xeq + M^(-1/2) * T * Q p = M^(1/2) * T * P here, r, p are cartesian postion & momentum, while Q, P are normal-mode postion & momentum

Definition at line 710 of file Model_Interf_MNDO.cpp.

References phys::au_2_ang, ELEMENTS_LABEL, FMT, isFileExists(), and phys::math::twopi.

Referenced by setInputDataSet_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_samp()

int PROJECT_NS::Model_Interf_MNDO::calc_samp ( )
private

this function generates initialization configuration

Parameters
Requilibrium configuration
Returns
int

mass-weighted Hessian to obtain normalmode

Definition at line 757 of file Model_Interf_MNDO.cpp.

References ARRAY_MATMUL, phys::au_2_ang, phys::au_2_angoverps, utils::concat(), ELEMENTS_LABEL, FMT, and isFileExists().

Referenced by setInputDataSet_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_scan()

int PROJECT_NS::Model_Interf_MNDO::calc_scan ( )
private

Definition at line 858 of file Model_Interf_MNDO.cpp.

References phys::au_2_ang.

Referenced by setInputDataSet_impl().

Here is the caller graph for this function:

◆ connectRelatedKernels()

void Kernel::connectRelatedKernels ( std::shared_ptr< Kernel > & ker)
privateinherited

Connect related kernels to this kernel.

This function connects related kernels to the current kernel. Related kernels are kernels that are associated with or connected to this kernel in some way.

Note
The exact definition of "related kernels" may vary depending on the context and application.

Definition at line 228 of file Kernel.cpp.

References PROJECT_NS::Kernel::_all_kernels, and PROJECT_NS::Kernel::connectRelatedKernels().

Referenced by PROJECT_NS::Kernel::connectRelatedKernels().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deserializeKernel()

std::shared_ptr< Kernel > Kernel::deserializeKernel ( const std::string & str)
staticinherited

Deserialize a string representation into a Kernel object.

Parameters
strThe string containing the serialized Kernel object.
Returns
A shared pointer to the deserialized Kernel object.

Definition at line 187 of file Kernel.cpp.

◆ dump()

static int PROJECT_NS::Kernel::dump ( Kernel * ker)
inlinestaticinherited

Definition at line 71 of file Kernel.h.

◆ executeKernel()

◆ executeKernel_impl()

Status & PROJECT_NS::Model_Interf_MNDO::executeKernel_impl ( Status & stat)
privatevirtual

Virtual function to execute the kernel implementation.

Parameters
statStatus object to store execution status.
Returns
Status object after execution.

< convert Bohr to Angstrom

< convert Angstrom to Bohr

< convert kcalpmol to Hartree

< convert to Hartree/Bohr

Reimplemented from PROJECT_NS::Kernel.

Definition at line 209 of file Model_Interf_MNDO.cpp.

References phys::au_2_ang, phys::au_2_kcal_1mea, utils::concat(), dE, directory, E, exec_file, PROJECT_NS::Dimension::F, fail_type_ptr, frez_ptr, PROJECT_NS::Status::icalc, last_attempt_ptr, PROJECT_NS::Dimension::N, nac, new_task(), PROJECT_NS::Dimension::NFF, parse_standard(), removeFile(), task_control, track_nac_sign(), and x.

Referenced by initializeKernel_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalizeKernel()

Status & Kernel::finalizeKernel ( Status & stat)
inherited

Finalize the kernel and its children, performing any necessary cleanup.

Parameters
statThe status object to store finalization status.
Returns
The status object after finalization.

Definition at line 66 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, and PROJECT_NS::Kernel::finalizeKernel_impl().

Here is the call graph for this function:

◆ finalizeKernel_impl()

Status & Kernel::finalizeKernel_impl ( Status & stat)
protectedvirtualinherited

Virtual function to finalize the kernel implementation.

Parameters
statStatus object to store finalization status.
Returns
Status object after finalization.

Reimplemented in PROJECT_NS::Kernel_Recorder.

Definition at line 226 of file Kernel.cpp.

Referenced by PROJECT_NS::Kernel::finalizeKernel().

Here is the caller graph for this function:

◆ generateInformationString()

const std::string Kernel::generateInformationString ( double total_time = -1.0f,
int current_layer = 0,
int total_depth = 0,
int total_align_size = 0 )
inherited

Generate a formatted string containing information about the kernel.

This function generates a formatted string containing information about the kernel, including its total time, current layer, total depth, and total alignment size.

Parameters
total_timeThe total time taken by the kernel (default: -1.0f).
current_layerThe current layer of the kernel (default: 0).
total_depthThe total depth of the kernel (default: 0).
total_align_sizeThe total alignment size of the kernel (default: 0).
Returns
A formatted string containing kernel information.

Definition at line 189 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, PROJECT_NS::Kernel::depth, PROJECT_NS::Kernel::exec_time, PROJECT_NS::Kernel::getName(), PROJECT_NS::Kernel::kernel_id, and PROJECT_NS::Kernel::max_align_size.

Here is the call graph for this function:

◆ getDataSet()

std::shared_ptr< DataSet > Kernel::getDataSet ( ) const
inherited

Get the data set associated with the kernel.

Returns
Shared pointer to the DataSet object.

Definition at line 37 of file Kernel.cpp.

References PROJECT_NS::Kernel::_dataset.

◆ getDictOfKernels()

static std::map< std::string, Kernel * > & PROJECT_NS::Kernel::getDictOfKernels ( )
staticprivateinherited

Get the dictionary of kernels (mapping from names to kernel pointers).

This function returns a reference to the static map containing the dictionary of kernels. The dictionary maps kernel names to their corresponding kernel pointers.

Returns
A reference to the dictionary of kernels.

◆ getID()

int Kernel::getID ( ) const
inherited

Get the ID of the kernel.

Returns
The ID of the kernel.

Definition at line 74 of file Kernel.cpp.

References PROJECT_NS::Kernel::kernel_id.

Referenced by PROJECT_NS::Kernel_Prioritization::getName(), and PROJECT_NS::Kernel::operator==().

Here is the caller graph for this function:

◆ getKernels()

std::vector< Kernel * > & Kernel::getKernels ( )
staticprivateinherited

Get the vector of all kernel pointers.

This function returns a reference to the static vector containing pointers to all kernels.

Returns
A reference to the vector of all kernel pointers.

Definition at line 247 of file Kernel.cpp.

Referenced by PROJECT_NS::Kernel::Kernel().

Here is the caller graph for this function:

◆ getLastParentKernelAndChildOrder()

std::tuple< Kernel *, std::size_t > Kernel::getLastParentKernelAndChildOrder ( )
inherited

Retrieve the last parent kernel along with the order of its child kernels, if available.

Returns
A tuple containing a pointer to the last parent kernel and the order of its child kernels.

Definition at line 178 of file Kernel.cpp.

References PROJECT_NS::Kernel::_order_in_parent, PROJECT_NS::Kernel::_parent_kernel, and PROJECT_NS::Kernel::has_parent.

Referenced by PROJECT_NS::Kernel::appendChild(), PROJECT_NS::Kernel::insertAt(), and PROJECT_NS::Kernel::updateAt().

Here is the caller graph for this function:

◆ getName()

const std::string PROJECT_NS::Model_Interf_MNDO::getName ( )
virtual

Get the name of the kernel.

Returns the concatenated name of the kernel, prefixed with "Kernel__".

Returns
The name of the kernel.

Reimplemented from PROJECT_NS::Kernel.

Definition at line 23 of file Model_Interf_MNDO.cpp.

◆ getParam()

std::shared_ptr< Param > Kernel::getParam ( ) const
inherited

Get the parameter associated with the kernel.

Returns
Shared pointer to the Param object.

Definition at line 35 of file Kernel.cpp.

References PROJECT_NS::Kernel::_param.

◆ getRuleSet()

std::shared_ptr< RuleSet > Kernel::getRuleSet ( )
inherited

Get RuleSet associated with the Kernel.

Returns
The RuleSet (name, dataPointer, datatype, size, stride).

Definition at line 183 of file Kernel.cpp.

References PROJECT_NS::Kernel::_ruleset.

◆ getType()

int PROJECT_NS::Model_Interf_MNDO::getType ( ) const
virtual

Get the type of the kernel.

This function returns the type of the kernel.

Note
This function should be implemented in derived classes to return the specific type of the kernel.
Returns
The type of the kernel.

Reimplemented from PROJECT_NS::Kernel.

Definition at line 25 of file Model_Interf_MNDO.cpp.

References FUNCTION_NAME, and utils::hash().

Here is the call graph for this function:

◆ initializeKernel()

Status & Kernel::initializeKernel ( Status & stat)
inherited

Prepare initial conditions for the kernel and its children.

Parameters
statThe status object to store initialization status.
Returns
The status object after initialization.

Definition at line 39 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, PROJECT_NS::Kernel::_dataset, PROJECT_NS::Kernel::count_calc, and PROJECT_NS::Kernel::initializeKernel_impl().

Here is the call graph for this function:

◆ initializeKernel_impl()

Status & PROJECT_NS::Model_Interf_MNDO::initializeKernel_impl ( Status & stat)
privatevirtual

ForceField_init for mndo.

Parameters
nrnuclear configuration np: nuclear momentum m: nuclear mass erho: electronic density eeac: electronic amplititude eocc: electronic occupation fdim: electronic freedoms itraj: index of trajectory
Returns
int

Reimplemented from PROJECT_NS::Kernel.

Definition at line 155 of file Model_Interf_MNDO.cpp.

References PROJECT_NS::Kernel::_dataset, PROJECT_NS::Kernel::_param, ARRAY_MATMUL, utils::concat(), directory, executeKernel_impl(), PROJECT_NS::Status::icalc, init_nuclinp, isFileExists(), LOC, mass, PROJECT_NS::Dimension::N, p, p0, p_sigma, PROJECT_NS::Kernel_Random::rand_gaussian(), refer, removeFile(), task_control, Tmod, x, x0, and x_sigma.

Here is the call graph for this function:

◆ insertAt()

Kernel & Kernel::insertAt ( std::vector< std::size_t > indexes,
std::shared_ptr< Kernel > ker )
inherited

Insert a kernel at specified indexes in the tree.

Parameters
indexesIndexes indicating the position to insert the kernel.
kerThe kernel to insert.
Returns
Reference to the modified kernel.

Definition at line 102 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, PROJECT_NS::Kernel::_ruleset, and PROJECT_NS::Kernel::getLastParentKernelAndChildOrder().

Here is the call graph for this function:

◆ mpi_reduce_info()

static int PROJECT_NS::Kernel::mpi_reduce_info ( Kernel * ker)
inlinestaticinherited

Definition at line 75 of file Kernel.h.

◆ new_keyword()

std::string PROJECT_NS::Model_Interf_MNDO::new_keyword ( const MNDOKW_map & newkeyword)
private

generate a new set of keywords

Definition at line 352 of file Model_Interf_MNDO.cpp.

References PROJECT_NS::MNDOKW::key, keyword, and PROJECT_NS::MNDOKW::val.

Referenced by new_task().

Here is the caller graph for this function:

◆ new_task()

int PROJECT_NS::Model_Interf_MNDO::new_task ( const std::string & file,
const std::string & task_flag )
private

generate input file for a new task based on the template

<

Definition at line 373 of file Model_Interf_MNDO.cpp.

References atoms, FMT, mndo_addition, mndo_comment, mndo_keyword, natom, new_keyword(), and x.

Referenced by executeKernel_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==()

bool Kernel::operator== ( const Kernel & ker)
inherited

Overloaded equality operator to compare two Kernel objects by their IDs.

Parameters
kerThe Kernel object to compare with.
Returns
True if the IDs of the two kernels are equal, otherwise false.

Definition at line 76 of file Kernel.cpp.

References PROJECT_NS::Kernel::getID().

Here is the call graph for this function:

◆ parse_hessian()

int PROJECT_NS::Model_Interf_MNDO::parse_hessian ( const std::string & log)
private

parse frequency calculation log where the frequency should be calculated by specifying (JOP=2), (ICROSS=0) and (KPRINT=1)

Definition at line 593 of file Model_Interf_MNDO.cpp.

References ARRAY_CLEAR, phys::au_2_wn, hess, PROJECT_NS::Dimension::N, PROJECT_NS::Dimension::NN, Tmod, and w.

Referenced by setInputDataSet_impl().

Here is the caller graph for this function:

◆ parse_hessian2()

int PROJECT_NS::Model_Interf_MNDO::parse_hessian2 ( const std::string & log)
private

parse frequency calculation (JOP=2) and (KPRINT=1)

Definition at line 665 of file Model_Interf_MNDO.cpp.

References ARRAY_CLEAR, phys::au_2_amu, and phys::au_2_wn.

Referenced by setInputDataSet_impl().

Here is the caller graph for this function:

◆ parse_mndo()

int PROJECT_NS::Model_Interf_MNDO::parse_mndo ( const std::string & mndoinp)
private

this function parse mndo input (only support cartesian format)

Returns
int: total atom number parsed
Todo
: support zmat format parser

Definition at line 276 of file Model_Interf_MNDO.cpp.

References iroot, keyword, mndo_addition, mndo_comment, mndo_data, mndo_keyword, ncigrd, and nciref.

Referenced by setInputParam_impl().

Here is the caller graph for this function:

◆ parse_standard()

Status & PROJECT_NS::Model_Interf_MNDO::parse_standard ( const std::string & log,
Status & stat_in )
private

parse energy/gradients/nac from output

Parameters
loglog file to parse
Returns
status

find energy surfaces (for icross=0, this section is missed)

< E in [kcalpmol]

find energy surfaces (for icross=0, this section is missed)

< E in [kcalpmol]

find gradients

< grad in kcalpmol/angstrom

find non-adiabatic coupling(NAC) terms note we use the complete formalism (let MPRINT=1) in MNDO

< grad in kcalpmol/angstrom

Definition at line 468 of file Model_Interf_MNDO.cpp.

References PROJECT_NS::Kernel::_dataset, utils::concat(), dE, directory, E, PROJECT_NS::Dimension::F, f_p, f_r, f_rp, PROJECT_NS::Dimension::Fadd1, fail_type_ptr, PROJECT_NS::Dimension::FF, PROJECT_NS::Status::icalc, last_attempt_ptr, PROJECT_NS::Dimension::N, nac, natom, nciref, and succ_ptr.

Referenced by executeKernel_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeAt()

Kernel & Kernel::removeAt ( std::vector< std::size_t > indexes)
inherited

Remove kernels at specified indexes from the tree.

Parameters
indexesIndexes indicating the kernels to remove.
Returns
Reference to the modified kernel.

Definition at line 128 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels.

◆ report()

static int PROJECT_NS::Kernel::report ( Kernel * ker)
inlinestaticinherited

Definition at line 73 of file Kernel.h.

◆ serializeKernel()

const std::string Kernel::serializeKernel ( const Kernel & ker)
staticinherited

Serialize a Kernel object into a string representation.

Parameters
kerThe Kernel object to serialize.
Returns
A string representing the serialized Kernel object.

Definition at line 185 of file Kernel.cpp.

◆ setInputDataSet()

void Kernel::setInputDataSet ( std::shared_ptr< DataSet > & DS)
inherited

Set input data set for the kernel and its children.

Parameters
DSShared pointer to the DataSet object.

Definition at line 28 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, PROJECT_NS::Kernel::_dataset, PROJECT_NS::Kernel::_param, and PROJECT_NS::Kernel::setInputDataSet_impl().

Here is the call graph for this function:

◆ setInputDataSet_impl()

void PROJECT_NS::Model_Interf_MNDO::setInputDataSet_impl ( std::shared_ptr< DataSet > & DS)
privatevirtual

Virtual function to set input data set for the kernel implementation.

Parameters
DSShared pointer to the DataSet object containing input data.

Reimplemented from PROJECT_NS::Kernel.

Definition at line 44 of file Model_Interf_MNDO.cpp.

References PROJECT_NS::Kernel::_param, PROJECT_NS::DATA::model::atoms, atoms, phys::au_2_amu, phys::au_2_ang, beta, calc_normalmode(), calc_samp(), calc_scan(), classical_bath, utils::concat(), PROJECT_NS::DATA::model::rep::dE, dE, PROJECT_NS::DATA::model::dV, dV, PROJECT_NS::DATA::model::rep::E, E, ELEMENTS_MASS, PROJECT_NS::Dimension::F, PROJECT_NS::DATA::model::f_p, f_p, PROJECT_NS::DATA::model::f_r, f_r, PROJECT_NS::DATA::model::f_rp, f_rp, PROJECT_NS::DATA::iter::fail_type, fail_type_ptr, PROJECT_NS::DATA::iter::frez, frez_ptr, PROJECT_NS::DATA::model::grad, grad, PROJECT_NS::DATA::model::hess, hess, init_nuclinp, isFileExists(), PROJECT_NS::DATA::iter::last_attempt, last_attempt_ptr, LOC, PROJECT_NS::DATA::model::mass, mass, mndo_data, PROJECT_NS::Dimension::N, PROJECT_NS::DATA::model::rep::nac, nac, PROJECT_NS::DATA::model::rep::nac_prev, nac_prev, natom, PROJECT_NS::DATA::integrator::p, p, PROJECT_NS::DATA::model::p0, p0, PROJECT_NS::DATA::model::p_sigma, p_sigma, parse_hessian(), parse_hessian2(), PROJECT_NS::DATA::iter::succ, succ_ptr, PROJECT_NS::DATA::model::rep::T, T, phys::temperature_d, PROJECT_NS::DATA::model::Tmod, Tmod, PROJECT_NS::DATA::model::V, V, PROJECT_NS::DATA::model::vpes, vpes, PROJECT_NS::DATA::model::w, w, PROJECT_NS::DATA::integrator::x, x, PROJECT_NS::DATA::model::x0, x0, PROJECT_NS::DATA::model::x_sigma, and x_sigma.

Here is the call graph for this function:

◆ setInputParam()

void Kernel::setInputParam ( std::shared_ptr< Param > & PM)
inherited

Set input parameters for the kernel and its children.

Parameters
PMShared pointer to the Param object.

Definition at line 21 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, PROJECT_NS::Kernel::_param, PROJECT_NS::Kernel::is_timing, LOC, and PROJECT_NS::Kernel::setInputParam_impl().

Here is the call graph for this function:

◆ setInputParam_impl()

void PROJECT_NS::Model_Interf_MNDO::setInputParam_impl ( std::shared_ptr< Param > & PM)
privatevirtual

Virtual function to set input parameters for the kernel implementation.

Parameters
PMShared pointer to the Param object containing input parameters.

Reimplemented from PROJECT_NS::Kernel.

Definition at line 27 of file Model_Interf_MNDO.cpp.

References classical_bath, directory, exec_file, PROJECT_NS::Dimension::F, LOC, PROJECT_NS::Dimension::N, natom, ncigrd, nciref, PROJECT_NS::Kernel_Representation::onthefly, and parse_mndo().

Here is the call graph for this function:

◆ track_nac_sign()

int PROJECT_NS::Model_Interf_MNDO::track_nac_sign ( )
private

this part track the sign of NAC between current step with the last step, in order to make sure nac changes continuously with time.

Returns
int

< skip starting time

Definition at line 420 of file Model_Interf_MNDO.cpp.

References PROJECT_NS::Dimension::F, PROJECT_NS::Dimension::FF, PROJECT_NS::Dimension::N, nac, nac_prev, PROJECT_NS::Dimension::NFF, and refer.

Referenced by executeKernel_impl().

Here is the caller graph for this function:

◆ updateAt()

Kernel & Kernel::updateAt ( std::vector< std::size_t > indexes,
std::shared_ptr< Kernel > ker )
inherited

Update the kernel at specified indexes in the tree.

build tree structure of the kernel

Parameters
indexesIndexes indicating the kernel to update.
kerThe kernel to update with.
Returns
Reference to the modified kernel.

Definition at line 147 of file Kernel.cpp.

References PROJECT_NS::Kernel::_child_kernels, PROJECT_NS::Kernel::_ruleset, and PROJECT_NS::Kernel::getLastParentKernelAndChildOrder().

Here is the call graph for this function:

Member Data Documentation

◆ _all_kernels

std::vector<std::shared_ptr<Kernel> > PROJECT_NS::Kernel::_all_kernels
protectedinherited

Vector containing shared pointers to all descendant kernels of this kernel.

Definition at line 303 of file Kernel.h.

Referenced by PROJECT_NS::Kernel::connectRelatedKernels().

◆ _child_kernels

◆ _dataset

◆ _order_in_parent

std::size_t PROJECT_NS::Kernel::_order_in_parent
protectedinherited

Order of this kernel in its parent's children.

Definition at line 293 of file Kernel.h.

Referenced by PROJECT_NS::Kernel::appendChild(), and PROJECT_NS::Kernel::getLastParentKernelAndChildOrder().

◆ _param

◆ _parent_kernel

Kernel* PROJECT_NS::Kernel::_parent_kernel
protectedinherited

Pointer to the parent kernel.

Definition at line 288 of file Kernel.h.

Referenced by PROJECT_NS::Kernel::getLastParentKernelAndChildOrder().

◆ _ruleset

◆ atoms

int* PROJECT_NS::Model_Interf_MNDO::atoms
private

Definition at line 54 of file Model_Interf_MNDO.h.

Referenced by new_task(), and setInputDataSet_impl().

◆ beta

kids_real PROJECT_NS::Model_Interf_MNDO::beta
private

Definition at line 31 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl().

◆ classical_bath

bool PROJECT_NS::Model_Interf_MNDO::classical_bath
private

Definition at line 48 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl(), and setInputParam_impl().

◆ dE

kids_real * PROJECT_NS::Model_Interf_MNDO::dE
private

Definition at line 63 of file Model_Interf_MNDO.h.

Referenced by executeKernel_impl(), parse_standard(), and setInputDataSet_impl().

◆ diff_nac

bool PROJECT_NS::Model_Interf_MNDO::diff_nac
private

Definition at line 32 of file Model_Interf_MNDO.h.

◆ directory

std::string PROJECT_NS::Model_Interf_MNDO::directory
private

◆ dV

kids_real * PROJECT_NS::Model_Interf_MNDO::dV
private

Definition at line 62 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl().

◆ E

kids_real * PROJECT_NS::Model_Interf_MNDO::E
private

Definition at line 63 of file Model_Interf_MNDO.h.

Referenced by executeKernel_impl(), parse_standard(), and setInputDataSet_impl().

◆ exec_file

std::string PROJECT_NS::Model_Interf_MNDO::exec_file
private

Definition at line 34 of file Model_Interf_MNDO.h.

Referenced by executeKernel_impl(), and setInputParam_impl().

◆ f_p

kids_real * PROJECT_NS::Model_Interf_MNDO::f_p
private

Definition at line 66 of file Model_Interf_MNDO.h.

Referenced by parse_standard(), and setInputDataSet_impl().

◆ f_r

kids_real* PROJECT_NS::Model_Interf_MNDO::f_r
private

Definition at line 66 of file Model_Interf_MNDO.h.

Referenced by parse_standard(), and setInputDataSet_impl().

◆ f_rp

kids_real * PROJECT_NS::Model_Interf_MNDO::f_rp
private

Definition at line 66 of file Model_Interf_MNDO.h.

Referenced by parse_standard(), and setInputDataSet_impl().

◆ fail_type_ptr

int* PROJECT_NS::Model_Interf_MNDO::fail_type_ptr
private

Definition at line 79 of file Model_Interf_MNDO.h.

Referenced by executeKernel_impl(), parse_standard(), and setInputDataSet_impl().

◆ frez_ptr

kids_bint* PROJECT_NS::Model_Interf_MNDO::frez_ptr
private

Definition at line 77 of file Model_Interf_MNDO.h.

Referenced by executeKernel_impl(), and setInputDataSet_impl().

◆ grad

kids_real * PROJECT_NS::Model_Interf_MNDO::grad
private

Definition at line 61 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl().

◆ hess

kids_real * PROJECT_NS::Model_Interf_MNDO::hess
private

Definition at line 61 of file Model_Interf_MNDO.h.

Referenced by parse_hessian(), and setInputDataSet_impl().

◆ init_nuclinp

std::string PROJECT_NS::Model_Interf_MNDO::init_nuclinp
private

Definition at line 35 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and setInputDataSet_impl().

◆ iroot

int PROJECT_NS::Model_Interf_MNDO::iroot
private

Definition at line 72 of file Model_Interf_MNDO.h.

Referenced by parse_mndo().

◆ keyword

std::vector<MNDOKW> PROJECT_NS::Model_Interf_MNDO::keyword
private

Definition at line 43 of file Model_Interf_MNDO.h.

Referenced by new_keyword(), and parse_mndo().

◆ last_attempt_ptr

kids_bint* PROJECT_NS::Model_Interf_MNDO::last_attempt_ptr
private

Definition at line 78 of file Model_Interf_MNDO.h.

Referenced by executeKernel_impl(), parse_standard(), and setInputDataSet_impl().

◆ lroot

int PROJECT_NS::Model_Interf_MNDO::lroot
private

Definition at line 73 of file Model_Interf_MNDO.h.

◆ mass

kids_real* PROJECT_NS::Model_Interf_MNDO::mass
private

Definition at line 60 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and setInputDataSet_impl().

◆ mndo_addition

std::string PROJECT_NS::Model_Interf_MNDO::mndo_addition
private

Definition at line 41 of file Model_Interf_MNDO.h.

Referenced by new_task(), and parse_mndo().

◆ mndo_comment

std::string PROJECT_NS::Model_Interf_MNDO::mndo_comment
private

Definition at line 40 of file Model_Interf_MNDO.h.

Referenced by new_task(), and parse_mndo().

◆ mndo_data

std::vector<std::string> PROJECT_NS::Model_Interf_MNDO::mndo_data
private

Definition at line 38 of file Model_Interf_MNDO.h.

Referenced by parse_mndo(), and setInputDataSet_impl().

◆ mndo_keyword

std::string PROJECT_NS::Model_Interf_MNDO::mndo_keyword
private

Definition at line 39 of file Model_Interf_MNDO.h.

Referenced by new_task(), and parse_mndo().

◆ nac

kids_real* PROJECT_NS::Model_Interf_MNDO::nac
private

◆ nac_prev

kids_real * PROJECT_NS::Model_Interf_MNDO::nac_prev
private

Definition at line 64 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl(), and track_nac_sign().

◆ natom

int PROJECT_NS::Model_Interf_MNDO::natom
private

◆ ncigrd

int PROJECT_NS::Model_Interf_MNDO::ncigrd
private

Definition at line 71 of file Model_Interf_MNDO.h.

Referenced by parse_mndo(), and setInputParam_impl().

◆ nciref

int PROJECT_NS::Model_Interf_MNDO::nciref
private

Definition at line 70 of file Model_Interf_MNDO.h.

Referenced by parse_mndo(), parse_standard(), and setInputParam_impl().

◆ p

kids_real * PROJECT_NS::Model_Interf_MNDO::p
private

Definition at line 51 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and setInputDataSet_impl().

◆ p0

kids_real* PROJECT_NS::Model_Interf_MNDO::p0
private

Definition at line 56 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and setInputDataSet_impl().

◆ p_sigma

kids_real* PROJECT_NS::Model_Interf_MNDO::p_sigma
private

Definition at line 58 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and setInputDataSet_impl().

◆ read_flag

int PROJECT_NS::Model_Interf_MNDO::read_flag
private

Definition at line 69 of file Model_Interf_MNDO.h.

◆ refer

bool PROJECT_NS::Model_Interf_MNDO::refer
private

Definition at line 74 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and track_nac_sign().

◆ savename

std::string PROJECT_NS::Model_Interf_MNDO::savename
private

Definition at line 36 of file Model_Interf_MNDO.h.

◆ succ_ptr

kids_bint* PROJECT_NS::Model_Interf_MNDO::succ_ptr
private

Definition at line 76 of file Model_Interf_MNDO.h.

Referenced by parse_standard(), and setInputDataSet_impl().

◆ T

kids_real* PROJECT_NS::Model_Interf_MNDO::T
private

Definition at line 63 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl().

◆ task_control

std::string PROJECT_NS::Model_Interf_MNDO::task_control
private

Definition at line 45 of file Model_Interf_MNDO.h.

Referenced by executeKernel_impl(), and initializeKernel_impl().

◆ temp

kids_real PROJECT_NS::Model_Interf_MNDO::temp
private

Definition at line 31 of file Model_Interf_MNDO.h.

◆ Tmod

kids_real * PROJECT_NS::Model_Interf_MNDO::Tmod
private

Definition at line 61 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), parse_hessian(), and setInputDataSet_impl().

◆ V

kids_real* PROJECT_NS::Model_Interf_MNDO::V
private

Definition at line 62 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl().

◆ vpes

kids_real* PROJECT_NS::Model_Interf_MNDO::vpes
private

Definition at line 61 of file Model_Interf_MNDO.h.

Referenced by setInputDataSet_impl().

◆ w

kids_real* PROJECT_NS::Model_Interf_MNDO::w
private

Definition at line 59 of file Model_Interf_MNDO.h.

Referenced by parse_hessian(), and setInputDataSet_impl().

◆ x

kids_real* PROJECT_NS::Model_Interf_MNDO::x
private

◆ x0

kids_real* PROJECT_NS::Model_Interf_MNDO::x0
private

Definition at line 55 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and setInputDataSet_impl().

◆ x_sigma

kids_real* PROJECT_NS::Model_Interf_MNDO::x_sigma
private

Definition at line 57 of file Model_Interf_MNDO.h.

Referenced by initializeKernel_impl(), and setInputDataSet_impl().


The documentation for this class was generated from the following files: