ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/FAS/src/fasbond.h
Revision: 66
Committed: Tue Aug 13 16:02:26 2002 UTC (21 years, 10 months ago) by tim
Content type: text/plain
File size: 1591 byte(s)
Log Message:
flexible atom selection

File Contents

# Content
1 #ifndef FASBOND_H
2 #define FASBOND_H
3
4 #include <iostream>
5 #include <vector>
6
7 #define FAS_UNKNOWN_BOND (1<<1)
8 #define FAS_HYDROGEN_BOND (1<<2)
9 #define FAS_AROMATIC_BOND (1<<3)
10 #define FAS_RING_BOND (1<<4)
11
12 using namespace std;
13
14 namespace TBondType
15 {
16 const int btUnknow = FAS_UNKNOWN_BOND;
17 const int btHydrogen = FAS_HYDROGEN_BOND;
18 const int btAromatic = FAS_AROMATIC_BOND;
19 const int btRing = FAS_RING_BOND;
20 };
21
22 class TFASAtom;
23 class TFASModel;
24
25 class TFASBond
26 {
27 protected:
28 unsigned int _index;
29 unsigned int _bondOrder;
30 int _bondType;
31 TFASAtom *_begin;
32 TFASAtom *_end;
33 TFASModel *model;
34
35 public:
36 TFASBond();
37 ~TFASBond();
38
39 void SetIndex(unsigned int index) { _index = index;}
40 void SetBondOrder(unsigned int bondOrder) { _bondOrder = bondOrder;}
41 void SetBegin(TFASAtom *begin) { _begin = begin;}
42 void SetEnd(TFASAtom *end) { _end = end;}
43 void SetBondType(int bondType) { _bondType |= bondType;}
44 bool HasBondType(int bondType) {return _bondType & bondType;}
45
46 unsigned int GetIndex() { return _index;}
47 unsigned int GetBondOrder() { return _bondOrder;}
48 TFASAtom *GetBegin() { return _begin;}
49 TFASAtom *GetEnd() { return _end;}
50 TFASAtom *GetNbrAtom(const TFASAtom * atom);
51
52 //methods of bond type
53 bool IsHydrogenBond();
54 bool IsExteriorBond();
55 bool IsSingle();
56 bool IsDouble();
57 bool IsTriple();
58 bool IsRotor();
59 bool IsAmide();
60 bool IsPrimaryAmide();
61 bool IsSecondaryAmide();
62 bool IsEster();
63 bool IsCarbonyl();
64 bool IsAromatic();
65
66 //method of bond length
67 float GetBondLength(int frameNum=-1);
68
69
70
71 };
72
73 #endif