Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ruff by sorting the class variables in _so3.py #441

Merged
merged 69 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
fc94e79
improve TensorNet model coverage
kenko911 Jun 22, 2024
53357d7
Update pyproject.toml
kenko911 Jun 22, 2024
f65cdba
Improve the unit test for SO(3) equivarance in TensorNet class
kenko911 Jun 22, 2024
93574e0
Merge branch 'main' of https://github.com/kenko911/matgl
kenko911 Jun 22, 2024
16abc38
improve SO3Net model class coverage and simplify TensorNet implementa…
kenko911 Jun 23, 2024
6aaad51
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jun 23, 2024
2798176
improve the coverage in MLP_norm class
kenko911 Jun 24, 2024
e24bbdd
Merge branch 'main' of https://github.com/kenko911/matgl
kenko911 Jun 24, 2024
2101bb0
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jun 24, 2024
147d4f5
Better documentation for M3GNet potential training with stresses
kenko911 Jun 25, 2024
e144ae2
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jun 28, 2024
9b17963
Improve the implementation of three-body interactions
kenko911 Jul 3, 2024
dc6ed59
fixed black
kenko911 Jul 3, 2024
59ab134
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jul 5, 2024
522809c
Optimize the speed of _compute_3body class
kenko911 Jul 5, 2024
e290538
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jul 8, 2024
27c728f
type checking is added for scheduler
kenko911 Jul 8, 2024
355ee6b
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jul 14, 2024
3ac4f39
update M3GNet Potential training notebook for the demonstration of ob…
kenko911 Jul 14, 2024
992c17e
Downgrade sympy to avoid crash of SO3 operations
kenko911 Jul 14, 2024
193aaff
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jul 17, 2024
38df100
Smooth l1 loss function is added and united tests are improved
kenko911 Jul 17, 2024
ea64ed9
Merge branch 'main' of https://github.com/kenko911/matgl
kenko911 Jul 20, 2024
40133c0
merge the method predict_structure and featurize_structure into a fun…
kenko911 Jul 21, 2024
6ebdb57
Merge branch 'materialsvirtuallab:main' into main
kenko911 Jul 28, 2024
c469ef7
remove unnecessary else statement for training magmoms
kenko911 Jul 28, 2024
6a3e736
Merge branch 'materialsvirtuallab:main' into main
kenko911 Aug 1, 2024
a4de37b
Merge branch 'materialsvirtuallab:main' into main
kenko911 Aug 7, 2024
bdb5ee0
Merge branch 'materialsvirtuallab:main' into main
kenko911 Aug 14, 2024
e5764b3
modify so3 operation implementation to make united tests pass due to …
kenko911 Aug 14, 2024
07d9bdd
Merge branch 'main' of https://github.com/kenko911/matgl
kenko911 Aug 14, 2024
b57f0be
Merge branch 'main' of https://github.com/kenko911/matgl
kenko911 Aug 14, 2024
ef0ce51
skip test_load_all_models for MacOS pytest now
kenko911 Aug 14, 2024
ae43929
Merge branch 'materialsvirtuallab:main' into main
kenko911 Aug 16, 2024
c355500
Merge branch 'materialsvirtuallab:main' into main
kenko911 Sep 4, 2024
7f34ed9
Reference for CHGNet is added
kenko911 Sep 4, 2024
fdae7a1
Update README.md and index.md for including CHGNet
kenko911 Sep 4, 2024
6438649
add more description for using CHGNet pretrained models in Relaxation…
kenko911 Sep 4, 2024
981b9c1
Merge branch 'materialsvirtuallab:main' into main
kenko911 Sep 4, 2024
984f9fa
Merge branch 'main' of https://github.com/kenko911/matgl
kenko911 Sep 4, 2024
c00594b
Merge branch 'main' of https://github.com/kenko911/matgl
kenko911 Sep 18, 2024
b4e34cd
A command-line interface for performing ASE MD simulations is added
kenko911 Sep 18, 2024
efe4118
added back py.typed
kenko911 Sep 18, 2024
a32bddc
Merge branch 'materialsvirtuallab:main' into main
kenko911 Sep 22, 2024
d2f1c43
ExpNormal Smearing for radial basis functions is added
kenko911 Sep 22, 2024
916a77c
Changed deprecated torch.scalar_tensor into torch.Tensor
kenko911 Sep 23, 2024
49ba5d8
Converted the float number into tensor
kenko911 Sep 23, 2024
cba6fd6
Upgrade torch to 2.4.0 in pyproject.toml
kenko911 Oct 6, 2024
8b63fdc
fix the united test in test_bond.py
kenko911 Oct 6, 2024
cf9fc6a
Merge branch 'main' into main
shyuep Oct 10, 2024
a20fa10
Bump boto3 from 1.35.38 to 1.35.39
dependabot[bot] Oct 14, 2024
2c1a096
Merge branch 'materialsvirtuallab:main' into main
kenko911 Oct 14, 2024
7209f48
fix the error from the upgrade of boto3
kenko911 Oct 14, 2024
10932c0
Downgrade DGL to 2.2.1
kenko911 Oct 14, 2024
104b53e
Downgrade pytorch
kenko911 Oct 14, 2024
ae09d16
fix mypy by adding self.norm_layers is not None
kenko911 Oct 14, 2024
9f9f43c
Downgrade Pytorch and DGL version (#392)
kenko911 Oct 14, 2024
cf79de7
correct the downgrade for torch
kenko911 Oct 14, 2024
3aa5ef9
Merge branch 'dependabot/pip/boto3-1.35.39' into main
kenko911 Oct 14, 2024
9c185ed
fix the version of torchdata
kenko911 Oct 14, 2024
e6502e8
merged the conflicts
kenko911 Oct 14, 2024
a997119
downgrade torch to 2.2.1
kenko911 Oct 14, 2024
a2c6b80
included symbreak for chgnet training to improve code coverage
kenko911 Oct 22, 2024
f0112a0
Merge branch 'materialsvirtuallab:main' into main
kenko911 Nov 8, 2024
9ece41b
Merge branch 'materialsvirtuallab:main' into main
kenko911 Nov 22, 2024
b30f5b9
fix ruff by sorting '__all__' in _so3.py
kenko911 Nov 22, 2024
296a834
remove Bussi for MD now
kenko911 Nov 22, 2024
189a330
remove Bussi for now
kenko911 Nov 22, 2024
33c156d
Remove trailing whitespace
kenko911 Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/matgl/ext/ase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

"nvt_bussi" ensemble option is documented but not implemented

The code shows that while "nvt_bussi" is listed in the docstring as a valid ensemble option, there is no corresponding implementation in the if-elif chain. The code will raise a "Ensemble not supported" ValueError when users try to use this ensemble. The option should either be implemented or removed from the docstring.

🔗 Analysis chain

Missing implementation for "nvt_bussi" ensemble

The "nvt_bussi" option has been added to the type annotation but there's no corresponding implementation in the __init__ method's if-elif chain. This will raise a ValueError when users try to use this ensemble.

Let's verify if the ASE package supports Bussi thermostat:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if ASE has Bussi thermostat implementation
rg -l "class.*Bussi" || echo "No Bussi thermostat found in the codebase"

# Check if there are any existing tests for Bussi thermostat
rg -l "nvt_bussi" "test_*"

Length of output: 189


Script:

#!/bin/bash
# Let's check the implementation of the ensemble initialization
ast-grep --pattern 'def __init__($$$) {
  $$$
  if ensemble $$$:
    $$$
}'

# Also check for any mentions of Bussi in the codebase
rg -i "bussi" -A 5 -B 5

Length of output: 1007


Script:

#!/bin/bash
# Let's check the actual implementation of the ensemble handling in the initialization
rg "if ensemble ==" src/matgl/ext/ase.py -A 20

Length of output: 48


Script:

#!/bin/bash
# Let's try a different pattern to find the ensemble initialization code
rg "ensemble.*=.*" src/matgl/ext/ase.py -A 30 -B 5

# Also check if there's any other pattern for ensemble handling
rg "elif ensemble" src/matgl/ext/ase.py -A 5

Length of output: 5963

🧰 Tools
🪛 Ruff (0.7.0)

408-408: Trailing whitespace

Remove trailing whitespace

(W291)

temperature (float): temperature for MD simulation, in K
timestep (float): time step in fs
pressure (float): pressure in eV/A^3
Expand Down
2 changes: 1 addition & 1 deletion src/matgl/layers/_so3.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

__all__ = [
"RealSphericalHarmonics",
"SO3TensorProduct",
"SO3Convolution",
"SO3GatedNonlinearity",
"SO3ParametricGatedNonlinearity",
"SO3TensorProduct",
]


Expand Down
Loading