IMP  2.4.0
The Integrative Modeling Platform
CoulombPairScore.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/CoulombPairScore.h
3  * \brief Coulomb (electrostatic) score between a pair of particles.
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPATOM_COULOMB_PAIR_SCORE_H
9 #define IMPATOM_COULOMB_PAIR_SCORE_H
10 
11 #include <IMP/atom/atom_config.h>
12 #include <IMP/generic.h>
13 #include <IMP/PairScore.h>
14 #include <IMP/base/Pointer.h>
16 #include <IMP/pair_macros.h>
17 
18 IMPATOM_BEGIN_NAMESPACE
19 
20 //! Coulomb (electrostatic) score between a pair of particles.
21 /** The two particles in the pair must be Charged particles.
22  The form of the potential is \f[
23  \frac{1}{4\pi\epsilon_0\epsilon_r} \frac{q_i q_j}{|r_{ij}|}
24  \f] where \f$\epsilon_0\f$ is the permittivity of vacuum,
25  \f$\epsilon_r\f$ the relative dielectric (adjustable; 1.0 by default),
26  \f$q_i\f$ and \f$q_j\f$ the charges on the two particles,
27  and \f$|r_{ij}|\f$ the distance between them.
28  */
29 class IMPATOMEXPORT CoulombPairScore : public PairScore {
31  double relative_dielectric_;
32  double multiplication_factor_;
33 
34  void calculate_multiplication_factor();
35 
36  public:
37  CoulombPairScore(SmoothingFunction *f) : smoothing_function_(f) {
38  set_relative_dielectric(1.0);
39  }
40 
41  void set_relative_dielectric(double relative_dielectric) {
42  relative_dielectric_ = relative_dielectric;
43  calculate_multiplication_factor();
44  }
45 
46  double get_relative_dielectric() const { return relative_dielectric_; }
47 
48  virtual double evaluate_index(kernel::Model *m,
55  ;
56 };
57 
59 
60 IMPATOM_END_NAMESPACE
61 
62 #endif /* IMPATOM_COULOMB_PAIR_SCORE_H */
Class for adding derivatives from restraints to the model.
Import IMP/kernel/pair_macros.h in the namespace.
Coulomb (electrostatic) score between a pair of particles.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:147
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
#define IMP_PAIR_SCORE_METHODS(Name)
virtual double evaluate_index(kernel::Model *m, const kernel::ParticleIndexPair &vt, DerivativeAccumulator *da) const
Compute the score and the derivative if needed.
A class to store an fixed array of same-typed values.
Definition: Array.h:33
Abstract class for scoring object(s) of type ParticlePair.
virtual ModelObjectsTemp do_get_inputs(kernel::Model *m, const ParticleIndexes &pis) const
Import IMP/kernel/PairScore.h in the namespace.
Classes to smooth nonbonded interactions.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition: object_macros.h:52
A nullptr-initialized pointer to an IMP Object.
Base class for smoothing nonbonded interactions as a function of distance.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73
Import IMP/kernel/generic.h in the namespace.