00001
00002
00003
00004
00005 #ifndef BALL_KERNEL_PDBATOM_H
00006 #define BALL_KERNEL_PDBATOM_H
00007
00008 #ifndef BALL_KERNEL_ATOM_H
00009 # include <BALL/KERNEL/atom.h>
00010 #endif
00011
00012
00013 #define BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR ' '
00014 #define BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR ' '
00015 #define BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR ' '
00016 #define BALL_PDBATOM_DEFAULT_OCCUPANCY 1.0
00017 #define BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR 0.0
00018
00019
00020 namespace BALL
00021 {
00022 class Chain;
00023 class Protein;
00024 class Residue;
00025
00038 class BALL_EXPORT PDBAtom
00039 : public Atom
00040 {
00041 public:
00042
00043 friend class Bond;
00044
00045 BALL_CREATE_DEEP(PDBAtom)
00046
00047
00050
00053 enum RemotenessIndicator
00054 {
00055 REMOTENESS_INDICATOR__UNKNOWN = BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR,
00056 REMOTENESS_INDICATOR__ALPHA = 'A',
00057 REMOTENESS_INDICATOR__alpha = 'a',
00058 REMOTENESS_INDICATOR__BETA = 'B',
00059 REMOTENESS_INDICATOR__beta = 'b',
00060 REMOTENESS_INDICATOR__GAMMA = 'G',
00061 REMOTENESS_INDICATOR__gamma = 'g',
00062 REMOTENESS_INDICATOR__DELTA = 'D',
00063 REMOTENESS_INDICATOR__delta = 'd',
00064 REMOTENESS_INDICATOR__EPSILON = 'E',
00065 REMOTENESS_INDICATOR__epsilon = 'e',
00066 REMOTENESS_INDICATOR__ZETA = 'Z',
00067 REMOTENESS_INDICATOR__zeta = 'z',
00068 REMOTENESS_INDICATOR__ETA = 'H',
00069 REMOTENESS_INDICATOR__eta = 'h',
00070
00071 NUMBER_OF_REMOTENESS_INDICATORS
00072 };
00073
00076 enum Property
00077 {
00079 PROPERTY__HETATM = Atom::NUMBER_OF_PROPERTIES + 1,
00080
00082 NUMBER_OF_PROPERTIES
00083 };
00085
00089
00091 PDBAtom();
00092
00094 PDBAtom(const PDBAtom& pdb_atom, bool deep = true);
00095
00097 PDBAtom(const String& name);
00098
00100 PDBAtom
00101 (Element& element,
00102 const String& name,
00103 const String& type_name = BALL_ATOM_DEFAULT_TYPE_NAME,
00104 Atom::Type atom_type = BALL_ATOM_DEFAULT_TYPE,
00105 const Vector3& position = Vector3(BALL_ATOM_DEFAULT_POSITION),
00106 const Vector3& velocity = Vector3(BALL_ATOM_DEFAULT_VELOCITY),
00107 const Vector3& force = Vector3(BALL_ATOM_DEFAULT_FORCE),
00108 float charge = BALL_ATOM_DEFAULT_CHARGE,
00109 float radius = BALL_ATOM_DEFAULT_RADIUS,
00110 char branch_designator =BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR,
00111 char remoteness_indicator =BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR,
00112 char alternate_location_indicator = BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR,
00113 float occupancy = BALL_PDBATOM_DEFAULT_OCCUPANCY,
00114 float temperature_factor = BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR);
00115
00117 virtual ~PDBAtom();
00118
00121 virtual void destroy();
00122
00124
00127
00131 bool operator == (const PDBAtom& pdb_atom) const;
00132
00136 bool operator != (const PDBAtom& pdb_atom) const;
00137
00139
00142
00147 void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
00148
00152 void persistentRead(PersistenceManager& pm);
00153
00155
00158
00164 void set(const PDBAtom& pdb_atom, bool deep = true);
00165
00170 void get(PDBAtom& pdb_atom, bool deep = true) const;
00171
00177 PDBAtom& operator = (const PDBAtom& pdb_atom);
00178
00182 void swap(PDBAtom& pdb_atom);
00183
00186 virtual void clear();
00187
00189
00192
00197 Protein* getProtein();
00198
00203 const Protein* getProtein() const;
00204
00209 Chain* getChain();
00210
00215 const Chain* getChain() const;
00216
00221 Residue* getResidue();
00222
00227 const Residue* getResidue() const;
00228
00232 void setBranchDesignator(char branch_designator);
00233
00237 char getBranchDesignator() const;
00238
00242 void setRemotenessIndicator(char remoteness_indicator);
00243
00247 char getRemotenessIndicator() const;
00248
00252 void setAlternateLocationIndicator(char alternate_location_indicator);
00253
00257 char getAlternateLocationIndicator() const;
00258
00262 void setOccupancy(float occupancy);
00263
00267 float getOccupancy() const;
00268
00272 void setTemperatureFactor(float temperature_factor);
00273
00277 float getTemperatureFactor() const;
00278
00280
00283
00290 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
00291
00293
00294 private:
00295
00296 void clear_();
00297
00298
00299
00300 char branch_designator_;
00301
00302
00303
00304 char remoteness_indicator_;
00305
00306
00307
00308 char alternate_location_indicator_;
00309
00310
00311
00312 float occupancy_;
00313
00314
00315
00316 float temperature_factor_;
00317
00318 };
00319 }
00320
00321 #endif // BALL_KERNEL_PDBATOM_H