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

Libcint interface #132

Merged
merged 128 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
5f4497b
Initial libcint interface
marvinfriede Jul 8, 2023
a6412c3
Large test clean up
marvinfriede Jul 9, 2023
1609e6f
Fix and extend test
marvinfriede Jul 10, 2023
ccd0b1f
Integral driver
marvinfriede Jul 21, 2023
c405a5a
Container for (multipolar) potentials
marvinfriede Jul 21, 2023
2ce59dc
Non-batched dipole integral
marvinfriede Jul 21, 2023
09eba86
(Pseudo-)Batched version
marvinfriede Jul 21, 2023
53ab1b3
Provide dxtblibs wheels
marvinfriede Jul 21, 2023
e87439b
Update settings
marvinfriede Jul 21, 2023
4ecd8e4
Formatting and refactoring
marvinfriede Jul 24, 2023
3966b61
Change p-orbital ordering
marvinfriede Jul 24, 2023
c51d16b
More clean up
marvinfriede Jul 24, 2023
8026187
Prepare properties
marvinfriede Jul 25, 2023
99cca93
Dipole moment
marvinfriede Aug 2, 2023
163c34e
Fix culling and indexing
marvinfriede Aug 4, 2023
bb156bd
Example IR spectrum calculation
marvinfriede Aug 15, 2023
b823eaf
Formatting and bug fixes
marvinfriede Aug 15, 2023
53e7409
Separate out properties
marvinfriede Aug 15, 2023
87f2cc5
Improve imports in external
marvinfriede Aug 15, 2023
d331e46
Add field gradient
marvinfriede Aug 15, 2023
1732ded
Add tests
marvinfriede Aug 15, 2023
0140ad1
Test
marvinfriede Aug 18, 2023
0932a3e
Test
marvinfriede Aug 22, 2023
b6d8e64
Test timing
marvinfriede Aug 23, 2023
faf8df2
Plot
marvinfriede Aug 24, 2023
59b919f
Test shift
marvinfriede Sep 7, 2023
125b52a
Tests
marvinfriede Sep 7, 2023
309723b
WIP: Clean up
marvinfriede Nov 20, 2023
cdc8d4a
WIP: More clean up
marvinfriede Nov 21, 2023
90d0b01
WIP: Even more cleanup
marvinfriede Nov 22, 2023
0f5f717
WIP: Still cleaning up
marvinfriede Nov 22, 2023
8c08e0e
WIP: Almost done cleaning up
marvinfriede Nov 23, 2023
f961142
WIP: Only 4 tests still failing
marvinfriede Nov 23, 2023
b175b91
WIP: More refactoring
marvinfriede Nov 24, 2023
72b66e3
WIP: All tests are passing in 3.10
marvinfriede Nov 24, 2023
b8185d0
Vectorize analytical overlap gradient
marvinfriede Nov 30, 2023
073182f
Also adapt recursion
marvinfriede Nov 30, 2023
86d65bd
More integral refactoring
marvinfriede Dec 4, 2023
e45a8f1
Fix memory leak from memoization
marvinfriede Dec 4, 2023
e4a0459
Timing
marvinfriede Dec 4, 2023
5ae7a75
Timing
marvinfriede Dec 4, 2023
9bb5e35
Add labels
marvinfriede Dec 5, 2023
0445395
Remove torch version variable
marvinfriede Dec 5, 2023
44cd3a1
Better timer
marvinfriede Dec 5, 2023
0d1934a
Config classes
marvinfriede Dec 5, 2023
63fe590
Improve output
marvinfriede Dec 5, 2023
4d21465
WIP: Fix tests
marvinfriede Dec 6, 2023
6b197f9
Fix tests
marvinfriede Dec 10, 2023
61de1d2
Skip importing traced code from recursive MD
marvinfriede Dec 16, 2023
d987e94
Minor patches
marvinfriede Jan 6, 2024
3701ea0
More fixes
marvinfriede Jan 6, 2024
c2a8eca
Functions transforms
marvinfriede Jan 17, 2024
5a379f2
Numerical IR
marvinfriede Jan 18, 2024
025952c
Property derivatives
marvinfriede Jan 18, 2024
e217a08
Hyperpolarizability
marvinfriede Jan 19, 2024
dd7cc88
Legacy overlap
marvinfriede Jan 26, 2024
8b557b5
Properly project out translation and rotation in vibrational analysis
marvinfriede Jan 31, 2024
6fa68fc
Add structure
marvinfriede Feb 2, 2024
805f392
Fix for IR
marvinfriede Feb 2, 2024
bcca6da
Update einsum, SCF files, fieldgrad
marvinfriede Mar 1, 2024
d6177be
Minor updates (use storch, more notes, docs)
marvinfriede Mar 1, 2024
0a96d20
Lazy loading
marvinfriede Mar 2, 2024
a4e8a60
Introduce components as base for TB terms
marvinfriede Mar 7, 2024
fbfa4e3
Clean up calculator methods
marvinfriede Mar 10, 2024
2d70638
Remove notebooks
marvinfriede Mar 15, 2024
26e5b6e
Add extension how-to
marvinfriede Mar 15, 2024
0188130
Fix tests and change labels
marvinfriede Mar 15, 2024
c4e24d6
Reset integrals
marvinfriede Mar 17, 2024
dfebaae
Better printing
marvinfriede Mar 21, 2024
6d61a50
Fix data (data now from tad_mctc)
marvinfriede Mar 22, 2024
1448285
Fix tests
marvinfriede Mar 22, 2024
156b381
Format
marvinfriede Mar 22, 2024
a417859
Un-mass weight normal modes and IR unit fix
marvinfriede Mar 24, 2024
33d5738
Result containers and docstrings
marvinfriede Mar 25, 2024
cccfa9a
More tests and debugging higher-order AD
marvinfriede Mar 25, 2024
4c8dfdf
Remove duplicate charges and EEQ (both in tad-mctc)
marvinfriede Mar 25, 2024
1fe9982
Fix Raman intensities
marvinfriede Mar 26, 2024
cb37a93
Skip batch tests and remove data (now from tad-mctc)
marvinfriede Mar 26, 2024
f4e22c6
Fix reference values because of slight change in guess
marvinfriede Mar 26, 2024
9900043
Move all TB contributions to `components`
marvinfriede Mar 26, 2024
e7e3a08
Remove data reader and PTB data
marvinfriede Mar 26, 2024
5632600
Refactor classicals for consistency
marvinfriede Mar 26, 2024
1a0cf07
Move basis to own dir and fix normal mode test
marvinfriede Mar 26, 2024
312c21c
Change IndexHelper signature and remove units
marvinfriede Mar 26, 2024
d38e0a5
Improve printout
marvinfriede Mar 27, 2024
6602390
Finalize singlepoint printout
marvinfriede Mar 28, 2024
1d94383
Skip timer if no parent
marvinfriede Mar 28, 2024
3286962
Clean up and renaming
marvinfriede Mar 29, 2024
ecebf48
Add license notice in all files
marvinfriede Mar 29, 2024
cb174f4
Move CN tests to tad-mctc and some clean up
marvinfriede Mar 29, 2024
5225867
Clean out examples
marvinfriede Mar 30, 2024
1089b00
Clean up utils
marvinfriede Mar 30, 2024
edf2cb0
Conformer batch mode and performance improvement
marvinfriede Apr 1, 2024
3d3a91d
Clean up
marvinfriede Apr 2, 2024
3a13934
Refactor typing
marvinfriede Apr 4, 2024
ab9a25a
Adapt test workflow
marvinfriede Apr 4, 2024
f78af25
Fix tests across all versions
marvinfriede Apr 5, 2024
dd19aee
Make defaults explicit and start manually merging RAM fix
marvinfriede Apr 5, 2024
19da07a
Fix some licenses and batch modes
marvinfriede Apr 8, 2024
9c91430
Refactor libcint interface
marvinfriede Apr 8, 2024
46a4c6b
Continue merging RAM fix
marvinfriede Apr 8, 2024
649a518
Fix imports
marvinfriede Apr 9, 2024
5e1d448
Refactor SCF variants
marvinfriede Apr 9, 2024
dafbc0a
Refactor libcint library integration
marvinfriede Apr 9, 2024
5ae8346
Revert default SCF mode in tests to non pure
marvinfriede Apr 9, 2024
395f98c
Updates for tad-libcint
marvinfriede Apr 12, 2024
601804e
Setup libcint calculation in CPU context
marvinfriede Apr 12, 2024
111df98
Update GA workflow
marvinfriede Apr 12, 2024
ac31ab1
Docs for param, loaders, mol
marvinfriede Apr 14, 2024
a196bf2
Docs for properties
marvinfriede Apr 15, 2024
816498c
Proper caching
marvinfriede Apr 16, 2024
8b8fac0
Fix tests
marvinfriede Apr 16, 2024
b6e05f2
Fix adapted symeig wrapper in xitorch
marvinfriede Apr 17, 2024
a0a6bc3
CUDA example and IndexHelper improvement
marvinfriede Apr 19, 2024
f13708d
Update forces calculation
marvinfriede Apr 19, 2024
0eaf98c
Add LICENSE
marvinfriede Apr 19, 2024
3bf54a6
Linting
marvinfriede Apr 22, 2024
b66f564
Remove print if under verbosity threshold
marvinfriede Apr 22, 2024
77c8d19
SCF tests
marvinfriede Apr 23, 2024
1614278
Recover forces printout
marvinfriede Apr 24, 2024
54bd788
Final fixes
marvinfriede Apr 24, 2024
3302675
Move PySCF to exlibs
marvinfriede Apr 24, 2024
d7f86d6
Refactor calculator
marvinfriede Apr 24, 2024
c27bf25
Fix type annotations
marvinfriede Apr 24, 2024
03f6be0
Fix cache bug
marvinfriede Apr 25, 2024
ff87988
Export config
marvinfriede Apr 25, 2024
9fb9dc3
Enable batch print
marvinfriede Apr 26, 2024
dd0a8db
Clean up examples
marvinfriede Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
108 changes: 108 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# This file is part of dxtb.
#
# SPDX-Identifier: Apache-2.0
# Copyright (C) 2024 Grimme Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Tests

