00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef BTK_ATOM_INDEX_TETRAD_H
00025 #define BTK_ATOM_INDEX_TETRAD_H
00026
00027
00028 #include "atom_types.h"
00029
00030 #include <utility>
00031
00032 namespace BTK{
00033
00034 struct AtomIndexTetrad {
00035 typedef std::pair<int,ATOM::index_t> monomer_atom_idx_t;
00036
00037
00038 AtomIndexTetrad() {}
00039
00040 AtomIndexTetrad(monomer_atom_idx_t atom_index3,
00041 monomer_atom_idx_t atom_index2,
00042 monomer_atom_idx_t atom_index1,
00043 double len34,
00044 double ang234,
00045 double dih1234,
00046 bool is_real_torsion)
00047 : _atom_index3(atom_index3),
00048 _atom_index2(atom_index2),
00049 _atom_index1(atom_index1),
00050 _len34(len34),
00051 _ang234(ang234),
00052 _dih1234(dih1234),
00053 _is_real_torsion(is_real_torsion) {}
00054
00055 bool
00056 operator<(const AtomIndexTetrad& right) const
00057 {
00058 if ( _atom_index3 != right._atom_index3 ) {
00059 return _atom_index3 < right._atom_index3;
00060 } else if ( _atom_index2 != right._atom_index2 ) {
00061 return _atom_index2 < right._atom_index2;
00062 } else {
00063 return _atom_index1 < right._atom_index1;
00064 }
00065 }
00066
00067 bool
00068 operator==(const AtomIndexTetrad& right) const
00069 {
00070 return
00071 ( _atom_index3 == right._atom_index3 ) &&
00072 ( _atom_index2 == right._atom_index2 ) &&
00073 ( _atom_index1 == right._atom_index1 );
00074 }
00075
00076 monomer_atom_idx_t atom_index3() const { return _atom_index3; }
00077 monomer_atom_idx_t atom_index2() const { return _atom_index2; }
00078 monomer_atom_idx_t atom_index1() const { return _atom_index1; }
00079
00080 double len34() const { return _len34; }
00081 double ang234() const { return _ang234; }
00082 double dih1234() const { return _dih1234; }
00083
00084 bool is_real_torsion() const { return _is_real_torsion; }
00085
00086 private:
00087 monomer_atom_idx_t _atom_index3;
00088 monomer_atom_idx_t _atom_index2;
00089 monomer_atom_idx_t _atom_index1;
00090 double _len34;
00091 double _ang234;
00092 double _dih1234;
00093 bool _is_real_torsion;
00094 };
00095
00096 }
00097
00098 #endif