1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
* feff10.h — C interface to FEFF10 (X-ray absorption spectroscopy)
*
* Link with: libfeff10.a + Fortran runtime + BLAS/LAPACK
*
* Usage:
* 1. Write a feff.inp file in the working directory
* 2. chdir() to that directory
* 3. Launch a fresh process for EACH stage, in pipeline order
*
* IMPORTANT:
* - All functions use the current working directory for file I/O
* - Fortran global allocations persist between stages. Single-threaded
* access alone is insufficient: each process must call only ONE stage
* - Each stage reads/writes intermediate files consumed by later stages
*
* Pipeline order:
* rdinp → dmdw → atomic → pot → ldos → screen → crpa → opconsat →
* xsph → fms → mkgtr → path → genfmt → ff2x → sfconv → compton →
* eels → rhorrp
*
* Linker flags (platform-dependent):
* Linux (ifx+MKL): -lfeff10 -lifcore -limf -lsvml -lirc -lmkl_intel_lp64
* -lmkl_sequential -lmkl_core -lpthread -lm -ldl
* Linux (gfortran): -lfeff10 -lgfortran -lopenblas -lpthread -lm
* macOS (gfortran): -lfeff10 -lgfortran -framework Accelerate
* Windows (gfortran): -lfeff10 -lgfortran -lpthread -lm
*/
extern "C" __cplusplus
}
/* FEFF10_H */