Skip to content

Updating the AIMNet package#34

Merged
cplett merged 4 commits intofaccts:mainfrom
cplett:aimnet_update
Apr 8, 2026
Merged

Updating the AIMNet package#34
cplett merged 4 commits intofaccts:mainfrom
cplett:aimnet_update

Conversation

@cplett
Copy link
Copy Markdown
Contributor

@cplett cplett commented Apr 7, 2026

This PR updates the AIMNet2 integration to use the currently maintained package (aimnetcentral), enabling access to all supported models.

Closes #32.

Signed-off-by: Christoph Plett <plett@faccts.de>
@cplett cplett added this to the v2.1.0 milestone Apr 7, 2026
@cplett cplett requested a review from stgeo April 7, 2026 07:32
@cplett cplett self-assigned this Apr 7, 2026
@cplett cplett added the enhancement New feature or request label Apr 7, 2026
Copy link
Copy Markdown
Contributor

@stgeo stgeo left a comment

Choose a reason for hiding this comment

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

Thanks - looks much better now!

In addition to the inline comments, I noticed two things:

  • I got a PyTorch/CUDA warning:
venv-aimnet2/lib/python3.12/site-packages/torch/cuda/__init__.py:371: UserWarning: Found GPU0 NVIDIA RTX A500 Laptop GPU which is of compute capability (CC) 8.6.
The following list shows the CCs this version of PyTorch was built for and the hardware CCs it supports:
Please follow the instructions at https://pytorch.org/get-started/locally/ to install a PyTorch release that supports one of these CUDA versions: 12.6, 12.8, 13.0
  _warn_unsupported_code(d, device_cc, code_ccs)

It goes away with -d cuda. Not sure how to make it not complain. In any case, it's just a warning and it works correctly on both GPU and CPU.

  • The test references need to be updated for the new default model:
======================================================================
FAIL: test_H2O_engrad (__main__.Aimnet2Tests.test_H2O_engrad)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tests/aimnet2/test_aiment2_standalone.py", line 58, in test_H2O_engrad
    self.assertAlmostEqual(energy, expected_energy, places=9)
AssertionError: -76.4768264497 != -76.47682538331 within 9 places (1.0663899985274838e-06 difference)

======================================================================
FAIL: test_OH_anion_eng_grad (__main__.Aimnet2Tests.test_OH_anion_eng_grad)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/aimnet2/test_aiment2_standalone.py", line 93, in test_OH_anion_eng_grad
    self.assertAlmostEqual(energy, expected_energy, places=9)
AssertionError: -75.82629740302 != -75.82629634884 within 9 places (1.0541800037344728e-06 difference)

======================================================================
FAIL: test_OH_rad_eng_grad (__main__.Aimnet2Tests.test_OH_rad_eng_grad)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/aimnet2/test_aiment2_standalone.py", line 128, in test_OH_rad_eng_grad
    self.assertAlmostEqual(energy, expected_energy, places=7)
AssertionError: -75.68258800204 != -75.68258695326 within 7 places (1.0487800068403885e-06 difference)

cplett added 3 commits April 8, 2026 08:25
Signed-off-by: Christoph Plett <plett@faccts.de>
Signed-off-by: Christoph Plett <plett@faccts.de>
Signed-off-by: Christoph Plett <plett@faccts.de>
@cplett
Copy link
Copy Markdown
Contributor Author

cplett commented Apr 8, 2026

@stgeo regarding the warning: It seems to me that the cuda version you have installed does not match your GPU. So this is probably a warning the user might want to have. Otherwise, we could also filter it with warnings.filterwarnings.

The tests are updated now.

@cplett cplett requested a review from stgeo April 8, 2026 07:44
Copy link
Copy Markdown
Contributor

@stgeo stgeo left a comment

Choose a reason for hiding this comment

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

Thanks, good to go!

@cplett cplett merged commit c18542b into faccts:main Apr 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aimnet2 dependency

2 participants