-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality to support the deep potential #827
base: master
Are you sure you want to change the base?
Conversation
src/model/read_xyz.cu
Outdated
@@ -548,8 +620,14 @@ void initialize_position( | |||
} | |||
|
|||
std::vector<std::string> atom_symbols; | |||
auto filename_potential = get_filename_potential(); | |||
auto filename_potential = get_out_potential(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be separately writen in the #ifdef and #else parts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be separately writen in the #ifdef and #else parts
OK, I've fixed it and it compiles.
Have you also tested virial stress and heat current? |
Make output concise
Nice work @Kick-H ! |
fix bug
This is related to the C++ interface of DP. If you are interested, welcome to check the source code. |
I have tested stress. The heat flux test has not been done yet, but it is definitely worth doing. |
Keep documents streamlined by removing unnecessary information
Maybe worth replacing the |
OK, thank you very much for your suggestion. |
replae the cuda* specific calls with the macros
General comments:
The file
|
@Kick-H NICE WORK!But is this support for all backends and descriptors of DP model? or only support spefific (like TF backends) of DP model? |
Currently only for the tensorflow backend, and the code is to be refactored (to make this part as isolated as possible) and optimized. |
Delete the DUSE_tensorflow command of the Xu version
Thank you very much, I will check it as much as possiable. |
I have change the #ifdef DP_BHK to #ifdef USE_TENSORFLOW, And the version is from @BBBuZHIDAO , which is faster. The old version has been backed up. |
I will write a README and test it as soon as possible. |
GPUMD supports DP potential projectAuthor: 徐克 (kickhsu[at]gmail.com) Author: 卜河凯 (hekai_bu[at]whu.edu.cn) WeChat Official Account: 微纳计算 (nanocomp) 0 Program Introduction0.1 Necessary instructions
0.2 Installation Dependencies
1 Installation detailsUse the instance in AutoDL for testing。 If you need testing use AutoDL, please contact us. And we have created an image in AutoDL that can run GPUMD-DP directly, which can be shared with the account that provides the user ID. Then, you will not require the following process and can be used directly. 2 GPUMD-DP installation (Offline version)2.0 DP installation (Offline version)Use the latest version of DP installation steps:
After running according to the above steps, using 2.1 GPUMD-DP installationThe github link is Here.
Modify
Then run the following installation command:
2.2 Running Tests
3 GPUMD-DP installation (Online version)3.0 DP installation (Online version)3.1 Conda environmentCreate a new conda environment with python and activate it.
3.2 Conda install some packagesInstall CMake, CUDA-toolkit and Tensorflow. Please make sure the versions of CUDA-toolkit and Tensorflow is COMPATIBLE. My tensorflow version is 2.18.0.
3.3 download deep-kit and installDownload DP source code and compile the source files following DP docs. Here is cmake commands:
We just need DP C++ interface, so we don't source all DP environment. The libraries will be installed in 3.4 Configure the makefile of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests that have been conducted include:
- Basic information comparison with lammps, including force, energy, potential, etc.
- Some dynamic processes.
The project has come to an end for the time being, and areas that need to be improved in the future:
- Increase in calculation speed
- Support for triclinic boxes
Summary
I wrote a preliminary version and tested it with water system. After comparison, there was no problem with the force and energy. Here is the detailed installation and testing process.
The most complicated and time-consuming part of this version is probably the establishment of the neighbor list. I used the easiest method here, which requires completely mirroring the central cell to obtain the information of the 27 mirror boxes around it (boundary conditions p p p), and then completing the solution of the information of the atoms in the central box (the real box atoms).
This version was initially tested for speed and was several times slower than lammps, but it supports a larger simulation system size.
Modification
Added two files, force/deepmd.cu and force/deepmd.cuh, and added an example in examples/14_DP_water_msd, and the installation tutorial is also here (examples/14_DP_water_msd/Readme.md).
Others
Refer to the DP-lammps interface file
pair_deepmd.cpp
, which contains thedp.compute
command, which can complete the solution of force and energy through coordinates and atomic types by calling dp's dependencies.