00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_KERNEL_PDBATOM_H
00008 #define BALL_KERNEL_PDBATOM_H
00009
00010 #ifndef BALL_KERNEL_ATOM_H
00011 # include <BALL/KERNEL/atom.h>
00012 #endif
00013
00014
00015 #define BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR ' '
00016 #define BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR ' '
00017 #define BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR ' '
00018 #define BALL_PDBATOM_DEFAULT_OCCUPANCY 1.0
00019 #define BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR 0.0
00020
00021
00022 namespace BALL
00023 {
00024 class Chain;
00025 class Protein;
00026 class Residue;
00027
00040 class BALL_EXPORT PDBAtom
00041 : public Atom
00042 {
00043 public:
00044
00045 friend class Bond;
00046
00047 BALL_CREATE_DEEP(PDBAtom)
00048
00049
00052
00055 enum RemotenessIndicator
00056 {
00057 REMOTENESS_INDICATOR__UNKNOWN = BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR,
00058 REMOTENESS_INDICATOR__ALPHA = 'A',
00059 REMOTENESS_INDICATOR__alpha = 'a',
00060 REMOTENESS_INDICATOR__BETA = 'B',
00061 REMOTENESS_INDICATOR__beta = 'b',
00062 REMOTENESS_INDICATOR__GAMMA = 'G',
00063 REMOTENESS_INDICATOR__gamma = 'g',
00064 REMOTENESS_INDICATOR__DELTA = 'D',
00065 REMOTENESS_INDICATOR__delta = 'd',
00066 REMOTENESS_INDICATOR__EPSILON = 'E',
00067 REMOTENESS_INDICATOR__epsilon = 'e',
00068 REMOTENESS_INDICATOR__ZETA = 'Z',
00069 REMOTENESS_INDICATOR__zeta = 'z',
00070 REMOTENESS_INDICATOR__ETA = 'H',
00071 REMOTENESS_INDICATOR__eta = 'h',
00072
00073 NUMBER_OF_REMOTENESS_INDICATORS
00074 };
00075
00078 enum Property
00079 {
00080 NUMBER_OF_PROPERTIES = Atom::NUMBER_OF_PROPERTIES
00081 };
00083
00087
00089 PDBAtom();
00090
00092 PDBAtom(const PDBAtom& pdb_atom, bool deep = true);
00093
00095 PDBAtom(const String& name);
00096
00098 PDBAtom
00099 (Element& element,
00100 const String& name,
00101 const String& type_name = BALL_ATOM_DEFAULT_TYPE_NAME,
00102 Atom::Type atom_type = BALL_ATOM_DEFAULT_TYPE,
00103 const Vector3& position = Vector3(BALL_ATOM_DEFAULT_POSITION),
00104 const Vector3& velocity = Vector3(BALL_ATOM_DEFAULT_VELOCITY),
00105 const Vector3& force = Vector3(BALL_ATOM_DEFAULT_FORCE),
00106 float charge = BALL_ATOM_DEFAULT_CHARGE,
00107 float radius = BALL_ATOM_DEFAULT_RADIUS,
00108 char branch_designator =BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR,
00109 char remoteness_indicator =BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR,
00110 char alternate_location_indicator = BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR,
00111 float occupancy = BALL_PDBATOM_DEFAULT_OCCUPANCY,
00112 float temperature_factor = BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR);
00113
00115 virtual ~PDBAtom();
00116
00119 virtual void destroy();
00120
00122
00125
00129 bool operator == (const PDBAtom& pdb_atom) const;
00130
00134 bool operator != (const PDBAtom& pdb_atom) const;
00135
00137
00140
00145 void persistentWrite(PersistenceManager& pm, const char* name = 0) const
00146 throw(Exception::GeneralException);
00147
00151 void persistentRead(PersistenceManager& pm)
00152 throw(Exception::GeneralException);
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