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

Revisions №61650

branch: master 「№61650」
Commited by: Vikram K. Mulligan
GitHub commit link: 「b76418fb8267936f」 「№5235」
Difference from previous tested commit:  code diff
Commit date: 2021-05-04 19:18:57

Merge pull request #5235 from RosettaCommons/vmullig/fix_initialize_by_bin_disk_reads Ensure that bin transition data are read from disk once and only once. This PR aims to create a manager for bin transition data, so that they are loaded lazily, in a threadsafe manner, and only once. (This is to avoid repeated disk reads when using the trRosetta mover that pull request #5119 introduces.) Bin transition data are data stored in `database/protocol_data/generalizedKIC/bin_params/`. They are stats mined from the PDB of an amino acid of a given type an position i being found in a particular backbone bin B, and another amino acid of another given type at position i+1 being found in another backbone bin B'. This can be used for sampling -- for example, to set up a random conformation of a backbone with torsion distributions reflecting real proteins. PR #5119 does not depend on this PR, but this will increase efficiency once merged. The status quo is that anything that uses a `BinTransitionCalculator` triggers a read from disk whenever the `BinTransitionCalculator` is instantiated and initialized, repeatedly reading the same binfiles, but after this PR, each unique binfile will only be read once. Note: previously the `simple_cycpep_predict` application's director node read bin definitions once in MPI mode and broadcast those to all manager and worker nodes to avoid repeated reads by many nodes. Since the workers will now be reading the bin definitions once each, it's no longer necessary to do this. Tasks: - [x] Create a `BinTransitionCalculatorManager` class that fields requests for `BinTransitionCalculators`. - [x] Make the `BinTransitionCalculator` constructor private, and the `BinTransitionCalculatorManager` a `friend`, so that anything that wants a calculator must go through the calculator manager. - [x] Make the `BinTransitionCalculator` take a bin transitions file on initialization. Delete the default constructor and only allow the copy and initialization constructors. - [x] Have the `BinTransitionCalculatorManager` create a `BinTransitionCalculatorManager` for each bin transition file the first time that each file is requested, in a lazy, threadsafe way. Store this object, and hand out clones to the stored copy whenever a request is fielded. - [x] Update all classes that request a `BinTransitionCalculator` to go through the `BinTransitionCalculatorManager`. - [x] Fix serialization error. - [x] Check unit and integration tests. - [x] Add citations to the `InitializeByBins` and `PerturbByBins` movers while I'm at it. - [x] Beauty. - [x] Fix the timeout in the `simple_cycep_predict_design` integration test. - [x] Check that the `simple_cycep_predict_design` MPI integration test still produces at least one output structure.

...