GaPFlow.md.Mock#
- class GaPFlow.md.Mock(prop, geo, gp)#
Bases:
MolecularDynamicsMock implementation of an MD runner.
Instances of this class mimic the behavior of an MD simulations. Instead of running an MD simulations, data is generated from implemented constitutive laws with added Gaussian noise. During an active learning simulation noisy look-up tables are generated, which are used to train a surrogate model.
- __init__(prop, geo, gp)#
Constructor.
- Parameters:
prop (dict) – Physical fluid properties (e.g., shear viscosity).
geo (dict) – Geometry parameters.
gp (dict or None, optional) – GP configuration dictionary.
Methods
__init__(prop, geo, gp)Constructor.
build_input_files(dataset, location, X)Builds LAMMPS input files based on GP inputs
Read simulation output and returns observations and their standard error.
run(X_target, tag)Run an MD simulation and store its input, metadata, and output into a dtool dataset.
Attributes
File location, where dtool datasets are written into (default is '/tmp/').
- build_input_files(dataset, location, X)#
- Builds LAMMPS input files based on GP inputs
and writes them to a dtool dataset.
- Parameters:
dataset (dtoolcore.proto_dataset) – A proto_dataset object.
location (str) – Absolute path of the proto dataset.
X (Array) – Input (i.e. density, gap height, …)
- property dtool_basepath#
File location, where dtool datasets are written into (default is ‘/tmp/’).
- is_mock: bool#
- main_file: str#
- name = 'mock'#
- num_worker: int#
- params: dict#
- read_output()#
Read simulation output and returns observations and their standard error.
- run(X_target, tag)#
Run an MD simulation and store its input, metadata, and output into a dtool dataset.
This method is called from a Database instance when new training data is added e.g. during initialization or in an active learning simulation.
- Parameters:
X_target (Array) – The training input.
tag (str) – A tag to attach to the dataset name.
- Returns:
Array – Training observations
Array – Standard error of training observations