From 4fdde1ab80ac0ec8c17762d2662980ea1671a27a Mon Sep 17 00:00:00 2001 From: Tetracarbonylnickel Date: Wed, 10 Apr 2024 18:50:43 +0200 Subject: [PATCH] spell check --- apax/bal/api.py | 4 ++-- apax/config/train_config.py | 4 ++-- apax/data/input_pipeline.py | 2 +- apax/md/ase_calc.py | 2 +- apax/train/run.py | 2 +- apax/utils/jax_md_reduced/partition.py | 8 ++++---- apax/utils/jax_md_reduced/simulate.py | 4 ++-- apax/utils/jax_md_reduced/smap.py | 2 +- examples/01_Model_Training.ipynb | 6 +++--- examples/02_Molecular_Dynamics.ipynb | 4 ++-- examples/04_Batch_Data_Selection.ipynb | 4 ++-- tests/unit_tests/data/test_input_pipeline.py | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/apax/bal/api.py b/apax/bal/api.py index 9f0571e4..f04c14ca 100644 --- a/apax/bal/api.py +++ b/apax/bal/api.py @@ -117,9 +117,9 @@ def kernel_selection( selection_method: Currently only "max_dist" is supported. feature_transforms: - Feature tranforms to be applied on top of the + Feature transforms to be applied on top of the base feature map transform. - Examples would include multiplcation with or addition of a constant. + Examples would include multiplication with or addition of a constant. selection_batch_size: Amount of new data points to be selected from `pool_atoms`. processing_batch_size: diff --git a/apax/config/train_config.py b/apax/config/train_config.py index cff58b70..388c0776 100644 --- a/apax/config/train_config.py +++ b/apax/config/train_config.py @@ -359,7 +359,7 @@ class CheckpointConfig(BaseModel, extra="forbid"): class Config(BaseModel, frozen=True, extra="forbid"): """ - Main configuration of a apax training run. Parameter that are cofig classes will + Main configuration of a apax training run. Parameter that are config classes will be generated by parsing the config.yaml file and are specified as shown :ref:`here `: @@ -385,7 +385,7 @@ class Config(BaseModel, frozen=True, extra="forbid"): | Number of models to be trained at once. n_jitted_steps : int, default = 1 | Number of train batches to be processed in a compiled loop. - | Can yield singificant speedups for small structures or small batch sizes. + | Can yield significant speedups for small structures or small batch sizes. data : :class:`.DataConfig` | Data configuration. model : :class:`.ModelConfig` diff --git a/apax/data/input_pipeline.py b/apax/data/input_pipeline.py index a6aceffc..9d75b4fd 100644 --- a/apax/data/input_pipeline.py +++ b/apax/data/input_pipeline.py @@ -18,7 +18,7 @@ def pad_nl(idx, offsets, max_neighbors): """ - Pad the neighbor list arrays to the maximal number of neighbors occuring. + Pad the neighbor list arrays to the maximal number of neighbors occurring. Parameters ---------- diff --git a/apax/md/ase_calc.py b/apax/md/ase_calc.py index 9637940f..57329af4 100644 --- a/apax/md/ase_calc.py +++ b/apax/md/ase_calc.py @@ -305,7 +305,7 @@ def batch_eval( unpadded_results = unpack_results(results, inputs) # for the last batch, the number of structures may be less - # than the batch_size, which is why we check this explicitely + # than the batch_size, which is why we check this explicitly num_strucutres_in_batch = results["energy"].shape[0] for j in range(num_strucutres_in_batch): atoms = atoms_list[i].copy() diff --git a/apax/train/run.py b/apax/train/run.py index da946c77..088a4d62 100644 --- a/apax/train/run.py +++ b/apax/train/run.py @@ -139,7 +139,7 @@ def run(user_config: Union[str, os.PathLike, dict], log_level="error"): Parameters ---------- user_config : str | os.PathLike | dict - training config full exmaple can be finde :ref:`here `: + training config full example can be find :ref:`here `: """ config = parse_config(user_config) diff --git a/apax/utils/jax_md_reduced/partition.py b/apax/utils/jax_md_reduced/partition.py index 36a7bafb..1a082605 100644 --- a/apax/utils/jax_md_reduced/partition.py +++ b/apax/utils/jax_md_reduced/partition.py @@ -161,7 +161,7 @@ def update(self, position: Array, **kwargs) -> "CellList": def kwarg_buffers(self): logging.warning( "kwarg_buffers renamed to named_buffer. The name " - "kwarg_buffers will be depricated." + "kwarg_buffers will be deprecated." ) return self.named_buffer @@ -179,7 +179,7 @@ class PartitionErrorCode(IntEnum): to allocate a new cell list. CELL_SIZE_TOO_SMALL: Indicates that the size of cells in a cell list was not large enough to properly capture particle interactions. This - indicates that it is necessary to allcoate a new cell list with larger + indicates that it is necessary to allocate a new cell list with larger cells. MALFORMED_BOX: Indicates that a box matrix was not properly upper triangular. @@ -242,7 +242,7 @@ class NeighborList: reference_position: The positions of particles when the neighbor list was constructed. This is used to decide whether the neighbor list ought to be updated. - error: An error code that is used to identify errors that occured during + error: An error code that is used to identify errors that occurred during neighbor list construction. See `PartitionError` and `PartitionErrorCode` for details. cell_list_capacity: An optional integer specifying the capacity of the cell @@ -317,7 +317,7 @@ class NeighborList: reference_position: The positions of particles when the neighbor list was constructed. This is used to decide whether the neighbor list ought to be updated. - error: An error code that is used to identify errors that occured during + error: An error code that is used to identify errors that occurred during neighbor list construction. See `PartitionError` and `PartitionErrorCode` for details. cell_list_capacity: An optional integer specifying the capacity of the cell diff --git a/apax/utils/jax_md_reduced/simulate.py b/apax/utils/jax_md_reduced/simulate.py index 5cd46c1f..c4a56901 100644 --- a/apax/utils/jax_md_reduced/simulate.py +++ b/apax/utils/jax_md_reduced/simulate.py @@ -1590,8 +1590,8 @@ def temp_csvr( Samples from the canonical ensemble in which the number of particles (N), the system volume (V), and the temperature (T) are held constant. CSVR - algorithmn samples the canonical distribution by rescaling the velocities - by a appropritely chosen random factor. At each timestep (dt) the rescaling + algorithm samples the canonical distribution by rescaling the velocities + by a appropriately chosen random factor. At each timestep (dt) the rescaling takes place and the rescaling factor is calculated using A7 Bussi et al. [#bussi2007]_. CSVR updates to the velocity are stochastic in nature and unlike the Berendsen thermostat it samples the true canonical diff --git a/apax/utils/jax_md_reduced/smap.py b/apax/utils/jax_md_reduced/smap.py index a4096cc5..7bb22f9b 100644 --- a/apax/utils/jax_md_reduced/smap.py +++ b/apax/utils/jax_md_reduced/smap.py @@ -160,7 +160,7 @@ def bond( an ndarray of distances or displacements of shape `[]` or `[d_in]` respectively. The metric can optionally take a floating point time as a third argument. - static_bonds: An ndarray of integer pairs wth shape `[b, 2]` where each + static_bonds: An ndarray of integer pairs with shape `[b, 2]` where each pair specifies a bond. `static_bonds` are baked into the returned compute function statically and cannot be changed after the fact. static_bond_types: An ndarray of integers of shape `[b]` specifying the diff --git a/examples/01_Model_Training.ipynb b/examples/01_Model_Training.ipynb index 9f3d012d..a0fc88d0 100644 --- a/examples/01_Model_Training.ipynb +++ b/examples/01_Model_Training.ipynb @@ -21,7 +21,7 @@ "\n", "## Acquiring a dataset\n", "\n", - "You can obtain the benzene dataset with DFT labels either by running the following command or manually from this [link](http://www.quantum-machine.org/gdml/data/xyz/ethanol_ccsd_t.zip). Apax uses ASE to read in datasets, so make sure to convert your own data into an ASE readable format (extxyz, traj etc). Be carefull the downloaded dataset has to be modified like in the `apax.untils.dataset.mod_md_datasets` function in order to be readable." + "You can obtain the benzene dataset with DFT labels either by running the following command or manually from this [link](http://www.quantum-machine.org/gdml/data/xyz/ethanol_ccsd_t.zip). Apax uses ASE to read in datasets, so make sure to convert your own data into an ASE readable format (extxyz, traj etc). Be careful the downloaded dataset has to be modified like in the `apax.utils.dataset.mod_md_datasets` function in order to be readable." ] }, { @@ -100,7 +100,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The following command create a minimal configuration file in the working directory. Full configuration file with descriptiond of the prameter can be found [here](https://github.com/apax-hub/apax/blob/main/apax/cli/templates/train_config_full.yaml)." + "The following command create a minimal configuration file in the working directory. Full configuration file with descriptiond of the parameter can be found [here](https://github.com/apax-hub/apax/blob/main/apax/cli/templates/train_config_full.yaml)." ] }, { @@ -291,7 +291,7 @@ "\n", "If training is interrupted for any reason, re-running the above `train` command will resume training from the latest checkpoint.\n", "\n", - "Furthermore, an Apax trianing can easily be started within a script." + "Furthermore, an Apax training can easily be started within a script." ] }, { diff --git a/examples/02_Molecular_Dynamics.ipynb b/examples/02_Molecular_Dynamics.ipynb index 59448fd8..41c5c659 100644 --- a/examples/02_Molecular_Dynamics.ipynb +++ b/examples/02_Molecular_Dynamics.ipynb @@ -244,7 +244,7 @@ "duration: 20_000 # fs\n", "initial_structure: project/benzene_mod.xyz\n", "```\n", - "Full configuration file with descriptiond of the prameter can be found [here](https://github.com/apax-hub/apax/blob/main/apax/cli/templates/md_config_minimal.yaml)." + "Full configuration file with descriptiond of the parameter can be found [here](https://github.com/apax-hub/apax/blob/main/apax/cli/templates/md_config_minimal.yaml)." ] }, { @@ -339,7 +339,7 @@ "metadata": {}, "source": [ "During the simulation, a progress bar tracks the instantaneous temperature at each outer step.\n", - "The simulation is followd by a small oh bondlength distribution analyses of the trajectory defined [here](#bondlength)." + "The simulation is followed by a small oh bondlength distribution analyses of the trajectory defined [here](#bondlength)." ] }, { diff --git a/examples/04_Batch_Data_Selection.ipynb b/examples/04_Batch_Data_Selection.ipynb index fa4f7435..1075a7c4 100644 --- a/examples/04_Batch_Data_Selection.ipynb +++ b/examples/04_Batch_Data_Selection.ipynb @@ -7,7 +7,7 @@ "# Batch Active Learning\n", "\n", "While it is possible to perform rudimentary data selection simply by randomly choosing samples, the batch of data thus drawn might not be the most informative one.\n", - "Choosing those samples whith the largest prediction uncertainties from trajectories often results in the selection of configurations from subsequent time steps.\n", + "Choosing those samples with the largest prediction uncertainties from trajectories often results in the selection of configurations from subsequent time steps.\n", "\n", "Batch selection methods can be constructed to select informative and diverse data, with or without following the underlying distribution.\n", "\n", @@ -392,7 +392,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "As we can see below, the batch selection method only picks a few data points from the optimization part of the pool, indicating that during an optmization the structure of the molecule does not change very much.\n", + "As we can see below, the batch selection method only picks a few data points from the optimization part of the pool, indicating that during an optimization the structure of the molecule does not change very much.\n", "Hence, there are not many informative samples to be found in it." ] }, diff --git a/tests/unit_tests/data/test_input_pipeline.py b/tests/unit_tests/data/test_input_pipeline.py index 8d9209a5..05d7360e 100644 --- a/tests/unit_tests/data/test_input_pipeline.py +++ b/tests/unit_tests/data/test_input_pipeline.py @@ -10,7 +10,7 @@ from apax.utils.data import split_atoms, split_idxs from apax.utils.random import seed_py_np_tf -# TODO REENABLE LATER +# TODO RE-ENABLE LATER # @pytest.mark.parametrize( # "num_data, pbc, calc_results, external_labels", # (