From bb5fb2dcb3c9a2dedd2cb607d9ff8648fba3b2a7 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 10 Oct 2022 17:44:40 -0400 Subject: [PATCH 1/2] lmp: throw errors when 6-element virial requested --- source/lmp/pair_deepmd.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/lmp/pair_deepmd.cpp b/source/lmp/pair_deepmd.cpp index 91f8e4b7c9..ca07a94173 100644 --- a/source/lmp/pair_deepmd.cpp +++ b/source/lmp/pair_deepmd.cpp @@ -310,6 +310,7 @@ void PairDeepMD::compute(int eflag, int vflag) { if (numb_models == 0) return; if (eflag || vflag) ev_setup(eflag,vflag); + if (vflag_atom) error->all(FLERR, "6-element virial is not supported. Use compute centroid/stress/atom command for 9-element virial."); bool do_ghost = true; double **x = atom->x; From e3bcd420d01cfa05d384804630131f6324fb2b79 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 10 Oct 2022 17:49:44 -0400 Subject: [PATCH 2/2] revise message --- source/lmp/pair_deepmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lmp/pair_deepmd.cpp b/source/lmp/pair_deepmd.cpp index ca07a94173..2e633dafe3 100644 --- a/source/lmp/pair_deepmd.cpp +++ b/source/lmp/pair_deepmd.cpp @@ -310,7 +310,7 @@ void PairDeepMD::compute(int eflag, int vflag) { if (numb_models == 0) return; if (eflag || vflag) ev_setup(eflag,vflag); - if (vflag_atom) error->all(FLERR, "6-element virial is not supported. Use compute centroid/stress/atom command for 9-element virial."); + if (vflag_atom) error->all(FLERR, "6-element atomic virial is not supported. Use compute centroid/stress/atom command for 9-element atomic virial."); bool do_ghost = true; double **x = atom->x;