mdsuite.project.project module

MDSuite: A Zincwarecode package. License ——- This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html SPDX-License-Identifier: EPL-2.0 Copyright Contributors to the Zincwarecode Project. Contact Information ——————- email: zincwarecode@gmail.com github: https://github.com/zincware web: https://zincwarecode.com/ Citation ——– If you use this module please cite us with: Summary ——-.

class mdsuite.project.project.Project(name: Optional[str] = None, storage_path: Union[str, Path] = './', description: Optional[str] = None)[source]

Bases: ProjectDatabase

Class for the main container of all experiments.

The Project class acts as the encompassing class for analysis with MDSuite. It contains all method required to add and analyze new experiments. These experiments may then be compared with one another quickly. The state of the class is saved and updated after each operation in order to retain the most current state of the analysis.

project = mdsuite.Project()
project.add_experiment(
    name="NaCl",
    timestep=0.002,
    temperature=1400.0,
    units="metal",
    simulation_data="NaCl_gk_i_q.lammpstraj",
    active=False # calculations are only performed on active experiments
    )
project.activate_experiments("NaCl") # set experiment state to active
project.run.RadialDistributionFunction(number_of_configurations=500)
project.disable_experiments("NaCl") # set experiment state to inactive
name

The name of the project

Type:

str

description

A short description of the project

Type:

str

storage_path

Where to store the tensor_values and databases. This may not simply be the current directory if the databases are expected to be quite large.

Type:

str

experiments

A dict of class objects. Class objects are instances of the experiment class for different experiments.

Type:

dict

activate_experiments(names: Union[str, list])[source]

Load experiments, such that they are used for the computations.

Parameters:

names (Name or list of names of experiments that should be instantiated) – and loaded into self.experiments.

Return type:

Updates the class state.

property active_experiments: Dict[str, Experiment]

Get a DotDict of instantiated experiments that are currently selected!.

add_data(data_sets: dict)[source]

Add simulation_data to a experiments.

This is a method so that parallelization is possible amongst simulation_data addition to different experiments at the same time.

Parameters:

data_sets (dict) –

keys: the names of the experiments values: str or mdsuite.file_io.file_read.FileProcessor

refer to mdsuite.experiment.add_data() for an explanation of the file specification options

Return type:

Updates the experiment classes.

add_experiment(name: str = <class 'mdsuite.utils.helpers.NoneType'>, timestep: ~typing.Optional[float] = None, temperature: ~typing.Optional[float] = None, units: ~typing.Optional[~typing.Union[str, ~mdsuite.utils.units.Units]] = None, cluster_mode: ~typing.Optional[bool] = None, active: bool = True, simulation_data: ~typing.Optional[~typing.Union[str, ~pathlib.Path, ~mdsuite.file_io.file_read.FileProcessor, list]] = None) Experiment[source]

Add an experiment to the project.

Parameters:
  • active (bool, default = True) – Activate the experiment when added

  • cluster_mode (bool) – If true, cluster mode is parsed to the experiment class.

  • name (str) – Name to use for the experiment.

  • timestep (float) – Timestep used during the simulation.

  • temperature (float) – Temperature the simulation was performed at and is to be used in calculation.

  • units (str) – units used

  • simulation_data – data that should be added to the experiment. see mdsuite.experiment.add_data() for details of the file specification. you can also create the experiment with simulation_data == None and add data later

Notes

Using custom NoneType to raise a custom ValueError message with useful info.

Returns:

The experiment object that was added to the project

Return type:

Experiment

attach_file_logger()[source]

Attach a file logger for this project.

disable_experiments(names: Union[str, list])[source]

Disable experiments.

Parameters:

names (Name or list of names of experiments that should be instantiated) – and loaded into self.experiments

property experiments: Dict[str, Experiment]

Get a DotDict of instantiated experiments!.

load_experiments(names: Union[str, list])[source]

Alias for activate_experiments.

property run: RunComputation

Method to access the available calculators.

Returns:

class that has all available calculators as properties

Return type:

RunComputation