mdsuite.experiment.experiment 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.experiment.experiment.Experiment(project, name, time_step=None, temperature=None, units: Optional[Union[str, Units]] = None, cluster_mode=False)[source]¶
Bases:
ExperimentDatabase
The central experiment class fundamental to all analysis.
project = mdsuite.Project() project.add_experiment( name="NaCl", timestep=0.002, temperature=1400.0, units="metal", simulation_data="NaCl_gk_i_q.lammpstraj" ) project.experiments.NaCl.run.RadialDistributionFunction( number_of_configurations=500 )
- storage_path¶
Path to where the tensor_values should be stored (best to have drive capable of storing large files)
- Type:
- temperature¶
The temperature of the simulation that should be used in some analysis. Necessary as it cannot be easily read in from the simulation tensor_values.
- Type:
- time_step¶
Time step of the simulation e.g 0.002. Necessary as it cannot be easily read in from the trajectory.
- Type:
- species¶
A dictionary of the species in the experiment and their properties. Their properties includes index location in the trajectory file, mass of the species as taken from the PubChem database_path, and the charge taken from the same database_path. When using these properties, it is best that users confirm this information, with exception to the indices as they are read from the file and will be correct.
- Type:
- add_data(simulation_data: Union[str, Path, FileProcessor, list], force: bool = False, update_with_pubchempy: bool = True)[source]¶
Add data to experiment. This method takes a filename, file path or a file reader (or a list thereof). If given a filename, it will try to instantiate the appropriate file reader with its default arguments. If you have a custom data format with its own reader or want to use non-default arguments for your reader, instantiate the reader and pass it to this method. TODO reference online documentation of data loading in the error messages :param simulation_data: or list thereof
if str or pathlib.Path: path to the file that contains the simulation_data if mdsuite.file_io.file_read.FileProcessor: An already instantiated file reader from mdsuite.file_io if list : must be list of any of the above (can be mixed).
- cls_transformation_run(transformation: Transformations, *args, **kwargs)[source]¶
Run the transformation.
The Transformation class is updated with this experiment and afterwards performs the transformation. Preliminary work in accordance to https://github.com/zincware/MDSuite/issues/404
- Parameters:
transformation (Transformations) –
- load_matrix(property_name: str = None, species: ~typing.Iterable[str] = None, select_slice: <numpy.lib.index_tricks.IndexExpression object at 0x7f811e5ba760> = None, path: ~typing.Iterable[str] = None)[source]¶
Load a desired property matrix.
- Parameters:
- Returns:
property_matrix – Tensor of the property to be studied. Format depends on kwargs.
- Return type:
np.array, tf.Tensor
- property run: RunComputation¶
Method to access the available calculators.
- Returns:
class that has all available calculators as properties
- Return type:
- run_visualization(species: Optional[list] = None, molecules: bool = False, unwrapped: bool = False)[source]¶
Perform a trajectory visualization.
- static units_to_si(units_system) Units [source]¶
Returns a dictionary with equivalences from the unit experiment given by a string to SI. Along with some constants in the unit experiment provided (boltzmann, or other conversions). Instead, the user may provide a dictionary. In that case, the dictionary will be used as the unit experiment.
- mdsuite.experiment.experiment.update_species_attributes_with_pubchempy(species_list: List[SpeciesInfo])[source]¶
Add information to the species dictionary.
A fundamental part of this package is species specific analysis. Therefore, the Pubchempy package is used to add important species specific information to the class. This will include the charge of the ions which will be used in conductivity calculations.