Skip to content

Commit 68a5a29

Browse files
committed
update docs
1 parent b44d09f commit 68a5a29

File tree

4 files changed

+53
-12
lines changed

4 files changed

+53
-12
lines changed

docs/execution.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In addition, it ensures that all nontrivial operations are executed using psiflo
101101
---
102102
container:
103103
engine: 'apptainer'
104-
uri: 'oras://ghcr.io/molmod/psiflow:3.0.0-cuda'
104+
uri: 'oras://ghcr.io/molmod/psiflow:3.0.0_python3.9_cuda'
105105
ModelEvaluation:
106106
cores_per_worker: 1
107107
simulation_engine: 'yaff'
@@ -125,7 +125,7 @@ As an example of this, consider the following configuration:
125125
---
126126
container:
127127
engine: "apptainer"
128-
uri: "oras://ghcr.io/molmod/psiflow:2.0.0-cuda"
128+
uri: "oras://ghcr.io/molmod/psiflow:3.0.0_python3.9_cuda"
129129
ModelEvaluation:
130130
cores_per_worker: 1
131131
simulation_engine: 'openmm'
@@ -154,6 +154,7 @@ ModelTraining:
154154
scheduler_options: "#SBATCH --clusters=dodrio\n#SBATCH --gpus=1\n"
155155
ReferenceEvaluation:
156156
max_walltime: 20
157+
cpu_affinity: "alternating" # avoid performance decrease in CP2K
157158
SlurmProvider:
158159
partition: "cpu_rome"
159160
account: "2022_069"

docs/index.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,26 @@ To achieve this, psiflow implements the following high-level abstractions:
1616
- one or more **phase space sampling** algorithms (e.g. biased NPT, geometry optimization)
1717
- a reference **level of theory** (e.g. CP2K using PBE-D3(BJ) + TZVP)
1818

19+
1920
These three components are used to implement **online learning** algorithms,
2021
which essentially interleave phase space sampling with
2122
quantum mechanical energy evaluations and model training.
2223
In this way, the entire (relevant part of the) phase space of the system(s)
2324
of interest may be explored and learned by the model without ever having to
2425
perform *ab initio* molecular dynamics.
2526

