-
Notifications
You must be signed in to change notification settings - Fork 123
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:
|
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.