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
85 changes: 85 additions & 0 deletions doc/examples/wien2k_csc_svo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Charge self-consistent DFT+DMFT for SrVO3 with Wien2k

A charge self-consistent DFT+DMFT calculation using Wien2k and ModEST.

Here, we project onto the V-t2g shell in a wide energy window (-10 eV to +10 eV) around the Fermi energy.

## What is here

| file | role |
|---|---|
| `SrVO3.struct` | the Wien2k structure file |
| `SrVO3.indmftpr` | the dmftproj projector definition |
| `wien2k_modest_csc.py` | the CSC DFT+DMFT script |

## Prerequisites

* Wien2k, with `WIENROOT` set and `$WIENROOT/x` on disk
* `dmftproj` on `$PATH` (built and installed by this package)
* `triqs_modest`, and an impurity solver — the script uses `triqs_cthyb`

## Running it

Wien2k takes the case name from the directory name, so the directory must be
called `SrVO3` to match `seedname` in the script.

```bash
mkdir SrVO3 && cd SrVO3
cp /path/to/wien2k_csc_svo/SrVO3.struct .

# generate the Wien2k inputs (in0, in1, in2, inm, inc, klist, the starting
# density, ...). Accept the defaults unless you know you want otherwise.
init_lapw -b -numk 1000 -rkmax 7.0

# the dmftproj input: either copy the one provided
cp /path/to/wien2k_csc_svo/SrVO3.indmftpr .
# ...or generate your own interactively
init_dmftpr

cp /path/to/wien2k_csc_svo/wien2k_modest_csc.py .
mpirun -n 16 python wien2k_modest_csc.py
```

The driver converges the DFT SCF cycle itself on the first call, so there is no
separate `run_lapw` step. An already-converged `case.scf` is reused; pass
`force_scf=True` to `one_body_elements_from_dft()` to redo it.

The run is checkpointed every iteration into a `svo_csc_beta<beta>_U<U>_J<J>.ckpt`
directory, so it can be killed and restarted: the DMFT state is restored from the
checkpoint and the Wien2k state from the files on disk. Restarting is just
re-running the same command.

To check the DFT part alone first, without any DMFT:

```python
from triqs_dftkit.wien2k import Driver
Driver("SrVO3").run_dft_only() # or run_dft_only(n_iter=1) for one cycle
```

## The projection window

Line 15 of `SrVO3.indmftpr` is the correlated energy window relative to E_F, in
Rydberg.

Every k-point must have bands inside this window: `lapw2 -qdmft` indexes its
density matrices per k-point but only sets their dimension for k-points that
dmftproj marked as included, so an excluded k-point would be read against
uninitialised memory. The driver checks `case.oubwin` and refuses up front
rather than letting that happen, so if it reports excluded k-points, widen the
window.

## Notes

`lapw2 -qdmft` runs serially regardless of how the rest of the calculation is
parallelised. The impurity solver still uses all available ranks.

The entire Wien2k chain runs on the master rank alone. Typically, the job size
is determined by the impurity solver, as we expect the DFT part to take a small
wall time.

The driver takes a `verbosity` argument: `1` (the default) prints one line per SCF
cycle, `2` adds one line per Wien2k program launched, and `0` leaves only warnings.
Warnings ignore the setting and go to stderr, so quietening the progress output
cannot hide a problem.

