「view this page in B3 βῆτα server」

Revisions №59945

branch: master 「№59945」
Commited by: Vikram K. Mulligan
GitHub commit link: 「7ce3600945394f54」 「№2755」
Difference from previous tested commit:  code diff
Commit date: 2017-12-28 03:31:01

Merge pull request #2755 from RosettaCommons/vmullig/voids_penalty Add a guidance function to promote voids-free packing Natural proteins have few to no voids in their cores. The packer, however, often produces solutions with voids. I think that there are often situations in which a better solution exists, albeit one that requires a little bit of minimization to relieve minor clashes (which is why the packer avoids these solutions). Our usual solution is to produce a _lot_ of designs and to filter based on holes, throwing away most of the designs due to buried voids. This, of course, is inefficient. To try to coax the packer towards better-packed solutions, I'm adding a design-centric score term to penalize deviation from solutions in which the total buried rotamer volume differs significantly from the total volume that one is trying to fill. I think I have a way to do this that moves most of the cost to a precomputation, so that the cost during the simulated annealing search is negligible, but I want to try this out to be sure. Merge approved by TJ Brunette. @asford Tasks: - [x] Add `VoidsPenaltyEnergy` (copy from `NetChargeEnergy`). - [x] Register energy appropriately. - [x] Write precomputation: - [x] Class for voxel grid. - [x] Set up voxel grid. - [x] Identify buried voxels (using sidechain cones method). - Note that this is a good task for a GPU... Hmm... - ~~Figure out how to make this faster. (Can probably do a low-res pass first to figure out the relevant cones for each group of voxels).~~ --> Doesn't need to be faster. This isn't rate-limiting. - [x] Set up rotamers. For each rotamer, compute volume lying in buried volume (by counting buried voxels that the rotamer overlaps). - Also a good task for a GPU. Hmm... - I'll do this in a SLIGHTLY imprecise way: - For each atom in rotamer, ask whether the atom centre is in a buried voxel. - If it is, add the atom to a list of buried atoms for the rotamer. - Sum the volume of the buried atoms for the rotamer (4/3*Pi\*r^3 for each atom), then subtract the overlap integrals of every pair of atoms. - Assumption: adding back the overlap triples isn't worth it because they contribute negligibly. - Assumption2: if the atom centre is buried, the whole atom is probably buried, while if the atom centre is not buried, the whole atom is probably not buried (a good enough approximation for grids with large voxels). - [x] Unit test for the rotamer setup. - [x] Fix this unit test's failure. - [x] Prune voxels that no rotamer touches, and calculate total buried packable volume. - [x] Write computation performed during simulated annealing search: - [x] For each step, impose a quadratically-ramping penalty based on the square of the difference between the total volume and the sum of the current rotamer volumes. - [x] Unit test: pack with this alone, and check that small volume deviations are achievable. - [x] Make the values that I initially hard-coded in `VoidsPenaltyVoxelGrid::is_buried()` into ones that can be configured _via_ the options system (with proper options objects -- not global reads). - [x] Add to `EnergyMethodOptions`, have the `VoidsPenaltyEnergy` read from an `EnergyMethodOptions` object, and configure the internal `VoidsPenaltyVoxelGrid` when it creates that object. - [x] The number of cones in which a voxel must be found to be considered buried is still hard-coded (at "6"). This should also be added to `EnergyMethodOptions` and `ScoreFunctionLoader`. - [x] Prune voxels of residues that are fixed during packing. - [x] Disable during minimization -- too expensive. - ~~Hmm. I'm still seeing calls during minimization. Track down and figure out how to disable.~~ --> These are calls to basic scoring peripheral to minimization in the `FastDesign` protocol. Maybe I'll add an option for disabling scoring outright except during packing. - [x] Option for disabling scoring outright except during packing. - ~~Might as well apply this to `aa_composition`, `hbnet`, and `netscore` terms, too. They don't need to be evaluated during minimization trajectories.~~ --> For a future pull request. - [x] Figure out a good way to do this for once-off scoring. - [x] Oh crap -- symmetry. - [x] Make the system work with symmetry. - [x] Unit tests for VoidsPenaltyEnergy with symmetry. - [x] Symmetric integration test. - [x] Unit tests. - [x] Integration test. - [x] Shorten integration tests a bit. - [x] Beauty. - [x] Documentation. - [x] Benchmark: calculate buried voids after design with and without this term, for many sampled backbones. - [x] Figure out largest voxel size that still produces good behaviour, and make this default. - Seems like 0.5 A is pretty good. This produces a 60% slowdown during packing of a 100-residue pose, but still creates much better-packed solutions. - Eliminating unnecessary `voids_penalty` evaluation during scoring steps in between packer steps in FastDesign, the slowdown drops to a 23% slowdown when designing the core and boundary of a 100-residue pose. - [x] Figure out time cost for this term. Also: - [x] Update function signature in ResidueArrayAnnealableEnergy for setting up for packing. (Allow rotamer sets to be passed to energy method during setup.) - [x] Update ResidueArrayAnnealableEnergy derived classes to use the C++11 `override` keyword correctly.