IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
MinimumSphereDistancePairScore.h
Go to the documentation of this file.
1 /**
2  * \file IMP/npc/MinimumSphereDistancePairScore.h
3  * \brief Apply a UnaryFunction to the minimum transformed distance
4  *
5  * Copyright 2007-2020 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPNPC_MINIMUM_SPHERE_DISTANCE_PAIR_SCORE_H
9 #define IMPNPC_MINIMUM_SPHERE_DISTANCE_PAIR_SCORE_H
10 
11 #include <IMP/npc/npc_config.h>
12 #include <IMP/PairScore.h>
13 #include <IMP/UnaryFunction.h>
14 #include <IMP/pair_macros.h>
16 
17 IMPNPC_BEGIN_NAMESPACE
18 
19 //! Apply a UnaryFunction to the minimum transformed sphere-sphere distance
20 /** This is like a SphereDistancePairScore in that it calculates the
21  inter-surface distance between two XYZR Particles (spheres) and then
22  scores it with a provided UnaryFunction. However, it also considers
23  the distance between the two particles with the second particle
24  transformed by each of the provided transformations. The transformation
25  which results in the minimum interparticle distance (not necessarily the
26  minimum score) is then used for scoring. This can be used for periodic
27  boundaries or other symmetric systems.
28  */
29 class IMPNPCEXPORT MinimumSphereDistancePairScore : public PairScore {
31  algebra::Transformation3Ds transforms_;
32 
33  public:
35  algebra::Transformation3Ds transforms)
36  : f_(f), transforms_(transforms) {}
37 
38  virtual double evaluate_index(Model *m, const ParticleIndexPair &pi,
41  Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE {
42  return IMP::get_particles(m, pis);
43  }
46 };
47 
48 IMPNPC_END_NAMESPACE
49 
50 #endif /* IMPNPC_MINIMUM_SPHERE_DISTANCE_PAIR_SCORE_H */
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const
Overload this method to specify the inputs.
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:37
Apply a UnaryFunction to the minimum transformed sphere-sphere distance.
Macros for various classes.
#define IMP_PAIR_SCORE_METHODS(Name)
Definition: pair_macros.h:25
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Single variable function.
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Define PairScore.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
Simple 3D transformation class.
Abstract single variable functor class for score functions.
Definition: UnaryFunction.h:25
virtual double evaluate_index(Model *m, const ParticleIndexPair &vt, DerivativeAccumulator *da) const =0
Compute the score and the derivative if needed.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.