Hierarchical Sampling and Scoring

clash checking

We can totally solve the hierarchical clash checking problem using an euclidean distance transform (EDT) on the excluded volume elements (I say we call them “Thorns”). This will give, for each atom, a depth below the surface of the molecule. If you’re clash-checking at a resolution of, say, 2A, you simply set the atomic radius at (depth-2A), ignore if below zero, and your good. Will be easy to use the existing clash-check machinery with this extension. Also gives the opportunity for very fast approximate clash checking by picking some small representative set of atoms with high depths – the depth can be used as a radius for clash-checking, so atoms with high depths can exclude alot of volume with only a handful. Obviously, picking the representatives will take some care, but I think we’ll get alot of speedup out of a fast non-strict clash check even if it isn’t prefect.

Nesting Enumerated State Tree (Nest)

All DOFs are managed by Nest objects, which define a hierarchical tree of all allowed states. Nests can control: - Stem transforms in the Bouquet (scene tree) - Rose conformation DOFs (clustered fragments, parametric backbones, etc) - Helical symmetry DOFs (helix and screw axes)

Illustrations

some misc. illustrations showing the nesting grids:

../_images/Scheme_nest_grid1d.jpg ../_images/Scheme_nest_grid2d.jpg ../_images/Scheme_nest_griddir_sph.jpg

Indexing Info Partially Obsolete!

Zorder Indexing

Illustration of basic Nest indexing, which using “z-order” indexing and “morton numbers” in order to (1) make sure siblings in the hierarchy have contiguous indices, avoiding explicit storage and listing, and (2) increase memory coherency by ensuring similar conformations are sampled together. Simple bitshifts are all that’s needed to get the parent or children of an index.

../_images/Scheme_nest_indexing_zorder.png

MultiNest Indexing

Illustration of a Scheme MultiNest index structure, showing the “BigIndex” strategy which preserves zorder indexing for a set of Nests, and the “MultiIndex” strategy which just lists individual indexes. We may need to employ some mix of these constructs to cope with the indexing headaches involved with Hierarchical Packing.

../_images/Scheme_nest_multiindex_bigindex.png

Indexing Challenges

  • must be able to sort and iterate based by Zorder.

  • must be able to decompose by subsets of Nests within MultiNest (for pair-decomposition)

  • must be able to decompose by individual Nests

  • must be able to efficiently represent a list of indices to be evaluated in a Course of sampling

  • BigIndex with arbitrary precision implementation is terrible, each on the heap

  • MultiIndex maybe better, if done with 2D array, but how to increment & sort efficiently

  • Preferably, list only the “parents” at a given level in the hierarchy, as all children of each parent will be checked

Here’s an illustration of what some of these different indexing types are

../_images/Scheme_nest_various_indexing.png

I propose some kind of index manager structure that can assist with all this. It’s implementation can at first be simple and slow, and later be replaced with something more nastily efficient with the same interface. Something like this:

  • class MultiIndexSet

-Types
  • strong_typedef Size IndexMS // sample number in current Course

  • strong_typedef Size IndexG // Index of Nest (to select a nest)

  • strong_typedef Size IndexRB // index of Rose

  • strong_typedef Size Index1B // Index of one-body states

  • strong_typedef Size Index2B // Index of two-body states

-Attributes
  • explicit_parent_indices : BigIndex

-Operations
  • IndexMS nstate_total () // total number of samples to be done in set

  • Index nstate_grid ( IndexG ) // size() of one Nest

  • Void index_grid ( IndexG, IndexMS ) // Nest index

  • Index1B nstate_onebody (IndexRB ) // number of distinct one-body states in set for a body

  • Index1B index_onebody ( IndexRB, IndexMS )

  • Index2B nstate_twobody ( IndexRB, IndexRB )

  • Index2B index_twobody ( IndexRB, IndexRB, IndexMS )