-
-
Notifications
You must be signed in to change notification settings - Fork 165
/
noncovalent.h
66 lines (50 loc) · 1.89 KB
/
noncovalent.h
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
65
66
/******************************************************************************
This source file is part of the Avogadro project.
This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/
#ifndef AVOGADRO_QTPLUGINS_NONCOVALENT_H
#define AVOGADRO_QTPLUGINS_NONCOVALENT_H
#include <avogadro/core/vector.h>
#include <avogadro/qtgui/sceneplugin.h>
namespace Avogadro {
namespace QtPlugins {
/**
* @brief Predict some non-covalent interactions, like hydrogen bonds.
* @author Aritz Erkiaga
*/
class NonCovalent : public QtGui::ScenePlugin
{
Q_OBJECT
public:
explicit NonCovalent(QObject* parent = nullptr);
~NonCovalent() override;
void process(const QtGui::Molecule& molecule,
Rendering::GroupNode& node) override;
QString name() const override { return tr("Non-Covalent"); }
QString description() const override
{
return tr("Render a few non-covalent interactions.");
}
QWidget* setupWidget() override;
bool hasSetupWidget() const override { return true; }
DefaultBehavior defaultBehavior() const override
{
return DefaultBehavior::False;
}
public slots:
void setAngleTolerance(float angleTolerance, Index index);
void setMaximumDistance(float maximumDistance, Index index);
void setLineWidth(float width, Index index);
private:
const std::string m_name = "Non-Covalent";
const std::array<QString, 3> INTERACTION_NAMES = { tr("Hydrogen"),
tr("Halogen"),
tr("Chalcogen") };
std::array<double, 3> m_angleTolerancesDegrees;
std::array<double, 3> m_maximumDistances;
std::array<Vector3ub, 3> m_lineColors;
std::array<float, 3> m_lineWidths;
};
} // end namespace QtPlugins
} // end namespace Avogadro
#endif // AVOGADRO_QTPLUGINS_NONCOVALENT_H