Here is a patch for grid based non-bonded list (and the working grid code). All the tests pass, yada,yada.
The interface of the nonbonded list does not change significantly.
One issue is that as it currently stands, horrible things happen if two different bits of code iterate through the list of non-bonded particles with different distance cutoffs at the same time. The possible solutions to this problem are either to implement iterators which generate the list on the fly (slightly messy code but not bad), or pull the distance cutoff out of the iteration and into the ScoreState itself. I don't really like doing the latter as different restraints will have different distance cutoffs and it seems a waste to build different nonbonded lists for them solely because of that. So I will probably implement iterators at some point. Anyway, it is not a pressing concern.
Also, the grid is rebuilt every iteration. I will eventually make it lazier.
The grid has improved slightly: - there are now two types of grid indexes: Index, which always refers to a real voxel and VirtualIndex which count be something like (-10, -5, -6). These can be mapped onto real cells in various ways. There are also iterator which allow iteration over rectangular subregions of the grid.
Daniel Russel wrote: > Here is a patch for grid based non-bonded list (and the working grid > code). All the tests pass, yada,yada.
It doesn't build when applied against current SVN: kernel/include/IMP/score_states/../Grid3D.h: In constructor 'IMP::Grid3D<V>::Grid3D() [with VT = std::vector<IMP::Particle*, std::allocatorIMP::Particle* >]': kernel/src/score_states/NonbondedListScoreState.cpp:17: instantiated from here kernel/include/IMP/score_states/../Grid3D.h:220: error: no matching function for call to 'IMP::Vector3D::Vector3D()'
Ben
participants (2)
-
Ben Webb
-
Daniel Russel