Debian Codegraph @

avogadro/calc/defaultmodel.cpp

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #include "defaultmodel.h"
7
8 #include <avogadro/core/array.h>
9 #include <avogadro/core/molecule.h>
10
11 namespace Avogadro::Calc {
12
13 // Base class constructors are called automatically
14 DefaultModel::DefaultModel(const std::string& id) : m_identifier(id)
15 {
16 // we don't know which elements are in the molecule
17 // but we can just say all of them are okay
18 // (because this method should work for any molecule)
19 m_elements.set();
20 }
21
22 MatrixX DefaultModel::partialCharges(Core::Molecule& mol) const
23 {
24 return mol.partialCharges(m_identifier);
25 }
26
27 MatrixX DefaultModel::partialCharges(const Core::Molecule& mol) const
28 {
29 return mol.partialCharges(m_identifier);
30 }
31
32 } // namespace Avogadro::Calc