27+
!!! success "**See what it looks like on [Weights & Biases](https://wandb.ai/svandenhaute/formic_acid?workspace=user-svandenhaute)!**"
28+
29+
The main channel through which you will analyze psiflow's output is Weights & Biases.
30+
Click [here](https://wandb.ai/svandenhaute/formic_acid?workspace=user-svandenhaute)
31+
to check out a few completed runs, in which we learn the energetics of the molecular
32+
proton transfer reaction in a formic acid dimer!
33+
For more information on the example as well as a full walkthrough on how to obtain
34+
the reaction free energy based on a single input structure as starting point, check out the
35+
Jupyter [notebook](https://github.com/molmod/psiflow/blob/main/examples/notebook/tutorial.ipynb).
36+
37+
---
38+
2639
<!---
2740
## Core functionality
2841
@@ -63,6 +76,7 @@ the definition of the computational graph itself.
6376
For more information, check out the psiflow [Configuration](config.md) page.
6477
--->
6578

79+
6680
!!! note "Citing psiflow"
6781

6882
Psiflow is developed at the
@@ -657,7 +671,32 @@ reference.add_file('potential', 'POTENTIAL_UZH')
657671
reference.add_file('dftd3', 'dftd3.dat')
658672
```
659673

660-
### NWChem
674+
### PySCF
675+
The `PySCFReference` expects a string representation of the Python code that should be executed.
676+
You may assume that this piece of code will be executed in a larger Python script in which the correct
677+
PySCF `molecule` object has been initialized. The script should define the `energy` and `forces` Python
678+
variables (respectively `float` and `numpy.ndarray`) which should contain the energy and negative gradient
679+
in atomic units.
680+
681+
See below for an example:
682+
```py
683+
from psiflow.reference import PySCFReference
684+
685+
routine = """
686+
from pyscf import dft
687+
688+
mf = dft.RKS(molecule)
689+
mf.xc = 'pbe,pbe'
690+
691+
energy = mf.kernel()
692+
forces = -mf.nuc_grad_method().kernel()
693+
"""
694+
basis = 'cc-pvtz'
695+
spin = 0
696+
reference = PySCFReference(routine, basis, spin)
697+
```
698+
699+
### NWChem (deprecated)
661700
For nonperiodic systems, psiflow provides an interface with [NWChem](https://nwchemgit.github.io/Home.html),
662701
which implements a plethora of DFT and post-HF methods for both periodic and nonperiodic systems.
663702
The `NWChemReference` class essentially wraps around the ASE calculator, and is similarly easy to use:

docs/installation.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ the main dependencies according to how they are used in psiflow:
1010
| -------------------- | -------- | ------- | :---------------: | :--------: |
1111
| **QM evaluation** | CP2K | 2023.1 | | :material-check: |
1212
| | NWChem | 7.2 | | :material-check: |
13+
| | PySCF | 2.4 | | |
1314
| **trainable potentials** | MACE | 0.2.0 | :material-check: |
1415
| | NequIP | 0.5.6 | :material-check: |
1516
| | Allegro | 0.2.0 | :material-check: |
1617
| **molecular dynamics**| OpenMM | 8.0 | :material-check: |
1718
| | PLUMED | 2.9.0 | |
1819
| | YAFF | 1.6.0 | |
19-
| **miscellaneous** | Parsl | 2023.8.28 | |
20+
| **miscellaneous** | Parsl | 2023.10.23 | |
2021
| | e3nn | 0.4.4 | :material-check: |
2122
| | PyTorch | 1.13.1 | :material-check: |
2223
| | ASE | 3.22.1 | |
23-
| | Pymatgen | 2023.8.10 | |
24+
| | Pymatgen | 2023.11.12 | |
2425
| | wandb | 0.15.8 | |
2526
| | Python | 3.9 | |
2627

@@ -47,9 +48,9 @@ Python environment requires barely anything, and is straightforward to install
4748
using `micromamba` -- a blazingly fast drop-in replacement for `conda`:
4849

4950
```console
50-
micromamba create -n psiflow_env -c conda-forge -y python=3.9 ndcctools=7.6.1
51+
micromamba create -n psiflow_env -c conda-forge -y python=3.9
5152
micromamba activate psiflow_env
52-
pip install git+https://github.com/molmod/psiflow
53+
pip install parsl==2023.10.23 git+https://github.com/molmod/psiflow
5354
```
5455
That's it! Before running actual calculations, it is still necessary to set up Parsl
5556
to use the compute resources you have at your disposal -- whether it's a local GPU,
@@ -61,15 +62,15 @@ a SLURM cluster, or a cloud computing provider; check out the
6162
Apptainer -- now the most widely used container system for HPCs -- is part of the
6263
Linux Foundation. It is easy to set up on most Linux distributions, as explained in the [Apptainer documentation](https://apptainer.org/docs/admin/main/installation.html#install-ubuntu-packages).
6364

64-
Psiflow's containers are hosted on the GitHub Container Registry (GHCR).
65+
Psiflow's containers are hosted on the GitHub Container Registry (GHCR), for both Python 3.9 and 3.10.
6566
To download and run commands in them, simply execute:
6667

6768
```console
6869
# show available pip packages
69-
apptainer exec oras://ghcr.io/molmod/psiflow:2.0.0-cuda11.8 /usr/local/bin/entry.sh pip list
70+
apptainer exec oras://ghcr.io/molmod/psiflow:3.0.0_python3.9_cuda /usr/local/bin/entry.sh pip list
7071

7172
# inspect cp2k version
72-
apptainer exec oras://ghcr.io/molmod/psiflow:2.0.0-cuda11.8 /usr/local/bin/entry.sh cp2k.pmsp --version
73+
apptainer exec oras://ghcr.io/molmod/psiflow:3.0.0_python3.9_cuda /usr/local/bin/entry.sh cp2k.pmsp --version
7374
```
7475

7576
Internally, Apptainer will store the container in a local cache directory such that it does not have to
@@ -131,4 +132,4 @@ pip install git+https://github.com/acesuit/MACE.git@55f7411 && \
131132
pip install git+https://github.com/svandenhaute/openmm-ml.git@triclinic
132133
pip install git+https://github.com/molmod/psiflow
133134
```
134-
This is mostly a copy-paste from psiflow's [Dockerfile](https://github.com/molmod/psiflow/blob/main/Dockerfile).
135+
This is mostly a copy-paste from psiflow's [Dockerfiles](https://github.com/molmod/psiflow/blob/main/container).

docs/learning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The following keyword arguments are specific to `SequentialLearning`:
9292

9393
- `niterations: int` : the number of active learning iterations to perform. Each iterations starts with phase space
9494
sampling, followed by reference evaluation and model training.
95-
- `temperature_ramp: Optional[tuple[float]] = None`: (new in v2.0.0) whether to gradually increase the temperature of the walkers
95+
- `temperature_ramp: Optional[tuple[float, float, float]] = None`: (new in v2.0.0) whether to gradually increase the temperature of the walkers
9696
over a certain number of iterations. If not `None`, this keyword argument expects a tuple of floats: (initial T, final T, nsteps).
9797
If this is `None`, then the temperature of the walkers is left as-is.
9898
- `error_thresholds_for_reset: tuple[float, float] = (10, 200)` : (new in v2.0.0) determines the (energy, force)

0 commit comments

Comments
 (0)