Debian Codegraph @

include/BALL/MOLMEC/PARAMETER/atomTypes.h

raw symbols SCIP
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4
5 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H
6 #define BALL_MOLMEC_PARAMETER_ATOMTYPES_H
7
8 #ifndef BALL_FORMAT_PARAMETERSECTION_H
9 # include <BALL/FORMAT/parameterSection.h>
10 #endif
11
12 #ifndef BALL_KERNEL_ATOM_H
13 # include <BALL/KERNEL/atom.h>
14 #endif
15
16 #define BALL_ATOM_WILDCARD_NAME "*"
17 #define BALL_ATOM_UNKNOWN_NAME "?"
18
19 namespace BALL
20 {
21 class ForceFieldParameters;
22
23 /** Force Field Atom Type Class.
24
25 Molecular Mechanics Parameter: class describing the atom type section of a parameter file.
26 \ingroup MolmecParameters
27 */
28 class BALL_EXPORT AtomTypes
29 : public ParameterSection
30 {
31 public:
32
33 /** @name Constructors and Destructors
34 */
35 //@{
36
37 /** Default constructor.
38 */
39 AtomTypes() ;
40
41 /** Copy constructor.
42 */
43 AtomTypes(const AtomTypes& atom_types) ;
44
45 /** Destructor.
46 */
47 virtual ~AtomTypes() ;
48
49 //@}
50 /** Parameter extraction
51 */
52 //@{
53
54 /** Reads a parameter section from an INI file.
55 This method reads the section given in section_name from ini_file,
56 interprets (if given) a format line, reads the data from this section according to
57 the format, and builds some datastructures for fast and easy acces this data.
58 */
59 virtual bool extractSection(Parameters& parameters,
60 const String& section_name = "AtomTypes") ;
61
62 /** Returns the numeric type for a given string.
63 */
64 Atom::Type getType(const String& name) const ;
65
66 /** Queries whether a given atom type is defined
67 */
68 bool hasType(const String& name) const ;
69
70 /** Returns the name for a given index
71 */
72 String getTypeName(Atom::Type type) const ;
73
74 /**
75 */
76 Size getNumberOfTypes() const ;
77
78 //@}
79 /** @name Assignment
80 */
81 //@{
82
83 /** Clear method
84 */
85 virtual void clear() ;
86
87 /** Assignment operator.
88 @param atom_types the atom types object to be copied
89 */
90 AtomTypes& operator = (const AtomTypes& atom_types) ;
91
92 //@}
93 /** @name Predicates
94 */
95 //@{
96
97 /** Equality operator
98 */
99 bool operator == (const AtomTypes& atom_types) const ;
100
101 //@}
102
103 protected:
104
105 /*_ Contains the numeric types for each atom type string.
106 */
107 StringHashMap<Atom::Type> type_map_;
108
109 /*_ Contains the symbolic names of the atom types.
110 */
111 vector<String> names_;
112 };
113 } // namespace BALL
114
115 #endif // BALL_MOLMEC_PARAMETER_ATOMTYPES_H