8 #ifndef IMPATOM_LENNARD_JONES_PAIR_SCORE_H
9 #define IMPATOM_LENNARD_JONES_PAIR_SCORE_H
11 #include <IMP/atom/atom_config.h>
18 IMPATOM_BEGIN_NAMESPACE
43 double repulsive_weight_, attractive_weight_;
49 double &A,
double &B)
const {
50 double well_depth = std::sqrt(lj0.get_well_depth() * lj1.get_well_depth());
51 double rmin = lj0.get_radius() + lj1.get_radius();
54 double rmin6 = rmin * rmin * rmin * rmin * rmin * rmin;
55 double rmin12 = rmin6 * rmin6;
57 A = well_depth * rmin12 * repulsive_weight_;
58 B = 2.0 * well_depth * rmin6 * attractive_weight_;
63 : smoothing_function_(f),
64 repulsive_weight_(1.0),
65 attractive_weight_(1.0) {}
67 void set_repulsive_weight(
double repulsive_weight) {
68 repulsive_weight_ = repulsive_weight;
71 double get_repulsive_weight()
const {
return repulsive_weight_; }
73 void set_attractive_weight(
double attractive_weight) {
74 attractive_weight_ = attractive_weight;
77 double get_attractive_weight()
const {
return attractive_weight_; }
Abstract class for scoring object(s) of type ParticleIndexPair.
#define IMP_PAIR_SCORE_METHODS(Name)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A more IMP-like version of the std::vector.
Class for storing model, its restraints, constraints, and particles.
A decorator for a particle that has a Lennard-Jones potential well.
Lennard-Jones score between a pair of particles.
A smart pointer to a ref-counted Object that is a class member.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
A decorator for a particle that has a Lennard-Jones potential well.
Classes to smooth nonbonded interactions.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
A nullptr-initialized pointer to an IMP Object.
Base class for smoothing nonbonded interactions as a function of distance.
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.
Compile-time generic restraint and constraint support.