ensure that a LAMMPS instance could be created and the eim pair style is available

This commit is contained in:
Axel Kohlmeyer
2020-06-17 18:12:12 -04:00
parent afe874ac5b
commit 5bb9700124

View File

@ -12,6 +12,7 @@
------------------------------------------------------------------------- */
#include "MANYBODY/pair_eim.h"
#include "info.h"
#include "input.h"
#include "lammps.h"
#include "utils.h"
@ -42,6 +43,11 @@ protected:
lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD);
lmp->input->one("units metal");
if (!verbose) ::testing::internal::GetCapturedStdout();
ASSERT_NE(lmp, nullptr);
// check if the prerequisite eim pair style is available
Info *info = new Info(lmp);
ASSERT_TRUE(info->has_style("pair", "eim"));
int npair = nelements * (nelements + 1) / 2;
setfl.ielement = new int[nelements];