From 578aaa0b5852dbc1bb6468705fb1ebb5cd77dc17 Mon Sep 17 00:00:00 2001 From: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:14:42 +0800 Subject: [PATCH] Fix ruff by sorting the class variables in _so3.py (#441) * improve TensorNet model coverage * Update pyproject.toml Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * Improve the unit test for SO(3) equivarance in TensorNet class * improve SO3Net model class coverage and simplify TensorNet implementations * improve the coverage in MLP_norm class * Improve the implementation of three-body interactions * fixed black * Optimize the speed of _compute_3body class * type checking is added for scheduler * update M3GNet Potential training notebook for the demonstration of obtaining and using element offsets * Downgrade sympy to avoid crash of SO3 operations * Smooth l1 loss function is added and united tests are improved * merge the method predict_structure and featurize_structure into a function including both * remove unnecessary else statement for training magmoms * modify so3 operation implementation to make united tests pass due to the update of sympy * skip test_load_all_models for MacOS pytest now * Reference for CHGNet is added * Update README.md and index.md for including CHGNet Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * add more description for using CHGNet pretrained models in Relaxations and Simulations using the M3GNet Universal Potential.ipynb * A command-line interface for performing ASE MD simulations is added * added back py.typed * ExpNormal Smearing for radial basis functions is added * Changed deprecated torch.scalar_tensor into torch.Tensor Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * Converted the float number into tensor Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * fix the united test in test_bond.py * Bump boto3 from 1.35.38 to 1.35.39 Bumps [boto3](https://github.com/boto/boto3) from 1.35.38 to 1.35.39. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.35.38...1.35.39) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * fix the error from the upgrade of boto3 * Downgrade DGL to 2.2.1 * Downgrade pytorch * fix mypy by adding self.norm_layers is not None * Downgrade Pytorch and DGL version (#392) * improve TensorNet model coverage * Update pyproject.toml Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * Improve the unit test for SO(3) equivarance in TensorNet class * improve SO3Net model class coverage and simplify TensorNet implementations * improve the coverage in MLP_norm class * Improve the implementation of three-body interactions * fixed black * Optimize the speed of _compute_3body class * type checking is added for scheduler * update M3GNet Potential training notebook for the demonstration of obtaining and using element offsets * Downgrade sympy to avoid crash of SO3 operations * Smooth l1 loss function is added and united tests are improved * merge the method predict_structure and featurize_structure into a function including both * remove unnecessary else statement for training magmoms * modify so3 operation implementation to make united tests pass due to the update of sympy * skip test_load_all_models for MacOS pytest now * Reference for CHGNet is added * Update README.md and index.md for including CHGNet Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * add more description for using CHGNet pretrained models in Relaxations and Simulations using the M3GNet Universal Potential.ipynb * A command-line interface for performing ASE MD simulations is added * added back py.typed * ExpNormal Smearing for radial basis functions is added * Changed deprecated torch.scalar_tensor into torch.Tensor Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * Converted the float number into tensor Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * fix the united test in test_bond.py * fix the error from the upgrade of boto3 * Downgrade DGL to 2.2.1 * Downgrade pytorch * fix mypy by adding self.norm_layers is not None --------- Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Shyue Ping Ong * correct the downgrade for torch * fix the version of torchdata * downgrade torch to 2.2.1 * fix ruff by sorting '__all__' in _so3.py * remove Bussi for MD now Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * remove Bussi for now Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> * Remove trailing whitespace --------- Signed-off-by: Tsz Wai Ko <47970742+kenko911@users.noreply.github.com> Signed-off-by: dependabot[bot] Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Shyue Ping Ong Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/matgl/ext/ase.py | 4 ++-- src/matgl/layers/_so3.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matgl/ext/ase.py b/src/matgl/ext/ase.py index b5ae0631..e3a8d135 100644 --- a/src/matgl/ext/ase.py +++ b/src/matgl/ext/ase.py @@ -405,8 +405,8 @@ def __init__( stress of the atoms state_attr (torch.Tensor): State attr. stress_weight (float): conversion factor from GPa to eV/A^3 - ensemble (str): choose from "nve", "nvt", "nvt_langevin", "nvt_andersen", "npt", "npt_berendsen", - "npt_nose_hoover" + ensemble (str): choose from "nve", "nvt", "nvt_langevin", "nvt_andersen", "nvt_bussi", "npt", + "npt_berendsen", "npt_nose_hoover" temperature (float): temperature for MD simulation, in K timestep (float): time step in fs pressure (float): pressure in eV/A^3 diff --git a/src/matgl/layers/_so3.py b/src/matgl/layers/_so3.py index 13d7a825..53631b9e 100644 --- a/src/matgl/layers/_so3.py +++ b/src/matgl/layers/_so3.py @@ -16,10 +16,10 @@ __all__ = [ "RealSphericalHarmonics", - "SO3TensorProduct", "SO3Convolution", "SO3GatedNonlinearity", "SO3ParametricGatedNonlinearity", + "SO3TensorProduct", ]