PropertyCalculationLayer¶
-
class
propertyestimator.layers.
PropertyCalculationLayer
[source]¶ An abstract representation of a calculation layer whose goal is to estimate a set of physical properties using a single approach, such as a layer which employs direct simulations to estimate properties, or one which reweights cached simulation data to the same end.
Notes
Calculation layers must inherit from this class, and must override the schedule_calculation method.
See also
TODO
Link to a general page outlining what calculation layers are and how they are used.
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
Methods
Initialize self.
schedule_calculation
(calculation_backend, …)Submit the proposed calculation to the backend of choice.
-
static
schedule_calculation
(calculation_backend, storage_backend, layer_directory, data_model, callback, synchronous=False)[source]¶ Submit the proposed calculation to the backend of choice.
- Parameters
calculation_backend (PropertyEstimatorBackend) – The backend to the submit the calculations to.
storage_backend (PropertyEstimatorStorage) – The backend used to store / retrieve data from previous calculations.
layer_directory (str) – The local directory in which to store all local, temporary calculation data from this layer.
data_model (PropertyEstimatorServer.ServerEstimationRequest) – The data model encoding the proposed calculation.
callback (function) – The function to call when the backend returns the results (or an error).
synchronous (bool) – If true, this function will block until the calculation has completed. This is mainly intended for debugging purposes.