iprPy package
Subpackages
Module contents
- check_modules()
Prints lists of the calculation, record, and database styles that were successfully and unsuccessfully loaded when iprPy was initialized.
- fix_lammps_versions(run_directory: str, **kwargs)
Iterates over all prepared calculations in a run_directory and updates the LAMMPS version to use.
- Parameters:
run_directory_name (str) – The name of the run directory containing the prepared calculations to update.
kwargs (any) – Keyword parameters including the current and old LAMMPS commands. The current will be replaced by the old for the potentials where it is required. All other kwargs are ignored.
- load_calculation(style, **kwargs)
Loads a Calculation subclass associated with a given calculation style
- Parameters:
style (str) – The calculation style
- Returns:
A Calculation object for the style
- Return type:
subclass of iprPy.calculation.Calculation
- load_database(name=None, style=None, host=None, **kwargs)
Loads a database object. Can be either loaded from stored settings or by defining all needed access information.
- Parameters:
name (str, optional) – The name assigned to a pre-defined database. If given, can be the only parameter.
style (str, optional) – The database style to use.
host (str, optional) – The URL/file path where the database is hosted.
kwargs (dict, optional) – Any other keyword parameters defining necessary access information. Allowed keywords are database style-specific.
- Returns:
The database object.
- Return type:
Subclass of yabadaba.Database
- load_record(style: str, model: str | DataModelDict | None = None, name: str | None = None, database=None, **kwargs) Record
Loads a Record subclass associated with a given record style.
- Parameters:
style (str) – The record style.
name (str, optional) – The name to give to the specific record.
model (str, DataModelDict, optional) – Data model content to load for the given record style.
database (yabadaba.Database, optional) – Allows for a default database to be associated with the record.
**kwargs (any) – Any extra keyword parameter supported by the record style.
- Returns:
A Record object for the style
- Return type:
subclass of Record
- load_run_directory(name: str | None = None)
Loads a pre-defined run_directory from the settings file.
- reset_orphans(run_directory, orphan_directory=None)
Resets calculations that were moved to an orphan directory back to a run directory and removes any bid files that they contain. Can be useful if connection is lost to a remote database or a runner was accidentally started with the wrong database.
- Parameters:
run_directory (str) – The directory to move the orphaned calculations to.
orphan_directory (str, optional) – The orphan directory containing archived calculation folders. The default value assumes that the orphan directory is a directory named “orphan” that is in the same parent directory as run_directory, i.e. is at “../orphan” relative to run_directory.