Skip to content

Commit 2a58592

Browse files
committed
update docs
1 parent 53cc227 commit 2a58592

File tree

2 files changed

+31
-44
lines changed

2 files changed

+31
-44
lines changed

docs/index.md

+23-34
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ Its main functionality is provided by its
615615
`evaluate` method, which accepts both a `Dataset` as well as a (future of a)
616616
single `FlowAtoms` instance, and performs the single-point calculations.
617617
Depending on which argument it receives, it returns either a future or a `Dataset`
618-
which contain the QM energy, forces, and stress.
618+
which contain the QM energy, forces, and/or stress.
619619

620620
```py
621621
_, trajectory = walker.propagate(model=model, keep_trajectory=True) # trajectory of states
@@ -651,24 +651,35 @@ energy_H.result() # about -13.7 eV
651651
The `CP2KReference` expects a traditional CP2K
652652
[input file](https://github.com/molmod/psiflow/blob/main/examples/data/cp2k_input.txt)
653653
(again represented as a multi-line string in Python, just like the PLUMED input);
654-
it should only contain the FORCE_EVAL section.
655-
Additional input files which define the basis sets, pseudopotentials, and
656-
dispersion correction parameters have to be added to the calculator after initialization.
654+
it should only contain the `FORCE_EVAL` section, and any `TOPOLOGY` or `CELL` information
655+
will be automatically removed since this information may change from structure to structure
656+
and is automatically taken care of by psiflow internally.
657+
Do not use absolute filepaths to refer to basis set or pseudopotential input files.
658+
Instead, you can simply use the corresponding filenames as they appear within the
659+
[CP2K data directory](https://github.com/cp2k/cp2k/tree/master/data).
657660
```py
658661
from psiflow.reference import CP2KReference
659662

660663

661664
cp2k_input = with file('cp2k_input.txt', 'r') as f: f.read()
662665
reference = CP2KReference(cp2k_input)
663666

664-
# register additional input files with the following mapping
665-
# if the corresponding keyword in the CP2K input file is X, use Y as key here:
666-
# X: BASIS_SET_FILE_NAME -> Y: basis_set
667-
# X: POTENTIAL_FILE_NAME -> Y: potential
668-
# X: PARAMETER_FILE_NAME -> Y: dftd3
669-
reference.add_file('basis_set', 'BASIS_MOLOPT_UZH')
670-
reference.add_file('potential', 'POTENTIAL_UZH')
671-
reference.add_file('dftd3', 'dftd3.dat')
667+
```
668+
669+
Sometimes, you may wish to perform energy-only evaluations. For example, in some implementations
670+
of post-HF methods such as MP2 or RPA, evaluation of the forces can become much more expensive
671+
and is generally not efficient.
672+
In those cases, it is possible to perform energy-only evaluations of atomic structures, provided
673+
that you have expressed to psiflow that it should not try to parse any forces from the output file.
674+
This is done by providing a `properties` argument during initialization of the `Reference` instance.
675+
676+
```py
677+
reference_Eonly = CP2KReference(cp2k_input, properties=('energy',))
678+
reference_Ef = CP2KReference(cp2k_input, properties=('energy', 'forces'))
679+
680+
state = reference_Eonly.evaluate(atoms) # only contains the potential energy; not the forces
681+
state = reference_Ef.evaluate(atoms) # contains both energy and forces (default behavior)
682+
672683
```
673684

674685
### PySCF
@@ -695,25 +706,3 @@ basis = 'cc-pvtz'
695706
spin = 0
696707
reference = PySCFReference(routine, basis, spin)
697708
```
698-
699-
### NWChem (deprecated)
700-
For nonperiodic systems, psiflow provides an interface with [NWChem](https://nwchemgit.github.io/Home.html),
701-
which implements a plethora of DFT and post-HF methods for both periodic and nonperiodic systems.
702-
The `NWChemReference` class essentially wraps around the ASE calculator, and is similarly easy to use:
703-
```py
704-
calculator_kwargs = {
705-
'basis': {e: '3-21g' for e in ['H', 'C', 'O', 'N']},
706-
'dft': {
707-
'xc': 'pw91lda',
708-
'mult': 1,
709-
'convergence': {
710-
'energy': 1e-6,
711-
'density': 1e-6,
712-
'gradient': 1e-6,
713-
},
714-
},
715-
}
716-
reference = NWChemReference(**calculator_kwargs)
717-
718-
```
719-

docs/installation.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@ the main dependencies according to how they are used in psiflow:
88

99
| category | name | version | uses GPU | uses MPI |
1010
| -------------------- | -------- | ------- | :---------------: | :--------: |
11-
| **QM evaluation** | CP2K | 2023.1 | | :material-check: |
12-
| | NWChem | 7.2 | | :material-check: |
13-
| | PySCF | 2.4 | | |
11+
| **QM evaluation** | CP2K | >= 2023.1 | | :material-check: |
12+
| | PySCF | >=2.4 | | |
1413
| **trainable potentials** | MACE | 0.2.0 | :material-check: |
1514
| | NequIP | 0.5.6 | :material-check: |
1615
| | Allegro | 0.2.0 | :material-check: |
1716
| **molecular dynamics**| OpenMM | 8.0 | :material-check: |
1817
| | PLUMED | 2.9.0 | |
1918
| | YAFF | 1.6.0 | |
20-
| **miscellaneous** | Parsl | 2023.10.23 | |
19+
| **miscellaneous** | Parsl | 2024.02.12 | |
2120
| | e3nn | 0.4.4 | :material-check: |
2221
| | PyTorch | 1.13.1 | :material-check: |
23-
| | ASE | 3.22.1 | |
24-
| | Pymatgen | 2023.11.12 | |
22+
| | ASE | >=3.22.1 | |
2523
| | wandb | 0.15.8 | |
26-
| | Python | 3.9 | |
24+
| | Python | 3.10, 3.11 | |
2725

2826
</center>
2927

@@ -48,7 +46,7 @@ Python environment requires barely anything, and is straightforward to install
4846
using `micromamba` -- a blazingly fast drop-in replacement for `conda`:
4947

5048
```console
51-
micromamba create -n psiflow_env -c conda-forge -y python=3.9
49+
micromamba create -n psiflow_env -c conda-forge -y python=3.10
5250
micromamba activate psiflow_env
5351
pip install parsl==2023.10.23 git+https://github.com/molmod/psiflow
5452
```
@@ -117,7 +115,7 @@ While this is not really necessary in the vast majority of cases, we mention for
117115
the following manual setup using `micromamba`:
118116
```console
119117
CONDA_OVERRIDE_CUDA="11.8" micromamba create -p ./psiflow_env -y -c conda-forge \
120-
python=3.9 pip ndcctools=7.6.1 \
118+
python=3.10 pip \
121119
openmm-plumed openmm-torch pytorch=1.13.1=cuda* \
122120
nwchem py-plumed cp2k && \
123121
micromamba clean -af --yes
@@ -130,6 +128,6 @@ pip install git+https://github.com/acesuit/MACE.git@55f7411 && \
130128
pip install git+https://github.com/mir-group/nequip.git@develop --no-deps && \
131129
pip install git+https://github.com/mir-group/allegro --no-deps && \
132130
pip install git+https://github.com/svandenhaute/openmm-ml.git@triclinic
133-
pip install git+https://github.com/molmod/psiflow
131+
pip install 'psiflow[parsl] @ git+https://github.com/molmod/psiflow'
134132
```
135133
This is mostly a copy-paste from psiflow's [Dockerfiles](https://github.com/molmod/psiflow/blob/main/container).

0 commit comments

Comments
 (0)