00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef IMP_PAIR_SCORE_H
00011 #define IMP_PAIR_SCORE_H
00012
00013 #include "kernel_config.h"
00014 #include "base_types.h"
00015 #include "Particle.h"
00016 #include "DerivativeAccumulator.h"
00017 #include "internal/container_helpers.h"
00018
00019 IMP_BEGIN_NAMESPACE
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 class IMPEXPORT PairScore : public Object
00030 {
00031 public:
00032 PairScore(std::string name="PairScore %1%");
00033
00034 virtual double evaluate(const ParticlePair& vt,
00035 DerivativeAccumulator *da) const = 0;
00036
00037 #if !defined(IMP_DOXYGEN) && 2 != 1
00038
00039 virtual double evaluate(Particle *a, Particle *b,
00040 DerivativeAccumulator *da) const {
00041 return evaluate(ParticlePair(a,b), da);
00042 }
00043 #endif
00044
00045
00046
00047
00048
00049 virtual double evaluate(const ParticlePairsTemp &o,
00050 DerivativeAccumulator *da) const = 0;
00051
00052
00053
00054
00055
00056
00057
00058 virtual double evaluate_change(const ParticlePair& vt,
00059 DerivativeAccumulator *da) const = 0;
00060
00061 virtual double evaluate_change(const ParticlePairsTemp &o,
00062 DerivativeAccumulator *da) const = 0;
00063 virtual double evaluate_prechange(const ParticlePair& vt,
00064 DerivativeAccumulator *da) const = 0;
00065 virtual double evaluate_prechange(const ParticlePairsTemp &o,
00066 DerivativeAccumulator *da) const = 0;
00067
00068 virtual bool get_is_changed(const ParticlePair& vt) const =0;
00069
00070
00071
00072
00073 virtual ParticlesList
00074 get_interacting_particles(const ParticlePair& vt) const =0;
00075
00076
00077 virtual ParticlesTemp
00078 get_input_particles(const ParticlePair& vt) const =0;
00079
00080
00081
00082 virtual ContainersTemp
00083 get_input_containers(const ParticlePair& vt) const =0;
00084
00085 IMP_REF_COUNTED_DESTRUCTOR(PairScore);
00086 };
00087
00088 IMP_OBJECTS(PairScore);
00089
00090
00091
00092
00093 IMP_END_NAMESPACE
00094
00095 #endif