File BondOrderCollection.h¶
- Copyright
This code is licensed under the 3-clause BSD license.
Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.
See LICENSE.txt for details.
-
namespace
Scine
This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.
This header contains alias definitions defining which classes to use for the different degrees of derivatives.
-
namespace
Utils
-
class
BondOrderCollection
- #include <BondOrderCollection.h>
Class defining the bond orders between atoms of some molecular system.
Public Functions
-
BondOrderCollection
() Default Constructor.
-
BondOrderCollection
(int numberAtoms) Create an empty collection.
- Parameters
numberAtoms
: The number of atoms.
-
bool
empty
() const Whether this collection is empty, i.e.
whether there are any non-zero bond orders in this collection
-
const Eigen::SparseMatrix<double> &
getMatrix
() const Get the Matrix.
- Return
const Eigen::SparseMatrix<double>& The bond order matrix. This is a symmetric matrix.
-
template<typename
T
>
voidsetMatrix
(T &&bondOrderMatrix) Set the Matrix.
- Template Parameters
T
: Any matrix type.
- Parameters
bondOrderMatrix
: The new matrix. This must be a symmetric matrix.
-
void
resize
(int numberAtoms) Resize the matrix.
This operation does not preserve any existing values.
- Parameters
numberAtoms
: The new number of atoms.
-
void
setZero
() Set all bond orders to zero and frees the memory.
-
template<typename
Index
= int>
IndexgetSystemSize
() const Get the system size.
- Return
int Returns the number of atoms considered in the BondOrderCollection.
- Template Parameters
Index
: The type of the index desired. Defaults to integer
-
template<typename
Index
>
voidsetOrder
(Index i, Index j, double order) Set the bond order.
Sets both \(M_{ij}\) and \(M_{ji}\)
- Template Parameters
Index
:
- Parameters
i
: The index of the first atom.j
: The index of the second atom.double
: The new bond order.
-
template<typename
Index
>
doublegetOrder
(Index i, Index j) const Get the Order object.
- Return
double The bond order.
- Template Parameters
Index
:
- Parameters
i
: The index of the first atom.j
: The index of the second atom.
-
bool
operator==
(const BondOrderCollection &other) const Checks whether two bond order collections are approximately equal.
- Note
Uses Eigen’s isApprox to fuzzy-compare. Elements in both matrices need not be exactly the same.
- Return
Whether the matrices are approximately the same
- Parameters
other
: The other bond order collection to compare against
-
bool
operator!=
(const BondOrderCollection &other) const Negates.
- See
operator ==
Private Members
-
Eigen::SparseMatrix<double>
bondOrderMatrix_
¶
-
-
class
-
namespace