00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00024
00025 #ifndef BTK_ATOM_PREDICATES_H
00026 #define BTK_ATOM_PREDICATES_H
00027
00028
00029 namespace BTK {
00030
00031
00032 struct is_any {
00033 template <typename AtomType>
00034 bool operator()(AtomType& a){
00035 return true;
00036 }
00037 };
00038
00039 struct is_calpha {
00040 template <typename AtomType>
00041 bool operator()(AtomType& a){
00042 return (a.atom_index() == ATOM::CA);
00043 }
00044 };
00045
00046 struct is_protein_bb {
00047 template <typename AtomType>
00048 bool operator()(AtomType& a){
00049 return (a.atom_index() == ATOM::CA ||
00050 a.atom_index() == ATOM::C ||
00051 a.atom_index() == ATOM::N );
00052 }
00053 };
00054
00055 struct is_group_num_gt {
00056 is_group_num_gt(int n) : _n(n) {}
00057
00058 template <typename AtomType>
00059 bool operator()(AtomType& a){
00060 return a.group_num() > _n;
00061 }
00062
00063 int _n;
00064 };
00065
00066 struct is_group_num_lt {
00067 is_group_num_lt(int n) : _n(n) {}
00068
00069 template <typename AtomType>
00070 bool operator()(AtomType& a){
00071 return a.group_num() < _n;
00072 }
00073
00074 int _n;
00075 };
00076
00077 struct is_selected {
00078 template <typename AtomType>
00079 bool operator()(AtomType& a){
00080 return a.is_selected();
00081 }
00082 };
00083
00084 }
00085
00086 #endif
00087
00088