diff --git a/mdsuite/calculators/green_kubo_distinct_diffusion_coefficients.py b/mdsuite/calculators/green_kubo_distinct_diffusion_coefficients.py index 31f56d22..1098df38 100644 --- a/mdsuite/calculators/green_kubo_distinct_diffusion_coefficients.py +++ b/mdsuite/calculators/green_kubo_distinct_diffusion_coefficients.py @@ -57,7 +57,8 @@ class Args: class GreenKuboDistinctDiffusionCoefficients(TrajectoryCalculator, ABC): """ - Class for the Green-Kubo diffusion coefficient implementation + Class for the Green-Kubo diffusion coefficient implementation. + Attributes ---------- experiment : object @@ -211,7 +212,8 @@ def _map_over_particles(self, ds_a: np.ndarray, ds_b: np.ndarray) -> np.ndarray: def ref_conf_map(ref_dataset, full_ds): """ - Maps over the atoms axis in dataset + Maps over the atoms axis in dataset. + Parameters ---------- dataset diff --git a/mdsuite/calculators/green_kubo_self_diffusion_coefficients.py b/mdsuite/calculators/green_kubo_self_diffusion_coefficients.py index 6e72a629..d85314e8 100644 --- a/mdsuite/calculators/green_kubo_self_diffusion_coefficients.py +++ b/mdsuite/calculators/green_kubo_self_diffusion_coefficients.py @@ -59,7 +59,8 @@ class Args: class GreenKuboDiffusionCoefficients(TrajectoryCalculator, ABC): """ - Class for the Green-Kubo diffusion coefficient implementation + Class for the Green-Kubo diffusion coefficient implementation. + Attributes ---------- experiment : object diff --git a/mdsuite/calculators/radial_distribution_function.py b/mdsuite/calculators/radial_distribution_function.py index 5b576bf1..870eec7f 100644 --- a/mdsuite/calculators/radial_distribution_function.py +++ b/mdsuite/calculators/radial_distribution_function.py @@ -738,6 +738,7 @@ def _spherical_symmetry(data: np.array) -> np.array: # TODO make it a property ---------- data : np.array tensor_values on which to operate + Returns ------- function_values : np.array @@ -751,6 +752,7 @@ def _correction_1(data: np.array) -> np.array: tensor_values : np.array tensor_values on which to operate + Returns ------- function_values : np.array @@ -765,6 +767,7 @@ def _correction_2(data: np.array) -> np.array: tensor_values : np.array tensor_values on which to operate + Returns ------- function_values : np.array @@ -785,7 +788,8 @@ def _correction_2(data: np.array) -> np.array: def _piecewise(data: np.array) -> np.array: """ - Return a piecewise operation on a set of tensor_values + Return a piecewise operation on a set of tensor_values. + Parameters ---------- data : np.array diff --git a/mdsuite/calculators/spatial_distribution_function.py b/mdsuite/calculators/spatial_distribution_function.py index 521537b0..8159d4e0 100644 --- a/mdsuite/calculators/spatial_distribution_function.py +++ b/mdsuite/calculators/spatial_distribution_function.py @@ -168,6 +168,7 @@ def _load_positions(self, indices: list, species: str) -> tf.Tensor: List of indices to take from the database_path species: str The species to load the positions from + Returns ------- loaded_data : tf.Tensor diff --git a/mdsuite/database/data_manager.py b/mdsuite/database/data_manager.py index 8b514fd2..ff7b9352 100644 --- a/mdsuite/database/data_manager.py +++ b/mdsuite/database/data_manager.py @@ -175,6 +175,7 @@ def generator( Path to the tensor_values in the database_path dictionary : bool If true, tensor_values is returned in a dictionary + Returns ------- """ @@ -242,6 +243,7 @@ def atom_generator( Path to the tensor_values in the database_path dictionary : bool If true, tensor_values is returned in a dictionary + Returns ------- """ @@ -308,7 +310,8 @@ def ensemble_generator(self, system: bool = False, glob_data: dict = None) -> tu def dictionary_generator(ensemble_loop, correlation_time, data_range): """ - Generator for the ensemble loop + Generator for the ensemble loop. + Parameters ---------- ensemble_loop : int @@ -317,6 +320,7 @@ def dictionary_generator(ensemble_loop, correlation_time, data_range): Distance between ensembles data_range : int Size of each ensemble + Returns ------- None. diff --git a/mdsuite/database/simulation_database.py b/mdsuite/database/simulation_database.py index 60668fdb..dc300fe6 100644 --- a/mdsuite/database/simulation_database.py +++ b/mdsuite/database/simulation_database.py @@ -196,7 +196,8 @@ def __init__(self, species_list: List[SpeciesInfo], chunk_size: int): def add_data(self, data: np.ndarray, config_idx, species_name, property_name): """ - Add configuration data to the chunk + Add configuration data to the chunk. + Parameters ---------- data: diff --git a/mdsuite/experiment/experiment.py b/mdsuite/experiment/experiment.py index 57167776..19463214 100644 --- a/mdsuite/experiment/experiment.py +++ b/mdsuite/experiment/experiment.py @@ -470,7 +470,8 @@ def add_data( 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 + TODO reference online documentation of data loading in the error messages. + Parameters ---------- simulation_data : str or pathlib.Path or mdsuite.file_io.file_read.FileProcessor @@ -688,7 +689,8 @@ def update_species_attributes_with_pubchempy(species_list: List[SpeciesInfo]): def _species_list_to_architecture_dict(species_list, n_configurations): # TODO let the database handler use the species list directly instead of the dict """ - converter from species list to legacy architecture dict + converter from species list to legacy architecture dict. + Parameters ---------- species_list diff --git a/mdsuite/experiment/run_module.py b/mdsuite/experiment/run_module.py index 9aea3351..2da4bf99 100644 --- a/mdsuite/experiment/run_module.py +++ b/mdsuite/experiment/run_module.py @@ -43,7 +43,8 @@ class RunModule: """ def __init__(self, parent, module_dict, **kwargs): - """Initialize the attributes + """Initialize the attributes. + Parameters ---------- parent: Experiment diff --git a/mdsuite/file_io/extxyz_files.py b/mdsuite/file_io/extxyz_files.py index 4e255863..45fa1372 100644 --- a/mdsuite/file_io/extxyz_files.py +++ b/mdsuite/file_io/extxyz_files.py @@ -257,6 +257,7 @@ def _get_property_to_column_idx_dict( header to analyse var_names: dict of translations from MDsuite property names to extxyz property names + Returns ------- species_index: int diff --git a/mdsuite/file_io/lammps_flux_files.py b/mdsuite/file_io/lammps_flux_files.py index 79fd45bd..fb13a054 100644 --- a/mdsuite/file_io/lammps_flux_files.py +++ b/mdsuite/file_io/lammps_flux_files.py @@ -64,7 +64,8 @@ def __init__( """ Initialize the lammps flux reader. Since the flux file does not have a fixed expected content, you need to provide the necessary metadata - (sample_rate, box_l) here manually + (sample_rate, box_l) here manually. + Parameters ---------- file_path diff --git a/mdsuite/file_io/script_input.py b/mdsuite/file_io/script_input.py index 31fd5eca..2cb956c2 100644 --- a/mdsuite/file_io/script_input.py +++ b/mdsuite/file_io/script_input.py @@ -15,7 +15,8 @@ def __init__( self, data: TrajectoryChunkData, metadata: TrajectoryMetadata, name: str ): """ - Provide all the data needed for this class to act as a FileProcessor + Provide all the data needed for this class to act as a FileProcessor. + Parameters ---------- data diff --git a/mdsuite/file_io/tabular_text_files.py b/mdsuite/file_io/tabular_text_files.py index 704d5ee5..312afa6e 100644 --- a/mdsuite/file_io/tabular_text_files.py +++ b/mdsuite/file_io/tabular_text_files.py @@ -71,7 +71,8 @@ def __init__( Init, also handles the combination of file_format_column_names and custom_column_names. The result, self._column_name_dict is supposed to be used by child functions to - create their TabularTextFileReaderData + create their TabularTextFileReaderData. + Parameters ---------- file_path: @@ -164,7 +165,8 @@ def _read_process_n_configurations( n_header_lines: int = 0, ) -> mdsuite.database.simulation_database.TrajectoryChunkData: """ - Read n configurations and package them into a trajectory chunk of the right format + Read n configurations and package them into a trajectory chunk of the right format. + Parameters ---------- file: @@ -223,7 +225,8 @@ def _read_process_n_configurations( def read_n_lines(file, n_lines: int, start_at: int = None) -> list: """ Get n_lines lines, starting at line number start_at. - If start_at is None, read from the current file state + If start_at is None, read from the current file state. + Returns ------- A list of strings, one string for each line. @@ -236,7 +239,8 @@ def read_n_lines(file, n_lines: int, start_at: int = None) -> list: def skip_n_lines(file, n_lines: int) -> None: """ - skip n_lines in file + skip n_lines in file. + Parameters ---------- file: the file where we skip lines diff --git a/mdsuite/memory_management/memory_manager.py b/mdsuite/memory_management/memory_manager.py index f0ce2e07..8cf5c8c0 100644 --- a/mdsuite/memory_management/memory_manager.py +++ b/mdsuite/memory_management/memory_manager.py @@ -355,6 +355,7 @@ def get_ensemble_loop( Data range to be used in the analysis. correlation_time : int Correlation time to be considered when looping over the tensor_values + Returns ------- data_range_partitions : int diff --git a/mdsuite/project/project.py b/mdsuite/project/project.py index f5a4666c..327da53e 100644 --- a/mdsuite/project/project.py +++ b/mdsuite/project/project.py @@ -273,6 +273,7 @@ def disable_experiments(self, names: Union[str, list]): ---------- names: Name or list of names of experiments that should be instantiated and loaded into self.experiments + Returns ------- @@ -297,6 +298,7 @@ def add_data(self, data_sets: dict): values: str or mdsuite.file_io.file_read.FileProcessor refer to mdsuite.experiment.add_data() for an explanation of the file specification options + Returns ------- Updates the experiment classes. diff --git a/mdsuite/transformations/transformations.py b/mdsuite/transformations/transformations.py index 58baf090..ecb24073 100644 --- a/mdsuite/transformations/transformations.py +++ b/mdsuite/transformations/transformations.py @@ -178,7 +178,8 @@ def _save_output( Save the tensor_values into the database_path # todo for the future: this should not be part of the transformation. # the transformation should yield a batch and the experiment should take care of - # storing it in the correct place, just as with file inputs + # storing it in the correct place, just as with file inputs. + Returns ------- saves the tensor_values to the database_path. @@ -446,7 +447,8 @@ class SingleSpeciesTrafo(Transformations): def run_transformation(self, species: typing.Iterable[str] = None): """ Perform the batching and data loading for the transformation, - then calls transform_batch + then calls transform_batch. + Parameters ---------- species : Iterable[str] @@ -553,7 +555,8 @@ class MultiSpeciesTrafo(Transformations): def run_transformation(self, species: typing.Iterable[str] = None) -> None: """ Perform the batching and data loading for the transformation, - then calls transform_batch + then calls transform_batch. + Parameters ---------- species : Iterable[str] diff --git a/mdsuite/utils/meta_functions.py b/mdsuite/utils/meta_functions.py index 2b988fd7..15ef4632 100644 --- a/mdsuite/utils/meta_functions.py +++ b/mdsuite/utils/meta_functions.py @@ -467,7 +467,8 @@ def get_nearest_divisor(a: int, b: int) -> int: def split_array(data: np.array, condition: np.array) -> list: """ - split an array by a condition + split an array by a condition. + Parameters ---------- data : np.array diff --git a/mdsuite/utils/scale_functions.py b/mdsuite/utils/scale_functions.py index a9ad0823..6d95bd80 100644 --- a/mdsuite/utils/scale_functions.py +++ b/mdsuite/utils/scale_functions.py @@ -81,6 +81,7 @@ def quadratic_scale_function( Scalar scaling factor for the inner multiplication outer_scale_factor : int Scalar scaling factor for the outer multiplication + Returns ------- scaled_memory : int