Xiaoxun-Gong / DeepH-E3

MIT License
70 stars 17 forks source link

about the training and the eval #12

Open xiaowangfeng opened 5 months ago

xiaowangfeng commented 5 months ago

when i finish the training, i see the config

To get the prediction error and predicted Hamiltonians on the twisted structures:

  1. Unzip the file Bismuth_twisted.zip.
  2. Find the configuration file Bismuth_eval.ini. Read the descriptions of the input variables in this configuration file.
  3. These variables need to be modified by yourself: trained_model_dir, output_dir, processed_data_dir, save_graph_dir.
  4. Run the command: /path/to/deephe3-eval.py Bismuth_eval.ini to evaluate the trained model.
  5. When finished, hamiltonians_pred.h5 will be produced under the folders of each structures under output_dir. There will be a test_result.h5 file and src folder under output_dir, which can be analyzed using deephe3-analyze.py.'

I want to know the processed_data_dir is different from the training of processed_data_dir?

could you tell me? thanks

Xiaoxun-Gong commented 5 months ago

In the prediction step, the goal is to get the predicted Hamiltonians of the twisted structures which are not in the training set. Therefore the processed_data_dir in this step should be the folder containing structures from Bismuth_twisted.zip.

xiaowangfeng commented 5 months ago

thanks,I have geted the result , now how can I ues the hamiltonians_pred.h5 and info.json to compare with the hamiltonians.h5 and how to plot the energy photo in the paper.

Xiaoxun-Gong commented 5 months ago

You can use the inference utility of DeepH-pack to get the band structure and plot them. Please refer to this link.

xiaowangfeng commented 5 months ago

thanks, I have finished the The entire process foe deepH, but I see the inference.ini [basic] OLP_dir = /data/run01/scv7f2x/software-scv7f2x/DeepH-pack/example/work_dir/olp/5_4 work_dir = /data/run01/scv7f2x/software-scv7f2x/DeepH-pack/example/work_dir/inference/5_4 structure_file_name = POSCAR task = [5] sparse_calc_config = /data/run01/scv7f2x/software-scv7f2x/DeepH-pack/example/work_dir/inference/5_4/band.json trained_model_dir = /data/run01/scv7f2x/software-scv7f2x/DeepH-pack/example/work_dir/trained_model restore_blocks_py = True

[interpreter] julia_interpreter = /data/home/scv7f2x/run/julia-1.6.6/bin/julia

[graph] radius = 9.0 create_from_DFT = True

I don‘t know where is the band.json for the deepH-E3 and I only got the info.json and the hamiltonians_pred.h5.

Please tell me how to modify the inference.ini to plot the figure.

thanks again

Xiaoxun-Gong commented 5 months ago

When you diagonalize the Hamiltonian using DeepH-pack, you will get openmx.Band file under work_dir, containing the band structure information in OpenMX format. This script takes in information from openmx.Band to plot the band structure. You need to put this script under work_dir and run python3 plot_band.py -u <plot_upper_limit> -d <plot_lower_limit>.