on:
push:
branches:
- main
- master
paths-ignore:
- "doc*/**"
- "./*.ya?ml"
- "**/*.md"
- "**/*.rst"

pull_request:
paths-ignore:
- "doc*/**"
- "./*.ya?ml"
- "**/*.md"
- "**/*.rst"

workflow_dispatch:

jobs:
main:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
torch-version: ["1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2"]
exclude:
# PyTorch now fully supports Python=<3.11
# see: https://github.com/pytorch/pytorch/issues/86566
#
# PyTorch does not support Python 3.12 (all platforms)
# see: https://github.com/pytorch/pytorch/issues/110436
- os: ubuntu-latest
python-version: "3.12"
- os: macos-latest
python-version: "3.12"
- os: windows-latest
python-version: "3.12"
# PyTorch<1.13.0 does only support Python=<3.10
- python-version: "3.11"
torch-version: "1.11.0"
- python-version: "3.11"
torch-version: "1.12.1"
# On macOS and Windows, 1.13.x is also not supported for Python>=3.10
- os: macos-latest
python-version: "3.11"
torch-version: "1.13.1"
- os: windows-latest
python-version: "3.11"
torch-version: "1.13.1"

runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash {0}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox

- name: Determine TOXENV
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."

- name: Unittests with tox
run: tox -e ${{ env.TOXENV }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: >
matrix.python-version == '3.11' &&
matrix.torch-version == '2.2.2' &&
matrix.os == 'ubuntu-latest'
with:
files: ./coverage.xml # optional
93 changes: 93 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# This file is part of dxtb.
#
# SPDX-Identifier: Apache-2.0
# Copyright (C) 2024 Grimme Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build

on:
push:
branches:
- main
tags:
- "v*"

pull_request:
branches:
- main

workflow_dispatch:

jobs:
wheel:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build wheel (bdist)
run: pipx run build --wheel

- name: Upload wheel as artifact
uses: actions/upload-artifact@v3
with:
path: dist/*.whl

sdist:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build source distribution (sdist)
run: pipx run build --sdist

- name: Upload source distribution as artifact
uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_test_pypi:
needs: [sdist, wheel]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
path: dist

- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

upload_pypi:
needs: [sdist, wheel, upload_test_pypi]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
path: dist

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
50 changes: 0 additions & 50 deletions .github/workflows/test.yml

This file was deleted.

26 changes: 21 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# This file is part of dxtb.
#
# SPDX-Identifier: Apache-2.0
# Copyright (C) 2024 Grimme Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Prerequisites
*.d

Expand Down Expand Up @@ -189,7 +206,6 @@ data/*/processed*
data/misc

# exclude some sample and reaction files for tests
!data/PTB/samples_HE.json
!data/GMTKN55/samples_ACONF.json
!data/GMTKN55/reactions_ACONF.json

Expand All @@ -202,16 +218,16 @@ data/misc
# models
models/

# ML model bookkeeping
src/lightning_logs/
src/wandb/

# other
devel*

# plots
plots/
figs/
examples/*.pdf
examples/*.svg

dxtb.profile

# pytorch lightning
src/lightning_logs/*
Expand Down
27 changes: 22 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,53 @@
# This file is part of dxtb.
#
# SPDX-Identifier: Apache-2.0
# Copyright (C) 2024 Grimme Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: check-added-large-files
args: ["--maxkb=20000"]
- id: debug-statements
language_version: python3

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers, --max-py-version, "3.11"]

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.3.0
hooks:
- id: black
6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"editor.formatOnPaste": false, // not supported by black
"editor.insertSpaces": true,
"editor.tabSize": 4
},
"pylint.args": ["--indent-string=' '"],
"python.analysis.diagnosticSeverityOverrides": {
"reportPrivateImportUsage": "information"
},
"python.defaultInterpreterPath": "${env:CONDA_PREFIX}/envs/dxtb/bin/python",
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": ["--indent-string=' '"],
"python.testing.pytestArgs": [],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
Expand Down
Loading