Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef IMPATOM_BONDED_PAIR_FILTER_H
00009 #define IMPATOM_BONDED_PAIR_FILTER_H
00010
00011 #include "atom_config.h"
00012 #include "bond_decorators.h"
00013 #include <IMP/PairFilter.h>
00014
00015 IMPATOM_BEGIN_NAMESPACE
00016
00017
00018
00019
00020
00021
00022
00023 class IMPATOMEXPORT BondedPairFilter : public PairFilter
00024 {
00025 public:
00026
00027 BondedPairFilter();
00028
00029 IMP_PAIR_FILTER(BondedPairFilter);
00030 };
00031
00032 inline bool BondedPairFilter
00033 ::get_contains_particle_pair(const ParticlePair& pp) const {
00034 if (!Bonded::particle_is_instance(pp[0])
00035 || ! Bonded::particle_is_instance(pp[1])) {
00036 return false;
00037 }
00038 Bonded ba(pp[0]);
00039 Bonded bb(pp[1]);
00040 Bond bd=get_bond(ba, bb);
00041 return bd != Bond();
00042 }
00043
00044 IMP_OBJECTS(BondedPairFilter,BondedPairFilters);
00045
00046 IMPATOM_END_NAMESPACE
00047
00048 #endif