BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PDBAtom.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_KERNEL_PDBATOM_H
6 #define BALL_KERNEL_PDBATOM_H
7 
8 #ifndef BALL_KERNEL_ATOM_H
9 # include <BALL/KERNEL/atom.h>
10 #endif
11 
12 
13 #define BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR ' '
14 #define BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR ' '
15 #define BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR ' '
16 #define BALL_PDBATOM_DEFAULT_OCCUPANCY 1.0
17 #define BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR 0.0
18 
19 
20 namespace BALL
21 {
22  class Chain;
23  class Protein;
24  class Residue;
25 
39  : public Atom
40  {
41  public:
42 
43  friend class Bond;
44 
46 
47 
50 
54  {
55  REMOTENESS_INDICATOR__UNKNOWN = BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR,
56  REMOTENESS_INDICATOR__ALPHA = 'A',
57  REMOTENESS_INDICATOR__alpha = 'a',
58  REMOTENESS_INDICATOR__BETA = 'B',
59  REMOTENESS_INDICATOR__beta = 'b',
60  REMOTENESS_INDICATOR__GAMMA = 'G',
61  REMOTENESS_INDICATOR__gamma = 'g',
62  REMOTENESS_INDICATOR__DELTA = 'D',
63  REMOTENESS_INDICATOR__delta = 'd',
64  REMOTENESS_INDICATOR__EPSILON = 'E',
65  REMOTENESS_INDICATOR__epsilon = 'e',
66  REMOTENESS_INDICATOR__ZETA = 'Z',
67  REMOTENESS_INDICATOR__zeta = 'z',
68  REMOTENESS_INDICATOR__ETA = 'H',
69  REMOTENESS_INDICATOR__eta = 'h',
70 
71  NUMBER_OF_REMOTENESS_INDICATORS
72  };
73 
76  enum Property
77  {
79  PROPERTY__HETATM = Atom::NUMBER_OF_PROPERTIES + 1,
80 
82  NUMBER_OF_PROPERTIES
83  };
85 
89 
91  PDBAtom();
92 
94  PDBAtom(const PDBAtom& pdb_atom, bool deep = true);
95 
97  PDBAtom(const String& name);
98 
100  PDBAtom
101  (Element& element,
102  const String& name,
103  const String& type_name = BALL_ATOM_DEFAULT_TYPE_NAME,
105  const Vector3& position = Vector3(BALL_ATOM_DEFAULT_POSITION),
106  const Vector3& velocity = Vector3(BALL_ATOM_DEFAULT_VELOCITY),
107  const Vector3& force = Vector3(BALL_ATOM_DEFAULT_FORCE),
108  float charge = BALL_ATOM_DEFAULT_CHARGE,
109  float radius = BALL_ATOM_DEFAULT_RADIUS,
110  char branch_designator =BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR,
111  char remoteness_indicator =BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR,
112  char alternate_location_indicator = BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR,
113  float occupancy = BALL_PDBATOM_DEFAULT_OCCUPANCY,
114  float temperature_factor = BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR);
115 
117  virtual ~PDBAtom();
118 
121  virtual void destroy();
122 
124 
127 
131  bool operator == (const PDBAtom& pdb_atom) const;
132 
136  bool operator != (const PDBAtom& pdb_atom) const;
137 
139 
142 
147  void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
148 
152  void persistentRead(PersistenceManager& pm);
153 
155 
158 
164  void set(const PDBAtom& pdb_atom, bool deep = true);
165 
170  void get(PDBAtom& pdb_atom, bool deep = true) const;
171 
177  PDBAtom& operator = (const PDBAtom& pdb_atom);
178 
182  void swap(PDBAtom& pdb_atom);
183 
186  virtual void clear();
187 
189 
192 
197  Protein* getProtein();
198 
203  const Protein* getProtein() const;
204 
209  Chain* getChain();
210 
215  const Chain* getChain() const;
216 
221  Residue* getResidue();
222 
227  const Residue* getResidue() const;
228 
232  void setBranchDesignator(char branch_designator);
233 
237  char getBranchDesignator() const;
238 
242  void setRemotenessIndicator(char remoteness_indicator);
243 
247  char getRemotenessIndicator() const;
248 
252  void setAlternateLocationIndicator(char alternate_location_indicator);
253 
257  char getAlternateLocationIndicator() const;
258 
262  void setOccupancy(float occupancy);
263 
267  float getOccupancy() const;
268 
272  void setTemperatureFactor(float temperature_factor);
273 
277  float getTemperatureFactor() const;
278 
280 
283 
290  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
291 
293 
294  private:
295 
296  void clear_();
297 
298  /*_ The PDB branch designator
299  */
300  char branch_designator_;
301 
302  /*_ The PDB remoteness indicator
303  */
304  char remoteness_indicator_;
305 
306  /*_ The PDB alternate location indicator
307  */
308  char alternate_location_indicator_;
309 
310  /*_ The PDB occupancy
311  */
312  float occupancy_;
313 
314  /*_ The PDB temperature factor
315  */
316  float temperature_factor_;
317 
318  };
319 } // namespace BALL
320 
321 #endif // BALL_KERNEL_PDBATOM_H
#define BALL_ATOM_DEFAULT_TYPE_NAME
Definition: atom.h:29
#define BALL_ATOM_DEFAULT_FORCE
Definition: atom.h:34
#define BALL_ATOM_DEFAULT_CHARGE
Definition: atom.h:26
short Type
Definition: atom.h:103
Property
Definition: atom.h:130
#define BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR
Definition: PDBAtom.h:17
RemotenessIndicator
Definition: PDBAtom.h:53
#define BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR
Definition: PDBAtom.h:15
#define BALL_ATOM_DEFAULT_RADIUS
Definition: atom.h:31
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
#define BALL_CREATE_DEEP(name)
Definition: create.h:26
TVector3< float > Vector3
Definition: vector3.h:1084
#define BALL_ATOM_DEFAULT_VELOCITY
Definition: atom.h:33
BALL_EXPORT bool operator==(const String &s1, const String &s2)
#define BALL_PDBATOM_DEFAULT_OCCUPANCY
Definition: PDBAtom.h:16
#define BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR
Definition: PDBAtom.h:13
#define BALL_ATOM_DEFAULT_POSITION
Definition: atom.h:30
#define BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR
Definition: PDBAtom.h:14
#define BALL_EXPORT
Definition: COMMON/global.h:50
#define BALL_ATOM_DEFAULT_TYPE
Definition: atom.h:32