| 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 |
#ifndef AVOGADRO_CORE_SECONDARYSTRUCTURE_H |
| 7 |
#define AVOGADRO_CORE_SECONDARYSTRUCTURE_H |
| 8 |
|
| 9 |
#include "avogadrocoreexport.h" |
| 10 |
|
| 11 |
#include "avogadrocore.h" |
| 12 |
|
| 13 |
#include <vector> |
| 14 |
|
| 15 |
namespace Avogadro::Core { |
| 16 |
|
| 17 |
class Molecule; |
| 18 |
|
| 19 |
//! \internal |
| 20 |
struct hBondRecord |
| 21 |
{ |
| 22 |
//! The atom index we're examining |
| 23 |
Index atom; |
| 24 |
//! The z-coordinate of the atom |
| 25 |
float atomZ; |
| 26 |
//! The residue containing the atom |
| 27 |
Index residue; |
| 28 |
//! The residue we're paired through an hbond |
| 29 |
Index residuePair; |
| 30 |
//! The length (squared) of the hydrogen bond |
| 31 |
float distSquared; |
| 32 |
}; |
| 33 |
|
| 34 |
class AVOGADROCORE_EXPORT SecondaryStructureAssigner |
| 35 |
{ |
| 36 |
public: |
| 37 |
// construction and destruction |
| 38 |
explicit SecondaryStructureAssigner(Molecule* m = nullptr); |
| 39 |
~SecondaryStructureAssigner(); |
| 40 |
|
| 41 |
void assign(Molecule* mol); |
| 42 |
|
| 43 |
private: |
| 44 |
void assignBackboneHydrogenBonds(); |
| 45 |
|
| 46 |
Molecule* m_molecule; |
| 47 |
std::vector<hBondRecord*> m_hBonds; |
| 48 |
}; |
| 49 |
|
| 50 |
} // namespace Avogadro::Core |
| 51 |
|
| 52 |
#endif // AVOGADRO_CORE_ANGLEITERATOR_H |