scine_puffin.utilities.scine_helper¶
Functions
|
Updates the model of the given calculation both based on its results and the settings of the actual calculator |
Classes
|
An interface for managing calculator and task specific settings in all puffin jobs. |
- class scine_puffin.utilities.scine_helper.SettingsManager(method_family: str, program: str, calculator_settings: utils.Settings | None = None, task_settings: Dict[str, Any] | None = None)[source]¶
An interface for managing calculator and task specific settings in all puffin jobs.
- correct_non_applicable_settings()[source]¶
Changes calculator settings that are not applicable in a Puffin execution
- prepare_readuct_task(structure: db.Structure, calculation: db.Calculation, settings: utils.ValueCollection, resources: dict) Tuple[Dict[str, utils.core.Calculator | None], List[str]] [source]¶
Constructs a dictionary with a Scine Calculator based on the calculation settings and resources to have an input for a ReaDuct task
- Parameters:
- structuredb.Structure
The database structure object to be analysed.
- calculationdb.Calculation
The database calculation that shall be calculated with ReaDuct.
- settingsutils.ValueCollection
The settings of the database calculation.
- resourcesdict
Resources of the calculator (config[‘resources’]).
- Returns:
- Tuple[dict, List[str]]]
A tuple containing the dictionary containing the calculator and a list containing the corresponding key
- separate_settings(calculation_settings: utils.ValueCollection) None [source]¶
Extract calculator and task settings from the given calculation settings. Uses the information of the settings which are available for a calculator.
- Parameters:
- calculation_settingsdict
The dictionary of the calculation settings (read from database).
- setting_is_available(setting_key: str) bool [source]¶
Check, if given setting_key is a setting in the calculator
- Parameters:
- setting_keylist
The settings_key to be checked.
- update_calculator_settings(structure: None | db.Structure, model: db.Model, resources: dict) None [source]¶
Update calculator settings with information about the structure, the model, the resources and the available_calculator settings.
- Parameters:
- structuredb.Structure
The database structure object to be analysed.
- modeldb.Model
The database model object to be used.
- resourcesdict
Resources of the calculator (config[‘resources’]).
- scine_puffin.utilities.scine_helper.update_model(calculator: utils.core.Calculator, calculation: db.Calculation, config: Configuration) db.Model [source]¶
Updates the model of the given calculation both based on its results and the settings of the actual calculator
- Parameters:
- calculatorutils.core.Calculator
The calculator that performed the calculation.
- calculationdb.Calculation
The database calculation that is currently run.
- configscine_puffin.config.Configuration
The current configuration of the Puffin necessary for the program’s version.