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 IMP::OwnerPointer<SmoothingFunction> smoothing_function_;
44 double repulsive_weight_, attractive_weight_;
50 double &A,
double &B)
const {
51 double well_depth = std::sqrt(lj0.get_well_depth() * lj1.get_well_depth());
52 double rmin = lj0.get_radius() + lj1.get_radius();
55 double rmin6 = rmin * rmin * rmin * rmin * rmin * rmin;
56 double rmin12 = rmin6 * rmin6;
58 A = well_depth * rmin12 * repulsive_weight_;
59 B = 2.0 * well_depth * rmin6 * attractive_weight_;
64 : smoothing_function_(f), repulsive_weight_(1.0), attractive_weight_(1.0) {}
66 void set_repulsive_weight(
double repulsive_weight) {
67 repulsive_weight_ = repulsive_weight;
70 double get_repulsive_weight()
const {
return repulsive_weight_; }
72 void set_attractive_weight(
double attractive_weight) {
73 attractive_weight_ = attractive_weight;
76 double get_attractive_weight()
const {
return attractive_weight_; }