-
Notifications
You must be signed in to change notification settings - Fork 1
/
ElectronicState.hpp
64 lines (51 loc) · 2 KB
/
ElectronicState.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* Tinned: a set of nonnumerical routines for computational chemistry
Copyright 2023-2024 Bin Gao
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This file is the header file of abstract class for electronic state.
2023-10-28, Bin Gao:
* remove member method get_args()
2023-09-21, Bin Gao:
* first version
*/
#pragma once
#include <string>
#include <symengine/basic.h>
#include <symengine/dict.h>
#include <symengine/symbol.h>
#include <symengine/symengine_rcp.h>
#include <symengine/matrices/matrix_symbol.h>
namespace Tinned
{
// ElectronicState can be differentiated to any perturbation and any order
class ElectronicState: public SymEngine::MatrixSymbol
{
protected:
// derivatives_ holds derivatives with respect to perturbations
SymEngine::multiset_basic derivatives_;
public:
//! Constructor
explicit ElectronicState(
const std::string& name,
const SymEngine::multiset_basic& derivatives = {}
);
SymEngine::hash_t __hash__() const override;
bool __eq__(const SymEngine::Basic& o) const override;
int compare(const SymEngine::Basic& o) const override;
//SymEngine::vec_basic get_args() const override;
//// Override the defaut behaviour for diff
//SymEngine::RCP<const SymEngine::Basic> diff_impl(
// const SymEngine::RCP<const SymEngine::Symbol>& s
//) const override;
// Get derivatives
inline SymEngine::multiset_basic get_derivatives() const
{
return derivatives_;
}
// Check if `x` is a same response parameter
virtual inline bool is_same_parameter(
const SymEngine::RCP<const SymEngine::Basic>& x
) const = 0;
};
}