Index: kernel/include/IMP/score_states/SConscript =================================================================== --- kernel/include/IMP/score_states/SConscript (revision 494) +++ kernel/include/IMP/score_states/SConscript (working copy) @@ -1,14 +1,16 @@ +Import('env') import os.path -Import('env') - -files = ['BondedListScoreState.h', 'NonbondedListScoreState.h', - 'BipartiteNonbondedListScoreState.h', 'MaxChangeScoreState.h', - 'BondDecoratorListScoreState.h', 'AllNonbondedListScoreState.h', - 'QuadraticBipartiteNonbondedListScoreState.h', - 'QuadraticAllNonbondedListScoreState.h', - 'QuadraticNonbondedListScoreState.h'] - -# Install the include files: -includedir = os.path.join(env['includedir'], 'IMP', 'score_states') +files=[ + 'AllNonbondedListScoreState.h', + 'BipartiteNonbondedListScoreState.h', + 'BondDecoratorListScoreState.h', + 'BondedListScoreState.h', + 'MaxChangeScoreState.h', + 'NonbondedListScoreState.h', + 'QuadraticAllNonbondedListScoreState.h', + 'QuadraticBipartiteNonbondedListScoreState.h', + 'QuadraticNonbondedListScoreState.h', + ] +includedir = os.path.join(env['includedir'], 'IMP', 'score_states' ) inst = env.Install(includedir, files) env.Alias('install', inst) Index: kernel/include/IMP/score_states/QuadraticAllNonbondedListScoreState.h =================================================================== --- kernel/include/IMP/score_states/QuadraticAllNonbondedListScoreState.h (revision 494) +++ kernel/include/IMP/score_states/QuadraticAllNonbondedListScoreState.h (working copy) @@ -19,10 +19,7 @@ { //! This class maintains a list of non-bonded pairs of spheres -/** \note Points whose coordinates are not optimized are assumed to - stay that way and are pairs involving only fixed points are skipped - - \note QuadraticBipartiteNonbondedListScoreState is basically an +/** \note QuadraticBipartiteNonbondedListScoreState is basically an implementation detail for performance analysis and should not be used by end users. */ @@ -30,7 +27,6 @@ public QuadraticNonbondedListScoreState { typedef QuadraticNonbondedListScoreState P; - Particles fixed_; //! \internal void rebuild_nbl(Float cut); Index: kernel/include/IMP/score_states/AllNonbondedListScoreState.h =================================================================== --- kernel/include/IMP/score_states/AllNonbondedListScoreState.h (revision 494) +++ kernel/include/IMP/score_states/AllNonbondedListScoreState.h (working copy) @@ -26,9 +26,6 @@ \note The radius is currently assumed not to change. This could be fixed later. - \note Points whose coordinates are not optimized are assumed to - stay that way (and vice versa, although that direction doesn't - matter so much). \todo The structure is slightly dumb about rebuilding and will rebuild the whole list of any of the grids become invalidated. This could be improved as each piece is computed separately (so @@ -50,7 +47,6 @@ Bin(const Bin &o): grid(o.grid), rmax(o.rmax){} }; std::vector bins_; - std::vector fixed_bins_; //! \internal void rebuild_nbl(Float cut); Index: kernel/src/score_states/SConscript =================================================================== --- kernel/src/score_states/SConscript (revision 494) +++ kernel/src/score_states/SConscript (working copy) @@ -1,11 +1,10 @@ Import('env') - -files = ['NonbondedListScoreState.cpp', - 'MaxChangeScoreState.cpp', 'BondDecoratorListScoreState.cpp', - 'AllNonbondedListScoreState.cpp', - 'QuadraticBipartiteNonbondedListScoreState.cpp', - 'QuadraticAllNonbondedListScoreState.cpp', - 'QuadraticNonbondedListScoreState.cpp'] - -files = [File(x) for x in files] +files=[] +files.append(File( 'AllNonbondedListScoreState.cpp' )) +files.append(File( 'BondDecoratorListScoreState.cpp' )) +files.append(File( 'MaxChangeScoreState.cpp' )) +files.append(File( 'NonbondedListScoreState.cpp' )) +files.append(File( 'QuadraticAllNonbondedListScoreState.cpp' )) +files.append(File( 'QuadraticBipartiteNonbondedListScoreState.cpp' )) +files.append(File( 'QuadraticNonbondedListScoreState.cpp' )) Return('files') Index: kernel/src/score_states/QuadraticAllNonbondedListScoreState.cpp =================================================================== --- kernel/src/score_states/QuadraticAllNonbondedListScoreState.cpp (revision 494) +++ kernel/src/score_states/QuadraticAllNonbondedListScoreState.cpp (working copy) @@ -27,17 +27,7 @@ void QuadraticAllNonbondedListScoreState::set_particles(const Particles &ps) { - Particles moving; - fixed_.clear(); - for (unsigned int i=0; i< ps.size(); ++i) { - XYZDecorator d= XYZDecorator::cast(ps[i]); - if (d.get_coordinates_are_optimized()) { - moving.push_back(ps[i]); - } else { - fixed_.push_back(ps[i]); - } - } - P::set_particles(moving); + P::set_particles(ps); } @@ -52,9 +42,6 @@ IMP_LOG(TERSE, "Rebuilding QNBL with cutoff " << cut << std::endl); const Particles &moving= P::get_particles(); for (unsigned int j=0; j< moving.size(); ++j) { - for (unsigned int i=0; i< fixed_.size(); ++i) { - P::handle_nbl_pair(fixed_[i], moving[j], cut); - } for (unsigned int i=0; i< j; ++i) { P::handle_nbl_pair(moving[i], moving[j], cut); } Index: kernel/src/score_states/AllNonbondedListScoreState.cpp =================================================================== --- kernel/src/score_states/AllNonbondedListScoreState.cpp (revision 494) +++ kernel/src/score_states/AllNonbondedListScoreState.cpp (working copy) @@ -26,7 +26,6 @@ AllNonbondedListScoreState::~AllNonbondedListScoreState() { cleanup(bins_); - cleanup(fixed_bins_); } float AllNonbondedListScoreState::side_from_r(float r) const { @@ -39,23 +38,8 @@ void AllNonbondedListScoreState::set_particles(const Particles &ps) { NonbondedListScoreState::clear_nbl(); - // split into moving and fixed and call repartition twice - Particles moving, fixed; - for (unsigned int i=0; i< ps.size(); ++i) { - XYZDecorator d= XYZDecorator::cast(ps[i]); - if (d.get_coordinates_are_optimized()) { - moving.push_back(ps[i]); - } else { - fixed.push_back(ps[i]); - } - } cleanup(bins_); - cleanup(fixed_bins_); - repartition_points(moving, bins_); - repartition_points(fixed, fixed_bins_); - for (unsigned int i=0; i< fixed_bins_.size(); ++i) { - fixed_bins_[i].grid->update(); - } + repartition_points(ps, bins_); } void AllNonbondedListScoreState::repartition_points(const Particles &ps, @@ -183,18 +167,13 @@ void AllNonbondedListScoreState::rebuild_nbl(Float cut) { - IMP_LOG(TERSE, "Rebuilding NBL with " << bins_.size() << " dynamic and " - << fixed_bins_.size() << " fixed " + IMP_LOG(TERSE, "Rebuilding NBL with " << bins_.size() << " bins" << " and cutoff " << cut << std::endl); for (unsigned int i=0; i< bins_.size(); ++i) { for (unsigned int j=i+1; j< bins_.size(); ++j) { generate_nbl(bins_[i], bins_[j], cut); } - for (unsigned int j=0; j< fixed_bins_.size(); ++j) { - generate_nbl(bins_[i], fixed_bins_[j], cut); - } - // same code as AllNonbonded. Would be nice to consolidate internal::ParticleGrid::Index last_index; for (internal::ParticleGrid::ParticleVoxelIterator it Index: kernel/src/singleton_scores/DistanceToSingletonScore.cpp =================================================================== --- kernel/src/singleton_scores/DistanceToSingletonScore.cpp (revision 494) +++ kernel/src/singleton_scores/DistanceToSingletonScore.cpp (working copy) @@ -30,11 +30,7 @@ Float score; XYZDecorator d1 = XYZDecorator::cast(b); - if (!d1.get_coordinates_are_optimized()) { - IMP_WARN("DistanceToSingletonScore called on non optimized particle" - << b->get_index() <