|
1 | | -# Fit electronic density of states (DOS) {{ tensorflow_icon }} |
| 1 | +# Fit electronic density of states (DOS) {{ tensorflow_icon }} {{ pytorch_icon }} {{ dpmodel_icon }} |
2 | 2 |
|
3 | 3 | :::{note} |
4 | | -**Supported backends**: TensorFlow {{ tensorflow_icon }} |
| 4 | +**Supported backends**: TensorFlow {{ tensorflow_icon }}, PyTorch {{ pytorch_icon }}, DP {{ dpmodel_icon }} |
5 | 5 | ::: |
6 | 6 |
|
7 | 7 | Here we present an API to DeepDOS model, which can be used to fit electronic density of state (DOS) (which is a vector). |
@@ -82,10 +82,26 @@ To prepare the data, we recommend shifting the DOS data by the Fermi level. |
82 | 82 |
|
83 | 83 | The training command is the same as `ener` mode, i.e. |
84 | 84 |
|
| 85 | +::::{tab-set} |
| 86 | + |
| 87 | +:::{tab-item} TensorFlow {{ tensorflow_icon }} |
| 88 | + |
| 89 | +```bash |
| 90 | +dp --tf train input.json |
| 91 | +``` |
| 92 | + |
| 93 | +::: |
| 94 | + |
| 95 | +:::{tab-item} PyTorch {{ pytorch_icon }} |
| 96 | + |
85 | 97 | ```bash |
86 | | -dp train input.json |
| 98 | +dp --pt train input.json |
87 | 99 | ``` |
88 | 100 |
|
| 101 | +::: |
| 102 | + |
| 103 | +:::: |
| 104 | + |
89 | 105 | The detailed loss can be found in `lcurve.out`: |
90 | 106 |
|
91 | 107 | ``` |
@@ -117,14 +133,33 @@ The detailed loss can be found in `lcurve.out`: |
117 | 133 |
|
118 | 134 | In this earlier version, we can use `dp test` to infer the electronic density of state for given frames. |
119 | 135 |
|
| 136 | +::::{tab-set} |
| 137 | + |
| 138 | +:::{tab-item} TensorFlow {{ tensorflow_icon }} |
| 139 | + |
| 140 | +```bash |
| 141 | + |
| 142 | +dp --tf freeze -o frozen_model.pb |
| 143 | + |
| 144 | +dp --tf test -m frozen_model.pb -s ../data/111/$k -d ${output_prefix} -a -n 100 |
| 145 | +``` |
| 146 | + |
| 147 | +::: |
| 148 | + |
| 149 | +:::{tab-item} PyTorch {{ pytorch_icon }} |
| 150 | + |
120 | 151 | ```bash |
121 | 152 |
|
122 | | -$DP freeze -o frozen_model.pb |
| 153 | +dp --pt freeze -o frozen_model.pth |
123 | 154 |
|
124 | | -$DP test -m frozen_model.pb -s ../data/111/$k -d ${output_prefix} -a -n 100 |
| 155 | +dp --pt test -m frozen_model.pth -s ../data/111/$k -d ${output_prefix} -a -n 100 |
125 | 156 | ``` |
126 | 157 |
|
127 | | -if `dp test -d ${output_prefix} -a` is specified, the predicted DOS and atomic DOS for each frame is output in the working directory |
| 158 | +::: |
| 159 | + |
| 160 | +:::: |
| 161 | + |
| 162 | +if `dp test -d ${output_prefix} -a` is specified, the predicted DOS and atomic DOS for each frame are output in the working directory |
128 | 163 |
|
129 | 164 | ``` |
130 | 165 | ${output_prefix}.ados.out.0 ${output_prefix}.ados.out.1 ${output_prefix}.ados.out.2 ${output_prefix}.ados.out.3 |
|
0 commit comments