Skip to content

Commit cd68593

Browse files
authored
Merge pull request #378 from tovrstra/fchk-ref-energy
Fchk ref energy
2 parents f8af4e8 + 7069ca9 commit cd68593

29 files changed

+721
-64
lines changed

.github/workflows/pytest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
if: ${{ matrix.python-version == '3.9'}}
2828
# Ensure changes to these dependencies are reflected
2929
# in pyproject.toml and docs/install.rst
30-
run: pip install numpy==1.22 scipy==1.11.1 attrs==21.3.0
30+
run: pip install numpy==1.26.4 scipy==1.13.1 attrs==21.3.0
3131
- name: Install development version
3232
run: pip install -e .[dev]
3333
# If some tests are slow against expectations, pytest will abort due to timeout.

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: 'iodata/test/data/.*'
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.6.0
4+
rev: v5.0.0
55
hooks:
66
- id: check-added-large-files
77
args: ["--maxkb=100"]
@@ -29,11 +29,11 @@ repos:
2929
- id: remove-crlf
3030
exclude_types: [binary]
3131
- repo: https://github.com/python-jsonschema/check-jsonschema
32-
rev: 0.28.5
32+
rev: 0.31.3
3333
hooks:
3434
- id: check-github-workflows
3535
- repo: https://github.com/astral-sh/ruff-pre-commit
36-
rev: v0.4.9
36+
rev: v0.10.0
3737
hooks:
3838
- id: ruff-format
3939
- id: ruff

docs/gen_formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from iodata.api import FORMAT_MODULES
2323

24-
__all__ = ("format_words", "print_section", "main")
24+
__all__ = ("format_words", "main", "print_section")
2525

2626

2727
HEADER = """

docs/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In addition, IOData has the following dependencies:
3434
Ensure changes to these dependencies are reflected
3535
in pyproject.toml and .github/workflows/pytest.yaml
3636
37-
- numpy >= 1.22: https://numpy.org/
37+
- numpy >= 1.26.4: https://numpy.org/
3838
- scipy >= 1.11.1: https://scipy.org/
3939
- attrs >= 21.3.0: https://www.attrs.org/en/stable/index.html
4040

iodata/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
from .api import dump_many, dump_one, load_many, load_one, write_input
2929
from .iodata import IOData
3030

31-
__all__ = ("IOData", "load_one", "load_many", "dump_one", "dump_many", "write_input")
31+
__all__ = ("IOData", "dump_many", "dump_one", "load_many", "load_one", "write_input")

iodata/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
WriteInputError,
3838
)
3939

40-
__all__ = ("load_one", "load_many", "dump_one", "dump_many", "write_input")
40+
__all__ = ("dump_many", "dump_one", "load_many", "load_one", "write_input")
4141

4242

4343
def _find_format_modules():

iodata/basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
from .attrutils import convert_array_to, validate_shape
3535

36-
__all__ = ("angmom_sti", "angmom_its", "Shell", "MolecularBasis")
36+
__all__ = ("MolecularBasis", "Shell", "angmom_its", "angmom_sti")
3737

3838
ANGMOM_CHARS = "spdfghiklmnoqrtuvwxyzabce"
3939

iodata/convert.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
from .orbitals import MolecularOrbitals
3232

3333
__all__ = (
34-
"convert_conventions",
35-
"iter_cart_alphabet",
36-
"HORTON2_CONVENTIONS",
3734
"CCA_CONVENTIONS",
38-
"convert_to_unrestricted",
35+
"HORTON2_CONVENTIONS",
36+
"convert_conventions",
3937
"convert_to_segmented",
38+
"convert_to_unrestricted",
39+
"iter_cart_alphabet",
4040
)
4141

4242

iodata/docstrings.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
from typing import Callable, Optional
2222

2323
__all__ = (
24-
"document_load_one",
25-
"document_load_many",
26-
"document_dump_one",
2724
"document_dump_many",
25+
"document_dump_one",
26+
"document_load_many",
27+
"document_load_one",
2828
"document_write_input",
2929
)
3030

@@ -188,8 +188,7 @@ def _document_dump(
188188
def decorator(func):
189189
if optional:
190190
optional_sentence = (
191-
" If the following attributes are present, they are also dumped "
192-
"into the file: {}."
191+
" If the following attributes are present, they are also dumped into the file: {}."
193192
).format(", ".join(f"``{word}``" for word in optional))
194193
else:
195194
optional_sentence = ""

iodata/formats/fchk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,13 @@ def load_many(lit: LineIterator) -> Iterator[dict]:
348348
),
349349
stacklevel=2,
350350
)
351+
reference_energy = fchk.get("Optimization Reference Energy", 0.0)
351352
for istep, (energy, recor, atcoords, gradients) in enumerate(trajectory):
352353
data = {
353354
"title": fchk["title"],
354355
"atnums": fchk["Atomic numbers"],
355356
"atcorenums": fchk["Nuclear charges"],
356-
"energy": energy,
357+
"energy": energy + reference_energy,
357358
"atcoords": atcoords,
358359
"atgradient": gradients,
359360
"extra": {

0 commit comments

Comments
 (0)