Debian Codegraph @

include/BALL/MOLMEC/PARAMETER/quadraticBondStretch.h

raw symbols SCIP
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4
5 #ifndef BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H
6 #define BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H
7
8 #ifndef BALL_FORMAT_PARAMETERSECTION_H
9 # include <BALL/FORMAT/parameterSection.h>
10 #endif
11
12 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H
13 # include <BALL/MOLMEC/PARAMETER/atomTypes.h>
14 #endif
15
16 namespace BALL
17 {
18 /** QuadraticBondStretch.
19
20 Molecular Mechanics Parameter: class describing the parameters
21 required for a harmonic stretch potential.
22
23 \ingroup MolmecParameters
24 */
25 class BALL_EXPORT QuadraticBondStretch
26 : public ParameterSection
27 {
28 public:
29
30 enum
31 {
32 UNKNOWN
33 };
34
35 struct BALL_EXPORT Values
36 {
37 float r0;
38 float k;
39 };
40
41 struct BALL_EXPORT Data
42 {
43 Atom* atom1;
44 Atom* atom2;
45 Values values;
46 };
47
48
49 /** Default constructor.
50 */
51 QuadraticBondStretch();
52
53 /** Destructor.
54 */
55 virtual ~QuadraticBondStretch() ;
56
57 /** Clear method
58 */
59 virtual void clear() ;
60
61 /** Reads a parameter section from an INI file.
62 This method reads the section given in section_name from ini_file,
63 interprets (if given) a format line, reads the data from this section according to
64 the format, and builds some datastructures for fast and easy acces this data.
65 */
66 virtual bool extractSection(ForceFieldParameters& parameters, const String& section_name);
67
68 ///
69 virtual bool extractSection(Parameters& parameters, const String& section_name);
70
71 /** Queries whether a parameter set is defined for the given atom types.
72 */
73 bool hasParameters(Atom::Type I, Atom::Type J) const;
74
75 /** Returns the parameters for a given atom type combination.
76 */
77 QuadraticBondStretch::Values getParameters
78 (Atom::Type I, Atom::Type J) const;
79
80 /** Assign the parameters for a given atom type combination.
81 If no parameters are defined for this combination, false is
82 returned and nothing is changed.
83 */
84 bool assignParameters
85 (QuadraticBondStretch::Values& parameters,
86 Atom::Type I, Atom::Type J) const;
87
88 protected:
89
90 Size number_of_atom_types_;
91
92 float* k_;
93
94 float* r0_;
95
96 bool* is_defined_;
97
98 String* names_;
99 };
100 } // namespace BALL
101
102 #endif // BALL_MOLMEC_PARAMETER_QUADRATICBONDSTRETCH_H