Hands-on tutorials: DeePMD-kit
cd example ls example1_intro_tf example3_train_input example5_lmp_eam example2_fit_sin_with_nn example4_train_water example6_workflow
You may go through the instrcutions in each example or follow the instructions below.
Example 1-2: basics of TensorFlow and Deep Learning
- Go to Example 1 and run the python code:
cd example1_intro_tf python Introduction+to+TensorFlow.py
- Go to Example 2 and run the python code:
cd ../example2_fit_sin_with_nn/ python Fitting+sine+curve.py
You might need to close the figure to continue with the code.
Example 3-5: Training and MD
- Go to Example 3:
You may freely have a look at input files for various different systems – they are highly similar!
cd deeppot_se vi HEA.json cd ..
- Go to Example 4 and run a training code:
cd ../example4_train_water/train dp_train water.json
Things like this might appear:
# # find 1 system(s): # find system ../data/water/ : 192 atoms 75 batches copied by  # # run with intra_op_parallelism_threads = 1, inter_op_parallelism_threads = 0 2018-08-02 12:32:03.411340: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA # computed stats # initialize model from scratch # start training, start lr is 1.000000e-03, final lr will be 3.505267e-08 2018-08-02 12:32:04.760812: W tensorflow/core/framework/allocator.cc:101] Allocation of 519782400 exceeds 10% of system memory. 2018-08-02 12:32:12.163116: W tensorflow/core/framework/allocator.cc:101] Allocation of 519782400 exceeds 10% of system memory. # batch 100 training time 6.02 s, testing time 1.25 s # batch 100 training time 6.02 s, testing time 1.25 s # saved checkpoint /home/dft003/deepmd-kit-tutorial/example/example4_train_water/train/model.ckpt 2018-08-02 12:32:19.596083: W tensorflow/core/framework/allocator.cc:101] Allocation of 519782400 exceeds 10% of system memory. # batch 200 training time 5.92 s, testing time 1.26 s ......
More instructions can be found in the section $3.2 Train a model $ in the file
manual.pdf contained in
- Go to Example 5:
cd ../../example5_lmp_eam/ ls Al_mm.eam.fs diffusion equiv melt structure_factor surf_energy
You may have a look at input files for various different MD purposes.
For example, if you want to find the melting point of Al under the EAM potential, you may do the following:
cd melt lmp_serial < in.melt
For other purposes, go to the corresponding folder, and do
lmp_serial < in.xxx, where in.xxx is the corresponding input file.
We cannot show in more details how to run LAMMPS, which is not our purpose here.
We refer to
~/deepmd-kit/soft/lammps-16Mar18/examples/ for more examples.
Example 6: Workflow for new studies
- Go to Example 6:
Do data conversion:
Go to the training folder and do training:
cd train dp_train input.json