Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions docs/ftorch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ To evaluate Skala, we download the model checkpoint from HuggingFace using the `

.. code-block:: bash

python prepare_inputs.py --output_dir features --molecule H2 --basis def2-QZVP
python prepare_inputs.py --output-dir features --basis def2-QZVP

The script needs the ``skala`` package installed in your Python environment, which can be done via pip:

Expand All @@ -210,7 +210,7 @@ The output for the H2 molecule with the def2-QZVP basis set should look like thi
.. code-block:: text

[1] Loading model from skala-1.0.fun
[2] Loading features from H2-def2qzvp
[2] Loading features from features
-> Loading coarse_0_atomic_coords
-> Loading grad
-> Loading grid_coords
Expand Down Expand Up @@ -260,8 +260,8 @@ In the output we can see the computed exchange-correlation energy as well as the

.. code-block:: text

[1] Loading model from ../../cpp/gauxc_integration/skala-1.0.fun
[2] Loading features from H2-def2qzvp
[1] Loading model from skala-1.0.fun
[2] Loading features from features
-> Loading coarse_0_atomic_coords
-> Loading grad
-> Loading grid_coords
Expand Down Expand Up @@ -307,4 +307,4 @@ Summary

In this example, we have demonstrated how to use Skala in Fortran with the FTorch library.
We have shown how to set up the development environment, build the application using CMake, and run the application to compute exchange-correlation energies and potentials using a Skala model.
This example serves as a starting point for integrating Skala into your Fortran applications using FTorch, and can be extended to include more complex features and functionalities as needed.
This example serves as a starting point for integrating Skala into your Fortran applications using FTorch, and can be extended to include more complex features and functionalities as needed.
12 changes: 9 additions & 3 deletions examples/cpp/cpp_integration/prepare_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@ def main() -> None:
type=Path,
help="Output directory for generated feature files.",
)
parser.add_argument(
"--basis",
default="def2-qzvp",
type=str,
help="Basis set.",
)
args = parser.parse_args()

args.output_dir.mkdir(parents=True, exist_ok=True)

molecule = gto.Mole(
molecule = gto.M(
atom="H 0 0 0; H 0 0 1",
basis="def2-qzvp",
basis=args.basis,
verbose=0,
).build()
)

# Create a set of meta-GGA features for this molecule.
dm = get_density_matrix(molecule)
Expand Down
Loading