Skip to content

Commit 634a7d3

Browse files
committed
Call LAMMPS builtin citeme function
log.cite file will be generated when running LAMMPS...
1 parent f1e92e6 commit 634a7d3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

source/lmp/pair_nnp.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "neigh_request.h"
1616
#include "modify.h"
1717
#include "fix.h"
18+
#include "citeme.h"
1819
#ifdef USE_TTM
1920
#include "fix_ttm_mod.h"
2021
#endif
@@ -24,6 +25,22 @@
2425
using namespace LAMMPS_NS;
2526
using namespace std;
2627

28+
static const char cite_user_deepmd_package[] =
29+
"USER-DEEPMD package:\n\n"
30+
"@article{Wang_ComputPhysCommun_2018_v228_p178,\n"
31+
" author = {Wang, Han and Zhang, Linfeng and Han, Jiequn and E, Weinan},\n"
32+
" doi = {10.1016/j.cpc.2018.03.016},\n"
33+
" url = {https://doi.org/10.1016/j.cpc.2018.03.016},\n"
34+
" year = 2018,\n"
35+
" month = {jul},\n"
36+
" publisher = {Elsevier {BV}},\n"
37+
" volume = 228,\n"
38+
" journal = {Comput. Phys. Commun.},\n"
39+
" title = {{DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics}},\n"
40+
" pages = {178--184}\n"
41+
"}\n\n";
42+
43+
2744
static int stringCmp(const void *a, const void* b)
2845
{
2946
char* m = (char*)a;
@@ -185,6 +202,7 @@ PairNNP::PairNNP(LAMMPS *lmp)
185202
: Pair(lmp)
186203

187204
{
205+
if (lmp->citeme) lmp->citeme->add(cite_user_deepmd_package);
188206
if (strcmp(update->unit_style,"metal") != 0) {
189207
error->all(FLERR,"Pair deepmd requires metal unit, please set it by \"units metal\"");
190208
}

0 commit comments

Comments
 (0)