Only non-magnetic calculations (`SP=0`, `SO=0`) are supported at present.
15 changes: 15 additions & 0 deletions doc/examples/wien2k_csc_svo/SrVO3.indmftpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
3
1 1 3
3
cubic
1 0 0 0
0 0 0 0
cubic
0 0 2 0
0 0 2 0
01
0
cubic
0 1 0 0
0 0 0 0
-0.73499 0.73499
217 changes: 217 additions & 0 deletions doc/examples/wien2k_csc_svo/SrVO3.struct
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
Title
P LATTICE,NONEQUIV.ATOMS: 3221_Pm-3m
MODE OF CALC=RELA unit=bohr
7.260500 7.260500 7.260500 90.000000 90.000000 90.000000
ATOM 1: X=0.50000000 Y=0.50000000 Z=0.50000000
MULT= 1 ISPLIT= 2
Sr NPT= 781 R0=0.00001000 RMT= 2.50000 Z: 38.0
LOCAL ROT MATRIX: 1.0000000 0.0000000 0.0000000
0.0000000 1.0000000 0.0000000
0.0000000 0.0000000 1.0000000
ATOM 2: X=0.00000000 Y=0.00000000 Z=0.00000000
MULT= 1 ISPLIT= 2
V NPT= 781 R0=0.00005000 RMT= 1.91 Z: 23.0
LOCAL ROT MATRIX: 1.0000000 0.0000000 0.0000000
0.0000000 1.0000000 0.0000000
0.0000000 0.0000000 1.0000000
ATOM -3: X=0.50000000 Y=0.00000000 Z=0.00000000
MULT= 3 ISPLIT=-2
-3: X=0.00000000 Y=0.50000000 Z=0.00000000
-3: X=0.00000000 Y=0.00000000 Z=0.50000000
O NPT= 781 R0=0.00010000 RMT= 1.70 Z: 8.0
LOCAL ROT MATRIX: 0.0000000 0.0000000 1.0000000
0.0000000 1.0000000 0.0000000
-1.0000000 0.0000000 0.0000000
48 NUMBER OF SYMMETRY OPERATIONS
-1 0 0 0.00000000
0-1 0 0.00000000
0 0-1 0.00000000
1
-1 0 0 0.00000000
0-1 0 0.00000000
0 0 1 0.00000000
2
-1 0 0 0.00000000
0 0-1 0.00000000
0-1 0 0.00000000
3
-1 0 0 0.00000000
0 0 1 0.00000000
0-1 0 0.00000000
4
-1 0 0 0.00000000
0 0-1 0.00000000
0 1 0 0.00000000
5
-1 0 0 0.00000000
0 0 1 0.00000000
0 1 0 0.00000000
6
-1 0 0 0.00000000
0 1 0 0.00000000
0 0-1 0.00000000
7
-1 0 0 0.00000000
0 1 0 0.00000000
0 0 1 0.00000000
8
0-1 0 0.00000000
-1 0 0 0.00000000
0 0-1 0.00000000
9
0-1 0 0.00000000
-1 0 0 0.00000000
0 0 1 0.00000000
10
0 0-1 0.00000000
-1 0 0 0.00000000
0-1 0 0.00000000
11
0 0 1 0.00000000
-1 0 0 0.00000000
0-1 0 0.00000000
12
0 0-1 0.00000000
-1 0 0 0.00000000
0 1 0 0.00000000
13
0 0 1 0.00000000
-1 0 0 0.00000000
0 1 0 0.00000000
14
0 1 0 0.00000000
-1 0 0 0.00000000
0 0-1 0.00000000
15
0 1 0 0.00000000
-1 0 0 0.00000000
0 0 1 0.00000000
16
0-1 0 0.00000000
0 0-1 0.00000000
-1 0 0 0.00000000
17
0-1 0 0.00000000
0 0 1 0.00000000
-1 0 0 0.00000000
18
0 0-1 0.00000000
0-1 0 0.00000000
-1 0 0 0.00000000
19
0 0 1 0.00000000
0-1 0 0.00000000
-1 0 0 0.00000000
20
0 0-1 0.00000000
0 1 0 0.00000000
-1 0 0 0.00000000
21
0 0 1 0.00000000
0 1 0 0.00000000
-1 0 0 0.00000000
22
0 1 0 0.00000000
0 0-1 0.00000000
-1 0 0 0.00000000
23
0 1 0 0.00000000
0 0 1 0.00000000
-1 0 0 0.00000000
24
0-1 0 0.00000000
0 0-1 0.00000000
1 0 0 0.00000000
25
0-1 0 0.00000000
0 0 1 0.00000000
1 0 0 0.00000000
26
0 0-1 0.00000000
0-1 0 0.00000000
1 0 0 0.00000000
27
0 0 1 0.00000000
0-1 0 0.00000000
1 0 0 0.00000000
28
0 0-1 0.00000000
0 1 0 0.00000000
1 0 0 0.00000000
29
0 0 1 0.00000000
0 1 0 0.00000000
1 0 0 0.00000000
30
0 1 0 0.00000000
0 0-1 0.00000000
1 0 0 0.00000000
31
0 1 0 0.00000000
0 0 1 0.00000000
1 0 0 0.00000000
32
0-1 0 0.00000000
1 0 0 0.00000000
0 0-1 0.00000000
33
0-1 0 0.00000000
1 0 0 0.00000000
0 0 1 0.00000000
34
0 0-1 0.00000000
1 0 0 0.00000000
0-1 0 0.00000000
35
0 0 1 0.00000000
1 0 0 0.00000000
0-1 0 0.00000000
36
0 0-1 0.00000000
1 0 0 0.00000000
0 1 0 0.00000000
37
0 0 1 0.00000000
1 0 0 0.00000000
0 1 0 0.00000000
38
0 1 0 0.00000000
1 0 0 0.00000000
0 0-1 0.00000000
39
0 1 0 0.00000000
1 0 0 0.00000000
0 0 1 0.00000000
40
1 0 0 0.00000000
0-1 0 0.00000000
0 0-1 0.00000000
41
1 0 0 0.00000000
0-1 0 0.00000000
0 0 1 0.00000000
42
1 0 0 0.00000000
0 0-1 0.00000000
0-1 0 0.00000000
43
1 0 0 0.00000000
0 0 1 0.00000000
0-1 0 0.00000000
44
1 0 0 0.00000000
0 0-1 0.00000000
0 1 0 0.00000000
45
1 0 0 0.00000000
0 0 1 0.00000000
0 1 0 0.00000000
46
1 0 0 0.00000000
0 1 0 0.00000000
0 0-1 0.00000000
47
1 0 0 0.00000000
0 1 0 0.00000000
0 0 1 0.00000000
48
Loading
Loading