BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
residueTorsions.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 // Molecular Mechanics Parameter: class describing the ResidueTorsions section of a parameter file
6 
7 #ifndef BALL_MOLMEC_PARAMETER_RESIDUETORSIONS_H
8 #define BALL_MOLMEC_PARAMETER_RESIDUETORSIONS_H
9 
10 #ifndef BALL_FORMAT_PARAMETERSECTION_H
12 #endif
13 
14 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H
16 #endif
17 
18 namespace BALL
19 {
33  : public ParameterSection
34  {
35  public:
36 
40 
44  {
50 
51  Data(const String& name, const String& A, const String& B, const String& C, const String& D)
52  : residue_name(name),
53  atom_name_A(A),
54  atom_name_B(B),
55  atom_name_C(C),
56  atom_name_D(D)
57  {
58  }
59 
60  Data()
61  : residue_name(""),
62  atom_name_A(""),
63  atom_name_B(""),
64  atom_name_C(""),
65  atom_name_D("")
66  {
67  }
68 
69  bool operator == (const Data& data) const;
70  bool operator != (const Data& data) const;
71  };
72 
74 
77 
81 
84  virtual ~ResidueTorsions() ;
85 
88  virtual void clear() ;
89 
91 
94 
100  virtual bool extractSection(ForceFieldParameters& parameters, const String& section_name);
101 
103  virtual bool extractSection(Parameters& parameters, const String& section_name);
104 
107  Size getNumberOfResidueTorsions(const String& residue_name) const;
108 
115  bool assignTorsion(const String& name, Position i, Data& torsion) const;
116 
119  bool hasTorsion
120  (const String& residue, const String& atom_A, const String& atom_B,
121  const String& atom_C, const String& atom_D) const;
122 
124 
125  protected:
126 
127  /*_ Contains arrays of ResidueTorsions.
128  All torsions for a given residue name are collected in
129  a vector and accessed via the residue name through a StringHashMap.
130  */
132 
133  /*_ Hash set of all torsion identifiers.
134  This hash set contains all entries in the form of strings.
135  It is used by \Ref{hasTorsion}.
136  */
138  };
139 } // namespace BALL
140 
141 #endif // BALL_MOLMEC_PARAMETER_RESIDUETORSIONS_H
Data(const String &name, const String &A, const String &B, const String &C, const String &D)
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
BALL_EXPORT bool operator==(const String &s1, const String &s2)
StringHashMap< vector< Data > > torsions_
HashSet< String > all_torsions_
#define BALL_EXPORT
Definition: COMMON/global.h:50