Merge branch 'develop' into distributed-grids
# Conflicts: # doc/src/Developer_utils.rst # doc/src/dump.rst # doc/src/fix_ave_chunk.rst # src/utils.h
This commit is contained in:
@ -14,8 +14,8 @@
|
||||
#define STRINGIFY(val) XSTR(val)
|
||||
#define XSTR(val) #val
|
||||
|
||||
using ::LAMMPS_NS::platform::path_join;
|
||||
using ::LAMMPS_NS::tagint;
|
||||
using ::LAMMPS_NS::platform::path_join;
|
||||
using ::testing::HasSubstr;
|
||||
using ::testing::StartsWith;
|
||||
using ::testing::StrEq;
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
#define STRINGIFY(val) XSTR(val)
|
||||
#define XSTR(val) #val
|
||||
|
||||
using ::LAMMPS_NS::platform::path_join;
|
||||
using ::LAMMPS_NS::bigint;
|
||||
using ::LAMMPS_NS::tagint;
|
||||
using ::LAMMPS_NS::platform::path_join;
|
||||
using ::testing::HasSubstr;
|
||||
using ::testing::StartsWith;
|
||||
|
||||
|
||||
@ -33,6 +33,11 @@ add_executable(test_set_property test_set_property.cpp)
|
||||
target_link_libraries(test_set_property PRIVATE lammps GTest::GMock)
|
||||
add_test(NAME SetProperty COMMAND test_set_property)
|
||||
|
||||
add_executable(test_labelmap test_labelmap.cpp)
|
||||
target_compile_definitions(test_labelmap PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(test_labelmap PRIVATE lammps GTest::GMock)
|
||||
add_test(NAME Labelmap COMMAND test_labelmap)
|
||||
|
||||
add_executable(test_variables test_variables.cpp)
|
||||
target_link_libraries(test_variables PRIVATE lammps GTest::GMock)
|
||||
add_test(NAME Variables COMMAND test_variables)
|
||||
|
||||
320
unittest/commands/test_labelmap.cpp
Normal file
320
unittest/commands/test_labelmap.cpp
Normal file
@ -0,0 +1,320 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "lammps.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "info.h"
|
||||
#include "label_map.h"
|
||||
#include "math_const.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "../testing/core.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#define STRINGIFY(val) XSTR(val)
|
||||
#define XSTR(val) #val
|
||||
|
||||
// whether to print verbose output (i.e. not capturing LAMMPS screen output).
|
||||
bool verbose = false;
|
||||
|
||||
using ::testing::ContainsRegex;
|
||||
using ::testing::ExitedWithCode;
|
||||
using ::testing::StrEq;
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
class LabelMapTest : public LAMMPSTest {
|
||||
protected:
|
||||
Atom *atom;
|
||||
Domain *domain;
|
||||
void SetUp() override
|
||||
{
|
||||
testbinary = "LabelMapTest";
|
||||
args = {"-log", "none", "-echo", "screen", "-nocite", "-v", "num", "1"};
|
||||
LAMMPSTest::SetUp();
|
||||
atom = lmp->atom;
|
||||
domain = lmp->domain;
|
||||
}
|
||||
|
||||
void TearDown() override { LAMMPSTest::TearDown(); }
|
||||
};
|
||||
|
||||
TEST_F(LabelMapTest, Atoms)
|
||||
{
|
||||
EXPECT_EQ(atom->natoms, 0);
|
||||
EXPECT_EQ(domain->box_exist, 0);
|
||||
EXPECT_EQ(atom->labelmapflag, 0);
|
||||
EXPECT_EQ(atom->types_style, Atom::NUMERIC);
|
||||
ASSERT_EQ(atom->lmap, nullptr);
|
||||
TEST_FAILURE(".*ERROR: Labelmap command before simulation box is.*",
|
||||
command("labelmap atom 3 C1"););
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("region box block 0 2 0 2 0 2");
|
||||
command("create_box 4 box");
|
||||
END_HIDE_OUTPUT();
|
||||
EXPECT_EQ(domain->box_exist, 1);
|
||||
EXPECT_EQ(atom->lmap, nullptr);
|
||||
EXPECT_EQ(atom->labelmapflag, 0);
|
||||
EXPECT_EQ(utils::expand_type(FLERR, "C1", Atom::ATOM, lmp), nullptr);
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("labelmap atom 2 N1");
|
||||
command("labelmap atom 3 O1 4 H1");
|
||||
command("mass * 1.0");
|
||||
command("mass O1 3.0");
|
||||
command("mass N1 2.0");
|
||||
command("mass H1 4.0");
|
||||
END_HIDE_OUTPUT();
|
||||
EXPECT_EQ(atom->labelmapflag, 1);
|
||||
ASSERT_NE(atom->lmap, nullptr);
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_DOUBLE_EQ(atom->mass[1], 1.0);
|
||||
EXPECT_DOUBLE_EQ(atom->mass[2], 2.0);
|
||||
EXPECT_DOUBLE_EQ(atom->mass[3], 3.0);
|
||||
EXPECT_DOUBLE_EQ(atom->mass[4], 4.0);
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("labelmap atom 1 C1 2 N2 3 ' O#' 1 C1 4 H# 2 N3"); // second '#' starts comment
|
||||
command("mass \"O#\" 10.0");
|
||||
END_HIDE_OUTPUT();
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_EQ(atom->lmap->find("C1", Atom::ATOM), 1);
|
||||
EXPECT_EQ(atom->lmap->find("N2", Atom::ATOM), 2);
|
||||
EXPECT_EQ(atom->lmap->find("O#", Atom::ATOM), 3);
|
||||
EXPECT_EQ(atom->lmap->find("H", Atom::ATOM), 4);
|
||||
EXPECT_EQ(atom->lmap->find("X", Atom::ATOM), -1);
|
||||
EXPECT_DOUBLE_EQ(atom->mass[3], 10.0);
|
||||
|
||||
EXPECT_EQ(utils::expand_type(FLERR, "1", Atom::ATOM, lmp), nullptr);
|
||||
EXPECT_EQ(utils::expand_type(FLERR, "*3", Atom::ATOM, lmp), nullptr);
|
||||
EXPECT_EQ(utils::expand_type(FLERR, "1*2", Atom::ATOM, lmp), nullptr);
|
||||
EXPECT_EQ(utils::expand_type(FLERR, "*", Atom::ATOM, lmp), nullptr);
|
||||
EXPECT_EQ(utils::expand_type(FLERR, "**", Atom::ATOM, lmp), nullptr);
|
||||
EXPECT_EQ(utils::expand_type(FLERR, "1*2*", Atom::ATOM, lmp), nullptr);
|
||||
|
||||
auto expanded = utils::expand_type(FLERR, "C1", Atom::ATOM, lmp);
|
||||
EXPECT_THAT(expanded, StrEq("1"));
|
||||
delete[] expanded;
|
||||
expanded = utils::expand_type(FLERR, "O#", Atom::ATOM, lmp);
|
||||
EXPECT_THAT(expanded, StrEq("3"));
|
||||
delete[] expanded;
|
||||
TEST_FAILURE(".*ERROR: Atom type string XX not found in labelmap.*",
|
||||
utils::expand_type(FLERR, "XX", Atom::ATOM, lmp););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Labelmap atom type 0 must be within 1-4.*",
|
||||
command("labelmap atom 0 C1"););
|
||||
TEST_FAILURE(".*ERROR: Labelmap atom type 5 must be within 1-4.*",
|
||||
command("labelmap atom 5 C1"););
|
||||
TEST_FAILURE(".*ERROR: Type label string 1C for atom type 1 is invalid.*",
|
||||
command("labelmap atom 1 1C"););
|
||||
TEST_FAILURE(".*ERROR: Type label string #C for atom type 1 is invalid.*",
|
||||
command("labelmap atom 1 '#C'"););
|
||||
TEST_FAILURE(".*ERROR: Type label string CA CB for atom type 1 is invalid.*",
|
||||
command("labelmap atom 1 ' CA CB '"););
|
||||
TEST_FAILURE(".*ERROR: Type label string \\*C for atom type 1 is invalid.*",
|
||||
command("labelmap atom 1 *C"););
|
||||
TEST_FAILURE(".*ERROR: The atom type label N2 is already in use for type 2.*",
|
||||
command("labelmap atom 1 N2"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: No bond types allowed with current box settings.*",
|
||||
command("labelmap bond 1 C1-C1"););
|
||||
TEST_FAILURE(".*ERROR: No angle types allowed with current box settings.*",
|
||||
command("labelmap angle 1 C1-C1-C1"););
|
||||
TEST_FAILURE(".*ERROR: No dihedral types allowed with current box settings.*",
|
||||
command("labelmap dihedral 1 C1-C1-C1-C1"););
|
||||
TEST_FAILURE(".*ERROR: No improper types allowed with current box settings.*",
|
||||
command("labelmap improper 1 C1-C1-C1-C1"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Incorrect number of arguments for labelmap command.*",
|
||||
command("labelmap atom 1 C1 2"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect number of arguments for labelmap command.*",
|
||||
command("labelmap atom 1 C1 atom 2 C2"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect number of arguments for labelmap clear command.*",
|
||||
command("labelmap clear atom"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect number of arguments for labelmap clear command.*",
|
||||
command("labelmap clear atom bond"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect number of arguments for labelmap write command.*",
|
||||
command("labelmap write"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect number of arguments for labelmap write command.*",
|
||||
command("labelmap write filename xxx"););
|
||||
TEST_FAILURE(".*ERROR: Illegal labelmap atom command: missing argument.*",
|
||||
command("labelmap atom 1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal labelmap atom command: missing argument.*",
|
||||
command("labelmap atom"););
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("labelmap clear");
|
||||
command("labelmap atom 3 C1 2 N2");
|
||||
END_HIDE_OUTPUT();
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_EQ(atom->lmap->find("C1", Atom::ATOM), 3);
|
||||
EXPECT_EQ(atom->lmap->find("N2", Atom::ATOM), 2);
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("labelmap clear");
|
||||
command("labelmap atom 1 \"C1'\" 2 'C2\"' 3 \"\"\"C1'-C2\" \"\"\" 4 \"\"\" C2\"-C1'\"\"\"");
|
||||
END_HIDE_OUTPUT();
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_EQ(atom->lmap->find("C1'", Atom::ATOM), 1);
|
||||
EXPECT_EQ(atom->lmap->find("C2\"", Atom::ATOM), 2);
|
||||
EXPECT_EQ(atom->lmap->find("C1'-C2\"", Atom::ATOM), 3);
|
||||
EXPECT_EQ(atom->lmap->find("C2\"-C1'", Atom::ATOM), 4);
|
||||
}
|
||||
|
||||
TEST_F(LabelMapTest, Topology)
|
||||
{
|
||||
if (!info->has_style("atom", "full")) GTEST_SKIP();
|
||||
|
||||
EXPECT_EQ(atom->natoms, 0);
|
||||
EXPECT_EQ(atom->nbonds, 0);
|
||||
EXPECT_EQ(atom->nangles, 0);
|
||||
EXPECT_EQ(atom->ndihedrals, 0);
|
||||
EXPECT_EQ(atom->nimpropers, 0);
|
||||
EXPECT_EQ(domain->box_exist, 0);
|
||||
EXPECT_EQ(atom->labelmapflag, 0);
|
||||
ASSERT_EQ(atom->lmap, nullptr);
|
||||
TEST_FAILURE(".*ERROR: Labelmap command before simulation box is.*",
|
||||
command("labelmap atom 3 C1"););
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("atom_style full");
|
||||
command("region box block 0 2 0 2 0 2");
|
||||
command("create_box 2 box bond/types 3 angle/types 2 dihedral/types 1 improper/types 1");
|
||||
command("labelmap atom 1 C1");
|
||||
END_HIDE_OUTPUT();
|
||||
EXPECT_EQ(atom->labelmapflag, 1);
|
||||
ASSERT_NE(atom->lmap, nullptr);
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::BOND));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::ANGLE));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::DIHEDRAL));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::IMPROPER));
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("labelmap atom 2 \"N2'\"");
|
||||
command("labelmap bond 1 C1-N2 2 [C1][C1] 3 N2=N2");
|
||||
command("labelmap angle 1 C1-N2-C1 2 \"\"\" N2'-C1\"-N2' \"\"\"");
|
||||
command("labelmap dihedral 1 'C1-N2-C1-N2'");
|
||||
command("labelmap improper 1 \"C1-N2-C1-N2\"");
|
||||
command("mass C1 12.0");
|
||||
command("mass \"N2'\" 14.0");
|
||||
command("labelmap write labelmap_topology.inc");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::BOND));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::ANGLE));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::DIHEDRAL));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::IMPROPER));
|
||||
EXPECT_EQ(atom->lmap->find("C1", Atom::ATOM), 1);
|
||||
EXPECT_EQ(atom->lmap->find("N2'", Atom::ATOM), 2);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2", Atom::BOND), 1);
|
||||
EXPECT_EQ(atom->lmap->find("[C1][C1]", Atom::BOND), 2);
|
||||
EXPECT_EQ(atom->lmap->find("N2=N2", Atom::BOND), 3);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2-C1", Atom::ANGLE), 1);
|
||||
EXPECT_EQ(atom->lmap->find("N2'-C1\"-N2'", Atom::ANGLE), 2);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2-C1-N2", Atom::DIHEDRAL), 1);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2-C1-N2", Atom::IMPROPER), 1);
|
||||
EXPECT_EQ(atom->lmap->find("X", Atom::ATOM), -1);
|
||||
EXPECT_EQ(atom->lmap->find("N2'-C1\"-N2'", Atom::BOND), -1);
|
||||
EXPECT_DOUBLE_EQ(atom->mass[1], 12.0);
|
||||
EXPECT_DOUBLE_EQ(atom->mass[2], 14.0);
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("labelmap clear");
|
||||
command("labelmap atom 1 C1");
|
||||
END_HIDE_OUTPUT();
|
||||
EXPECT_EQ(atom->labelmapflag, 1);
|
||||
ASSERT_NE(atom->lmap, nullptr);
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::BOND));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::ANGLE));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::DIHEDRAL));
|
||||
EXPECT_FALSE(atom->lmap->is_complete(Atom::IMPROPER));
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("include labelmap_topology.inc");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::ATOM));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::BOND));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::ANGLE));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::DIHEDRAL));
|
||||
EXPECT_TRUE(atom->lmap->is_complete(Atom::IMPROPER));
|
||||
EXPECT_EQ(atom->lmap->find("C1", Atom::ATOM), 1);
|
||||
EXPECT_EQ(atom->lmap->find("N2'", Atom::ATOM), 2);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2", Atom::BOND), 1);
|
||||
EXPECT_EQ(atom->lmap->find("[C1][C1]", Atom::BOND), 2);
|
||||
EXPECT_EQ(atom->lmap->find("N2=N2", Atom::BOND), 3);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2-C1", Atom::ANGLE), 1);
|
||||
EXPECT_EQ(atom->lmap->find("N2'-C1\"-N2'", Atom::ANGLE), 2);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2-C1-N2", Atom::DIHEDRAL), 1);
|
||||
EXPECT_EQ(atom->lmap->find("C1-N2-C1-N2", Atom::IMPROPER), 1);
|
||||
EXPECT_EQ(atom->lmap->find("X", Atom::ATOM), -1);
|
||||
EXPECT_EQ(atom->lmap->find("N2'-C1\"-N2'", Atom::BOND), -1);
|
||||
platform::unlink("labelmap_topology.inc");
|
||||
|
||||
auto expanded = utils::expand_type(FLERR, "N2'", Atom::ATOM, lmp);
|
||||
EXPECT_THAT(expanded, StrEq("2"));
|
||||
delete[] expanded;
|
||||
expanded = utils::expand_type(FLERR, "[C1][C1]", Atom::BOND, lmp);
|
||||
EXPECT_THAT(expanded, StrEq("2"));
|
||||
delete[] expanded;
|
||||
expanded = utils::expand_type(FLERR, "C1-N2-C1", Atom::ANGLE, lmp);
|
||||
EXPECT_THAT(expanded, StrEq("1"));
|
||||
delete[] expanded;
|
||||
expanded = utils::expand_type(FLERR, "C1-N2-C1-N2", Atom::DIHEDRAL, lmp);
|
||||
EXPECT_THAT(expanded, StrEq("1"));
|
||||
delete[] expanded;
|
||||
expanded = utils::expand_type(FLERR, "C1-N2-C1-N2", Atom::IMPROPER, lmp);
|
||||
EXPECT_THAT(expanded, StrEq("1"));
|
||||
delete[] expanded;
|
||||
TEST_FAILURE(".*ERROR: Bond type string XX not found in labelmap.*",
|
||||
utils::expand_type(FLERR, "XX", Atom::BOND, lmp););
|
||||
TEST_FAILURE(".*ERROR: Angle type string XX not found in labelmap.*",
|
||||
utils::expand_type(FLERR, "XX", Atom::ANGLE, lmp););
|
||||
TEST_FAILURE(".*ERROR: Dihedral type string XX not found in labelmap.*",
|
||||
utils::expand_type(FLERR, "XX", Atom::DIHEDRAL, lmp););
|
||||
TEST_FAILURE(".*ERROR: Improper type string XX not found in labelmap.*",
|
||||
utils::expand_type(FLERR, "XX", Atom::IMPROPER, lmp););
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
MPI_Init(&argc, &argv);
|
||||
::testing::InitGoogleMock(&argc, argv);
|
||||
|
||||
if (LAMMPS_NS::platform::mpi_vendor() == "Open MPI" && !Info::has_exceptions())
|
||||
std::cout << "Warning: using OpenMPI without exceptions. Death tests will be skipped\n";
|
||||
|
||||
// handle arguments passed via environment variable
|
||||
if (const char *var = getenv("TEST_ARGS")) {
|
||||
std::vector<std::string> env = LAMMPS_NS::utils::split_words(var);
|
||||
for (auto arg : env) {
|
||||
if (arg == "-v") {
|
||||
verbose = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true;
|
||||
|
||||
int rv = RUN_ALL_TESTS();
|
||||
MPI_Finalize();
|
||||
return rv;
|
||||
}
|
||||
@ -192,17 +192,25 @@ TEST_F(RegionTest, DeathTests)
|
||||
auto list = domain->get_region_list();
|
||||
ASSERT_EQ(list.size(), 1);
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal region block xlo: 1 >= xhi: 0.*", command("region reg1 block 1 0 0 1 0 1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region cone open face: 4.*", command("region reg2 cone x 0 0 2 1 0 1 open 4"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region plane normal vector: 0 0 0.*", command("region reg3 plane 0 0 0 0 0 0 side out"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region prism non-zero xy tilt with infinite x size.*", command("region reg4 prism INF INF 0 1 0 1 0.1 0.2 0.3"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region sphere radius: -1.*", command("region reg5 sphere 0 0 0 -1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region ellipsoid c: -2.*", command("region reg8 ellipsoid 0 0 0 2 1 -2"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region cylinder axis: xx.*", command("region reg9 cylinder xx 0 0 1 0 1 open 1 units box"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region block xlo: 1 >= xhi: 0.*",
|
||||
command("region reg1 block 1 0 0 1 0 1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region cone open face: 4.*",
|
||||
command("region reg2 cone x 0 0 2 1 0 1 open 4"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region plane normal vector: 0 0 0.*",
|
||||
command("region reg3 plane 0 0 0 0 0 0 side out"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region prism non-zero xy tilt with infinite x size.*",
|
||||
command("region reg4 prism INF INF 0 1 0 1 0.1 0.2 0.3"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region sphere radius: -1.*",
|
||||
command("region reg5 sphere 0 0 0 -1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region ellipsoid c: -2.*",
|
||||
command("region reg8 ellipsoid 0 0 0 2 1 -2"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region cylinder axis: xx.*",
|
||||
command("region reg9 cylinder xx 0 0 1 0 1 open 1 units box"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Unrecognized region style 'xxx'.*", command("region new1 xxx"););
|
||||
//TEST_FAILURE(".*ERROR: Illegal region command.*", command("region new1 block 0 1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region command: missing argument\\(s\\).*", command("region new1 block 0 1"););
|
||||
// TEST_FAILURE(".*ERROR: Illegal region command.*", command("region new1 block 0 1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal region command: missing argument\\(s\\).*",
|
||||
command("region new1 block 0 1"););
|
||||
TEST_FAILURE(".*ERROR: Delete region new3 does not exist.*", command("region new3 delete"););
|
||||
}
|
||||
|
||||
@ -223,16 +231,16 @@ TEST_F(RegionTest, Counts)
|
||||
command("region reg10 prism 0 5 0 5 -5 5 0.0 0.0 0.0"); // same as block
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
auto x = atom->x;
|
||||
auto reg1 = domain->get_region_by_id("reg1");
|
||||
auto reg2 = domain->get_region_by_id("reg2");
|
||||
auto reg3 = domain->get_region_by_id("reg3");
|
||||
auto reg4 = domain->get_region_by_id("reg4");
|
||||
auto reg5 = domain->get_region_by_id("reg5");
|
||||
auto reg6 = domain->get_region_by_id("reg6");
|
||||
auto reg7 = domain->get_region_by_id("reg7");
|
||||
auto reg8 = domain->get_region_by_id("reg8");
|
||||
auto reg9 = domain->get_region_by_id("reg9");
|
||||
auto x = atom->x;
|
||||
auto reg1 = domain->get_region_by_id("reg1");
|
||||
auto reg2 = domain->get_region_by_id("reg2");
|
||||
auto reg3 = domain->get_region_by_id("reg3");
|
||||
auto reg4 = domain->get_region_by_id("reg4");
|
||||
auto reg5 = domain->get_region_by_id("reg5");
|
||||
auto reg6 = domain->get_region_by_id("reg6");
|
||||
auto reg7 = domain->get_region_by_id("reg7");
|
||||
auto reg8 = domain->get_region_by_id("reg8");
|
||||
auto reg9 = domain->get_region_by_id("reg9");
|
||||
auto reg10 = domain->get_region_by_id("reg10");
|
||||
int count1, count2, count3, count4, count5, count6, count7, count8, count9, count10;
|
||||
count1 = count2 = count3 = count4 = count5 = count6 = count7 = count8 = count9 = count10 = 0;
|
||||
|
||||
@ -46,7 +46,7 @@ protected:
|
||||
|
||||
void TearDown() override { LAMMPSTest::TearDown(); }
|
||||
|
||||
void atomic_system(const std::string &atom_style, const std::string units = "real")
|
||||
void atomic_system(const std::string &atom_style, const std::string &units = "real")
|
||||
{
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("atom_style " + atom_style);
|
||||
@ -313,10 +313,10 @@ TEST_F(SetTest, SpinPackage)
|
||||
command("set atom 1*2 spin/atom 0.5 0.1 0.5 -0.1");
|
||||
command("set atom 8 spin/atom/random 23974 0.25");
|
||||
END_HIDE_OUTPUT();
|
||||
constexpr double vx = 0.1;
|
||||
constexpr double vy = 0.5;
|
||||
constexpr double vz = -0.1;
|
||||
constexpr double norm = 1.0 / sqrt(vx * vx + vy * vy + vz * vz);
|
||||
constexpr double vx = 0.1;
|
||||
constexpr double vy = 0.5;
|
||||
constexpr double vz = -0.1;
|
||||
const double norm = 1.0 / sqrt(vx * vx + vy * vy + vz * vz);
|
||||
ASSERT_EQ(atom->sp[0][0], vx * norm);
|
||||
ASSERT_EQ(atom->sp[0][1], vy * norm);
|
||||
ASSERT_EQ(atom->sp[0][2], vz * norm);
|
||||
@ -365,39 +365,39 @@ TEST_F(SetTest, EffPackage)
|
||||
ASSERT_NE(compute, nullptr);
|
||||
compute->compute_peratom();
|
||||
|
||||
EXPECT_EQ(atom->spin[0],-1);
|
||||
EXPECT_EQ(atom->spin[1],-1);
|
||||
EXPECT_EQ(atom->spin[2],1);
|
||||
EXPECT_EQ(atom->spin[3],1);
|
||||
EXPECT_EQ(atom->spin[4],0);
|
||||
EXPECT_EQ(atom->spin[5],2);
|
||||
EXPECT_EQ(atom->spin[6],3);
|
||||
EXPECT_EQ(atom->spin[7],3);
|
||||
EXPECT_EQ(atom->eradius[0],0.5);
|
||||
EXPECT_EQ(atom->eradius[1],1.0);
|
||||
EXPECT_EQ(atom->eradius[2],0.5);
|
||||
EXPECT_EQ(atom->eradius[3],1.0);
|
||||
EXPECT_EQ(atom->eradius[4],0.5);
|
||||
EXPECT_EQ(atom->eradius[5],1.0);
|
||||
EXPECT_EQ(atom->eradius[6],0.5);
|
||||
EXPECT_EQ(atom->eradius[7],1.0);
|
||||
EXPECT_EQ(atom->spin[0], -1);
|
||||
EXPECT_EQ(atom->spin[1], -1);
|
||||
EXPECT_EQ(atom->spin[2], 1);
|
||||
EXPECT_EQ(atom->spin[3], 1);
|
||||
EXPECT_EQ(atom->spin[4], 0);
|
||||
EXPECT_EQ(atom->spin[5], 2);
|
||||
EXPECT_EQ(atom->spin[6], 3);
|
||||
EXPECT_EQ(atom->spin[7], 3);
|
||||
EXPECT_EQ(atom->eradius[0], 0.5);
|
||||
EXPECT_EQ(atom->eradius[1], 1.0);
|
||||
EXPECT_EQ(atom->eradius[2], 0.5);
|
||||
EXPECT_EQ(atom->eradius[3], 1.0);
|
||||
EXPECT_EQ(atom->eradius[4], 0.5);
|
||||
EXPECT_EQ(atom->eradius[5], 1.0);
|
||||
EXPECT_EQ(atom->eradius[6], 0.5);
|
||||
EXPECT_EQ(atom->eradius[7], 1.0);
|
||||
|
||||
EXPECT_EQ(compute->array_atom[0][0],-1);
|
||||
EXPECT_EQ(compute->array_atom[1][0],-1);
|
||||
EXPECT_EQ(compute->array_atom[2][0],1);
|
||||
EXPECT_EQ(compute->array_atom[3][0],1);
|
||||
EXPECT_EQ(compute->array_atom[4][0],0);
|
||||
EXPECT_EQ(compute->array_atom[5][0],2);
|
||||
EXPECT_EQ(compute->array_atom[6][0],3);
|
||||
EXPECT_EQ(compute->array_atom[7][0],3);
|
||||
EXPECT_EQ(compute->array_atom[0][1],0.5);
|
||||
EXPECT_EQ(compute->array_atom[1][1],1.0);
|
||||
EXPECT_EQ(compute->array_atom[2][1],0.5);
|
||||
EXPECT_EQ(compute->array_atom[3][1],1.0);
|
||||
EXPECT_EQ(compute->array_atom[4][1],0.5);
|
||||
EXPECT_EQ(compute->array_atom[5][1],1.0);
|
||||
EXPECT_EQ(compute->array_atom[6][1],0.5);
|
||||
EXPECT_EQ(compute->array_atom[7][1],1.0);
|
||||
EXPECT_EQ(compute->array_atom[0][0], -1);
|
||||
EXPECT_EQ(compute->array_atom[1][0], -1);
|
||||
EXPECT_EQ(compute->array_atom[2][0], 1);
|
||||
EXPECT_EQ(compute->array_atom[3][0], 1);
|
||||
EXPECT_EQ(compute->array_atom[4][0], 0);
|
||||
EXPECT_EQ(compute->array_atom[5][0], 2);
|
||||
EXPECT_EQ(compute->array_atom[6][0], 3);
|
||||
EXPECT_EQ(compute->array_atom[7][0], 3);
|
||||
EXPECT_EQ(compute->array_atom[0][1], 0.5);
|
||||
EXPECT_EQ(compute->array_atom[1][1], 1.0);
|
||||
EXPECT_EQ(compute->array_atom[2][1], 0.5);
|
||||
EXPECT_EQ(compute->array_atom[3][1], 1.0);
|
||||
EXPECT_EQ(compute->array_atom[4][1], 0.5);
|
||||
EXPECT_EQ(compute->array_atom[5][1], 1.0);
|
||||
EXPECT_EQ(compute->array_atom[6][1], 0.5);
|
||||
EXPECT_EQ(compute->array_atom[7][1], 1.0);
|
||||
|
||||
TEST_FAILURE(".*ERROR on proc 0: Incorrect value for electron spin: 0.5.*",
|
||||
command("set atom * spin/electron 0.5"););
|
||||
|
||||
@ -41,8 +41,7 @@ using ::testing::ContainsRegex;
|
||||
using ::testing::ExitedWithCode;
|
||||
using ::testing::StrEq;
|
||||
|
||||
class SimpleCommandsTest : public LAMMPSTest {
|
||||
};
|
||||
class SimpleCommandsTest : public LAMMPSTest {};
|
||||
|
||||
TEST_F(SimpleCommandsTest, UnknownCommand)
|
||||
{
|
||||
|
||||
@ -33,10 +33,10 @@
|
||||
bool verbose = false;
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
using MathConst::MY_PI;
|
||||
using ::testing::ContainsRegex;
|
||||
using ::testing::ExitedWithCode;
|
||||
using ::testing::StrEq;
|
||||
using MathConst::MY_PI;
|
||||
|
||||
class VariableTest : public LAMMPSTest {
|
||||
protected:
|
||||
@ -196,8 +196,10 @@ TEST_F(VariableTest, CreateDelete)
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable index command.*", command("variable dummy index"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable delete command: expected 2 arguments but found 3.*", command("variable dummy delete xxx"););
|
||||
TEST_FAILURE(".*ERROR: Invalid variable loop argument: -1.*", command("variable dummy loop -1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable delete command: expected 2 arguments but found 3.*",
|
||||
command("variable dummy delete xxx"););
|
||||
TEST_FAILURE(".*ERROR: Invalid variable loop argument: -1.*",
|
||||
command("variable dummy loop -1"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable loop command.*", command("variable dummy loop 10 1"););
|
||||
TEST_FAILURE(".*ERROR: Unknown variable keyword: xxx.*", command("variable dummy xxxx"););
|
||||
TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*",
|
||||
@ -402,8 +404,9 @@ TEST_F(VariableTest, Functions)
|
||||
command("print \"$(extract_setting()\""););
|
||||
TEST_FAILURE(".*ERROR: Invalid extract_setting.. function syntax in variable formula.*",
|
||||
command("print \"$(extract_setting(one,two))\""););
|
||||
TEST_FAILURE(".*ERROR: Unknown setting nprocs for extract_setting.. function in variable formula.*",
|
||||
command("print \"$(extract_setting(nprocs))\""););
|
||||
TEST_FAILURE(
|
||||
".*ERROR: Unknown setting nprocs for extract_setting.. function in variable formula.*",
|
||||
command("print \"$(extract_setting(nprocs))\""););
|
||||
}
|
||||
|
||||
TEST_F(VariableTest, IfCommand)
|
||||
@ -576,6 +579,65 @@ TEST_F(VariableTest, NextCommand)
|
||||
TEST_FAILURE(".*ERROR: All variables in next command must have same style.*",
|
||||
command("next five four"););
|
||||
}
|
||||
|
||||
TEST_F(VariableTest, Label2TypeAtomic)
|
||||
{
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("region box block 0 2 0 2 0 2");
|
||||
command("create_box 4 box");
|
||||
command("labelmap atom 2 N1");
|
||||
command("labelmap atom 3 O1 4 H1");
|
||||
command("variable t1 equal label2type(atom,C1)");
|
||||
command("variable t2 equal label2type(atom,N1)");
|
||||
command("variable t3 equal label2type(atom,O1)");
|
||||
command("variable t4 equal label2type(atom,H1)");
|
||||
END_HIDE_OUTPUT();
|
||||
ASSERT_THAT(variable->retrieve("t2"), StrEq("2"));
|
||||
ASSERT_THAT(variable->retrieve("t3"), StrEq("3"));
|
||||
ASSERT_THAT(variable->retrieve("t4"), StrEq("4"));
|
||||
ASSERT_DOUBLE_EQ(variable->compute_equal("label2type(atom,N1)"), 2.0);
|
||||
ASSERT_DOUBLE_EQ(variable->compute_equal("label2type(atom,O1)"), 3.0);
|
||||
ASSERT_DOUBLE_EQ(variable->compute_equal("label2type(atom,H1)"), 4.0);
|
||||
|
||||
TEST_FAILURE(".*ERROR: Variable t1: Invalid atom type label C1 in variable formula.*",
|
||||
command("print \"${t1}\""););
|
||||
TEST_FAILURE(".*ERROR: Invalid bond type label H1 in variable formula.*",
|
||||
variable->compute_equal("label2type(bond,H1)"););
|
||||
}
|
||||
|
||||
TEST_F(VariableTest, Label2TypeMolecular)
|
||||
{
|
||||
if (!info->has_style("atom", "full")) GTEST_SKIP();
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("atom_style full");
|
||||
command("region box block 0 2 0 2 0 2");
|
||||
command("create_box 2 box bond/types 3 angle/types 2 dihedral/types 1 improper/types 1");
|
||||
command("labelmap atom 1 C1");
|
||||
command("labelmap atom 2 \"N2'\"");
|
||||
command("labelmap bond 1 C1-N2 2 [C1][C1] 3 N2=N2");
|
||||
command("labelmap angle 1 C1-N2-C1 2 \"\"\" N2'-C1\"-N2' \"\"\"");
|
||||
command("labelmap dihedral 1 'C1-N2-C1-N2'");
|
||||
command("labelmap improper 1 \"C1-N2-C1-N2\"");
|
||||
command("variable t1 equal label2type(atom,C1)");
|
||||
command("variable t2 equal \"label2type(atom,N2')\"");
|
||||
command("variable b1 equal label2type(bond,C1-N2)");
|
||||
command("variable b2 equal label2type(bond,[C1][C1])");
|
||||
command("variable a1 equal label2type(angle,C1-N2-C1)");
|
||||
command("variable a2 equal \"\"\"label2type(angle,N2'-C1\"-N2')\"\"\"");
|
||||
command("variable d1 equal label2type(dihedral,C1-N2-C1-N2)");
|
||||
command("variable i1 equal label2type(improper,C1-N2-C1-N2)");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
ASSERT_THAT(variable->retrieve("t1"), StrEq("1"));
|
||||
ASSERT_THAT(variable->retrieve("t2"), StrEq("2"));
|
||||
ASSERT_THAT(variable->retrieve("b1"), StrEq("1"));
|
||||
ASSERT_THAT(variable->retrieve("b2"), StrEq("2"));
|
||||
ASSERT_THAT(variable->retrieve("a1"), StrEq("1"));
|
||||
ASSERT_THAT(variable->retrieve("a2"), StrEq("2"));
|
||||
ASSERT_THAT(variable->retrieve("d1"), StrEq("1"));
|
||||
ASSERT_THAT(variable->retrieve("i1"), StrEq("1"));
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
@ -285,7 +285,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
// run_stress
|
||||
stress = lmp->force->angle->virial;
|
||||
block = fmt::format("{:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e}", stress[0],
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
|
||||
@ -285,7 +285,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
// run_stress
|
||||
stress = lmp->force->bond->virial;
|
||||
block = fmt::format("{:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e}", stress[0],
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
|
||||
@ -288,7 +288,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
// run_stress
|
||||
stress = lmp->force->dihedral->virial;
|
||||
block = fmt::format("{:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e}", stress[0],
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
|
||||
@ -279,7 +279,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
// run_stress
|
||||
stress = lmp->force->improper->virial;
|
||||
block = fmt::format("{:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e} {:23.16e}", stress[0],
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
stress[1], stress[2], stress[3], stress[4], stress[5]);
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
|
||||
@ -12,16 +12,16 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "test_main.h"
|
||||
#include "atom.h"
|
||||
#include "error_stats.h"
|
||||
#include "lammps.h"
|
||||
#include "pointers.h"
|
||||
#include "test_config.h"
|
||||
#include "test_config_reader.h"
|
||||
#include "error_stats.h"
|
||||
#include "utils.h"
|
||||
#include "yaml_writer.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "lammps.h"
|
||||
#include "atom.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@ -30,13 +30,14 @@
|
||||
#include <mpi.h>
|
||||
#include <vector>
|
||||
|
||||
using LAMMPS_NS::LAMMPS;
|
||||
using LAMMPS_NS::Atom;
|
||||
using LAMMPS_NS::LAMMPS;
|
||||
using LAMMPS_NS::tagint;
|
||||
using LAMMPS_NS::utils::split_words;
|
||||
using LAMMPS_NS::utils::trim;
|
||||
using LAMMPS_NS::tagint;
|
||||
|
||||
void EXPECT_STRESS(const std::string & name, double * stress, const stress_t & expected_stress, double epsilon)
|
||||
void EXPECT_STRESS(const std::string &name, double *stress, const stress_t &expected_stress,
|
||||
double epsilon)
|
||||
{
|
||||
SCOPED_TRACE("EXPECT_STRESS: " + name);
|
||||
ErrorStats stats;
|
||||
@ -49,10 +50,12 @@ void EXPECT_STRESS(const std::string & name, double * stress, const stress_t & e
|
||||
if (print_stats) std::cerr << name << " stats" << stats << std::endl;
|
||||
}
|
||||
|
||||
void EXPECT_FORCES(const std::string & name, Atom * atom, const std::vector<coord_t> & f_ref, double epsilon) {
|
||||
void EXPECT_FORCES(const std::string &name, Atom *atom, const std::vector<coord_t> &f_ref,
|
||||
double epsilon)
|
||||
{
|
||||
SCOPED_TRACE("EXPECT_FORCES: " + name);
|
||||
double ** f = atom->f;
|
||||
tagint * tag = atom->tag;
|
||||
double **f = atom->f;
|
||||
tagint *tag = atom->tag;
|
||||
const int nlocal = atom->nlocal;
|
||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
||||
ErrorStats stats;
|
||||
@ -64,10 +67,12 @@ void EXPECT_FORCES(const std::string & name, Atom * atom, const std::vector<coor
|
||||
if (print_stats) std::cerr << name << " stats" << stats << std::endl;
|
||||
}
|
||||
|
||||
void EXPECT_POSITIONS(const std::string & name, Atom * atom, const std::vector<coord_t> & x_ref, double epsilon) {
|
||||
void EXPECT_POSITIONS(const std::string &name, Atom *atom, const std::vector<coord_t> &x_ref,
|
||||
double epsilon)
|
||||
{
|
||||
SCOPED_TRACE("EXPECT_POSITIONS: " + name);
|
||||
double ** x = atom->x;
|
||||
tagint * tag = atom->tag;
|
||||
double **x = atom->x;
|
||||
tagint *tag = atom->tag;
|
||||
const int nlocal = atom->nlocal;
|
||||
ASSERT_EQ(nlocal + 1, x_ref.size());
|
||||
ErrorStats stats;
|
||||
@ -79,10 +84,12 @@ void EXPECT_POSITIONS(const std::string & name, Atom * atom, const std::vector<c
|
||||
if (print_stats) std::cerr << name << " stats" << stats << std::endl;
|
||||
}
|
||||
|
||||
void EXPECT_VELOCITIES(const std::string & name, Atom * atom, const std::vector<coord_t> & v_ref, double epsilon) {
|
||||
void EXPECT_VELOCITIES(const std::string &name, Atom *atom, const std::vector<coord_t> &v_ref,
|
||||
double epsilon)
|
||||
{
|
||||
SCOPED_TRACE("EXPECT_VELOCITIES: " + name);
|
||||
double ** v = atom->v;
|
||||
tagint * tag = atom->tag;
|
||||
double **v = atom->v;
|
||||
tagint *tag = atom->tag;
|
||||
const int nlocal = atom->nlocal;
|
||||
ASSERT_EQ(nlocal + 1, v_ref.size());
|
||||
ErrorStats stats;
|
||||
|
||||
@ -766,7 +766,7 @@ TEST(PairStyle, gpu)
|
||||
GTEST_SKIP();
|
||||
|
||||
const char *args_neigh[] = {"PairStyle", "-log", "none", "-echo",
|
||||
"screen", "-nocite", "-sf", "gpu"};
|
||||
"screen", "-nocite", "-sf", "gpu"};
|
||||
const char *args_noneigh[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf",
|
||||
"gpu", "-pk", "gpu", "0", "neigh", "no"};
|
||||
|
||||
|
||||
223
unittest/force-styles/tests/data.dielectric
Normal file
223
unittest/force-styles/tests/data.dielectric
Normal file
@ -0,0 +1,223 @@
|
||||
LAMMPS data file via write_data, version 5 May 2020, timestep = 0
|
||||
|
||||
29 atoms
|
||||
5 atom types
|
||||
24 bonds
|
||||
5 bond types
|
||||
30 angles
|
||||
4 angle types
|
||||
31 dihedrals
|
||||
5 dihedral types
|
||||
2 impropers
|
||||
2 improper types
|
||||
|
||||
-6.024572 8.975428 xlo xhi
|
||||
-7.692866 7.307134 ylo yhi
|
||||
-8.086924 6.913076 zlo zhi
|
||||
|
||||
Masses
|
||||
|
||||
1 12.0107
|
||||
2 4.00794
|
||||
3 14.0067
|
||||
4 15.9994
|
||||
5 15.9994
|
||||
|
||||
Pair Coeffs # zero
|
||||
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
||||
Bond Coeffs # zero
|
||||
|
||||
1 1.5
|
||||
2 1.1
|
||||
3 1.3
|
||||
4 1.2
|
||||
5 1
|
||||
|
||||
Angle Coeffs # zero
|
||||
|
||||
1 110.1
|
||||
2 111
|
||||
3 120
|
||||
4 108.5
|
||||
|
||||
Dihedral Coeffs # zero
|
||||
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
||||
Improper Coeffs # zero
|
||||
|
||||
1
|
||||
2
|
||||
|
||||
Atoms # dielectric
|
||||
|
||||
10 2 1 7.0000000000000007e-02 2.0185283555536988e+00 -1.4283966846517357e+00 -9.6733527271133024e-01 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
11 2 2 8.9999999999999997e-02 1.7929780509347666e+00 -1.9871047540768743e+00 -1.8840626643185674e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
12 2 1 -2.7000000000000002e-01 3.0030247876861225e+00 -4.8923319967572748e-01 -1.6188658531537248e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
13 2 2 8.9999999999999997e-02 4.0447273787895934e+00 -9.0131998547446246e-01 -1.6384447268320836e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
14 2 2 8.9999999999999997e-02 2.6033152817257075e+00 -4.0789761505963579e-01 -2.6554413538823063e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
2 1 2 3.1000000000000000e-01 3.0197083955402204e-01 2.9515239068888608e+00 -8.5689735572907566e-01 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
3 1 1 -2.0000000000000000e-02 -6.9435377880558602e-01 1.2440473127136711e+00 -6.2233801468892025e-01 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
4 1 2 8.9999999999999997e-02 -1.5771614164685133e+00 1.4915333140468066e+00 -1.2487126845040522e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
6 1 1 5.1000000000000001e-01 2.9412607937706009e-01 2.2719282656652909e-01 -1.2843094067857870e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
7 1 4 -5.1000000000000001e-01 3.4019871062879609e-01 -9.1277350075786561e-03 -2.4633113224304561e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
19 3 2 4.2359999999999998e-01 1.5349125211132961e+00 2.6315969880333707e+00 -4.2472859440220647e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
15 2 2 8.9999999999999997e-02 2.9756315249791303e+00 5.6334269722969288e-01 -1.2437650754599008e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
18 3 4 -8.4719999999999995e-01 2.1384791188033843e+00 3.0177261773770208e+00 -3.5160827596876225e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
20 3 2 4.2359999999999998e-01 2.7641167828863153e+00 3.6833419064000221e+00 -3.9380850623312638e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
8 2 3 -4.6999999999999997e-01 1.1641187171852805e+00 -4.8375305955385234e-01 -6.7659823767368688e-01 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
9 2 2 3.1000000000000000e-01 1.3777459838125838e+00 -2.5366338669522998e-01 2.6877644730326306e-01 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
16 2 1 5.1000000000000001e-01 2.6517554244980306e+00 -2.3957110424978438e+00 3.2908335999178327e-02 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
17 2 4 -5.1000000000000001e-01 2.2309964792710639e+00 -2.1022918943319384e+00 1.1491948328949437e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
1 1 3 -4.6999999999999997e-01 -2.7993683669226832e-01 2.4726588069312840e+00 -1.7200860244148433e-01 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
5 1 2 8.9999999999999997e-02 -8.9501761359359255e-01 9.3568128743071344e-01 4.0227731871484346e-01 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
21 4 5 -8.4719999999999995e-01 4.9064454390208301e+00 -4.0751205255383196e+00 -3.6215576073601046e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
22 4 2 4.2359999999999998e-01 4.3687453488627543e+00 -4.2054270536772504e+00 -4.4651491269372565e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
23 4 2 4.2359999999999998e-01 5.7374928154769504e+00 -3.5763355905184966e+00 -3.8820297194230728e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
24 5 5 -8.4719999999999995e-01 2.0684115301174013e+00 3.1518221747664397e+00 3.1554242678474576e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
25 5 2 4.2359999999999998e-01 1.2998381073113014e+00 3.2755513587518097e+00 2.5092990173114837e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
26 5 2 4.2359999999999998e-01 2.5807438597688113e+00 4.0120175892854135e+00 3.2133398379059099e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
27 6 5 -8.4719999999999995e-01 -1.9613581876744359e+00 -4.3556300596085160e+00 2.1101467673534788e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
28 6 2 4.2359999999999998e-01 -2.7406520384725965e+00 -4.0207251278130975e+00 1.5828689861678511e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
29 6 2 4.2359999999999998e-01 -1.3108232656499081e+00 -3.5992986322410760e+00 2.2680459788743503e+00 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 0 0 0
|
||||
|
||||
Velocities
|
||||
|
||||
1 7.7867804888392077e-04 5.8970331623292821e-04 -2.2179517633030531e-04
|
||||
2 2.7129529964126462e-03 4.6286427111164284e-03 3.5805549693846352e-03
|
||||
3 -1.2736791029204805e-03 1.6108674226414498e-03 -3.3618185901550799e-04
|
||||
4 -9.2828595122009308e-04 -1.2537885319521818e-03 -4.1204974953432108e-03
|
||||
5 -1.1800848061603740e-03 7.5424401975844038e-04 6.9023177964912290e-05
|
||||
6 -3.0914004879905335e-04 1.2755385764678133e-03 7.9574303350202582e-04
|
||||
7 -1.1037894966874103e-04 -7.6764845099077425e-04 -7.7217630460203659e-04
|
||||
8 3.9060281273221989e-04 -8.1444231918053418e-04 1.5134641148324972e-04
|
||||
9 1.2475530960659720e-03 -2.6608454451432528e-03 1.1117602907112732e-03
|
||||
10 4.5008983776042893e-04 4.9530197647538077e-04 -2.3336234361093645e-04
|
||||
11 -3.6977669078869707e-04 -1.5289071951960539e-03 -2.9176389881837113e-03
|
||||
12 1.0850834530183159e-03 -6.4965897903201833e-04 -1.2971152622619948e-03
|
||||
13 4.0754559196230639e-03 3.5043502394946119e-03 -7.8324487687854666e-04
|
||||
14 -1.3837220448746613e-04 -4.0656048637594394e-03 -3.9333461173944500e-03
|
||||
15 -4.3301707382721859e-03 -3.1802661664634938e-03 3.2037919043360571e-03
|
||||
16 -9.6715751018414326e-05 -5.0016572678960377e-04 1.4945658875149626e-03
|
||||
17 6.5692180538157174e-04 3.6635779995305095e-04 8.3495414466050911e-04
|
||||
18 -6.0936815808025862e-04 -9.3774557532468582e-04 -3.3558072507805731e-04
|
||||
19 -6.9919768291957119e-04 -3.6060777270430031e-03 4.2833405289822791e-03
|
||||
20 4.7777805013736515e-03 5.1003745845520452e-03 1.8002873923729241e-03
|
||||
21 -9.5568188553430398e-04 1.6594630943762931e-04 -1.8199788009966615e-04
|
||||
22 -3.3137518957653462e-03 -2.8683968287936054e-03 3.6384389958326871e-03
|
||||
23 2.4209481134686401e-04 -4.5457709985051130e-03 2.7663581642115042e-03
|
||||
24 2.5447450568861086e-04 4.8412447786110117e-04 -4.8021914527341357e-04
|
||||
25 4.3722771097312743e-03 -4.5184411669545515e-03 2.5200952006556795e-03
|
||||
26 -1.9250110555001179e-03 -3.0342169883610837e-03 3.5062814567984532e-03
|
||||
27 -2.6510179146429716e-04 3.6306203629019116e-04 -5.6235585400647747e-04
|
||||
28 -2.3068708109787484e-04 -8.5663070212203200e-04 2.1302563179109169e-03
|
||||
29 -2.5054744388303732e-03 -1.6773997805290820e-04 2.8436699761004796e-03
|
||||
|
||||
Bonds
|
||||
|
||||
1 5 1 2
|
||||
2 3 1 3
|
||||
3 2 3 4
|
||||
4 2 3 5
|
||||
5 1 3 6
|
||||
6 3 6 8
|
||||
7 4 6 7
|
||||
8 5 8 9
|
||||
9 3 8 10
|
||||
10 2 10 11
|
||||
11 1 10 12
|
||||
12 1 10 16
|
||||
13 2 12 13
|
||||
14 2 12 14
|
||||
15 2 12 15
|
||||
16 4 16 17
|
||||
17 5 18 19
|
||||
18 5 18 20
|
||||
19 5 21 22
|
||||
20 5 21 23
|
||||
21 5 24 25
|
||||
22 5 24 26
|
||||
23 5 27 28
|
||||
24 5 27 29
|
||||
|
||||
Angles
|
||||
|
||||
1 4 2 1 3
|
||||
2 4 1 3 5
|
||||
3 4 1 3 4
|
||||
4 4 1 3 6
|
||||
5 4 4 3 5
|
||||
6 2 5 3 6
|
||||
7 2 4 3 6
|
||||
8 3 3 6 7
|
||||
9 3 3 6 8
|
||||
10 3 7 6 8
|
||||
11 2 6 8 9
|
||||
12 2 9 8 10
|
||||
13 3 6 8 10
|
||||
14 2 8 10 11
|
||||
15 3 8 10 16
|
||||
16 2 11 10 12
|
||||
17 1 12 10 16
|
||||
18 1 8 10 12
|
||||
19 2 11 10 16
|
||||
20 2 10 12 15
|
||||
21 2 10 12 14
|
||||
22 2 10 12 13
|
||||
23 4 13 12 15
|
||||
24 4 13 12 14
|
||||
25 4 14 12 15
|
||||
26 4 10 16 17
|
||||
27 1 19 18 20
|
||||
28 1 22 21 23
|
||||
29 1 25 24 26
|
||||
30 1 28 27 29
|
||||
|
||||
Dihedrals
|
||||
|
||||
1 2 2 1 3 6
|
||||
2 2 2 1 3 4
|
||||
3 3 2 1 3 5
|
||||
4 1 1 3 6 8
|
||||
5 1 1 3 6 7
|
||||
6 5 4 3 6 8
|
||||
7 5 4 3 6 7
|
||||
8 5 5 3 6 8
|
||||
9 5 5 3 6 7
|
||||
10 4 3 6 8 9
|
||||
11 3 3 6 8 10
|
||||
12 3 7 6 8 9
|
||||
13 4 7 6 8 10
|
||||
14 2 6 8 10 12
|
||||
15 2 6 8 10 16
|
||||
16 2 6 8 10 11
|
||||
17 2 9 8 10 12
|
||||
18 4 9 8 10 16
|
||||
19 5 9 8 10 11
|
||||
20 5 8 10 12 13
|
||||
21 1 8 10 12 14
|
||||
22 5 8 10 12 15
|
||||
23 4 8 10 16 17
|
||||
24 5 11 10 12 13
|
||||
25 5 11 10 12 14
|
||||
26 5 11 10 12 15
|
||||
27 2 11 10 16 17
|
||||
28 2 12 10 16 17
|
||||
29 5 16 10 12 13
|
||||
30 5 16 10 12 14
|
||||
31 5 16 10 12 15
|
||||
|
||||
Impropers
|
||||
|
||||
1 1 6 3 8 7
|
||||
2 2 8 6 10 9
|
||||
@ -6,6 +6,7 @@ skip_tests:
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
fix adapt
|
||||
kspace pppm
|
||||
pre_commands: ! |
|
||||
variable scale equal ramp(0.5,1.0)
|
||||
post_commands: ! |
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
tags: generated
|
||||
date_generated: Mon Aug 15 01:14:02 2022
|
||||
epsilon: 4e-14
|
||||
skip_tests:
|
||||
|
||||
30
unittest/force-styles/tests/in.dielectric
Normal file
30
unittest/force-styles/tests/in.dielectric
Normal file
@ -0,0 +1,30 @@
|
||||
variable newton_pair index on
|
||||
variable newton_bond index on
|
||||
variable bond_factor index 0.10
|
||||
variable angle_factor index 0.25
|
||||
variable dihedral_factor index 0.50
|
||||
variable units index real
|
||||
variable input_dir index .
|
||||
variable data_file index ${input_dir}/data.dielectric
|
||||
variable pair_style index 'zero 8.0'
|
||||
variable bond_style index zero
|
||||
variable angle_style index zero
|
||||
variable dihedral_style index zero
|
||||
variable improper_style index zero
|
||||
variable t_target index 100.0
|
||||
|
||||
atom_style dielectric
|
||||
atom_modify map array
|
||||
neigh_modify delay 2 every 2 check no
|
||||
units ${units}
|
||||
timestep 0.1
|
||||
newton ${newton_pair} ${newton_bond}
|
||||
special_bonds lj/coul ${bond_factor} ${angle_factor} ${dihedral_factor}
|
||||
|
||||
pair_style ${pair_style}
|
||||
bond_style ${bond_style}
|
||||
angle_style ${angle_style}
|
||||
dihedral_style ${dihedral_style}
|
||||
improper_style ${improper_style}
|
||||
|
||||
read_data ${data_file}
|
||||
90
unittest/force-styles/tests/kspace-msm_dielectric.yaml
Normal file
90
unittest/force-styles/tests/kspace-msm_dielectric.yaml
Normal file
@ -0,0 +1,90 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
tags: slow
|
||||
date_generated: Fri Feb 26 23:09:26 2021
|
||||
epsilon: 5e-11
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair coul/msm/dielectric
|
||||
kspace msm/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify compute no
|
||||
kspace_style msm/dielectric 1.0e-4
|
||||
kspace_modify cutoff/adjust no
|
||||
kspace_modify pressure/scalar no # required for OPENMP with msm
|
||||
input_file: in.dielectric
|
||||
pair_style: coul/msm/dielectric 12.0
|
||||
pair_coeff: ! |
|
||||
* *
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_vdwl: 0
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
init_forces: ! |2
|
||||
1 -1.2431042274554520e-01 1.9802439635164294e-02 -1.2934560805652109e-01
|
||||
2 2.8269278524385981e-02 -3.4942207920179560e-02 1.0640770297542697e-01
|
||||
3 -8.1680189465386487e-03 -4.8785986221933948e-04 -5.6695928705039408e-03
|
||||
4 4.7243507011203875e-02 5.7225810677036214e-03 2.2981157415777751e-02
|
||||
5 4.3987668885808254e-02 2.8248082526437083e-03 1.9808257579061947e-02
|
||||
6 8.8800593109410506e-02 3.0616972893154053e-02 1.7757857593900081e-01
|
||||
7 -5.0486939698542926e-02 -4.9269456481661235e-02 -1.4635709147687803e-01
|
||||
8 1.6854633689262176e-02 -5.3889877013588897e-02 -1.8285642394974652e-01
|
||||
9 -1.8208650616643934e-02 2.4182790534936032e-02 9.4524210516868185e-02
|
||||
10 -2.0672900504789076e-02 1.6267660397450753e-02 3.1642325617085749e-02
|
||||
11 -2.6077347154308362e-02 2.5698647975433354e-02 3.9926142487441321e-02
|
||||
12 1.3654719159291959e-01 -4.6387879848293581e-02 -1.2630362459819144e-01
|
||||
13 -5.8109748793923867e-02 2.0198435165201065e-02 4.3686597342588833e-02
|
||||
14 -4.1188291677340401e-02 1.5483839448333378e-02 3.3581503274580475e-02
|
||||
15 -4.1921005103050787e-02 4.6161233544482179e-03 4.0635456166781297e-02
|
||||
16 -2.2170937444674826e-01 1.5851926934095659e-01 1.9868545500611781e-01
|
||||
17 1.6534628352924507e-01 -1.4039310969049748e-01 -1.0077971131805565e-01
|
||||
18 2.9446307550914391e-01 2.1107871134197267e-01 -2.3822295188757561e-01
|
||||
19 -1.1497979411501752e-01 -9.8017275380857638e-02 6.3040972959571770e-02
|
||||
20 -1.7622648355130471e-01 -1.3725908418675883e-01 1.0944379079200225e-01
|
||||
21 3.8912194870992411e-01 -1.8828921633907061e-01 -2.4484558396330772e-01
|
||||
22 -2.1179780459421113e-01 1.1630259668318758e-01 5.7538328830163223e-02
|
||||
23 -1.5378773433013196e-01 8.2471585685037790e-02 8.8670855699777451e-02
|
||||
24 2.1889058460877792e-01 1.9224905198267170e-01 2.0132393658378891e-01
|
||||
25 -4.8606884549553260e-02 -7.5467587141116996e-02 -5.3747830520043643e-02
|
||||
26 -1.4967846816434563e-01 -1.1230654336245335e-01 -1.1936419612620909e-01
|
||||
27 -3.3273527730870717e-01 2.9848870486028883e-02 -1.1257620438329453e-01
|
||||
28 2.1291483938325045e-01 -4.0520384302646095e-02 8.8122927793408815e-02
|
||||
29 1.5537778047382528e-01 2.1826593660998664e-02 4.1685376599454566e-02
|
||||
run_vdwl: 0
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
run_forces: ! |2
|
||||
1 -1.2395679232547130e-01 2.0146109106531619e-02 -1.2827365729808804e-01
|
||||
2 2.7886755727419794e-02 -3.5343748985890343e-02 1.0575224704522333e-01
|
||||
3 -8.1625716027346681e-03 -4.8280853342611387e-04 -5.6177982175900729e-03
|
||||
4 4.7257086969317325e-02 5.6839684424246639e-03 2.2777634266735503e-02
|
||||
5 4.3963228900686525e-02 2.8319210572596903e-03 1.9581568716000513e-02
|
||||
6 8.8542111460945233e-02 3.0663687272810280e-02 1.7623835677487854e-01
|
||||
7 -5.0273595956547790e-02 -4.9409712631872479e-02 -1.4541278378595143e-01
|
||||
8 1.7228328455862987e-02 -5.4120205381585490e-02 -1.8154834899604852e-01
|
||||
9 -1.8485411346972853e-02 2.4302377543661862e-02 9.3708642953056934e-02
|
||||
10 -2.0733723484382856e-02 1.6330981289874657e-02 3.1460670609309009e-02
|
||||
11 -2.6150839514591746e-02 2.5829754004203991e-02 3.9722511565340235e-02
|
||||
12 1.3683195341801987e-01 -4.6496929032343801e-02 -1.2561891227139674e-01
|
||||
13 -5.8193952783161113e-02 2.0243309422281770e-02 4.3465650724609249e-02
|
||||
14 -4.1278872269097378e-02 1.5532496933615860e-02 3.3394515434061488e-02
|
||||
15 -4.1987051617676026e-02 4.5853844307510777e-03 4.0398393863355121e-02
|
||||
16 -2.2207024887164900e-01 1.5899349683620562e-01 1.9759979720199139e-01
|
||||
17 1.6564040019940926e-01 -1.4064308476091039e-01 -9.9954963656764692e-02
|
||||
18 2.9554517271933162e-01 2.1285036802508378e-01 -2.3751859151483867e-01
|
||||
19 -1.1535768373316745e-01 -9.8724859420955033e-02 6.3073202014246779e-02
|
||||
20 -1.7685479806222060e-01 -1.3828729248251947e-01 1.0929448326376728e-01
|
||||
21 3.8967934355535033e-01 -1.9034991050182742e-01 -2.4389765041573847e-01
|
||||
22 -2.1209914094730067e-01 1.1729389051786178e-01 5.7400236525319739e-02
|
||||
23 -1.5388644254257433e-01 8.3394125813440953e-02 8.8340605318399698e-02
|
||||
24 2.1948400481473562e-01 1.9247712275756429e-01 2.0106466883697480e-01
|
||||
25 -4.9063599855698650e-02 -7.5615031940232669e-02 -5.3977787588657525e-02
|
||||
26 -1.4993706158308714e-01 -1.1244058819478711e-01 -1.1923046114238997e-01
|
||||
27 -3.3281163635093119e-01 2.9767190575698314e-02 -1.1185904907137413e-01
|
||||
28 2.1299846015761997e-01 -4.0390340379764550e-02 8.7603408024505169e-02
|
||||
29 1.5539855333679903e-01 2.1856782655404510e-02 4.1246381941839563e-02
|
||||
...
|
||||
89
unittest/force-styles/tests/kspace-pppm_dielectric.yaml
Normal file
89
unittest/force-styles/tests/kspace-pppm_dielectric.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
lammps_version: 2 Jun 2022
|
||||
date_generated: Sun Jun 5 11:47:58 2022
|
||||
epsilon: 1.5e-13
|
||||
skip_tests:
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair coul/long/dielectric
|
||||
kspace pppm/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify compute no
|
||||
kspace_style pppm/dielectric 1.0e-6
|
||||
kspace_modify gewald 0.3
|
||||
input_file: in.dielectric
|
||||
pair_style: coul/long/dielectric 8.0
|
||||
pair_coeff: ! |
|
||||
* *
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_vdwl: 0
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
init_forces: ! |2
|
||||
1 -9.5704063239170824e-03 1.3440401839656547e-03 3.9938351166047105e-03
|
||||
2 4.2546747552535428e-03 -4.6394704924901569e-03 -1.8639383905026156e-03
|
||||
3 -6.2689436339003596e-04 -1.1923832294754119e-04 3.1024334072044251e-04
|
||||
4 2.8904653542133046e-03 4.0048286752677591e-04 -1.1881079811383200e-03
|
||||
5 2.8067481142527392e-03 1.1249538111229643e-03 -7.8992757739952202e-04
|
||||
6 1.0523465137115526e-02 5.7444835008325897e-03 -9.4171156316220847e-03
|
||||
7 -6.0442808532858950e-03 -5.8528007629445105e-03 5.2900162100588104e-03
|
||||
8 -2.9095138717290920e-03 -9.0050388447901180e-03 4.4014558257614057e-03
|
||||
9 3.2886707142652893e-03 4.4648703522243427e-03 3.8291771586486379e-04
|
||||
10 -9.0909991198697099e-04 1.7647045143455965e-03 -2.4537591861546526e-06
|
||||
11 -1.5002813696751375e-03 2.4776755287400877e-03 -2.6041426800205674e-04
|
||||
12 8.2255495247906246e-03 -6.8126223463819621e-03 -8.3464377417941820e-04
|
||||
13 -2.8154328633420100e-03 1.8626508137035600e-03 9.2570078297929057e-04
|
||||
14 -2.9991011482475407e-03 2.2193552769033294e-03 4.5675765704394564e-04
|
||||
15 -2.4422674405748931e-03 1.3779216258678446e-03 1.5087422119394080e-04
|
||||
16 -6.3065226817821248e-03 8.0994785421873144e-03 7.7948169511488970e-03
|
||||
17 2.1712932472423164e-03 -7.7092752926742779e-03 -9.9843183915653676e-03
|
||||
18 1.2250633518865794e-02 2.3931580719148072e-02 -2.3032783639349450e-02
|
||||
19 -4.5739325868170509e-03 -1.2083425237677518e-02 1.3127920656307673e-02
|
||||
20 -6.3509675186534543e-03 -1.1554317452880160e-02 1.2513366661911501e-02
|
||||
21 7.2370604334770303e-03 9.4214770437382137e-03 -2.0582480710702272e-02
|
||||
22 -5.0302962829462793e-03 -2.3954421805390562e-03 9.6853611331667918e-03
|
||||
23 -3.1397831881129165e-03 -4.7636081827106625e-03 9.7394906276265063e-03
|
||||
24 9.1592606135343238e-04 2.7705153422388124e-02 -5.8648725733196610e-03
|
||||
25 1.9389266275156363e-03 -1.0450682262511200e-02 2.6060479368781131e-03
|
||||
26 -3.5468346395038284e-03 -1.5670009179897540e-02 1.9825521897942600e-03
|
||||
27 -1.3499137089964794e-02 2.6091966390167483e-02 -1.5098953238706988e-02
|
||||
28 9.4647573055174836e-03 -1.4728281444592208e-02 8.8519568594155693e-03
|
||||
29 6.2965813400663821e-03 -1.2246582589825026e-02 6.7066960491971583e-03
|
||||
run_vdwl: 0
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
run_forces: ! |2
|
||||
1 -9.5512367296693348e-03 1.3481986228832394e-03 4.0360496920819845e-03
|
||||
2 4.2310095077217249e-03 -4.6520267411891266e-03 -1.8873891848711444e-03
|
||||
3 -6.2657635097199582e-04 -1.1896339414013587e-04 3.1228053952145037e-04
|
||||
4 2.8929119769660746e-03 3.9833099588961228e-04 -1.1948966254162630e-03
|
||||
5 2.8036607264009267e-03 1.1250824895483655e-03 -7.9977001904481899e-04
|
||||
6 1.0517775415299555e-02 5.7363868487737019e-03 -9.4753365739491131e-03
|
||||
7 -6.0484479858843492e-03 -5.8590676715711935e-03 5.3263656833568585e-03
|
||||
8 -2.8902731245966352e-03 -9.0037174743433958e-03 4.4633941645762475e-03
|
||||
9 3.2719440551636165e-03 4.4604792993012321e-03 3.4264400361289614e-04
|
||||
10 -9.1214291344286910e-04 1.7671332579526759e-03 -1.0718060181645637e-05
|
||||
11 -1.5036983613157409e-03 2.4849579312452809e-03 -2.6767344531034297e-04
|
||||
12 8.2370000539625232e-03 -6.8149518655650299e-03 -7.9828139230475636e-04
|
||||
13 -2.8188931760921637e-03 1.8650744557518759e-03 9.1426138691727598e-04
|
||||
14 -3.0020345361480650e-03 2.2216374831535396e-03 4.4819872834903844e-04
|
||||
15 -2.4434489580208332e-03 1.3746131141371646e-03 1.3692983090348620e-04
|
||||
16 -6.3290560550783867e-03 8.1123385965123744e-03 7.7558668570284657e-03
|
||||
17 2.1893044938489075e-03 -7.6981064388344927e-03 -9.9464802743007962e-03
|
||||
18 1.2326575373962534e-02 2.4035949736671783e-02 -2.2966596407517550e-02
|
||||
19 -4.5945299269544680e-03 -1.2120131566157018e-02 1.3105619820168259e-02
|
||||
20 -6.3956048954198911e-03 -1.1610478112584980e-02 1.2479235193738019e-02
|
||||
21 7.2449337028217256e-03 9.2775525645935504e-03 -2.0499726162547745e-02
|
||||
22 -5.0276728424607717e-03 -2.3257295140813555e-03 9.6505434927086856e-03
|
||||
23 -3.1414718347009523e-03 -4.7050318098388480e-03 9.7005400386281204e-03
|
||||
24 9.4171169493705606e-04 2.7631000472134227e-02 -5.8324765686082400e-03
|
||||
25 1.9197188048042241e-03 -1.0419799501124184e-02 2.5868533348110123e-03
|
||||
26 -3.5519466566892540e-03 -1.5629585791677170e-02 1.9678442785116389e-03
|
||||
27 -1.3518109991418836e-02 2.6086722910789121e-02 -1.5022292876012720e-02
|
||||
28 9.4744709425719827e-03 -1.4720145605462569e-02 8.8095347267501904e-03
|
||||
29 6.3041275904037030e-03 -1.2247723292768253e-02 6.6654758184014956e-03
|
||||
...
|
||||
100
unittest/force-styles/tests/kspace-pppm_disp_dielectric.yaml
Normal file
100
unittest/force-styles/tests/kspace-pppm_disp_dielectric.yaml
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
lammps_version: 2 Jun 2022
|
||||
tags: slow
|
||||
date_generated: Sun Jun 5 11:47:58 2022
|
||||
epsilon: 2.5e-13
|
||||
skip_tests: intel
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair lj/long/coul/long/dielectric
|
||||
kspace pppm/disp/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify compute no
|
||||
kspace_style pppm/disp/dielectric 1.0e-5
|
||||
kspace_modify gewald 0.3
|
||||
kspace_modify force/disp/real 0.001
|
||||
kspace_modify force/disp/kspace 0.005
|
||||
input_file: in.dielectric
|
||||
pair_style: lj/long/coul/long/dielectric long long 8.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.02 2.5
|
||||
2 2 0.005 1.0
|
||||
2 4 0.005 0.5
|
||||
3 3 0.02 3.2
|
||||
4 4 0.015 3.1
|
||||
5 5 0.015 3.1
|
||||
extract: ! |
|
||||
epsilon 2
|
||||
sigma 2
|
||||
cut_coul 0
|
||||
natoms: 29
|
||||
init_vdwl: 0
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
init_forces: ! |2
|
||||
1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
run_vdwl: 0
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
run_forces: ! |2
|
||||
1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
|
||||
...
|
||||
@ -0,0 +1,92 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 1e-13
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair coul/cut/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
input_file: in.dielectric
|
||||
pair_style: coul/cut/dielectric 8.0
|
||||
pair_coeff: ! |
|
||||
1 1
|
||||
2 2 7.0
|
||||
2 3 7.5
|
||||
3 3
|
||||
4 4 8.0
|
||||
5 5
|
||||
extract: ! |
|
||||
cut_coul 2
|
||||
natoms: 29
|
||||
init_vdwl: 0
|
||||
init_coul: -1.6270720580997668
|
||||
init_stress: ! |-
|
||||
-3.5713714207793729e-01 -2.8078935505683300e-01 -9.8914556096499540e-01 -7.2262043240912760e-02 -1.2264220430160169e-01 4.5748472823212760e-02
|
||||
init_forces: ! |2
|
||||
1 3.8969278764694713e-02 -1.0246334132546393e-03 7.4206330179761026e-03
|
||||
2 -2.1134174221232802e-03 -6.0261871118319515e-02 -2.3235613173165380e-02
|
||||
3 -2.6973608856894799e-04 -1.5002594313647160e-03 5.2813178596309521e-04
|
||||
4 8.9662063621354137e-04 1.7643306885217823e-04 -5.3680195131562483e-03
|
||||
5 -6.9342562701838577e-03 1.2264882646071867e-02 -1.3569098786614022e-03
|
||||
6 3.5060698792442190e-02 -6.5188020878109099e-02 -5.1711194849922065e-02
|
||||
7 -5.7191356035078871e-03 1.3045634164130269e-02 6.7754689993642384e-02
|
||||
8 -2.9718083669643798e-02 7.2727093180817270e-02 4.2243873275634086e-02
|
||||
9 3.1789583921195103e-02 -9.8651998343020422e-02 2.8717723394066582e-02
|
||||
10 -5.1067808250566862e-03 7.3934394012401834e-03 -3.5334581341062892e-03
|
||||
11 -1.6844266093789088e-02 2.2293015808582266e-02 -7.1243259593589334e-03
|
||||
12 5.7572504009300952e-02 -1.3308179061057249e-02 2.2098332489433652e-02
|
||||
13 -5.3720613841083276e-03 4.3657854099130224e-03 1.8555178030664056e-03
|
||||
14 -2.1973243711431761e-02 1.0322839978677868e-02 3.4951863342062546e-03
|
||||
15 5.9415991161152664e-03 -2.4292551695784346e-04 -1.8703461283733593e-02
|
||||
16 -1.8288281884380322e-02 -6.3875839946378118e-03 4.8674090580776146e-02
|
||||
17 -4.2213783031065884e-02 8.9535611157287601e-02 -1.2129715116075911e-01
|
||||
18 -5.8126235563822183e-03 1.8205768400956471e-01 -1.6618574733715125e-01
|
||||
19 3.1593965218707880e-02 -2.5150637821907903e-02 1.3136720115037517e-01
|
||||
20 -5.6272372172188848e-02 -6.7250121511075012e-02 9.3456324515715367e-02
|
||||
21 6.9952408748007414e-02 2.8056259338065222e-02 -1.7811685153312032e-01
|
||||
22 2.4999207017236989e-02 -1.6635890602519493e-02 1.1474919942476801e-01
|
||||
23 -7.7177080204682058e-02 -6.7734866104500482e-02 7.1667456048558287e-02
|
||||
24 -2.6517940754153507e-02 2.0371901343696727e-01 -1.0477951882351583e-01
|
||||
25 5.5476284150380126e-02 -7.1938288352785110e-02 6.7995800159027120e-02
|
||||
26 -3.9355505454990239e-02 -1.4888664391188711e-01 -2.0141260355940084e-02
|
||||
27 -6.4051467101888859e-02 1.8163546376478723e-01 -6.5777131190689814e-02
|
||||
28 9.3967890617017130e-02 -7.7834513810279476e-02 6.4029117642704053e-02
|
||||
29 -2.2480005763165722e-02 -1.0559672149328110e-01 1.2773655773676701e-03
|
||||
run_vdwl: 0
|
||||
run_coul: -1.6279844338440619
|
||||
run_stress: ! |-
|
||||
-3.5884511139918035e-01 -2.8085342226235216e-01 -9.8828590018253004e-01 -7.2896447086299526e-02 -1.2402649890512313e-01 4.4478009742746190e-02
|
||||
run_forces: ! |2
|
||||
1 3.8998940510124883e-02 -9.9335721351631948e-04 7.5194893057167547e-03
|
||||
2 -2.2500451368359410e-03 -6.0307993251300165e-02 -2.3308919513993949e-02
|
||||
3 -2.7096175843409592e-04 -1.5058130591018063e-03 5.2836414640139505e-04
|
||||
4 9.1509088372596211e-04 1.7565022910291986e-04 -5.3864454603514567e-03
|
||||
5 -6.9227097121450504e-03 1.2268329346267551e-02 -1.3755742929802191e-03
|
||||
6 3.4985360414218375e-02 -6.5098418591521934e-02 -5.1635766701810561e-02
|
||||
7 -5.6837337590225565e-03 1.2960003036661474e-02 6.7587550645274774e-02
|
||||
8 -2.9554241666170503e-02 7.2645593425338620e-02 4.2315040009575700e-02
|
||||
9 3.1740453111601487e-02 -9.8735486009139381e-02 2.8800352343835975e-02
|
||||
10 -5.1150696583262146e-03 7.3888397241221515e-03 -3.5573833210676606e-03
|
||||
11 -1.6843460984247334e-02 2.2304487259702525e-02 -7.1066220435402547e-03
|
||||
12 5.7578786217636020e-02 -1.3289528590667673e-02 2.2169337456854860e-02
|
||||
13 -5.3914355339089587e-03 4.3479916222814814e-03 1.8435970296558886e-03
|
||||
14 -2.1980924862075129e-02 1.0346259172502811e-02 3.4972212533679603e-03
|
||||
15 5.9716302120347443e-03 -2.7716690498504320e-04 -1.8769428665793817e-02
|
||||
16 -1.8313254373362897e-02 -6.3755156908270189e-03 4.8624598933467815e-02
|
||||
17 -4.2234002922777805e-02 8.9692275403849359e-02 -1.2135319243926365e-01
|
||||
18 -6.6047567089239489e-03 1.8123360864653804e-01 -1.6541512462842878e-01
|
||||
19 3.2209502117907324e-02 -2.4647338596010374e-02 1.3159027407059617e-01
|
||||
20 -5.6078558470800607e-02 -6.6914262640868860e-02 9.2473232017072082e-02
|
||||
21 7.0113224905005336e-02 2.7597233530514690e-02 -1.7802511887564279e-01
|
||||
22 2.5428861163362564e-02 -1.6245400458843602e-02 1.1482535093513113e-01
|
||||
23 -7.7750413052134898e-02 -6.7709008035909360e-02 7.1495473475670382e-02
|
||||
24 -2.6922553723502204e-02 2.0404525778535060e-01 -1.0509187319606532e-01
|
||||
25 5.6143083191674117e-02 -7.1840045498035035e-02 6.8585168460760002e-02
|
||||
26 -3.9581615146914148e-02 -1.4925314633281192e-01 -2.0354055075273672e-02
|
||||
27 -6.4367318662883727e-02 1.8189807095953728e-01 -6.5475178095861092e-02
|
||||
28 9.4278607870065576e-02 -7.7938627869362773e-02 6.3984738236822089e-02
|
||||
29 -2.2498484464890389e-02 -1.0577249139886814e-01 1.0148939898702580e-03
|
||||
...
|
||||
@ -0,0 +1,92 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 2e-13
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair coul/long/dielectric
|
||||
kspace pppm/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify table 0
|
||||
kspace_style pppm/dielectric 1.0e-6
|
||||
kspace_modify gewald 0.2
|
||||
kspace_modify compute no
|
||||
input_file: in.dielectric
|
||||
pair_style: coul/long/dielectric 7.0
|
||||
pair_coeff: ! |
|
||||
* *
|
||||
extract: ! |
|
||||
cut_coul 0
|
||||
natoms: 29
|
||||
init_vdwl: 0
|
||||
init_coul: -14.708394739954706
|
||||
init_stress: ! |-
|
||||
-4.4682500146741194e-01 -8.6047509216713802e-01 -6.4553825218803351e-01 1.0922786061031881e-01 -7.4123098855942093e-02 1.7858417444213537e-01
|
||||
init_forces: ! |2
|
||||
1 4.0718617791585518e-02 -8.6848060265624916e-03 1.2223963574482556e-02
|
||||
2 -1.7228891831671828e-03 -5.6139418436589497e-02 -2.6106954349556590e-02
|
||||
3 -1.6299293500063886e-04 -1.6000702244690730e-03 6.5180280243197183e-04
|
||||
4 3.8377792378158993e-04 6.3348003204196453e-04 -5.7533095923449212e-03
|
||||
5 -7.6125358311800694e-03 1.2686938137510954e-02 -2.0153527368468776e-03
|
||||
6 3.8469082962678217e-02 -6.5217854057375985e-02 -6.0006359647611696e-02
|
||||
7 -7.7228666498734971e-03 7.3276096021923781e-03 7.0113295285282914e-02
|
||||
8 -2.9689393609897214e-02 7.0304582267010446e-02 4.8930711596521993e-02
|
||||
9 3.1439386330386662e-02 -9.6683916954682286e-02 2.4353513684989982e-02
|
||||
10 -4.7620897146457382e-03 7.6119123898980099e-03 -4.7156704941444111e-03
|
||||
11 -1.6681209782508977e-02 1.8797255312384263e-02 -1.2001959564574555e-02
|
||||
12 5.3106685964160905e-02 -1.6172054781054886e-02 2.8869888289774749e-02
|
||||
13 -3.3598227957416247e-03 2.1096459367165553e-03 -2.2262167045026928e-03
|
||||
14 -2.0775058289170645e-02 8.5438630191695206e-03 -8.3516208228363430e-04
|
||||
15 5.0159376724109236e-03 -1.7282069828867155e-03 -1.8726535698268827e-02
|
||||
16 -1.4987370854910899e-02 5.2138066289255068e-03 3.9381960957419616e-02
|
||||
17 -4.2162872780614584e-02 9.6684374783728350e-02 -1.2029505512080804e-01
|
||||
18 1.3722003500117458e-02 1.0609244077520950e-01 -1.5675758800594211e-01
|
||||
19 3.1573730584433378e-02 -1.9969747895520411e-02 9.9776252863569420e-02
|
||||
20 -5.3229155813995434e-02 -8.0176573696013206e-02 7.7642936492535258e-02
|
||||
21 3.6006048272019135e-02 9.1617299886146766e-02 -1.6995412990158698e-01
|
||||
22 2.9437208813316601e-02 -1.5715339379487880e-02 1.1148654601095871e-01
|
||||
23 -7.8603977235563102e-02 -6.2881181091032051e-02 7.0626713065279415e-02
|
||||
24 -2.9177741668964835e-02 1.9056323322159069e-01 -7.9400826479073275e-02
|
||||
25 5.5745163826299682e-02 -6.4691903733206671e-02 6.4895507112163825e-02
|
||||
26 -3.4790078229010590e-02 -1.3383426931487952e-01 1.4124310062255840e-02
|
||||
27 -4.0921803565278178e-02 2.0976460822257670e-01 -8.0511377954894908e-02
|
||||
28 7.9094836612276023e-02 -9.1920739351317601e-02 7.0131183449478468e-02
|
||||
29 -2.8350621313942739e-02 -1.1253496829002332e-01 6.0979130852948926e-03
|
||||
run_vdwl: 0
|
||||
run_coul: -14.71783473652635
|
||||
run_stress: ! |-
|
||||
-4.4852030899131456e-01 -8.6065441058496228e-01 -6.4453725069726231e-01 1.0854806534578959e-01 -7.5572045511377264e-02 1.7722268039484423e-01
|
||||
run_forces: ! |2
|
||||
1 4.0736613047264239e-02 -8.6547341993472946e-03 1.2288479044148651e-02
|
||||
2 -1.8514036124753566e-03 -5.6185726479472987e-02 -2.6160589740846667e-02
|
||||
3 -1.6446952419070618e-04 -1.6055882223535436e-03 6.5048219958935565e-04
|
||||
4 4.0248203472264383e-04 6.3247350793437646e-04 -5.7657542025619998e-03
|
||||
5 -7.5995659142657863e-03 1.2689746536036410e-02 -2.0266752696882656e-03
|
||||
6 3.8393761232536808e-02 -6.5134688704732907e-02 -5.9880836394182894e-02
|
||||
7 -7.6877772986243542e-03 7.2548601813971787e-03 6.9907702608312194e-02
|
||||
8 -2.9533992536434892e-02 7.0233119570818833e-02 4.8956063510027403e-02
|
||||
9 3.1396779561556953e-02 -9.6773338097016826e-02 2.4466214261375879e-02
|
||||
10 -4.7690212201087429e-03 7.6052730356584624e-03 -4.7330631502984777e-03
|
||||
11 -1.6678433826489383e-02 1.8807312151992283e-02 -1.1975743752775898e-02
|
||||
12 5.3105413140669855e-02 -1.6147554360061076e-02 2.8915728013515128e-02
|
||||
13 -3.3767990177223034e-03 2.0907700242810186e-03 -2.2311179530814258e-03
|
||||
14 -2.0781183289094309e-02 8.5652808548341407e-03 -8.2493674898999748e-04
|
||||
15 5.0465805766285697e-03 -1.7643272635958058e-03 -1.8783423404516532e-02
|
||||
16 -1.5003807185207109e-02 5.2082898138609123e-03 3.9382246972384474e-02
|
||||
17 -4.2185258312420378e-02 9.6842681075127418e-02 -1.2038012463575014e-01
|
||||
18 1.2902805802065266e-02 1.0524773985780653e-01 -1.5602711794141519e-01
|
||||
19 3.2199490062134184e-02 -1.9459545867486459e-02 9.9997355707979754e-02
|
||||
20 -5.3015220417372673e-02 -7.9815726773032794e-02 7.6665387129688234e-02
|
||||
21 3.6166175558857296e-02 9.1210569776501604e-02 -1.6989964928929338e-01
|
||||
22 2.9864650987965636e-02 -1.5346336420997815e-02 1.1157901001651836e-01
|
||||
23 -7.9174213877052146e-02 -6.2875806663683184e-02 7.0468389553018623e-02
|
||||
24 -2.9597989772195521e-02 1.9091672222994871e-01 -7.9730945645722945e-02
|
||||
25 5.6423745282354124e-02 -6.4609452383197569e-02 6.5504044877983475e-02
|
||||
26 -3.5020899736745936e-02 -1.3423140162815500e-01 1.3923926318076926e-02
|
||||
27 -4.1227240547854038e-02 2.1003029538655682e-01 -8.0241324887319457e-02
|
||||
28 7.9405192117892806e-02 -9.2021040250254205e-02 7.0103551793884639e-02
|
||||
29 -2.8376413316394705e-02 -1.1270986668936725e-01 5.8527210099402031e-03
|
||||
...
|
||||
@ -0,0 +1,92 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 2e-13
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair coul/long/dielectric
|
||||
kspace pppm/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify table 16
|
||||
kspace_style pppm/dielectric 1.0e-6
|
||||
kspace_modify gewald 0.2
|
||||
kspace_modify compute no
|
||||
input_file: in.dielectric
|
||||
pair_style: coul/long/dielectric 7.0
|
||||
pair_coeff: ! |
|
||||
* *
|
||||
extract: ! |
|
||||
cut_coul 0
|
||||
natoms: 29
|
||||
init_vdwl: 0
|
||||
init_coul: -14.7083948637962
|
||||
init_stress: ! |-
|
||||
-4.4682508269949750e-01 -8.6047516792273226e-01 -6.4553822845944708e-01 1.0922781028842514e-01 -7.4123017150187639e-02 1.7858412765344514e-01
|
||||
init_forces: ! |2
|
||||
1 4.0718629303545417e-02 -8.6848345072482007e-03 1.2223950255874087e-02
|
||||
2 -1.7228790059020203e-03 -5.6139396158228994e-02 -2.6106974211598740e-02
|
||||
3 -1.6299453906738564e-04 -1.6000675820772199e-03 6.5180434461624393e-04
|
||||
4 3.8377477242138914e-04 6.3347869304757444e-04 -5.7533088290839026e-03
|
||||
5 -7.6125430847795500e-03 1.2686934872739527e-02 -2.0153478530481024e-03
|
||||
6 3.8469079778974721e-02 -6.5217837001378190e-02 -6.0006366076055834e-02
|
||||
7 -7.7228837940251007e-03 7.3276071680954949e-03 7.0113285173821829e-02
|
||||
8 -2.9689373387361249e-02 7.0304584111449783e-02 4.8930705184739083e-02
|
||||
9 3.1439386239387052e-02 -9.6683921399452866e-02 2.4353520496461851e-02
|
||||
10 -4.7620906912803074e-03 7.6119024857069402e-03 -4.7156599507792189e-03
|
||||
11 -1.6681215502655784e-02 1.8797258567450001e-02 -1.2001962916228600e-02
|
||||
12 5.3106686222648157e-02 -1.6172060907788301e-02 2.8869902168035012e-02
|
||||
13 -3.3598200726315313e-03 2.1096486287416260e-03 -2.2262187405096292e-03
|
||||
14 -2.0775061858630935e-02 8.5438679055167797e-03 -8.3516353465867246e-04
|
||||
15 5.0159397668908118e-03 -1.7282027262685239e-03 -1.8726539463839696e-02
|
||||
16 -1.4987375069672539e-02 5.2138193624810848e-03 3.9381960411477526e-02
|
||||
17 -4.2162875036932647e-02 9.6684357122641090e-02 -1.2029503611875349e-01
|
||||
18 1.3721995660096516e-02 1.0609242960150758e-01 -1.5675756704096369e-01
|
||||
19 3.1573739741894577e-02 -1.9969735840308162e-02 9.9776249136363043e-02
|
||||
20 -5.3229166775010925e-02 -8.0176579593933817e-02 7.7642933948796178e-02
|
||||
21 3.6006059825720742e-02 9.1617292454743010e-02 -1.6995414461455080e-01
|
||||
22 2.9437216651728701e-02 -1.5715329965787339e-02 1.1148655631599073e-01
|
||||
23 -7.8603996380307795e-02 -6.2881183639271601e-02 7.0626713709282071e-02
|
||||
24 -2.9177736919177188e-02 1.9056323899062622e-01 -7.9400803870844916e-02
|
||||
25 5.5745168053398866e-02 -6.4691901344630195e-02 6.4895503807129745e-02
|
||||
26 -3.4790087336250719e-02 -1.3383428087909088e-01 1.4124296970789499e-02
|
||||
27 -4.0921791437594210e-02 2.0976461385522538e-01 -8.0511378552231033e-02
|
||||
28 7.9094841692925605e-02 -9.1920737966984523e-02 7.0131188951262580e-02
|
||||
29 -2.8350626818352681e-02 -1.1253496430752330e-01 6.0979008985069527e-03
|
||||
run_vdwl: 0
|
||||
run_coul: -14.717834907673769
|
||||
run_stress: ! |-
|
||||
-4.4852039779927888e-01 -8.6065450321623260e-01 -6.4453713992355122e-01 1.0854804314076144e-01 -7.5571991730931154e-02 1.7722268826576132e-01
|
||||
run_forces: ! |2
|
||||
1 4.0736628521230313e-02 -8.6547654533287149e-03 1.2288478820629799e-02
|
||||
2 -1.8513991613052123e-03 -5.6185711375212923e-02 -2.6160612540236296e-02
|
||||
3 -1.6447080669822618e-04 -1.6055851102309289e-03 6.5048400867261796e-04
|
||||
4 4.0247975645484936e-04 6.3247288372521011e-04 -5.7657529806321110e-03
|
||||
5 -7.5995742388226817e-03 1.2689743298797459e-02 -2.0266718929023856e-03
|
||||
6 3.8393754662575760e-02 -6.5134683094689644e-02 -5.9880842512765250e-02
|
||||
7 -7.6877886918894373e-03 7.2548677252569976e-03 6.9907685958524798e-02
|
||||
8 -2.9533970702740747e-02 7.0233113588337642e-02 4.8956067847706120e-02
|
||||
9 3.1396771688960518e-02 -9.6773345190941329e-02 2.4466213256827803e-02
|
||||
10 -4.7690225276792349e-03 7.6052630149667519e-03 -4.7330532074229695e-03
|
||||
11 -1.6678439647715954e-02 1.8807315842874456e-02 -1.1975746418129350e-02
|
||||
12 5.3105417458152039e-02 -1.6147559896694735e-02 2.8915738640526080e-02
|
||||
13 -3.3767965827751932e-03 2.0907733290088893e-03 -2.2311194293080337e-03
|
||||
14 -2.0781188434689027e-02 8.5652842919134182e-03 -8.2493642991144332e-04
|
||||
15 5.0465820851922846e-03 -1.7643242576956381e-03 -1.8783427500018771e-02
|
||||
16 -1.5003817197243835e-02 5.2083078180583369e-03 3.9382238153523007e-02
|
||||
17 -4.2185255608004735e-02 9.6842671020534940e-02 -1.2038011138082241e-01
|
||||
18 1.2902796770694119e-02 1.0524772571815993e-01 -1.5602710279661905e-01
|
||||
19 3.2199503093889435e-02 -1.9459534599638836e-02 9.9997352817517440e-02
|
||||
20 -5.3015228248040398e-02 -7.9815730400043194e-02 7.6665376831517168e-02
|
||||
21 3.6166184625483544e-02 9.1210563934803493e-02 -1.6989966047628491e-01
|
||||
22 2.9864665426751754e-02 -1.5346328185442293e-02 1.1157902108122958e-01
|
||||
23 -7.9174238360585653e-02 -6.2875810492694015e-02 7.0468389100587031e-02
|
||||
24 -2.9597987505448745e-02 1.9091673407267659e-01 -7.9730917009396746e-02
|
||||
25 5.6423750496706851e-02 -6.4609446175403873e-02 6.5504048625286360e-02
|
||||
26 -3.5020905937028085e-02 -1.3423141168457395e-01 1.3923918284055540e-02
|
||||
27 -4.1227230645270299e-02 2.1003030163502062e-01 -8.0241325665874122e-02
|
||||
28 7.9405197583642145e-02 -9.2021039102542751e-02 7.0103557758053658e-02
|
||||
29 -2.8376417873796106e-02 -1.1270986315500200e-01 5.8527090556668611e-03
|
||||
...
|
||||
@ -0,0 +1,94 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 2e-13
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair lj/cut/coul/cut/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
input_file: in.dielectric
|
||||
pair_style: lj/cut/coul/cut/dielectric 8.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.02 2.5
|
||||
2 2 0.005 1.0
|
||||
2 4 0.005 0.5
|
||||
3 3 0.02 3.2
|
||||
4 4 0.015 3.1
|
||||
5 5 0.015 3.1
|
||||
extract: ! |
|
||||
epsilon 2
|
||||
sigma 2
|
||||
cut_coul 2
|
||||
natoms: 29
|
||||
init_vdwl: 749.2372261744107
|
||||
init_coul: -2.2172971529979915
|
||||
init_stress: ! |2-
|
||||
2.1789192047888469e+03 2.1981451110187290e+03 4.6643993475530497e+03 -7.5957971667789900e+02 2.4613875798211151e+01 6.6657375281113514e+02
|
||||
init_forces: ! |2
|
||||
1 -2.3294420995765872e+01 2.6994465150249829e+02 3.3273569913923376e+02
|
||||
2 1.5829093411789319e+02 1.3021228374705882e+02 -1.8632945386356391e+02
|
||||
3 -1.3528930717680649e+02 -3.8704463376732781e+02 -1.4568925612931545e+02
|
||||
4 -7.8702130499372025e+00 2.1352282956040529e+00 -5.6008212380423972e+00
|
||||
5 -2.5246099829977968e+00 -4.0398861854152157e+00 1.2151347148105136e+01
|
||||
6 -8.3187159492168303e+02 9.6387646547301028e+02 1.1508584380475938e+03
|
||||
7 5.8197696930560916e+01 -3.3607709058635970e+02 -1.7178948459687756e+03
|
||||
8 1.4448420837926491e+02 -1.0920203343172346e+02 3.9994818672657021e+02
|
||||
9 7.9188734867030234e+01 8.5174357785743453e+01 3.5035047470796894e+02
|
||||
10 5.3118364541024414e+02 -6.1040251502641911e+02 -1.8356226038445442e+02
|
||||
11 -2.3702102237609441e+00 -5.8881381286755046e+00 -9.6684629648574223e+00
|
||||
12 1.7584727701368713e+01 1.0619811335621414e+01 -7.9033414578991836e+00
|
||||
13 8.0919919905611462e+00 -3.2100099724374105e+00 -1.4911554671749166e-01
|
||||
14 -3.4066383520829762e+00 6.9414041196824527e-01 -8.7509858912485736e+00
|
||||
15 -2.0070909472290605e-01 8.4817754715280760e+00 2.9963654510440163e+00
|
||||
16 4.6324502643372762e+02 -3.3088369250762952e+02 -1.1892543434700769e+03
|
||||
17 -4.5338399021972424e+02 3.1564818799492878e+02 1.2057072634902349e+03
|
||||
18 3.3072958725370257e-03 8.2686831829560201e-02 -1.4141521125196704e-01
|
||||
19 2.8459875391372545e-02 -2.9094338388449888e-02 1.0007958562857909e-01
|
||||
20 -6.1026908971505089e-02 -5.6297427422897783e-02 7.4437575547572160e-02
|
||||
21 -7.1522837931185663e+01 -8.1589893899844739e+01 2.2571304904039144e+02
|
||||
22 -1.0806236681683178e+02 -2.6175168695454843e+01 -1.6946188687048647e+02
|
||||
23 1.7956661108786219e+02 1.0775461836960672e+02 -5.6231347196777250e+01
|
||||
24 3.6549340495486632e+01 -2.1164434470324997e+02 1.1214205240399124e+02
|
||||
25 -1.4845269285608160e+02 2.3853075761507686e+01 -1.2478778352905718e+02
|
||||
26 1.1187525664619609e+02 1.8776504782676210e+02 1.2642307891010475e+01
|
||||
27 5.1760890406149173e+01 -2.2686143761501393e+02 9.0772192790296970e+01
|
||||
28 -1.8032886976019998e+02 7.7442061025399042e+01 -1.2199865251972031e+02
|
||||
29 1.2858865665314352e+02 1.4941984445229608e+02 3.1232078244627552e+01
|
||||
run_vdwl: 719.4458960925226
|
||||
run_coul: -2.2156577501695
|
||||
run_stress: ! |2-
|
||||
2.1325579099546162e+03 2.1540265268193689e+03 4.3966693260214452e+03 -7.3874465321305490e+02 4.1609142199223399e+01 6.2793323789270698e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0260531951381804e+01 2.6686052784433116e+02 3.2359555220480814e+02
|
||||
2 1.5299170089009351e+02 1.2592759290794491e+02 -1.7964598235350664e+02
|
||||
3 -1.3353652546725917e+02 -3.7923887988981301e+02 -1.4291784973471849e+02
|
||||
4 -7.8366134415663895e+00 2.1278676750112937e+00 -5.5898964494329730e+00
|
||||
5 -2.5083849916365812e+00 -4.0127357703699351e+00 1.2102205857291970e+01
|
||||
6 -8.0678115807471670e+02 9.2159344278035815e+02 1.0270338070726250e+03
|
||||
7 5.5774821870815444e+01 -3.1116354948428966e+02 -1.5746388509468688e+03
|
||||
8 1.3450247100776051e+02 -1.0057564707130840e+02 3.8856072474290994e+02
|
||||
9 7.6778366141014004e+01 8.2402096081899671e+01 3.3947310197303244e+02
|
||||
10 5.2127425712041918e+02 -5.9919256607504383e+02 -1.8126358126168137e+02
|
||||
11 -2.3745570686925803e+00 -5.8420113500500408e+00 -9.6144372705267589e+00
|
||||
12 1.7561596535878479e+01 1.0613629923614488e+01 -8.0380519651317766e+00
|
||||
13 8.0463786776931787e+00 -3.1758448811635676e+00 -1.4639227171188526e-01
|
||||
14 -3.3631175465035383e+00 6.7273297497123064e-01 -8.6347855486297149e+00
|
||||
15 -2.1870412271670844e-01 8.4996404149031815e+00 3.0200752209232498e+00
|
||||
16 4.3474681501166117e+02 -3.1171887585935428e+02 -1.1134782385353265e+03
|
||||
17 -4.2474141573792792e+02 2.9626134493330642e+02 1.1301272573095521e+03
|
||||
18 2.3957681115096144e-03 8.2179971666255180e-02 -1.4027401818299437e-01
|
||||
19 2.9063031074173674e-02 -2.8836609606349092e-02 1.0020420544989680e-01
|
||||
20 -6.0775047707873134e-02 -5.6004629690699984e-02 7.3371184808290135e-02
|
||||
21 -7.0448596189866336e+01 -7.9725267757565916e+01 2.2153177496901853e+02
|
||||
22 -1.0636274410178511e+02 -2.5930893397513000e+01 -1.6634176391811641e+02
|
||||
23 1.7679267525790843e+02 1.0564576591596762e+02 -5.5170103621208746e+01
|
||||
24 3.8163479194199411e+01 -2.1006049447420966e+02 1.1256741714722961e+02
|
||||
25 -1.4912825256676118e+02 2.3708553201270167e+01 -1.2542464198802914e+02
|
||||
26 1.1093663251134454e+02 1.8632577272877964e+02 1.2853758609408283e+01
|
||||
27 5.0752788066787673e+01 -2.2277623008397347e+02 8.8532781226689181e+01
|
||||
28 -1.7686116000861398e+02 7.5939433036194600e+01 -1.1943685874340260e+02
|
||||
29 1.2612909523237487e+02 1.4683725694373280e+02 3.0909676902728020e+01
|
||||
...
|
||||
@ -0,0 +1,94 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 5e-14
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair lj/cut/coul/debye/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
input_file: in.dielectric
|
||||
pair_style: lj/cut/coul/debye/dielectric 1.4 8.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.02 2.5
|
||||
2 2 0.005 1.0
|
||||
2 4 0.005 0.5
|
||||
3 3 0.02 3.2
|
||||
4 4 0.015 3.1
|
||||
5 5 0.015 3.1
|
||||
extract: ! |
|
||||
epsilon 2
|
||||
sigma 2
|
||||
cut_coul 2
|
||||
natoms: 29
|
||||
init_vdwl: 749.2372261744107
|
||||
init_coul: -0.453841549211297
|
||||
init_stress: ! |2-
|
||||
2.1790428027393882e+03 2.1985671135552925e+03 4.6649942248548887e+03 -7.5966836897522398e+02 2.4669597896455837e+01 6.6656388121858902e+02
|
||||
init_forces: ! |2
|
||||
1 -2.3307229383266996e+01 2.6995776712265945e+02 3.3270161124718533e+02
|
||||
2 1.5826349417165275e+02 1.3023112365488237e+02 -1.8627245039605054e+02
|
||||
3 -1.3528920299182568e+02 -3.8704416579257901e+02 -1.4569003546603216e+02
|
||||
4 -7.8705167734825743e+00 2.1360802287231948e+00 -5.5950662047806370e+00
|
||||
5 -2.5184199182855949e+00 -4.0470424000266414e+00 1.2152507070255092e+01
|
||||
6 -8.3188786389030179e+02 9.6391346618050454e+02 1.1508688957029192e+03
|
||||
7 5.8200148523680333e+01 -3.3607938488629367e+02 -1.7179240970492883e+03
|
||||
8 1.4450698429825641e+02 -1.0924757120516352e+02 3.9994374941876833e+02
|
||||
9 7.9160005637673436e+01 8.5239895625877139e+01 3.5029842997040635e+02
|
||||
10 5.3118609348470829e+02 -6.1040512321217750e+02 -1.8355942011460579e+02
|
||||
11 -2.3569977435584697e+00 -5.9034417556285979e+00 -9.6617506857129154e+00
|
||||
12 1.7536760274894299e+01 1.0631770975177549e+01 -7.9244108105262008e+00
|
||||
13 8.0955062655249499e+00 -3.2075936227945925e+00 -1.4968728644508020e-01
|
||||
14 -3.3898246634555722e+00 6.8826494283852357e-01 -8.7473430931886238e+00
|
||||
15 -2.0401444076167513e-01 8.4808618305012260e+00 3.0091548053886652e+00
|
||||
16 4.6325009608594650e+02 -3.3087110571702283e+02 -1.1892587958422396e+03
|
||||
17 -4.5333769606790270e+02 3.1555453542829514e+02 1.2057891726204259e+03
|
||||
18 -1.3113356669009686e-02 5.3131278982315577e-03 -9.5860868041130490e-02
|
||||
19 4.3525005616197279e-02 1.9995225193793889e-02 7.7722754774731020e-02
|
||||
20 -5.2117000417509170e-02 -6.0620666412504624e-02 5.6105318261131423e-02
|
||||
21 -7.1530401630796788e+01 -8.1569781069296994e+01 2.2576552612751630e+02
|
||||
22 -1.0805303505596230e+02 -2.6191731778096035e+01 -1.6949164436057049e+02
|
||||
23 1.7957302207638850e+02 1.0777356501993265e+02 -5.6262495822096504e+01
|
||||
24 3.6564206294440261e+01 -2.1169726480030889e+02 1.1211485024785971e+02
|
||||
25 -1.4845227161458564e+02 2.3877504212907702e+01 -1.2479697980238090e+02
|
||||
26 1.1187424329195983e+02 1.8780793785667282e+02 1.2656889827926859e+01
|
||||
27 5.1790732915559545e+01 -2.2692432382662844e+02 9.0802827722164437e+01
|
||||
28 -1.8034484450981202e+02 7.7484602679937353e+01 -1.2201795083491248e+02
|
||||
29 1.2856273071478316e+02 1.4944646662042760e+02 3.1210545803020260e+01
|
||||
run_vdwl: 719.4454512689834
|
||||
run_coul: -0.4523971147852765
|
||||
run_stress: ! |2-
|
||||
2.1326803818980484e+03 2.1544485300669253e+03 4.3972606339552049e+03 -7.3883316594752330e+02 4.1663294159898385e+01 6.2792364063903528e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0274215780044702e+01 2.6687309856417193e+02 3.2356233345725599e+02
|
||||
2 1.5296509276086505e+02 1.2594701888239310e+02 -1.7958977746082724e+02
|
||||
3 -1.3353643631635461e+02 -3.7923844065251450e+02 -1.4291860232396255e+02
|
||||
4 -7.8368980095852887e+00 2.1286998947899232e+00 -5.5841216601346666e+00
|
||||
5 -2.5021799738629249e+00 -4.0199000851740667e+00 1.2103336843159427e+01
|
||||
6 -8.0679620992595130e+02 9.2162924992589387e+02 1.0270430648975223e+03
|
||||
7 5.5777145289063959e+01 -3.1116547648946187e+02 -1.5746658117291361e+03
|
||||
8 1.3452311370572608e+02 -1.0062025667445143e+02 3.8855428217701109e+02
|
||||
9 7.6749746718599766e+01 8.2468560441180159e+01 3.3942206100249615e+02
|
||||
10 5.2127731447063024e+02 -5.9919582177169434e+02 -1.8126092419658204e+02
|
||||
11 -2.3613071952349625e+00 -5.8573604096643876e+00 -9.6076657998819410e+00
|
||||
12 1.7513584089234932e+01 1.0625571456230373e+01 -8.0592569119631481e+00
|
||||
13 8.0499029240931925e+00 -3.1734415316583364e+00 -1.4691186863171010e-01
|
||||
14 -3.3461929782909210e+00 6.6684808204226864e-01 -8.6311436240637889e+00
|
||||
15 -2.2200687594516827e-01 8.4987958613697607e+00 3.0329455695241143e+00
|
||||
16 4.3475136279816758e+02 -3.1170569899728292e+02 -1.1134813344481831e+03
|
||||
17 -4.2469445455853690e+02 2.9616683900897692e+02 1.1302079682990006e+03
|
||||
18 -1.3816225483336542e-02 4.6132773686957092e-03 -9.5323836801513587e-02
|
||||
19 4.3937450380342337e-02 2.0362298061827096e-02 7.7872174056515225e-02
|
||||
20 -5.1827021353879843e-02 -6.0260400878327083e-02 5.5430288956599773e-02
|
||||
21 -7.0456019835851336e+01 -7.9704677128320341e+01 2.2158319696585517e+02
|
||||
22 -1.0635312013028287e+02 -2.5947608124953252e+01 -1.6637083302377721e+02
|
||||
23 1.7679870234611414e+02 1.0566436183455650e+02 -5.5200949924275783e+01
|
||||
24 3.8178905565980521e+01 -2.1011241275925656e+02 1.1254022939712873e+02
|
||||
25 -1.4912778589827099e+02 2.3732897098033703e+01 -1.2543383922594604e+02
|
||||
26 1.1093504056810859e+02 1.8636769189170676e+02 1.2868349520615510e+01
|
||||
27 5.0781894030947456e+01 -2.2283867869321264e+02 8.8562633418380500e+01
|
||||
28 -1.7687618782159447e+02 7.5981595077790985e+01 -1.1945539475239681e+02
|
||||
29 1.2610291582873170e+02 1.4686383012395589e+02 3.0888186775600918e+01
|
||||
...
|
||||
@ -0,0 +1,99 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 7.5e-14
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair lj/cut/coul/long/dielectric
|
||||
kspace pppm/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify table 0
|
||||
kspace_style pppm/dielectric 1.0e-6
|
||||
kspace_modify gewald 0.2
|
||||
kspace_modify compute no
|
||||
input_file: in.dielectric
|
||||
pair_style: lj/cut/coul/long/dielectric 7.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.02 2.5
|
||||
2 2 0.005 1.0
|
||||
2 4 0.005 0.5
|
||||
3 3 0.02 3.2
|
||||
4 4 0.015 3.1
|
||||
5 5 0.015 3.1
|
||||
extract: ! |
|
||||
epsilon 2
|
||||
sigma 2
|
||||
cut_coul 0
|
||||
natoms: 29
|
||||
init_vdwl: 749.2383389865666
|
||||
init_coul: -14.708394739954706
|
||||
init_stress: ! |2-
|
||||
2.1789400433718447e+03 2.1980397146355758e+03 4.6647550140640560e+03 -7.5945564545716536e+02 2.4676533122150420e+01 6.6669814022299647e+02
|
||||
init_forces: ! |2
|
||||
1 -2.3292588777246699e+01 2.6993731751639575e+02 3.3274039468449547e+02
|
||||
2 1.5828382345778670e+02 1.3019394915153933e+02 -1.8632293060130323e+02
|
||||
3 -1.3528920043365289e+02 -3.8704473357812083e+02 -1.4568913245829896e+02
|
||||
4 -7.8707258926496371e+00 2.1356853425672426e+00 -5.6012065281215877e+00
|
||||
5 -2.5252882625587918e+00 -4.0394641299237755e+00 1.2150688705246949e+01
|
||||
6 -8.3186819214950128e+02 9.6387643956118279e+02 1.1508501455609867e+03
|
||||
7 5.8195693198998470e+01 -3.3608280861184761e+02 -1.7178924873647909e+03
|
||||
8 1.4448423706932473e+02 -1.0920445594263727e+02 3.9995487356489110e+02
|
||||
9 7.9188384669439429e+01 8.5176325867131766e+01 3.5034611049825986e+02
|
||||
10 5.3118399010135454e+02 -6.1040229655343046e+02 -1.8356344259681435e+02
|
||||
11 -2.3696975283542692e+00 -5.8889777298152950e+00 -9.6710851142335130e+00
|
||||
12 1.7580386617310278e+01 1.0617043932432946e+01 -7.8966628005662063e+00
|
||||
13 8.0952875004741713e+00 -3.2076956388794771e+00 -1.5119427465839053e-01
|
||||
14 -3.4060413039933826e+00 6.9491068735290962e-01 -8.7515604769903650e+00
|
||||
15 -1.9952806290214026e-01 8.4828943055508343e+00 2.9944309448884558e+00
|
||||
16 4.6324832731597348e+02 -3.3087210296838902e+02 -1.1892636352561592e+03
|
||||
17 -4.5338538347902175e+02 3.1563966405246697e+02 1.2057220465214600e+03
|
||||
18 -5.2181646965579580e-03 7.2889108135111375e-02 -1.2575414103528226e-01
|
||||
19 3.1885449830491651e-02 -2.0200369715920357e-02 1.0151604330717051e-01
|
||||
20 -5.4227564612496372e-02 -8.1200892813159078e-02 7.7999549632297133e-02
|
||||
21 -7.1530066940430387e+01 -8.1524297267480222e+01 2.2572576371085461e+02
|
||||
22 -1.0805897042584476e+02 -2.6209514775693375e+01 -1.6946764196296860e+02
|
||||
23 1.7956604021794868e+02 1.0775814198609325e+02 -5.6235188692037731e+01
|
||||
24 3.6562250499395432e+01 -2.1162539164274028e+02 1.1210369259577286e+02
|
||||
25 -1.4845921552132396e+02 2.3842437462573887e+01 -1.2479151143350711e+02
|
||||
26 1.1187655655909522e+02 1.8776400665741829e+02 1.2664270889986156e+01
|
||||
27 5.1769276885815401e+01 -2.2684533981674861e+02 9.0768849190625190e+01
|
||||
28 -1.8033407202947618e+02 7.7442136418510415e+01 -1.2199948575756908e+02
|
||||
29 1.2858227699351801e+02 1.4941463786888403e+02 3.1222136998646921e+01
|
||||
run_vdwl: 719.4470396574956
|
||||
run_coul: -14.67912401921343
|
||||
run_stress: ! |2-
|
||||
2.1325789705936336e+03 2.1539215471342850e+03 4.3970250900481115e+03 -7.3862011690601435e+02 4.1671588676557725e+01 6.2805766457360482e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0258938197728771e+01 2.6685302382619051e+02 3.2360054172956171e+02
|
||||
2 1.5298485030216648e+02 1.2590948224095322e+02 -1.7963975334499048e+02
|
||||
3 -1.3353643323176092e+02 -3.7923901926316040e+02 -1.4291774890960681e+02
|
||||
4 -7.8371262051092128e+00 2.1283292383076589e+00 -5.5902729529350488e+00
|
||||
5 -2.5090642501108640e+00 -4.0123086247817454e+00 1.2101553457185680e+01
|
||||
6 -8.0677766523563184e+02 9.2159348263532399e+02 1.0270260513196306e+03
|
||||
7 5.5772827534120694e+01 -3.1116938788593848e+02 -1.5746369448315863e+03
|
||||
8 1.3450232209337696e+02 -1.0057806662816827e+02 3.8856713733767839e+02
|
||||
9 7.6778060863082956e+01 8.2404145440177558e+01 3.3946895185311439e+02
|
||||
10 5.2127459557471423e+02 -5.9919234052314641e+02 -1.8126477427140244e+02
|
||||
11 -2.3740416984708759e+00 -5.8428481893634903e+00 -9.6170505448708301e+00
|
||||
12 1.7557252327885823e+01 1.0610854380199145e+01 -8.0313977859781200e+00
|
||||
13 8.0496743297627571e+00 -3.1735284757334794e+00 -1.4846450961086299e-01
|
||||
14 -3.3625160304324582e+00 6.7350505846971664e-01 -8.6353531133002015e+00
|
||||
15 -2.1752112674649707e-01 8.5007654254896448e+00 3.0181471530447892e+00
|
||||
16 4.3474993894718540e+02 -3.1170709645537937e+02 -1.1134870101938732e+03
|
||||
17 -4.2474261479457329e+02 2.9625260630103446e+02 1.1301415222394667e+03
|
||||
18 -6.1427631298689514e-03 7.2309926105250472e-02 -1.2469330083238638e-01
|
||||
19 3.2490701194955465e-02 -1.9907023820765504e-02 1.0164789643354502e-01
|
||||
20 -5.3969093574384938e-02 -8.0876889094963364e-02 7.6947836617562965e-02
|
||||
21 -7.0456070354596733e+01 -7.9659576371915861e+01 2.2154428937656849e+02
|
||||
22 -1.0635918930545733e+02 -2.5965331729225522e+01 -1.6634729564809081e+02
|
||||
23 1.7679221913081423e+02 1.0564927745975157e+02 -5.5173971454399108e+01
|
||||
24 3.8176328121684520e+01 -2.1004160710920615e+02 1.1252900702448888e+02
|
||||
25 -1.4913476641059617e+02 2.3697881643181784e+01 -1.2542833688951691e+02
|
||||
26 1.1093797786206611e+02 1.8632482151937535e+02 1.2875773953575896e+01
|
||||
27 5.0760936952120659e+01 -2.2276035690232783e+02 8.8529337501815661e+01
|
||||
28 -1.7686630128191297e+02 7.5939482546377860e+01 -1.1943762330584524e+02
|
||||
29 1.2612288523965614e+02 1.4683228443032482e+02 3.0899782377657353e+01
|
||||
...
|
||||
@ -0,0 +1,100 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 7.5e-14
|
||||
skip_tests: gpu single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair lj/cut/coul/msm/dielectric
|
||||
kspace msm/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify table 0
|
||||
kspace_style msm/dielectric 1.0e-4
|
||||
kspace_modify compute no
|
||||
kspace_modify cutoff/adjust no
|
||||
kspace_modify pressure/scalar no # required for OPENMP with msm
|
||||
input_file: in.dielectric
|
||||
pair_style: lj/cut/coul/msm/dielectric 12.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.02 2.5
|
||||
2 2 0.005 1.0
|
||||
2 4 0.005 0.5
|
||||
3 3 0.02 3.2
|
||||
4 4 0.015 3.1
|
||||
5 5 0.015 3.1
|
||||
extract: ! |
|
||||
epsilon 2
|
||||
sigma 2
|
||||
cut_coul 0
|
||||
natoms: 29
|
||||
init_vdwl: 749.2346094132243
|
||||
init_coul: -14.706914690233697
|
||||
init_stress: ! |2-
|
||||
2.1789604565899708e+03 2.1980919499627157e+03 4.6646477918383953e+03 -7.5946835675893374e+02 2.4645973885972793e+01 6.6671172171793467e+02
|
||||
init_forces: ! |2
|
||||
1 -2.3293036641030355e+01 2.6994009662099148e+02 3.3273967774089687e+02
|
||||
2 1.5828456542677557e+02 1.3019548569092080e+02 -1.8632394391624678e+02
|
||||
3 -1.3528921535432082e+02 -3.8704476642707192e+02 -1.4568910938104852e+02
|
||||
4 -7.8705035139322028e+00 2.1357641362367263e+00 -5.6014092669594930e+00
|
||||
5 -2.5250472889025550e+00 -4.0393516627803647e+00 1.2150486457500186e+01
|
||||
6 -8.3187230098523503e+02 9.6388086605030389e+02 1.1508506584731485e+03
|
||||
7 5.8196884510589427e+01 -3.3608073012979708e+02 -1.7178868201443331e+03
|
||||
8 1.4448389596053133e+02 -1.0920570166733745e+02 3.9995621847796008e+02
|
||||
9 7.9188699241062736e+01 8.5177111012279312e+01 3.5034562649693140e+02
|
||||
10 5.3118399250392281e+02 -6.1040215396812312e+02 -1.8356362466879733e+02
|
||||
11 -2.3697058764639078e+00 -5.8877169062134147e+00 -9.6702571849839636e+00
|
||||
12 1.7582506509067979e+01 1.0618105511460486e+01 -7.8977947656224758e+00
|
||||
13 8.0956796305938372e+00 -3.2082645570642891e+00 -1.5236046523765348e-01
|
||||
14 -3.4058927035701734e+00 6.9467407739447773e-01 -8.7527965850433880e+00
|
||||
15 -2.0005600809383203e-01 8.4825472107151985e+00 2.9946212467959565e+00
|
||||
16 4.6324840415926536e+02 -3.3088147583766482e+02 -1.1892638227685079e+03
|
||||
17 -4.5338585460625217e+02 3.1564547162221999e+02 1.2057149629960950e+03
|
||||
18 -4.8129988012991900e-03 7.3419971596388647e-02 -1.2607053859343545e-01
|
||||
19 3.2422316673388490e-02 -2.4550051342793772e-02 1.1015337299168851e-01
|
||||
20 -5.5411270510277409e-02 -8.0425460050698783e-02 8.2992024270809886e-02
|
||||
21 -7.1531046389848413e+01 -8.1526491432387999e+01 2.2572505902685663e+02
|
||||
22 -1.0805834012776086e+02 -2.6208165313075508e+01 -1.6946707766785840e+02
|
||||
23 1.7957061917272105e+02 1.0775550973856708e+02 -5.6237134917050376e+01
|
||||
24 3.6561493769188367e+01 -2.1162957183894034e+02 1.1208727707239673e+02
|
||||
25 -1.4845889430693984e+02 2.3845217449962778e+01 -1.2479232890089845e+02
|
||||
26 1.1187456904656550e+02 1.8777035612647003e+02 1.2671235027942247e+01
|
||||
27 5.1766360532432749e+01 -2.2685224279375160e+02 9.0770717133395550e+01
|
||||
28 -1.8033164344153488e+02 7.7445219361580357e+01 -1.2200009551333871e+02
|
||||
29 1.2858166873380662e+02 1.4941176346490306e+02 3.1224961137337743e+01
|
||||
run_vdwl: 719.4432950773695
|
||||
run_coul: -14.677691617615784
|
||||
run_stress: ! |2-
|
||||
2.1325991142348348e+03 2.1539735638063876e+03 4.3969179363860712e+03 -7.3863283556009901e+02 4.1641056200069123e+01 6.2807144554279864e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0259372193237134e+01 2.6685579767770241e+02 3.2359978985813552e+02
|
||||
2 1.5298556885115576e+02 1.2591099934752508e+02 -1.7964073866086045e+02
|
||||
3 -1.3353644240364554e+02 -3.7923903213676681e+02 -1.4291771687204826e+02
|
||||
4 -7.8369034937850675e+00 2.1284078596321256e+00 -5.5904763233470813e+00
|
||||
5 -2.5088230191025844e+00 -4.0121964594782575e+00 1.2101351741297592e+01
|
||||
6 -8.0678164265946748e+02 9.2159782927102071e+02 1.0270267702007970e+03
|
||||
7 5.5774033151878001e+01 -3.1116735778243350e+02 -1.5746314175305761e+03
|
||||
8 1.3450184115208577e+02 -1.0057921475070130e+02 3.8856838036119638e+02
|
||||
9 7.6778382498110702e+01 8.2404936007622837e+01 3.3946848612116048e+02
|
||||
10 5.2127460705817282e+02 -5.9919220252394086e+02 -1.8126495804928632e+02
|
||||
11 -2.3740506081122841e+00 -5.8415880007895886e+00 -9.6162248866147202e+00
|
||||
12 1.7559371666403866e+01 1.0611915175342791e+01 -8.0325280446635485e+00
|
||||
13 8.0500651521486510e+00 -3.1740967624734027e+00 -1.4963050767915292e-01
|
||||
14 -3.3623679931319934e+00 6.7326917821660281e-01 -8.6365868360310145e+00
|
||||
15 -2.1804972935988984e-01 8.5004171158236801e+00 3.0183377604151946e+00
|
||||
16 4.3475002943140947e+02 -3.1171650065247678e+02 -1.1134872286050906e+03
|
||||
17 -4.2474310192976344e+02 2.9625845892216392e+02 1.1301344641955479e+03
|
||||
18 -5.7403500992621497e-03 7.2867299983148642e-02 -1.2500475633838962e-01
|
||||
19 3.3031570306363021e-02 -2.4267485367431035e-02 1.1030106495096756e-01
|
||||
20 -5.5154232028042781e-02 -8.0110718379824988e-02 8.1947950864130883e-02
|
||||
21 -7.0456973976990469e+01 -7.9661744076563252e+01 2.2154359498828552e+02
|
||||
22 -1.0635857296524016e+02 -2.5963969377719572e+01 -1.6634675906299137e+02
|
||||
23 1.7679671283800002e+02 1.0564661923217321e+02 -5.5175893435233853e+01
|
||||
24 3.8175685911570667e+01 -2.1004568778654189e+02 1.1251257630301822e+02
|
||||
25 -1.4913447507852914e+02 2.3700681261903114e+01 -1.2542917171119228e+02
|
||||
26 1.1093591179069897e+02 1.8633104988954790e+02 1.2882757054833309e+01
|
||||
27 5.0758010048025099e+01 -2.2276726957704437e+02 8.8531205095649199e+01
|
||||
28 -1.7686386906616417e+02 7.5942572494714980e+01 -1.1943823631291974e+02
|
||||
29 1.2612228857869039e+02 1.4682941735730432e+02 3.0902608898722431e+01
|
||||
...
|
||||
@ -0,0 +1,99 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 7.5e-14
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair lj/cut/coul/long/dielectric
|
||||
kspace pppm/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify table 16
|
||||
kspace_style pppm/dielectric 1.0e-6
|
||||
kspace_modify gewald 0.2
|
||||
kspace_modify compute no
|
||||
input_file: in.dielectric
|
||||
pair_style: lj/cut/coul/long/dielectric 7.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.02 2.5
|
||||
2 2 0.005 1.0
|
||||
2 4 0.005 0.5
|
||||
3 3 0.02 3.2
|
||||
4 4 0.015 3.1
|
||||
5 5 0.015 3.1
|
||||
extract: ! |
|
||||
epsilon 2
|
||||
sigma 2
|
||||
cut_coul 0
|
||||
natoms: 29
|
||||
init_vdwl: 749.2383389865666
|
||||
init_coul: -14.7083948637962
|
||||
init_stress: ! |2-
|
||||
2.1789400432906150e+03 2.1980397145598195e+03 4.6647550140877756e+03 -7.5945564550748588e+02 2.4676533203856106e+01 6.6669814017620774e+02
|
||||
init_forces: ! |2
|
||||
1 -2.3292588765734763e+01 2.6993731748791504e+02 3.3274039467117694e+02
|
||||
2 1.5828382346796397e+02 1.3019394917381771e+02 -1.8632293062116526e+02
|
||||
3 -1.3528920043525699e+02 -3.8704473357547846e+02 -1.4568913245675679e+02
|
||||
4 -7.8707258958009954e+00 2.1356853412282484e+00 -5.6012065273583236e+00
|
||||
5 -2.5252882698123909e+00 -4.0394641331885479e+00 1.2150688710130748e+01
|
||||
6 -8.3186819215268474e+02 9.6387643957823877e+02 1.1508501455545584e+03
|
||||
7 5.8195693181854310e+01 -3.3608280861428182e+02 -1.7178924873749020e+03
|
||||
8 1.4448423708954735e+02 -1.0920445594079295e+02 3.9995487355847928e+02
|
||||
9 7.9188384669348409e+01 8.5176325862687023e+01 3.5034611050507141e+02
|
||||
10 5.3118399010037786e+02 -6.1040229656333452e+02 -1.8356344258627107e+02
|
||||
11 -2.3696975340744162e+00 -5.8889777265602286e+00 -9.6710851175851662e+00
|
||||
12 1.7580386617568756e+01 1.0617043926306215e+01 -7.8966627866879486e+00
|
||||
13 8.0952875031972766e+00 -3.2076956361874518e+00 -1.5119427669439750e-01
|
||||
14 -3.4060413075628424e+00 6.9491069223925683e-01 -8.7515604784427357e+00
|
||||
15 -1.9952806080766042e-01 8.4828943098074543e+00 2.9944309411228849e+00
|
||||
16 4.6324832731175889e+02 -3.3087210295565546e+02 -1.1892636352567051e+03
|
||||
17 -4.5338538348127810e+02 3.1563966403480572e+02 1.2057220465404623e+03
|
||||
18 -5.2181725365788969e-03 7.2889096961409425e-02 -1.2575412007030390e-01
|
||||
19 3.1885458987952850e-02 -2.0200357660708088e-02 1.0151603957996415e-01
|
||||
20 -5.4227575573511856e-02 -8.1200898711079758e-02 7.7999547088557969e-02
|
||||
21 -7.1530066928876678e+01 -8.1524297274911603e+01 2.2572576369614163e+02
|
||||
22 -1.0805897041800637e+02 -2.6209514766279671e+01 -1.6946764195266354e+02
|
||||
23 1.7956604019880396e+02 1.0775814198354502e+02 -5.6235188691393731e+01
|
||||
24 3.6562250504145240e+01 -2.1162539163697124e+02 1.1210369261838107e+02
|
||||
25 -1.4845921551709685e+02 2.3842437464962465e+01 -1.2479151143681214e+02
|
||||
26 1.1187655654998798e+02 1.8776400664585410e+02 1.2664270876894689e+01
|
||||
27 5.1769276897943115e+01 -2.2684533981111593e+02 9.0768849190027851e+01
|
||||
28 -1.8033407202439554e+02 7.7442136419894737e+01 -1.2199948575206730e+02
|
||||
29 1.2858227698801358e+02 1.4941463787286654e+02 3.1222136986460132e+01
|
||||
run_vdwl: 719.4470396574953
|
||||
run_coul: -14.679124253243254
|
||||
run_stress: ! |2-
|
||||
2.1325789704593126e+03 2.1539215469678197e+03 4.3970250900325655e+03 -7.3862011690475742e+02 4.1671588718551654e+01 6.2805766449371913e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0258938181153660e+01 2.6685302378855795e+02 3.2360054172735954e+02
|
||||
2 1.5298485031190913e+02 1.2590948226081667e+02 -1.7963975335757499e+02
|
||||
3 -1.3353643323287460e+02 -3.7923901926033227e+02 -1.4291774890822694e+02
|
||||
4 -7.8371262083074544e+00 2.1283292379226557e+00 -5.5902729514655007e+00
|
||||
5 -2.5090642557205660e+00 -4.0123086278690421e+00 1.2101553460860075e+01
|
||||
6 -8.0677766523947253e+02 9.2159348264823223e+02 1.0270260513102028e+03
|
||||
7 5.5772827534043152e+01 -3.1116938788216396e+02 -1.5746369448431726e+03
|
||||
8 1.3450232211517186e+02 -1.0057806663099079e+02 3.8856713734444173e+02
|
||||
9 7.6778060855709768e+01 8.2404145437825520e+01 3.3946895186015166e+02
|
||||
10 5.2127459557538145e+02 -5.9919234053461764e+02 -1.8126477426317228e+02
|
||||
11 -2.3740417043436124e+00 -5.8428481849852707e+00 -9.6170505494386997e+00
|
||||
12 1.7557252325475982e+01 1.0610854376978708e+01 -8.0313977779400414e+00
|
||||
13 8.0496743340217787e+00 -3.1735284732734690e+00 -1.4846451288291188e-01
|
||||
14 -3.3625160323768650e+00 6.7350506241206365e-01 -8.6353531159274475e+00
|
||||
15 -2.1752112634679505e-01 8.5007654295399746e+00 3.0181471491148644e+00
|
||||
16 4.3474993892613918e+02 -3.1170709642929285e+02 -1.1134870101998849e+03
|
||||
17 -4.2474261478600022e+02 2.9625260628935746e+02 1.1301415222570972e+03
|
||||
18 -6.1427733453667211e-03 7.2309912305671076e-02 -1.2469328586456262e-01
|
||||
19 3.2490708287754820e-02 -1.9907013549971677e-02 1.0164789826365245e-01
|
||||
20 -5.3969100158168110e-02 -8.0876892345253762e-02 7.6947829003897669e-02
|
||||
21 -7.0456070347078210e+01 -7.9659576377389470e+01 2.2154428936791317e+02
|
||||
22 -1.0635918929421609e+02 -2.5965331718874261e+01 -1.6634729563560069e+02
|
||||
23 1.7679221910769232e+02 1.0564927745679336e+02 -5.5173971453804469e+01
|
||||
24 3.8176328119144245e+01 -2.1004160711351972e+02 1.1252900703487416e+02
|
||||
25 -1.4913476640669779e+02 2.3697881646697873e+01 -1.2542833689482558e+02
|
||||
26 1.1093797785641119e+02 1.8632482150987437e+02 1.2875773942408888e+01
|
||||
27 5.0760936957614206e+01 -2.2276035690123251e+02 8.8529337503971931e+01
|
||||
28 -1.7686630127361011e+02 7.5939482549756050e+01 -1.1943762330290049e+02
|
||||
29 1.2612288523470006e+02 1.4683228443336608e+02 3.0899782367019007e+01
|
||||
...
|
||||
@ -0,0 +1,102 @@
|
||||
---
|
||||
lammps_version: 3 Aug 2022
|
||||
date_generated: Thu Sep 8 21:41:39 2022
|
||||
epsilon: 2.5e-09
|
||||
skip_tests: single
|
||||
prerequisites: ! |
|
||||
atom dielectric
|
||||
pair lj/long/coul/long/dielectric
|
||||
kspace pppm/disp/dielectric
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify table 0
|
||||
pair_modify table/disp 0
|
||||
kspace_style pppm/disp/dielectric 1.0e-6
|
||||
kspace_modify gewald 0.3
|
||||
kspace_modify force/disp/real 0.001
|
||||
kspace_modify force/disp/kspace 0.005
|
||||
kspace_modify compute no
|
||||
input_file: in.dielectric
|
||||
pair_style: lj/long/coul/long/dielectric long long 8.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.02 2.5
|
||||
2 2 0.005 1.0
|
||||
2 4 0.005 0.5
|
||||
3 3 0.02 3.2
|
||||
4 4 0.015 3.1
|
||||
5 5 0.015 3.1
|
||||
extract: ! |
|
||||
epsilon 2
|
||||
sigma 2
|
||||
cut_coul 0
|
||||
natoms: 29
|
||||
init_vdwl: 749.2372263849394
|
||||
init_coul: -12.764472354523122
|
||||
init_stress: ! |2-
|
||||
2.1789896124191409e+03 2.1981506635268597e+03 4.6647256305144138e+03 -7.5948722849527928e+02 2.4637932651156468e+01 6.6668896399382447e+02
|
||||
init_forces: ! |2
|
||||
1 -2.3286174143980553e+01 2.6993893821321313e+02 3.3273369487474804e+02
|
||||
2 1.5828133163638364e+02 1.3019983831998124e+02 -1.8631981366975324e+02
|
||||
3 -1.3528879928889739e+02 -3.8704459199964435e+02 -1.4568952254606154e+02
|
||||
4 -7.8725216791087202e+00 2.1353639321886426e+00 -5.5996517772648398e+00
|
||||
5 -2.5270767162674161e+00 -4.0406072393760333e+00 1.2151492124002500e+01
|
||||
6 -8.3188058140463954e+02 9.6387411657094094e+02 1.1508655167786710e+03
|
||||
7 5.8201968572218199e+01 -3.3607463300397569e+02 -1.7178961567702568e+03
|
||||
8 1.4448664584801398e+02 -1.0919588617440031e+02 3.9994713347571548e+02
|
||||
9 7.9185218666034203e+01 8.5171943342215087e+01 3.5034639142939920e+02
|
||||
10 5.3118452816660954e+02 -6.1040376452919065e+02 -1.8356281990943322e+02
|
||||
11 -2.3686858863408191e+00 -5.8898940148850487e+00 -9.6688794102806366e+00
|
||||
12 1.7576908939234539e+01 1.0624730172398207e+01 -7.9005863300595145e+00
|
||||
13 8.0973592781106607e+00 -3.2099461247144938e+00 -1.5205639881972763e-01
|
||||
14 -3.4036114754517417e+00 6.9256385245433427e-01 -8.7523895067493704e+00
|
||||
15 -1.9838785839976880e-01 8.4811355785466347e+00 2.9955798222407606e+00
|
||||
16 4.6325052415452609e+02 -3.3088620197486028e+02 -1.1892696266455252e+03
|
||||
17 -4.5338533090950523e+02 3.1565027690762309e+02 1.2057268653197470e+03
|
||||
18 -1.2374146467945003e-02 5.0073709650900328e-02 -1.0609803472411003e-01
|
||||
19 3.4925503806596245e-02 -1.2780723404912769e-02 9.7753529758476301e-02
|
||||
20 -5.1651694671945927e-02 -7.0354643516235618e-02 7.2110190194190821e-02
|
||||
21 -7.1533097401264698e+01 -8.1539714651455853e+01 2.2574085767945007e+02
|
||||
22 -1.0805687633419996e+02 -2.6203694278676625e+01 -1.6947622336778193e+02
|
||||
23 1.7957295281239305e+02 1.0776197954082350e+02 -5.6245239243180713e+01
|
||||
24 3.6564163444481601e+01 -2.1165662588485623e+02 1.1209579542005619e+02
|
||||
25 -1.4846188055766922e+02 2.3856102627265713e+01 -1.2479708577213361e+02
|
||||
26 1.1187590940118515e+02 1.8778521419451323e+02 1.2667708174230883e+01
|
||||
27 5.1775264052549062e+01 -2.2688020067700194e+02 9.0785175512857407e+01
|
||||
28 -1.8033786288346673e+02 7.7460473243539269e+01 -1.2200797020049274e+02
|
||||
29 1.2857721190478520e+02 1.4942614571460496e+02 3.1218045251445680e+01
|
||||
run_vdwl: 719.4456731444792
|
||||
run_coul: -12.735380452239427
|
||||
run_stress: ! |2-
|
||||
2.1326277434189606e+03 2.1540319211274309e+03 4.3969941693404471e+03 -7.3865219002148024e+02 4.1632846446226282e+01 6.2804820439446110e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0252579201884870e+01 2.6685458181423871e+02 3.2359388407993112e+02
|
||||
2 1.5298241409528828e+02 1.2591543640824665e+02 -1.7963667094402959e+02
|
||||
3 -1.3353603656118571e+02 -3.7923886687281498e+02 -1.4291812947798795e+02
|
||||
4 -7.8389214359971531e+00 2.1280125500685174e+00 -5.5887048693080867e+00
|
||||
5 -2.5108529039248131e+00 -4.0134453944915096e+00 1.2102355523523880e+01
|
||||
6 -8.0679028747897564e+02 9.2159111835187480e+02 1.0270407076371475e+03
|
||||
7 5.5779147495124910e+01 -3.1116108144509832e+02 -1.5746399501309934e+03
|
||||
8 1.3450499468982719e+02 -1.0056967489512954e+02 3.8855934583308238e+02
|
||||
9 7.6774861780621663e+01 8.2399790304301817e+01 3.3946923108359323e+02
|
||||
10 5.2127507824738632e+02 -5.9919375415095578e+02 -1.8126411002329547e+02
|
||||
11 -2.3730241143161583e+00 -5.8437712780828166e+00 -9.6148365370656634e+00
|
||||
12 1.7553761950433664e+01 1.0618527650868131e+01 -8.0353575511725133e+00
|
||||
13 8.0517481168008871e+00 -3.1757790200037084e+00 -1.4931726529049863e-01
|
||||
14 -3.3600804083765969e+00 6.7115990920333168e-01 -8.6361682069471062e+00
|
||||
15 -2.1638368437397651e-01 8.4990156871977796e+00 3.0193112282013752e+00
|
||||
16 4.3475198408547567e+02 -3.1172110706811338e+02 -1.1134925068040991e+03
|
||||
17 -4.2474237904604553e+02 2.9626311496048527e+02 1.1301458844348390e+03
|
||||
18 -1.3340771288180796e-02 4.9378733726348982e-02 -1.0519157371922092e-01
|
||||
19 3.5546988948818373e-02 -1.2428537986927182e-02 9.7968724837689675e-02
|
||||
20 -5.1366113903541490e-02 -6.9980325983148989e-02 7.1132663248924213e-02
|
||||
21 -7.0458946230165608e+01 -7.9674807338044729e+01 2.2155913668685426e+02
|
||||
22 -1.0635699213251399e+02 -2.5959515545052327e+01 -1.6635573249316354e+02
|
||||
23 1.7679885317690923e+02 1.0565294621165062e+02 -5.5183923226957759e+01
|
||||
24 3.8178454131941301e+01 -2.1007236065687607e+02 1.1252105934035761e+02
|
||||
25 -1.4913731726137928e+02 2.3711543343824502e+01 -1.2543384298894884e+02
|
||||
26 1.1093701334769246e+02 1.8634553167766845e+02 1.2879180727949606e+01
|
||||
27 5.0766748013841763e+01 -2.2279500870258624e+02 8.8545430125882177e+01
|
||||
28 -1.7686973159396905e+02 7.5957723646528365e+01 -1.1944584241209154e+02
|
||||
29 1.2611763281800827e+02 1.4684369998133576e+02 3.0895656415621641e+01
|
||||
...
|
||||
@ -2123,7 +2123,7 @@ TEST_F(AtomStyleTest, body_nparticle)
|
||||
"12.0 0.0 12.0 0.0 0.0 0.0\n"
|
||||
"0.0 1.0 0.0\n"
|
||||
"0.0 -3.0 0.0\n";
|
||||
FILE *fp = fopen("input_atom_styles.data", "w");
|
||||
FILE *fp = fopen("input_atom_styles.data", "w");
|
||||
fputs(data_file, fp);
|
||||
fclose(fp);
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
@ -4889,16 +4889,26 @@ TEST_F(AtomStyleTest, oxdna)
|
||||
command("set atom 8 shape 1.173984503142341 1.173984503142341 1.173984503142341");
|
||||
command("set atom 9 shape 1.173984503142341 1.173984503142341 1.173984503142341");
|
||||
command("set atom 10 shape 1.173984503142341 1.173984503142341 1.173984503142341");
|
||||
command("set atom 1 quat 0.120438343611269 -0.970540441176996 0.208676441957758 16.990727782866998");
|
||||
command("set atom 2 quat 0.122039415796829 -0.068232256412985 0.990177125658213 40.001729435287870");
|
||||
command("set atom 3 quat 0.052760168698289 0.030943512185297 0.998127679033382 69.627682451632380");
|
||||
command("set atom 4 quat -0.037622918613871 0.030623545471522 0.998822664169035 97.038820280300570");
|
||||
command("set atom 5 quat 0.055056042946138 0.077631917807377 0.995460756369964 137.7813218321917");
|
||||
command("set atom 6 quat 0.931128471673637 -0.355724722922553 -0.080372201291206 166.2836226291888");
|
||||
command("set atom 7 quat 0.753526078198930 -0.648440397941919 0.108275111595674 200.6802564250672");
|
||||
command("set atom 8 quat 0.553942138074214 -0.829580511279186 0.070315595507185 192.0355407659524");
|
||||
command("set atom 9 quat -0.373540155765431 0.913070802138105 -0.163613759548524 171.0789308260751");
|
||||
command("set atom 10 quat 0.027515673832457 0.998248649922676 -0.052369080773879 161.2621224558284");
|
||||
command("set atom 1 quat 0.120438343611269 -0.970540441176996 0.208676441957758 "
|
||||
"16.990727782866998");
|
||||
command("set atom 2 quat 0.122039415796829 -0.068232256412985 0.990177125658213 "
|
||||
"40.001729435287870");
|
||||
command(
|
||||
"set atom 3 quat 0.052760168698289 0.030943512185297 0.998127679033382 69.627682451632380");
|
||||
command("set atom 4 quat -0.037622918613871 0.030623545471522 0.998822664169035 "
|
||||
"97.038820280300570");
|
||||
command(
|
||||
"set atom 5 quat 0.055056042946138 0.077631917807377 0.995460756369964 137.7813218321917");
|
||||
command("set atom 6 quat 0.931128471673637 -0.355724722922553 -0.080372201291206 "
|
||||
"166.2836226291888");
|
||||
command(
|
||||
"set atom 7 quat 0.753526078198930 -0.648440397941919 0.108275111595674 200.6802564250672");
|
||||
command(
|
||||
"set atom 8 quat 0.553942138074214 -0.829580511279186 0.070315595507185 192.0355407659524");
|
||||
command("set atom 9 quat -0.373540155765431 0.913070802138105 -0.163613759548524 "
|
||||
"171.0789308260751");
|
||||
command("set atom 10 quat 0.027515673832457 0.998248649922676 -0.052369080773879 "
|
||||
"161.2621224558284");
|
||||
command("bond_style oxdna2/fene");
|
||||
command("bond_coeff * 2.0 0.25 0.7564");
|
||||
command("special_bonds lj 0 1 1");
|
||||
@ -4910,14 +4920,24 @@ TEST_F(AtomStyleTest, oxdna)
|
||||
command("create_bonds single/bond 1 7 8");
|
||||
command("create_bonds single/bond 1 8 9");
|
||||
command("create_bonds single/bond 1 9 10");
|
||||
command("pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh");
|
||||
command("pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk "
|
||||
"oxdna2/coaxstk oxdna2/dh");
|
||||
command("pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32");
|
||||
command("pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65");
|
||||
command("pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff * * oxdna2/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68");
|
||||
command("pair_coeff * * oxdna2/coaxstk 58.5 0.4 0.6 0.22 0.58 2.0 2.891592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 40.0 3.116592653589793");
|
||||
command("pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 "
|
||||
"0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65");
|
||||
command(
|
||||
"pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 "
|
||||
"0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command(
|
||||
"pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 "
|
||||
"0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command(
|
||||
"pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 "
|
||||
"0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff * * oxdna2/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 "
|
||||
"1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68");
|
||||
command("pair_coeff * * oxdna2/coaxstk 58.5 0.4 0.6 0.22 0.58 2.0 2.891592653589793 0.65 1.3 0 "
|
||||
"0.8 0.9 0 0.95 0.9 0 0.95 40.0 3.116592653589793");
|
||||
command("pair_coeff * * oxdna2/dh 0.1 0.2 0.815");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
@ -4974,14 +4994,24 @@ TEST_F(AtomStyleTest, oxdna)
|
||||
command("bond_style oxdna2/fene");
|
||||
command("bond_coeff * 2.0 0.25 0.7564");
|
||||
command("special_bonds lj 0 1 1");
|
||||
command("pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh");
|
||||
command("pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk "
|
||||
"oxdna2/coaxstk oxdna2/dh");
|
||||
command("pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32");
|
||||
command("pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65");
|
||||
command("pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff * * oxdna2/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68");
|
||||
command("pair_coeff * * oxdna2/coaxstk 58.5 0.4 0.6 0.22 0.58 2.0 2.891592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 40.0 3.116592653589793");
|
||||
command("pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 "
|
||||
"0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65");
|
||||
command(
|
||||
"pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 "
|
||||
"0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command(
|
||||
"pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 "
|
||||
"0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command(
|
||||
"pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 "
|
||||
"0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45");
|
||||
command("pair_coeff * * oxdna2/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 "
|
||||
"1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68");
|
||||
command("pair_coeff * * oxdna2/coaxstk 58.5 0.4 0.6 0.22 0.58 2.0 2.891592653589793 0.65 1.3 0 "
|
||||
"0.8 0.9 0 0.95 0.9 0 0.95 40.0 3.116592653589793");
|
||||
command("pair_coeff * * oxdna2/dh 0.1 0.2 0.815");
|
||||
|
||||
ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid"));
|
||||
|
||||
@ -21,7 +21,9 @@
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using ::testing::Eq;
|
||||
|
||||
@ -108,6 +110,22 @@ public:
|
||||
END_HIDE_OUTPUT();
|
||||
return fmt::format("{}.txt", binary_file);
|
||||
}
|
||||
|
||||
std::vector<std::string> extract_items(const std::string &file, const std::string &item)
|
||||
{
|
||||
std::string match = fmt::format("^ITEM: {}$", item);
|
||||
std::vector<std::string> values;
|
||||
|
||||
std::ifstream dump(file);
|
||||
for (std::string buffer; std::getline(dump, buffer); /* */) {
|
||||
buffer = utils::trim(buffer);
|
||||
if (utils::strmatch(buffer, match)) {
|
||||
std::getline(dump, buffer);
|
||||
values.push_back(buffer);
|
||||
}
|
||||
}
|
||||
return values;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(DumpAtomTest, run0)
|
||||
@ -680,8 +698,264 @@ TEST_F(DumpAtomTest, binary_write_dump)
|
||||
delete_file(reference);
|
||||
delete_file(dump_file);
|
||||
}
|
||||
|
||||
TEST_F(DumpAtomTest, frequency)
|
||||
{
|
||||
auto dump_file = dump_filename("frequency");
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("dump id all atom 5 " + dump_file);
|
||||
command("run 15 post no");
|
||||
command("run 12 post no");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
// NOTE: must reset to current timestep (27) to avoid unexpected issues with following
|
||||
TEST_FAILURE(".*ERROR: Cannot reset timestep with active dump - must undump first.*",
|
||||
command("reset_timestep 27"););
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("run 3 post no");
|
||||
command("undump id");
|
||||
command("reset_timestep 5");
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("dump_modify id append yes");
|
||||
command("run 20 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
std::vector<std::string> expected, values;
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"0", "5", "10", "15", "20", "25", "30", "10", "20"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("reset_timestep 10");
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("run 20 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"10", "20", "30"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("reset_timestep 0");
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("minimize 0.0 0.0 15 30");
|
||||
command("run 20 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"0", "10", "15", "20", "30"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
delete_file(dump_file);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// dump_modify
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
TEST_F(DumpAtomTest, delay)
|
||||
{
|
||||
auto dump_file = dump_filename("delay");
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("dump_modify id delay 20");
|
||||
command("run 50 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
std::vector<std::string> expected, values;
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"20", "30", "40", "50"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
delete_file(dump_file);
|
||||
}
|
||||
|
||||
TEST_F(DumpAtomTest, colname)
|
||||
{
|
||||
auto dump_file = dump_filename("colname");
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("group one id 1");
|
||||
command("dump id one atom 10 " + dump_file);
|
||||
command("run 5 post no");
|
||||
command("dump_modify id colname id AtomID colname 3 x-scaled colname -4 z-scaled");
|
||||
command("run 10 post no");
|
||||
command("dump_modify id colname default");
|
||||
command("run 10 post no");
|
||||
command("dump_modify id colname id AtomID colname 3 x-scaled colname -4 z-scaled");
|
||||
command("dump_modify id scale no image yes");
|
||||
command("run 10 post no");
|
||||
command("dump_modify id colname id AtomID colname 3 X colname -4 Z colname ix img_x");
|
||||
command("run 10 post no");
|
||||
command("dump_modify id colname default");
|
||||
command("run 10 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
std::vector<std::string> expected, values;
|
||||
values = extract_items(dump_file, "ATOMS id type xs ys zs");
|
||||
expected = {"1 1 0 0 0", "1 1 0 0 0"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
values = extract_items(dump_file, "ATOMS AtomID type x-scaled ys z-scaled");
|
||||
expected = {"1 1 0 0 0"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
values = extract_items(dump_file, "ATOMS id type x y z ix iy iz");
|
||||
expected = {"1 1 0 0 0 0 0 0", "1 1 0 0 0 0 0 0"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
values = extract_items(dump_file, "ATOMS AtomID type X y Z img_x iy iz");
|
||||
expected = {"1 1 0 0 0 0 0 0"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
delete_file(dump_file);
|
||||
}
|
||||
|
||||
TEST_F(DumpAtomTest, units_time)
|
||||
{
|
||||
auto dump_file = dump_filename("units_time");
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("dump_modify id units yes time yes");
|
||||
command("run 30 post no");
|
||||
command("timestep 0.01");
|
||||
command("run 30 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
std::vector<std::string> expected, values;
|
||||
values = extract_items(dump_file, "TIME");
|
||||
expected = {"0", "0.05", "0.1", "0.15", "0.25", "0.35", "0.45"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
values = extract_items(dump_file, "UNITS");
|
||||
expected = {"lj"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
delete_file(dump_file);
|
||||
}
|
||||
|
||||
TEST_F(DumpAtomTest, every)
|
||||
{
|
||||
auto dump_file = dump_filename("every");
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("run 20 post no");
|
||||
command("dump_modify id every 5");
|
||||
command("run 15 post no");
|
||||
command("dump_modify id every 10");
|
||||
command("run 25 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
std::vector<std::string> expected, values;
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"0", "10", "20", "25", "30", "35", "40", "50", "60"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
delete_file(dump_file);
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("reset_timestep 0");
|
||||
command("dump id all atom 1 " + dump_file);
|
||||
command("variable next equal (step+1)*(step+1)");
|
||||
command("dump_modify id every v_next");
|
||||
command("run 50 post no");
|
||||
command("variable next equal logfreq(10,7,10)");
|
||||
command("dump_modify id every v_next");
|
||||
command("run 100 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"1", "4", "25", "60", "70", "100"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
delete_file(dump_file);
|
||||
}
|
||||
|
||||
TEST_F(DumpAtomTest, every_time)
|
||||
{
|
||||
auto dump_file = dump_filename("every_time");
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("dump_modify id every/time 0.1");
|
||||
command("run 40 post no");
|
||||
command("timestep 0.01");
|
||||
command("run 20 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
std::vector<std::string> expected, values;
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"0", "20", "40", "50", "60"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
delete_file(dump_file);
|
||||
}
|
||||
|
||||
TEST_F(DumpAtomTest, header)
|
||||
{
|
||||
auto dump_file = dump_filename("header");
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("reset_timestep 5");
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("dump_modify id first no header yes");
|
||||
command("run 40 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
std::vector<std::string> expected, values;
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
expected = {"10", "20", "30", "40"};
|
||||
ASSERT_EQ(values.size(), expected.size());
|
||||
for (int i = 0; i < expected.size(); ++i)
|
||||
ASSERT_THAT(values[i], Eq(expected[i]));
|
||||
|
||||
BEGIN_HIDE_OUTPUT();
|
||||
command("dump id all atom 10 " + dump_file);
|
||||
command("dump_modify id header no");
|
||||
command("run 40 post no");
|
||||
command("undump id");
|
||||
END_HIDE_OUTPUT();
|
||||
|
||||
values = extract_items(dump_file, "TIMESTEP");
|
||||
ASSERT_EQ(values.size(), 0);
|
||||
delete_file(dump_file);
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
@ -144,7 +144,7 @@ TEST_F(DumpCfgTest, no_unwrap_no_buffer_run0)
|
||||
ASSERT_THAT(lines[0], Eq("Number of particles = 32"));
|
||||
delete_file("dump_cfg_no_unwrap_no_buffer_run0.melt.cfg");
|
||||
}
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@ -384,7 +384,7 @@ TEST_F(DumpCustomTest, rerun_bin)
|
||||
ASSERT_NEAR(pe_2, pe_rerun, 1.0e-14);
|
||||
delete_file(dump_file);
|
||||
}
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
@ -238,7 +238,7 @@ TEST_F(DumpLocalTest, triclinic_run0)
|
||||
ASSERT_EQ(utils::split_words(lines[7]).size(), 3);
|
||||
delete_file(dump_file);
|
||||
}
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@ -387,7 +387,7 @@ TEST_F(DumpNetCDFTest, run0_mpi)
|
||||
}
|
||||
delete_file(dump_file);
|
||||
}
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@ -348,7 +348,7 @@ TEST_F(FileOperationsTest, write_restart)
|
||||
}
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal write_restart command.*", command("write_restart"););
|
||||
TEST_FAILURE(".*ERROR: Illegal write_restart command.*",
|
||||
TEST_FAILURE(".*ERROR: Unknown write_restart keyword: xxxx.*",
|
||||
command("write_restart test.restart xxxx"););
|
||||
TEST_FAILURE(".*ERROR on proc 0: Cannot open restart file some_crazy_dir/test.restart:"
|
||||
" No such file or directory.*",
|
||||
@ -439,9 +439,17 @@ TEST_F(FileOperationsTest, write_data)
|
||||
ASSERT_FILE_EXISTS("charge.data");
|
||||
ASSERT_EQ(count_lines("charge.data"), 30);
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal write_data command.*", command("write_data"););
|
||||
TEST_FAILURE(".*ERROR: Illegal write_data command.*", command("write_data test.data xxxx"););
|
||||
TEST_FAILURE(".*ERROR: Illegal write_data command.*", command("write_data test.data pair xx"););
|
||||
TEST_FAILURE(".*ERROR: Illegal write_data command: missing argument.*", command("write_data"););
|
||||
TEST_FAILURE(".*ERROR: Unknown write_data keyword: xxxx.*",
|
||||
command("write_data test.data xxxx"););
|
||||
TEST_FAILURE(".*ERROR: Illegal write_data pair command: missing argument.*",
|
||||
command("write_data test.data pair"););
|
||||
TEST_FAILURE(".*ERROR: Unknown write_data pair option: xx.*",
|
||||
command("write_data test.data pair xx"););
|
||||
TEST_FAILURE(".*ERROR: Illegal write_data types command: missing argument.*",
|
||||
command("write_data test.data types"););
|
||||
TEST_FAILURE(".*ERROR: Unknown write_data types option: xx.*",
|
||||
command("write_data test.data types xx"););
|
||||
TEST_FAILURE(".*ERROR on proc 0: Cannot open data file some_crazy_dir/test.data:"
|
||||
" No such file or directory.*",
|
||||
command("write_data some_crazy_dir/test.data"););
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "input.h"
|
||||
#include "lammps.h"
|
||||
#include "molecule.h"
|
||||
#include "platform.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@ -70,17 +71,61 @@ static void create_molecule_files(const std::string &h2o_filename, const std::st
|
||||
}
|
||||
}
|
||||
|
||||
static void create_labelmap_files(const std::string &h2o_filename, const std::string &co2_filename)
|
||||
{
|
||||
// create molecule files
|
||||
const char h2o_file[] = "# Water molecule. SPC/E model.\n\n3 atoms\n2 bonds\n1 angles\n\n"
|
||||
"Coords\n\n1 1.12456 0.09298 1.27452\n"
|
||||
"2 1.53683 0.75606 1.89928\n3 0.49482 0.56390 0.65678\n\n"
|
||||
"Types\n\n1 OW\n2 HO\n3 HO\n\n"
|
||||
"Charges\n\n1 -0.8472\n2 0.4236\n3 0.4236\n\n"
|
||||
"Bonds\n\n1 OW-HO 1 2\n2 OW-HO 1 3\n\n"
|
||||
"Angles\n\n1 HO-OW-HO 2 1 3\n\n"
|
||||
"Shake Flags\n\n1 1\n2 1\n3 1\n\n"
|
||||
"Shake Atoms\n\n1 1 2 3\n2 1 2 3\n3 1 2 3\n\n"
|
||||
"Shake Bond Types\n\n1 OW-HO OW-HO HO-OW-HO\n2 OW-HO OW-HO HO-OW-HO\n3 "
|
||||
"OW-HO OW-HO HO-OW-HO\n\n"
|
||||
"Special Bond Counts\n\n1 2 0 0\n2 1 1 0\n3 1 1 0\n\n"
|
||||
"Special Bonds\n\n1 2 3\n2 1 3\n3 1 2\n\n";
|
||||
const char co2_file[] = "# CO2 molecule file. TraPPE model.\n\n"
|
||||
"3 atoms\n2 bonds\n1 angles\n\n"
|
||||
"Coords\n\n1 0.0 0.0 0.0\n2 -1.16 0.0 0.0\n3 1.16 0.0 0.0\n\n"
|
||||
"Types\n\n1 C\n2 O\n3 O\n\n"
|
||||
"Charges\n\n1 0.7\n2 -0.35\n3 -0.35\n\n"
|
||||
"Bonds\n\n1 C=O 1 2\n2 C=O 1 3\n\n"
|
||||
"Angles\n\n1 O=C=O 2 1 3\n\n"
|
||||
"Special Bond Counts\n\n1 2 0 0\n2 1 1 0\n3 1 1 0\n\n"
|
||||
"Special Bonds\n\n1 2 3\n2 1 3\n3 1 2\n\n";
|
||||
|
||||
FILE *fp = fopen(h2o_filename.c_str(), "w");
|
||||
if (fp) {
|
||||
fputs(h2o_file, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
fp = fopen(co2_filename.c_str(), "w");
|
||||
if (fp) {
|
||||
fputs(co2_file, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
// whether to print verbose output (i.e. not capturing LAMMPS screen output).
|
||||
bool verbose = false;
|
||||
|
||||
class MoleculeFileTest : public LAMMPSTest {
|
||||
protected:
|
||||
static void SetUpTestSuite() { create_molecule_files("moltest.h2o.mol", "moltest.co2.mol"); }
|
||||
static void SetUpTestSuite()
|
||||
{
|
||||
create_molecule_files("moltest.h2o.mol", "moltest.co2.mol");
|
||||
create_labelmap_files("labelmap.h2o.mol", "labelmap.co2.mol");
|
||||
}
|
||||
|
||||
static void TearDownTestSuite()
|
||||
{
|
||||
remove("moltest.h2o.mol");
|
||||
remove("moltest.co2.mol");
|
||||
platform::unlink("moltest.h2o.mol");
|
||||
platform::unlink("moltest.co2.mol");
|
||||
platform::unlink("labelmap.h2o.mol");
|
||||
platform::unlink("labelmap.co2.mol");
|
||||
}
|
||||
|
||||
void SetUp() override
|
||||
@ -247,6 +292,67 @@ TEST_F(MoleculeFileTest, twofiles)
|
||||
ASSERT_EQ(mols.size(), 1);
|
||||
}
|
||||
|
||||
TEST_F(MoleculeFileTest, labelmap)
|
||||
{
|
||||
if (!info->has_style("atom", "full")) GTEST_SKIP();
|
||||
BEGIN_CAPTURE_OUTPUT();
|
||||
command("atom_style full");
|
||||
command("region box block 0 2 0 2 0 2");
|
||||
command("create_box 4 box bond/types 2 angle/types 2");
|
||||
command("labelmap atom 1 HO 2 OW 3 C 4 O");
|
||||
command("labelmap bond 1 OW-HO 2 C=O");
|
||||
command("labelmap angle 1 HO-OW-HO 2 O=C=O");
|
||||
command("molecule h2olabel labelmap.h2o.mol");
|
||||
auto output = END_CAPTURE_OUTPUT();
|
||||
ASSERT_THAT(
|
||||
output,
|
||||
ContainsRegex(".*Read molecule template h2olabel:.*\n.*1 molecules.*\n"
|
||||
".*0 fragments.*\n.*3 atoms with max type 2.*\n.*2 bonds with max type 1.*\n"
|
||||
".*1 angles with max type 1.*\n.*0 dihedrals.*\n.*0 impropers.*"));
|
||||
BEGIN_CAPTURE_OUTPUT();
|
||||
command("molecule co2label labelmap.co2.mol");
|
||||
output = END_CAPTURE_OUTPUT();
|
||||
ASSERT_THAT(
|
||||
output,
|
||||
ContainsRegex(".*Read molecule template co2label:.*\n.*1 molecules.*\n"
|
||||
".*0 fragments.*\n.*3 atoms with max type 4.*\n.*2 bonds with max type 2.*\n"
|
||||
".*1 angles with max type 2.*\n.*0 dihedrals.*"));
|
||||
BEGIN_CAPTURE_OUTPUT();
|
||||
command("molecule h2onum moltest.h2o.mol");
|
||||
command("molecule co2num moltest.co2.mol offset 2 1 1 0 0");
|
||||
output = END_CAPTURE_OUTPUT();
|
||||
|
||||
auto mark = output.find("WARNING");
|
||||
auto first = output.substr(0, mark);
|
||||
mark = output.find("Read molecule", mark);
|
||||
auto second = output.substr(mark);
|
||||
ASSERT_THAT(
|
||||
first,
|
||||
ContainsRegex(".*Read molecule template h2onum:.*\n.*1 molecules.*\n"
|
||||
".*0 fragments.*\n.*3 atoms with max type 2.*\n.*2 bonds with max type 1.*\n"
|
||||
".*1 angles with max type 1.*\n.*0 dihedrals.*\n.*0 impropers.*\n"));
|
||||
ASSERT_THAT(
|
||||
second,
|
||||
ContainsRegex(".*Read molecule template co2num:.*\n.*1 molecules.*\n"
|
||||
".*0 fragments.*\n.*3 atoms with max type 4.*\n.*2 bonds with max type 2.*\n"
|
||||
".*1 angles with max type 2.*\n.*0 dihedrals.*"));
|
||||
ASSERT_EQ(lmp->atom->nmolecule, 4);
|
||||
auto mols = lmp->atom->get_molecule_by_id("h2onum");
|
||||
ASSERT_EQ(mols.size(), 1);
|
||||
mols = lmp->atom->get_molecule_by_id("co2num");
|
||||
ASSERT_EQ(mols.size(), 1);
|
||||
mols = lmp->atom->get_molecule_by_id("h2olabel");
|
||||
ASSERT_EQ(mols.size(), 1);
|
||||
mols = lmp->atom->get_molecule_by_id("co2label");
|
||||
ASSERT_EQ(mols.size(), 1);
|
||||
|
||||
BEGIN_CAPTURE_OUTPUT();
|
||||
command("labelmap atom 1 A 2 B");
|
||||
END_CAPTURE_OUTPUT();
|
||||
TEST_FAILURE(".*ERROR: Unknown atom type OW in Types section of molecule file: 1 OW.*",
|
||||
command("molecule fail labelmap.h2o.mol"););
|
||||
}
|
||||
|
||||
TEST_F(MoleculeFileTest, bonds)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP();
|
||||
|
||||
@ -57,8 +57,7 @@ constexpr int LAMMPS_NS::PairVashishta::NPARAMS_PER_LINE;
|
||||
constexpr int LAMMPS_NS::PairTersoffTable::NPARAMS_PER_LINE;
|
||||
#endif
|
||||
|
||||
class PotentialFileReaderTest : public LAMMPSTest {
|
||||
};
|
||||
class PotentialFileReaderTest : public LAMMPSTest {};
|
||||
|
||||
// open for native units
|
||||
TEST_F(PotentialFileReaderTest, Sw_native)
|
||||
@ -259,8 +258,7 @@ TEST_F(PotentialFileReaderTest, UnitConvert)
|
||||
delete reader;
|
||||
}
|
||||
|
||||
class OpenPotentialTest : public LAMMPSTest {
|
||||
};
|
||||
class OpenPotentialTest : public LAMMPSTest {};
|
||||
|
||||
// open for native units
|
||||
TEST_F(OpenPotentialTest, Sw_native)
|
||||
|
||||
@ -23,6 +23,10 @@ if(CMAKE_Fortran_COMPILER)
|
||||
endif()
|
||||
else()
|
||||
add_library(fmpi_stubs STATIC mpi_stubs.f90)
|
||||
get_filename_component(_tmp_fc ${CMAKE_Fortran_COMPILER} NAME)
|
||||
if (_tmp_fc STREQUAL "flang")
|
||||
target_link_libraries(fmpi_stubs PUBLIC gfortran)
|
||||
endif()
|
||||
add_library(MPI::MPI_Fortran ALIAS fmpi_stubs)
|
||||
endif()
|
||||
|
||||
|
||||
@ -9,7 +9,15 @@ DEFAULT_STYLE_EXAMPLE_LOG=os.path.join('melt', 'log.*.melt.g++.1')
|
||||
MULTI_STYLE_EXAMPLE_LOG=os.path.join('peptide', 'log.27Nov18.peptide.g++.1')
|
||||
sys.path.insert(1,PIZZA_DIR)
|
||||
|
||||
import dump
|
||||
# dump class uses NumPy, so only load and test dump if NumPy is available
|
||||
has_numpy = False
|
||||
try:
|
||||
import numpy
|
||||
has_numpy = True
|
||||
import dump
|
||||
except:
|
||||
pass
|
||||
|
||||
import log
|
||||
|
||||
class Logfiles(unittest.TestCase):
|
||||
@ -112,6 +120,7 @@ class PythonDump(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
del self.lmp
|
||||
|
||||
@unittest.skipIf(not has_numpy,"Missing the NumPy python module")
|
||||
def testDumpCustom(self):
|
||||
dumpfile = os.path.join(os.path.abspath('.'), 'dump.custom')
|
||||
self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR'])
|
||||
|
||||
@ -325,10 +325,10 @@ TEST(Platform, path_and_directory)
|
||||
ASSERT_FALSE(platform::path_is_directory("path_is_directory"));
|
||||
|
||||
#if defined(_WIN32)
|
||||
ASSERT_EQ(platform::mkdir("path_is_directory\\path_is_directory"),0);
|
||||
ASSERT_EQ(platform::mkdir("path_is_directory\\path_is_directory"), 0);
|
||||
ASSERT_TRUE(platform::path_is_directory("path_is_directory\\path_is_directory"));
|
||||
#else
|
||||
ASSERT_EQ(platform::mkdir("path_is_directory/path_is_directory"),0);
|
||||
ASSERT_EQ(platform::mkdir("path_is_directory/path_is_directory"), 0);
|
||||
ASSERT_TRUE(platform::path_is_directory("path_is_directory/path_is_directory"));
|
||||
#endif
|
||||
platform::rmdir("path_is_directory");
|
||||
|
||||
@ -141,8 +141,8 @@ TEST(Utils, count_words_with_extra_spaces)
|
||||
|
||||
TEST(Utils, join_words)
|
||||
{
|
||||
std::vector<std::string> words = {"one", "two", "three" };
|
||||
auto combined = utils::join_words(words, " ");
|
||||
std::vector<std::string> words = {"one", "two", "three"};
|
||||
auto combined = utils::join_words(words, " ");
|
||||
ASSERT_THAT(combined, StrEq("one two three"));
|
||||
combined = utils::join_words(words, "");
|
||||
ASSERT_THAT(combined, StrEq("onetwothree"));
|
||||
@ -152,7 +152,7 @@ TEST(Utils, join_words)
|
||||
words.resize(1);
|
||||
combined = utils::join_words(words, "/");
|
||||
ASSERT_THAT(combined, StrEq("one"));
|
||||
words.push_back("");
|
||||
words.emplace_back("");
|
||||
combined = utils::join_words(words, "1");
|
||||
ASSERT_THAT(combined, StrEq("one1"));
|
||||
}
|
||||
@ -440,6 +440,53 @@ TEST(Utils, invalid_id4)
|
||||
ASSERT_FALSE(utils::is_id("a$12"));
|
||||
}
|
||||
|
||||
TEST(Utils, valid_numeric)
|
||||
{
|
||||
ASSERT_EQ(utils::is_type("1"), 0);
|
||||
ASSERT_EQ(utils::is_type("21"), 0);
|
||||
ASSERT_EQ(utils::is_type("05"), 0);
|
||||
ASSERT_EQ(utils::is_type("1*"), 0);
|
||||
ASSERT_EQ(utils::is_type("*2"), 0);
|
||||
ASSERT_EQ(utils::is_type("1*4"), 0);
|
||||
}
|
||||
|
||||
TEST(Utils, invalid_numeric)
|
||||
{
|
||||
ASSERT_EQ(utils::is_type("1*2*"), -1);
|
||||
ASSERT_EQ(utils::is_type("**2"), -1);
|
||||
ASSERT_EQ(utils::is_type("*4*"), -1);
|
||||
ASSERT_EQ(utils::is_type("30**"), -1);
|
||||
}
|
||||
|
||||
TEST(Utils, valid_label)
|
||||
{
|
||||
ASSERT_EQ(utils::is_type("A"), 1);
|
||||
ASSERT_EQ(utils::is_type("c1"), 1);
|
||||
ASSERT_EQ(utils::is_type("o1_"), 1);
|
||||
ASSERT_EQ(utils::is_type("C1'"), 1);
|
||||
ASSERT_EQ(utils::is_type("N2\"-C1'"), 1);
|
||||
ASSERT_EQ(utils::is_type("[N2\"][C1']"), 1);
|
||||
ASSERT_EQ(utils::is_type("@X2=&X1"), 1);
|
||||
ASSERT_EQ(utils::is_type("|Na|Cl|H2O|"), 1);
|
||||
ASSERT_EQ(utils::is_type("CA(1)/CB(1)"), 1);
|
||||
ASSERT_EQ(utils::is_type("A-B"), 1); // ASCII
|
||||
ASSERT_EQ(utils::is_type("A−B"), 1); // UTF-8
|
||||
}
|
||||
|
||||
TEST(Utils, invalid_label)
|
||||
{
|
||||
ASSERT_EQ(utils::is_type("1A"), -1);
|
||||
ASSERT_EQ(utils::is_type("#c"), -1);
|
||||
ASSERT_EQ(utils::is_type("*B"), -1);
|
||||
ASSERT_EQ(utils::is_type(" B"), -1);
|
||||
ASSERT_EQ(utils::is_type("A "), -1);
|
||||
ASSERT_EQ(utils::is_type("A B"), -1);
|
||||
ASSERT_EQ(utils::is_type("\tB"), -1);
|
||||
ASSERT_EQ(utils::is_type("C\n"), -1);
|
||||
ASSERT_EQ(utils::is_type("d\r"), -1);
|
||||
ASSERT_EQ(utils::is_type(""), -1);
|
||||
}
|
||||
|
||||
TEST(Utils, strmatch_beg)
|
||||
{
|
||||
ASSERT_TRUE(utils::strmatch("rigid/small/omp", "^rigid"));
|
||||
|
||||
Reference in New Issue
Block a user