Skip to content

Commit 0ba9c9f

Browse files
committed
[reference_energies] add atomic reference energy solvers
Implement ReferenceEnergies helpers for regression- and reference-compound-based atomic energy estimation, including fixed-species constraints, provenance metadata, tests, and docs.
1 parent d0b49b5 commit 0ba9c9f

5 files changed

Lines changed: 1094 additions & 0 deletions

File tree

docs/source/api/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This section provides detailed API documentation for the aenet-python package.
66
.. toctree::
77
:maxdepth: 2
88

9+
reference_energies
910
trainset
1011
transformations
1112
torch_featurize
@@ -14,6 +15,13 @@ This section provides detailed API documentation for the aenet-python package.
1415
torch_training_training
1516
torch_training_inference
1617

18+
Reference Energies
19+
------------------
20+
21+
:doc:`reference_energies`
22+
Helper API for constructing atomic reference energies from regression and
23+
other supported workflows.
24+
1725
Training Set Management
1826
-----------------------
1927

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _api_reference_energies:
2+
3+
Reference Energies
4+
==================
5+
6+
The ``aenet.reference_energies`` module provides helper routines for
7+
constructing atomic reference energies used in cohesive- and
8+
formation-energy-based workflows.
9+
10+
Both `ReferenceEnergies.from_regression()` and
11+
`ReferenceEnergies.from_reference_compounds()` consume lightweight
12+
``(composition, energy)`` samples directly, so callers can stream data from
13+
custom parsers without materializing full structure objects. For file-backed
14+
workflows, the module also provides a lazy helper that yields those samples
15+
from paths readable by ``aenet.io.structure``.
16+
17+
.. currentmodule:: aenet.reference_energies
18+
19+
.. autoclass:: ReferenceEnergies
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:
23+
24+
.. autofunction:: iter_composition_energy_samples_from_files

docs/source/usage/torch_training.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ dataset-backed prediction, and committee training, see
4444
`example-05-torch-training.ipynb
4545
<https://github.com/atomisticnet/aenet-python/blob/master/notebooks/example-05-torch-training.ipynb>`_.
4646

47+
If you need to construct ``atomic_energies`` programmatically before
48+
training or before building a large HDF5 dataset, see
49+
:class:`aenet.reference_energies.ReferenceEnergies`. Its regression helper
50+
accepts lazy ``(composition, energy)`` samples directly, and its
51+
reference-compound helper selects the lowest-energy sample for each requested
52+
composition before solving the constrained system. The module also provides a
53+
file-path iterator backed by ``aenet.io.structure`` for streaming-friendly
54+
preprocessing.
55+
4756

4857
Energy-Only Training
4958
--------------------

0 commit comments

Comments
 (0)