Index: kernel/test/unary_functions/test_linear.py =================================================================== --- kernel/test/unary_functions/test_linear.py (revision 642) +++ kernel/test/unary_functions/test_linear.py (working copy) @@ -13,7 +13,7 @@ for i in range(15): val = -10.0 + 3.5 * i scoreonly = func.evaluate(val) - score, deriv = func.evaluate_deriv(val) + score, deriv = func.evaluate_derivative(val) self.assertEqual(score, scoreonly) self.assertInTolerance(score, (val - offset) * slope, 0.001) self.assertInTolerance(deriv, slope, 0.001) Index: kernel/test/unary_functions/test_splines.py =================================================================== --- kernel/test/unary_functions/test_splines.py (revision 642) +++ kernel/test/unary_functions/test_splines.py (working copy) @@ -53,7 +53,7 @@ for i in range(30): val = minrange + test_spacing * i scoreonly = spline.evaluate(val) - score, deriv = spline.evaluate_deriv(val) + score, deriv = spline.evaluate_derivative(val) self.assertEqual(score, scoreonly) expscore, expderiv = test_func(val) self.assertInTolerance(score, expscore, 0.1) Index: kernel/test/unary_functions/test_cosine.py =================================================================== --- kernel/test/unary_functions/test_cosine.py (revision 642) +++ kernel/test/unary_functions/test_cosine.py (working copy) @@ -23,7 +23,7 @@ val = -math.pi + math.pi * 15.0 / (i + 1.0) expscore, expderiv = _cosfunc(val, force_constant, periodicity, phase) - score, deriv = func.evaluate_deriv(val) + score, deriv = func.evaluate_derivative(val) scoreonly = func.evaluate(val) self.assertInTolerance(score, scoreonly, 1e-4) self.assertInTolerance(expscore, score, 0.1) Index: kernel/test/unary_functions/test_harmonic.py =================================================================== --- kernel/test/unary_functions/test_harmonic.py (revision 642) +++ kernel/test/unary_functions/test_harmonic.py (working copy) @@ -21,7 +21,7 @@ for i in range(15): val = 5.0 + i expscore, expderiv = _harmonicfunc(val, mean, force_constant) - score, deriv = func.evaluate_deriv(val) + score, deriv = func.evaluate_derivative(val) scoreonly = func.evaluate(val) self.assertEqual(score, scoreonly) self.assertInTolerance(expscore, score, 0.1) Index: kernel/test/unary_functions/test_wlc.py =================================================================== --- kernel/test/unary_functions/test_wlc.py (revision 642) +++ kernel/test/unary_functions/test_wlc.py (working copy) @@ -10,9 +10,9 @@ """Test that the WormLikeChain values are sane""" wlc= IMP.WormLikeChain(200, 3.4) self.check_unary_function_min(wlc, 0, 250, .5, 0) - self.check_unary_function_deriv(wlc, 0, 250, .5) + self.check_unary_function_derivative(wlc, 0, 250, .5) - self.assert_(wlc.evaluate_deriv(180)[1] > 4.2) + self.assert_(wlc.evaluate_derivative(180)[1] > 4.2) if __name__ == '__main__': unittest.main() Index: kernel/test/restraints/test_angles.py =================================================================== --- kernel/test/restraints/test_angles.py (revision 642) +++ kernel/test/restraints/test_angles.py (working copy) @@ -9,7 +9,7 @@ IMP.UnaryFunction.__init__(self) def evaluate(self, val): return 1.0 - def evaluate_deriv(self, val): + def evaluate_derivative(self, val): return 1.0, 0.0 def show(self, *args): print "identity" Index: kernel/test/optimizers/test_cg_optimizer.py =================================================================== --- kernel/test/optimizers/test_cg_optimizer.py (revision 642) +++ kernel/test/optimizers/test_cg_optimizer.py (working copy) @@ -28,7 +28,7 @@ for (p,d) in zip(self.particles, dx): p.add_to_derivative(self.index, d, accum); #for (i, d) in zip(self.indices, dx): - # accum.add_to_deriv(i, d) + # accum.add_to_derivative(i, d) return e class CGOptimizerTests(IMP.test.TestCase): Index: kernel/include/IMP/UnaryFunction.h =================================================================== --- kernel/include/IMP/UnaryFunction.h (revision 642) +++ kernel/include/IMP/UnaryFunction.h (working copy) @@ -36,7 +36,7 @@ given feaure. \return Score */ - virtual Float evaluate_deriv(Float feature, Float& deriv) const = 0; + virtual Float evaluate_derivative(Float feature, Float& deriv) const = 0; virtual void show(std::ostream &out=std::cout) const = 0; }; Index: kernel/include/IMP/internal/evaluate_distance_pair_score.h =================================================================== --- kernel/include/IMP/internal/evaluate_distance_pair_score.h (revision 642) +++ kernel/include/IMP/internal/evaluate_distance_pair_score.h (working copy) @@ -43,7 +43,7 @@ if (da && distance >= MIN_DISTANCE) { Float deriv; - score = f->evaluate_deriv(shifted_distance, deriv); + score = f->evaluate_derivative(shifted_distance, deriv); Vector3D d= delta/distance *deriv; d0.add_to_coordinates_derivative(d, *da); Index: kernel/include/IMP/unary_functions/ClosedCubicSpline.h =================================================================== --- kernel/include/IMP/unary_functions/ClosedCubicSpline.h (revision 642) +++ kernel/include/IMP/unary_functions/ClosedCubicSpline.h (working copy) @@ -45,7 +45,7 @@ \exception ValueException Feature is out of defined range. \return Score */ - virtual Float evaluate_deriv(Float feature, Float& deriv) const; + virtual Float evaluate_derivative(Float feature, Float& deriv) const; void show(std::ostream &out=std::cout) const { out << "Closed cubic spline of " << values_.size() << " values from " Index: kernel/include/IMP/unary_functions/Linear.h =================================================================== --- kernel/include/IMP/unary_functions/Linear.h (revision 642) +++ kernel/include/IMP/unary_functions/Linear.h (working copy) @@ -28,7 +28,7 @@ return (feature-offset_)*slope_; } - virtual Float evaluate_deriv(Float feature, Float& deriv) const { + virtual Float evaluate_derivative(Float feature, Float& deriv) const { deriv= slope_; return evaluate(feature); } Index: kernel/include/IMP/unary_functions/WormLikeChain.h =================================================================== --- kernel/include/IMP/unary_functions/WormLikeChain.h (revision 642) +++ kernel/include/IMP/unary_functions/WormLikeChain.h (working copy) @@ -65,7 +65,7 @@ \param[out] deriv force in kcal/angstrom mol \return Score */ - virtual Float evaluate_deriv(Float fl, Float& deriv) const { + virtual Float evaluate_derivative(Float fl, Float& deriv) const { unit::Angstrom l(fl); if (l < unit::Angstrom(0)) l=unit::Angstrom(0); unit::Piconewton doubled; Index: kernel/include/IMP/unary_functions/Cosine.h =================================================================== --- kernel/include/IMP/unary_functions/Cosine.h (revision 642) +++ kernel/include/IMP/unary_functions/Cosine.h (working copy) @@ -47,7 +47,7 @@ the feature value. \return Score */ - virtual Float evaluate_deriv(Float feature, Float& deriv) const; + virtual Float evaluate_derivative(Float feature, Float& deriv) const; void show(std::ostream &out=std::cout) const { out << "Cosine function with force " << force_constant_ Index: kernel/include/IMP/unary_functions/Harmonic.h =================================================================== --- kernel/include/IMP/unary_functions/Harmonic.h (revision 642) +++ kernel/include/IMP/unary_functions/Harmonic.h (working copy) @@ -57,7 +57,7 @@ */ virtual Float evaluate(Float feature) const { Float d; - return evaluate_deriv(feature, d); + return evaluate_derivative(feature, d); } //! Calculate harmonic score and derivative with respect to the given feature. @@ -66,7 +66,7 @@ the feature value. \return Score */ - virtual Float evaluate_deriv(Float feature, Float& deriv) const { + virtual Float evaluate_derivative(Float feature, Float& deriv) const { Float e = (feature - mean_); deriv = k_ * e; return 0.5 * k_ * e * e; Index: kernel/include/IMP/unary_functions/HarmonicLowerBound.h =================================================================== --- kernel/include/IMP/unary_functions/HarmonicLowerBound.h (revision 642) +++ kernel/include/IMP/unary_functions/HarmonicLowerBound.h (working copy) @@ -41,12 +41,12 @@ the feature value. \return Score */ - virtual Float evaluate_deriv(Float feature, Float& deriv) const { + virtual Float evaluate_derivative(Float feature, Float& deriv) const { if (feature >= Harmonic::get_mean()) { deriv = 0.0; return 0.0; } else { - return Harmonic::evaluate_deriv(feature, deriv); + return Harmonic::evaluate_derivative(feature, deriv); } } Index: kernel/include/IMP/unary_functions/OpenCubicSpline.h =================================================================== --- kernel/include/IMP/unary_functions/OpenCubicSpline.h (revision 642) +++ kernel/include/IMP/unary_functions/OpenCubicSpline.h (working copy) @@ -44,7 +44,7 @@ \exception ValueException Feature is out of defined range. \return Score */ - virtual Float evaluate_deriv(Float feature, Float& deriv) const; + virtual Float evaluate_derivative(Float feature, Float& deriv) const; void show(std::ostream &out=std::cout) const { out << "Open cubic spline of " << values_.size() << " values from " Index: kernel/include/IMP/unary_functions/HarmonicUpperBound.h =================================================================== --- kernel/include/IMP/unary_functions/HarmonicUpperBound.h (revision 642) +++ kernel/include/IMP/unary_functions/HarmonicUpperBound.h (working copy) @@ -41,12 +41,12 @@ the feature value. \return Score */ - virtual Float evaluate_deriv(Float feature, Float& deriv) const { + virtual Float evaluate_derivative(Float feature, Float& deriv) const { if (feature <= Harmonic::get_mean()) { deriv = 0.0; return 0.0; } else { - return Harmonic::evaluate_deriv(feature, deriv); + return Harmonic::evaluate_derivative(feature, deriv); } } Index: kernel/src/singleton_scores/AttributeSingletonScore.cpp =================================================================== --- kernel/src/singleton_scores/AttributeSingletonScore.cpp (revision 642) +++ kernel/src/singleton_scores/AttributeSingletonScore.cpp (working copy) @@ -21,7 +21,7 @@ { if (da) { Float d; - float r= f_->evaluate_deriv(b->get_value(k_), d); + float r= f_->evaluate_derivative(b->get_value(k_), d); b->add_to_derivative(k_, d, *da); return r; } else { Index: kernel/src/singleton_scores/TunnelSingletonScore.cpp =================================================================== --- kernel/src/singleton_scores/TunnelSingletonScore.cpp (revision 642) +++ kernel/src/singleton_scores/TunnelSingletonScore.cpp (working copy) @@ -58,7 +58,7 @@ // look below if changed Float dist= -std::min(std::min(rd, hdu), hdd) - radius; if (accum) { - score= f_->evaluate_deriv(dist, deriv_scalar); + score= f_->evaluate_derivative(dist, deriv_scalar); } else { score= f_->evaluate(dist); } Index: kernel/src/unary_functions/Cosine.cpp =================================================================== --- kernel/src/unary_functions/Cosine.cpp (revision 642) +++ kernel/src/unary_functions/Cosine.cpp (working copy) @@ -18,7 +18,7 @@ - force_constant_ * std::cos(periodicity_ * feature + phase_); } -Float Cosine::evaluate_deriv(Float feature, Float& deriv) const +Float Cosine::evaluate_derivative(Float feature, Float& deriv) const { deriv = force_constant_ * periodicity_ * std::sin(periodicity_ * feature + phase_); Index: kernel/src/unary_functions/OpenCubicSpline.cpp =================================================================== --- kernel/src/unary_functions/OpenCubicSpline.cpp (revision 642) +++ kernel/src/unary_functions/OpenCubicSpline.cpp (working copy) @@ -66,7 +66,7 @@ * (spacing_ * spacing_) / 6.; } -Float OpenCubicSpline::evaluate_deriv(Float feature, Float& deriv) const +Float OpenCubicSpline::evaluate_derivative(Float feature, Float& deriv) const { size_t lowbin = static_cast((feature - minrange_) / spacing_); // handle the case where feature ~= maxrange Index: kernel/src/unary_functions/ClosedCubicSpline.cpp =================================================================== --- kernel/src/unary_functions/ClosedCubicSpline.cpp (revision 642) +++ kernel/src/unary_functions/ClosedCubicSpline.cpp (working copy) @@ -82,7 +82,7 @@ * (spacing_ * spacing_) / 6.; } -Float ClosedCubicSpline::evaluate_deriv(Float feature, Float& deriv) const +Float ClosedCubicSpline::evaluate_derivative(Float feature, Float& deriv) const { size_t lowbin = static_cast((feature - minrange_) / spacing_); size_t highbin = lowbin + 1; Index: kernel/src/restraints/DihedralRestraint.cpp =================================================================== --- kernel/src/restraints/DihedralRestraint.cpp (revision 642) +++ kernel/src/restraints/DihedralRestraint.cpp (working copy) @@ -80,7 +80,7 @@ if (accum) { Float deriv; - score = score_func_->evaluate_deriv(angle, deriv); + score = score_func_->evaluate_derivative(angle, deriv); // method for derivative calculation from van Schaik et al. // J. Mol. Biol. 234, 751-762 (1993) Index: kernel/src/triplet_scores/AngleTripletScore.cpp =================================================================== --- kernel/src/triplet_scores/AngleTripletScore.cpp (revision 642) +++ kernel/src/triplet_scores/AngleTripletScore.cpp (working copy) @@ -46,7 +46,7 @@ if (da) { Float deriv; - score = f_->evaluate_deriv(angle, deriv); + score = f_->evaluate_derivative(angle, deriv); Vector3D unit_rij = rij.get_unit_vector(); Vector3D unit_rkj = rkj.get_unit_vector(); Index: kernel/pyext/IMP/test.py =================================================================== --- kernel/pyext/IMP/test.py (revision 642) +++ kernel/pyext/IMP/test.py (working copy) @@ -51,11 +51,11 @@ dz = p1.get_value(zkey) - p2.get_value(zkey) return math.sqrt(dx*dx + dy*dy + dz*dz) - def check_unary_function_deriv(self, func, lb, ub, step): + def check_unary_function_derivative(self, func, lb, ub, step): """Check the unary function func's derivatives against numerical approximations between lb and ub""" for f in [lb + i * step for i in range(1, int((ub-lb)/step))]: - (v,d)= func.evaluate_deriv(f) + (v,d)= func.evaluate_derivative(f) # Simple finite difference approximation offset= step/1024 vmn= func.evaluate(f-offset) @@ -117,7 +117,7 @@ self.v=v def evaluate(self, feat): return self.v - def evaluate_deriv(self, feat): + def evaluate_derivative(self, feat): return self.v, 0.0 def show(self, *args): print "ConstUF with value "+str(self.v) Index: impEM/test/test_derivs.py =================================================================== --- impEM/test/test_derivs.py (revision 642) +++ impEM/test/test_derivs.py (working copy) @@ -66,7 +66,7 @@ self.atmsel = modeller.selection(self.modeller_model) print "initialization done ..." - def test_deriv(self): + def test_derivative(self): """1. create a map 2. read it back in 3. calculate score