Update to latest changes from upstream
This commit is contained in:
@ -33,7 +33,7 @@ else()
|
||||
target_link_libraries(style_tests PUBLIC mpi_stubs)
|
||||
endif()
|
||||
# propagate sanitizer options to test tools
|
||||
if (NOT ENABLE_SANITIZER STREQUAL "none")
|
||||
if (ENABLE_SANITIZER AND (NOT ENABLE_SANITIZER STREQUAL "none"))
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
target_compile_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
target_link_options(style_tests PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
@ -124,6 +124,27 @@ file(GLOB FIX_TIMESTEP_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/fix-tim
|
||||
foreach(TEST ${FIX_TIMESTEP_TESTS})
|
||||
string(REGEX REPLACE "^.*fix-timestep-(.*)\.yaml" "FixTimestep:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND test_fix_timestep ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR};PYTHONPATH=${TEST_INPUT_FOLDER}:${LAMMPS_PYTHON_DIR}:$ENV{PYTHONPATH}")
|
||||
endforeach()
|
||||
|
||||
# dihedral style tester
|
||||
add_executable(test_dihedral_style test_dihedral_style.cpp)
|
||||
target_link_libraries(test_dihedral_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB DIHEDRAL_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/dihedral-*.yaml)
|
||||
foreach(TEST ${DIHEDRAL_TESTS})
|
||||
string(REGEX REPLACE "^.*dihedral-(.*)\.yaml" "DihedralStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND test_dihedral_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR};PYTHONPATH=${TEST_INPUT_FOLDER}:$ENV{PYTHONPATH}")
|
||||
endforeach()
|
||||
|
||||
# improper style tester
|
||||
add_executable(test_improper_style test_improper_style.cpp)
|
||||
target_link_libraries(test_improper_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB IMPROPER_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/improper-*.yaml)
|
||||
foreach(TEST ${IMPROPER_TESTS})
|
||||
string(REGEX REPLACE "^.*improper-(.*)\.yaml" "ImproperStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND test_improper_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR};PYTHONPATH=${TEST_INPUT_FOLDER}:$ENV{PYTHONPATH}")
|
||||
endforeach()
|
||||
|
||||
@ -38,7 +38,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <mpi.h>
|
||||
|
||||
#include <map>
|
||||
@ -235,41 +234,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
YamlWriter writer(outfile);
|
||||
|
||||
// lammps_version
|
||||
writer.emit("lammps_version", lmp->version);
|
||||
|
||||
// date_generated
|
||||
std::time_t now = time(NULL);
|
||||
block = ctime(&now);
|
||||
block = block.substr(0, block.find("\n") - 1);
|
||||
writer.emit("date_generated", block);
|
||||
|
||||
// epsilon
|
||||
writer.emit("epsilon", config.epsilon);
|
||||
|
||||
// prerequisites
|
||||
block.clear();
|
||||
for (auto &prerequisite : config.prerequisites) {
|
||||
block += prerequisite.first + " " + prerequisite.second + "\n";
|
||||
}
|
||||
writer.emit_block("prerequisites", block);
|
||||
|
||||
// pre_commands
|
||||
block.clear();
|
||||
for (auto &command : config.pre_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("pre_commands", block);
|
||||
|
||||
// post_commands
|
||||
block.clear();
|
||||
for (auto &command : config.post_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("post_commands", block);
|
||||
|
||||
// input_file
|
||||
writer.emit("input_file", config.input_file);
|
||||
// write yaml header
|
||||
write_yaml_header(&writer, &test_config, lmp->version);
|
||||
|
||||
// angle_style
|
||||
writer.emit("angle_style", config.angle_style);
|
||||
@ -307,8 +273,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
// init_forces
|
||||
block.clear();
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
auto f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
@ -328,8 +293,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
@ -342,6 +306,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
TEST(AngleStyle, plain)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -568,6 +534,8 @@ TEST(AngleStyle, plain)
|
||||
TEST(AngleStyle, omp)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "omp", "4", "-sf", "omp"};
|
||||
|
||||
@ -741,6 +709,8 @@ TEST(AngleStyle, omp)
|
||||
|
||||
TEST(AngleStyle, single)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
|
||||
@ -38,7 +38,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <mpi.h>
|
||||
|
||||
#include <map>
|
||||
@ -235,41 +234,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
YamlWriter writer(outfile);
|
||||
|
||||
// lammps_version
|
||||
writer.emit("lammps_version", lmp->version);
|
||||
|
||||
// date_generated
|
||||
std::time_t now = time(NULL);
|
||||
block = ctime(&now);
|
||||
block = block.substr(0, block.find("\n") - 1);
|
||||
writer.emit("date_generated", block);
|
||||
|
||||
// epsilon
|
||||
writer.emit("epsilon", config.epsilon);
|
||||
|
||||
// prerequisites
|
||||
block.clear();
|
||||
for (auto &prerequisite : config.prerequisites) {
|
||||
block += prerequisite.first + " " + prerequisite.second + "\n";
|
||||
}
|
||||
writer.emit_block("prerequisites", block);
|
||||
|
||||
// pre_commands
|
||||
block.clear();
|
||||
for (auto &command : config.pre_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("pre_commands", block);
|
||||
|
||||
// post_commands
|
||||
block.clear();
|
||||
for (auto &command : config.post_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("post_commands", block);
|
||||
|
||||
// input_file
|
||||
writer.emit("input_file", config.input_file);
|
||||
// write yaml header
|
||||
write_yaml_header(&writer, &test_config, lmp->version);
|
||||
|
||||
// bond_style
|
||||
writer.emit("bond_style", config.bond_style);
|
||||
@ -307,8 +273,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
// init_forces
|
||||
block.clear();
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
auto f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
@ -328,8 +293,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
@ -342,6 +306,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
TEST(BondStyle, plain)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -568,6 +534,8 @@ TEST(BondStyle, plain)
|
||||
TEST(BondStyle, omp)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "omp", "4", "-sf", "omp"};
|
||||
|
||||
@ -740,6 +708,8 @@ TEST(BondStyle, omp)
|
||||
|
||||
TEST(BondStyle, single)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -996,6 +966,8 @@ TEST(BondStyle, single)
|
||||
|
||||
TEST(BondStyle, extract)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#ifndef TEST_CONFIG_H
|
||||
#define TEST_CONFIG_H
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@ -32,6 +33,7 @@ public:
|
||||
std::string date_generated;
|
||||
std::string basename;
|
||||
double epsilon;
|
||||
std::set<std::string> skip_tests;
|
||||
std::vector<std::pair<std::string, std::string>> prerequisites;
|
||||
std::vector<std::string> pre_commands;
|
||||
std::vector<std::string> post_commands;
|
||||
@ -74,6 +76,7 @@ public:
|
||||
init_vdwl(0), run_vdwl(0), init_coul(0), run_coul(0), init_stress({0, 0, 0, 0, 0, 0}),
|
||||
run_stress({0, 0, 0, 0, 0, 0}), global_scalar(0)
|
||||
{
|
||||
skip_tests.clear();
|
||||
prerequisites.clear();
|
||||
pre_commands.clear();
|
||||
post_commands.clear();
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include "test_config.h"
|
||||
#include "yaml.h"
|
||||
#include "yaml_reader.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@ -25,11 +26,14 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using LAMMPS_NS::utils::split_words;
|
||||
|
||||
TestConfigReader::TestConfigReader(TestConfig &config) : YamlReader(), config(config)
|
||||
{
|
||||
consumers["lammps_version"] = &TestConfigReader::lammps_version;
|
||||
consumers["date_generated"] = &TestConfigReader::date_generated;
|
||||
consumers["epsilon"] = &TestConfigReader::epsilon;
|
||||
consumers["skip_tests"] = &TestConfigReader::skip_tests;
|
||||
consumers["prerequisites"] = &TestConfigReader::prerequisites;
|
||||
consumers["pre_commands"] = &TestConfigReader::pre_commands;
|
||||
consumers["post_commands"] = &TestConfigReader::post_commands;
|
||||
@ -53,13 +57,24 @@ TestConfigReader::TestConfigReader(TestConfig &config) : YamlReader(), config(co
|
||||
consumers["global_scalar"] = &TestConfigReader::global_scalar;
|
||||
consumers["global_vector"] = &TestConfigReader::global_vector;
|
||||
|
||||
consumers["bond_style"] = &TestConfigReader::bond_style;
|
||||
consumers["bond_coeff"] = &TestConfigReader::bond_coeff;
|
||||
consumers["angle_style"] = &TestConfigReader::angle_style;
|
||||
consumers["angle_coeff"] = &TestConfigReader::angle_coeff;
|
||||
consumers["init_energy"] = &TestConfigReader::init_energy;
|
||||
consumers["run_energy"] = &TestConfigReader::run_energy;
|
||||
consumers["equilibrium"] = &TestConfigReader::equilibrium;
|
||||
consumers["bond_style"] = &TestConfigReader::bond_style;
|
||||
consumers["bond_coeff"] = &TestConfigReader::bond_coeff;
|
||||
consumers["angle_style"] = &TestConfigReader::angle_style;
|
||||
consumers["angle_coeff"] = &TestConfigReader::angle_coeff;
|
||||
consumers["dihedral_style"] = &TestConfigReader::dihedral_style;
|
||||
consumers["dihedral_coeff"] = &TestConfigReader::dihedral_coeff;
|
||||
consumers["improper_style"] = &TestConfigReader::improper_style;
|
||||
consumers["improper_coeff"] = &TestConfigReader::improper_coeff;
|
||||
consumers["init_energy"] = &TestConfigReader::init_energy;
|
||||
consumers["run_energy"] = &TestConfigReader::run_energy;
|
||||
consumers["equilibrium"] = &TestConfigReader::equilibrium;
|
||||
}
|
||||
|
||||
void TestConfigReader::skip_tests(const yaml_event_t &event)
|
||||
{
|
||||
config.skip_tests.clear();
|
||||
for (auto &word : split_words((char *)event.data.scalar.value))
|
||||
config.skip_tests.insert(word);
|
||||
}
|
||||
|
||||
void TestConfigReader::prerequisites(const yaml_event_t &event)
|
||||
@ -259,6 +274,38 @@ void TestConfigReader::angle_coeff(const yaml_event_t &event)
|
||||
}
|
||||
}
|
||||
|
||||
void TestConfigReader::dihedral_style(const yaml_event_t &event)
|
||||
{
|
||||
config.dihedral_style = (char *)event.data.scalar.value;
|
||||
}
|
||||
|
||||
void TestConfigReader::dihedral_coeff(const yaml_event_t &event)
|
||||
{
|
||||
config.dihedral_coeff.clear();
|
||||
std::stringstream data((char *)event.data.scalar.value);
|
||||
std::string line;
|
||||
|
||||
while (std::getline(data, line, '\n')) {
|
||||
config.dihedral_coeff.push_back(line);
|
||||
}
|
||||
}
|
||||
|
||||
void TestConfigReader::improper_style(const yaml_event_t &event)
|
||||
{
|
||||
config.improper_style = (char *)event.data.scalar.value;
|
||||
}
|
||||
|
||||
void TestConfigReader::improper_coeff(const yaml_event_t &event)
|
||||
{
|
||||
config.improper_coeff.clear();
|
||||
std::stringstream data((char *)event.data.scalar.value);
|
||||
std::string line;
|
||||
|
||||
while (std::getline(data, line, '\n')) {
|
||||
config.improper_coeff.push_back(line);
|
||||
}
|
||||
}
|
||||
|
||||
void TestConfigReader::equilibrium(const yaml_event_t &event)
|
||||
{
|
||||
std::stringstream data((char *)event.data.scalar.value);
|
||||
|
||||
@ -23,6 +23,7 @@ class TestConfigReader : public YamlReader<TestConfigReader> {
|
||||
public:
|
||||
TestConfigReader(TestConfig &config);
|
||||
|
||||
void skip_tests(const yaml_event_t &event);
|
||||
void prerequisites(const yaml_event_t &event);
|
||||
void pre_commands(const yaml_event_t &event);
|
||||
void post_commands(const yaml_event_t &event);
|
||||
@ -44,6 +45,10 @@ public:
|
||||
void bond_coeff(const yaml_event_t &event);
|
||||
void angle_style(const yaml_event_t &event);
|
||||
void angle_coeff(const yaml_event_t &event);
|
||||
void dihedral_style(const yaml_event_t &event);
|
||||
void dihedral_coeff(const yaml_event_t &event);
|
||||
void improper_style(const yaml_event_t &event);
|
||||
void improper_coeff(const yaml_event_t &event);
|
||||
void equilibrium(const yaml_event_t &event);
|
||||
void init_vdwl(const yaml_event_t &event);
|
||||
void init_coul(const yaml_event_t &event);
|
||||
|
||||
711
unittest/force-styles/test_dihedral_style.cpp
Normal file
711
unittest/force-styles/test_dihedral_style.cpp
Normal file
@ -0,0 +1,711 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://lammps.sandia.gov/, 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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
// unit tests for dihedral styles intended for molecular systems
|
||||
|
||||
#include "error_stats.h"
|
||||
#include "test_config.h"
|
||||
#include "test_config_reader.h"
|
||||
#include "test_main.h"
|
||||
#include "yaml_reader.h"
|
||||
#include "yaml_writer.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
#include "dihedral.h"
|
||||
#include "fmt/format.h"
|
||||
#include "force.h"
|
||||
#include "info.h"
|
||||
#include "input.h"
|
||||
#include "lammps.h"
|
||||
#include "modify.h"
|
||||
#include "universe.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <mpi.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using ::testing::HasSubstr;
|
||||
using ::testing::StartsWith;
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
static void delete_file(const std::string &filename)
|
||||
{
|
||||
remove(filename.c_str());
|
||||
};
|
||||
|
||||
void cleanup_lammps(LAMMPS *lmp, const TestConfig &cfg)
|
||||
{
|
||||
delete_file(cfg.basename + ".restart");
|
||||
delete_file(cfg.basename + ".data");
|
||||
delete_file(cfg.basename + "-coeffs.in");
|
||||
delete lmp;
|
||||
}
|
||||
|
||||
LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool newton = true)
|
||||
{
|
||||
LAMMPS *lmp;
|
||||
|
||||
lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD);
|
||||
|
||||
// check if prerequisite styles are available
|
||||
Info *info = new Info(lmp);
|
||||
int nfail = 0;
|
||||
for (auto &prerequisite : cfg.prerequisites) {
|
||||
std::string style = prerequisite.second;
|
||||
|
||||
// this is a test for dihedral styles, so if the suffixed
|
||||
// version is not available, there is no reason to test.
|
||||
if (prerequisite.first == "dihedral") {
|
||||
if (lmp->suffix_enable) {
|
||||
style += "/";
|
||||
style += lmp->suffix;
|
||||
}
|
||||
}
|
||||
|
||||
if (!info->has_style(prerequisite.first, style)) ++nfail;
|
||||
}
|
||||
delete info;
|
||||
if (nfail > 0) {
|
||||
cleanup_lammps(lmp, cfg);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// utility lambdas to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
auto parse_input_script = [&](const std::string &filename) {
|
||||
lmp->input->file(filename.c_str());
|
||||
};
|
||||
|
||||
if (newton) {
|
||||
command("variable newton_bond index on");
|
||||
} else {
|
||||
command("variable newton_bond index off");
|
||||
}
|
||||
|
||||
command("variable input_dir index " + INPUT_FOLDER);
|
||||
|
||||
for (auto &pre_command : cfg.pre_commands) {
|
||||
command(pre_command);
|
||||
}
|
||||
|
||||
std::string input_file = INPUT_FOLDER + PATH_SEP + cfg.input_file;
|
||||
parse_input_script(input_file);
|
||||
|
||||
command("dihedral_style " + cfg.dihedral_style);
|
||||
|
||||
for (auto &dihedral_coeff : cfg.dihedral_coeff) {
|
||||
command("dihedral_coeff " + dihedral_coeff);
|
||||
}
|
||||
|
||||
for (auto &post_command : cfg.post_commands) {
|
||||
command(post_command);
|
||||
}
|
||||
|
||||
command("run 0 post no");
|
||||
command("write_restart " + cfg.basename + ".restart");
|
||||
command("write_data " + cfg.basename + ".data");
|
||||
command("write_coeff " + cfg.basename + "-coeffs.in");
|
||||
|
||||
return lmp;
|
||||
}
|
||||
|
||||
void run_lammps(LAMMPS *lmp)
|
||||
{
|
||||
// utility lambda to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
|
||||
command("fix 1 all nve");
|
||||
command("compute pe all pe/atom dihedral");
|
||||
command("compute sum all reduce sum c_pe");
|
||||
command("thermo_style custom step temp pe press c_sum");
|
||||
command("thermo 2");
|
||||
command("run 4 post no");
|
||||
}
|
||||
|
||||
void restart_lammps(LAMMPS *lmp, const TestConfig &cfg)
|
||||
{
|
||||
// utility lambda to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
|
||||
command("clear");
|
||||
command("read_restart " + cfg.basename + ".restart");
|
||||
|
||||
if (!lmp->force->dihedral) {
|
||||
command("dihedral_style " + cfg.dihedral_style);
|
||||
}
|
||||
|
||||
if ((cfg.dihedral_style.substr(0, 6) == "hybrid") || !lmp->force->dihedral->writedata) {
|
||||
for (auto &dihedral_coeff : cfg.dihedral_coeff) {
|
||||
command("dihedral_coeff " + dihedral_coeff);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &post_command : cfg.post_commands) {
|
||||
command(post_command);
|
||||
}
|
||||
|
||||
command("run 0 post no");
|
||||
}
|
||||
|
||||
void data_lammps(LAMMPS *lmp, const TestConfig &cfg)
|
||||
{
|
||||
// utility lambdas to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
auto parse_input_script = [&](const std::string &filename) {
|
||||
lmp->input->file(filename.c_str());
|
||||
};
|
||||
|
||||
command("clear");
|
||||
command("variable dihedral_style delete");
|
||||
command("variable data_file delete");
|
||||
command("variable newton_bond delete");
|
||||
command("variable newton_bond index on");
|
||||
|
||||
for (auto &pre_command : cfg.pre_commands) {
|
||||
command(pre_command);
|
||||
}
|
||||
|
||||
command("variable dihedral_style index '" + cfg.dihedral_style + "'");
|
||||
command("variable data_file index " + cfg.basename + ".data");
|
||||
|
||||
// special treatment for dihedral styles charmm and charmmfsw
|
||||
if (cfg.dihedral_style == "charmm") {
|
||||
command("variable pair_style delete");
|
||||
command("variable pair_style index 'lj/charmm/coul/charmm 7.0 8.0'");
|
||||
} else if (cfg.dihedral_style == "charmmfsw") {
|
||||
command("variable pair_style delete");
|
||||
command("variable pair_style index 'lj/charmmfsw/coul/charmmfsh 7.0 8.0'");
|
||||
}
|
||||
|
||||
std::string input_file = INPUT_FOLDER + PATH_SEP + cfg.input_file;
|
||||
parse_input_script(input_file);
|
||||
|
||||
for (auto &dihedral_coeff : cfg.dihedral_coeff) {
|
||||
command("dihedral_coeff " + dihedral_coeff);
|
||||
}
|
||||
for (auto &post_command : cfg.post_commands) {
|
||||
command(post_command);
|
||||
}
|
||||
command("run 0 post no");
|
||||
}
|
||||
|
||||
// re-generate yaml file with current settings.
|
||||
|
||||
void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
{
|
||||
// initialize system geometry
|
||||
const char *args[] = {"DihedralStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
LAMMPS *lmp = init_lammps(argc, argv, config);
|
||||
if (!lmp) {
|
||||
std::cerr << "One or more prerequisite styles are not available "
|
||||
"in this LAMMPS configuration:\n";
|
||||
for (auto &prerequisite : config.prerequisites) {
|
||||
std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const int natoms = lmp->atom->natoms;
|
||||
std::string block("");
|
||||
|
||||
YamlWriter writer(outfile);
|
||||
|
||||
// write yaml header
|
||||
write_yaml_header(&writer, &test_config, lmp->version);
|
||||
|
||||
// dihedral_style
|
||||
writer.emit("dihedral_style", config.dihedral_style);
|
||||
|
||||
// dihedral_coeff
|
||||
block.clear();
|
||||
for (auto &dihedral_coeff : config.dihedral_coeff) {
|
||||
block += dihedral_coeff + "\n";
|
||||
}
|
||||
writer.emit_block("dihedral_coeff", block);
|
||||
|
||||
// extract
|
||||
block.clear();
|
||||
for (auto data : config.extract)
|
||||
block += fmt::format("{} {}\n", data.first, data.second);
|
||||
writer.emit_block("extract", block);
|
||||
|
||||
// natoms
|
||||
writer.emit("natoms", natoms);
|
||||
|
||||
// init_energy
|
||||
writer.emit("init_energy", lmp->force->dihedral->energy);
|
||||
|
||||
// init_stress
|
||||
auto 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]);
|
||||
writer.emit_block("init_stress", block);
|
||||
|
||||
// init_forces
|
||||
block.clear();
|
||||
auto f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
}
|
||||
writer.emit_block("init_forces", block);
|
||||
|
||||
// do a few steps of MD
|
||||
run_lammps(lmp);
|
||||
|
||||
// run_energy
|
||||
writer.emit("run_energy", lmp->force->dihedral->energy);
|
||||
|
||||
// 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]);
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
}
|
||||
writer.emit_block("run_forces", block);
|
||||
|
||||
cleanup_lammps(lmp, config);
|
||||
return;
|
||||
}
|
||||
|
||||
TEST(DihedralStyle, plain)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"DihedralStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
if (!lmp) {
|
||||
std::cerr << "One or more prerequisite styles are not available "
|
||||
"in this LAMMPS configuration:\n";
|
||||
for (auto &prerequisite : test_config.prerequisites) {
|
||||
std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n";
|
||||
}
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
EXPECT_THAT(output, HasSubstr("Loop time"));
|
||||
|
||||
// abort if running in parallel and not all atoms are local
|
||||
const int nlocal = lmp->atom->nlocal;
|
||||
ASSERT_EQ(lmp->atom->natoms, nlocal);
|
||||
|
||||
double epsilon = test_config.epsilon;
|
||||
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
ErrorStats stats;
|
||||
stats.reset();
|
||||
const std::vector<coord_t> &f_ref = test_config.init_forces;
|
||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
auto dihedral = lmp->force->dihedral;
|
||||
auto stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stress = dihedral->virial;
|
||||
|
||||
const std::vector<coord_t> &f_run = test_config.run_forces;
|
||||
ASSERT_EQ(nlocal + 1, f_run.size());
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
int id = lmp->modify->find_compute("sum");
|
||||
double energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.run_energy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
lmp = init_lammps(argc, argv, test_config, false);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
// skip over these tests if newton bond is forced to be on
|
||||
if (lmp->force->newton_bond == 0) {
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
dihedral = lmp->force->dihedral;
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 2 * epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton off:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
id = lmp->modify->find_compute("sum");
|
||||
energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.run_energy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton off:" << stats << std::endl;
|
||||
}
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
restart_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "restart_forces stats:" << stats << std::endl;
|
||||
|
||||
dihedral = lmp->force->dihedral;
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "restart_stress stats:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "restart_energy stats:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
data_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "data_forces stats:" << stats << std::endl;
|
||||
|
||||
dihedral = lmp->force->dihedral;
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "data_stress stats:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "data_energy stats:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
};
|
||||
|
||||
TEST(DihedralStyle, omp)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"DihedralStyle", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "omp", "4", "-sf", "omp"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
if (!lmp) {
|
||||
std::cerr << "One or more prerequisite styles with /omp suffix\n"
|
||||
"are not available in this LAMMPS configuration:\n";
|
||||
for (auto &prerequisite : test_config.prerequisites) {
|
||||
std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n";
|
||||
}
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
EXPECT_THAT(output, HasSubstr("Loop time"));
|
||||
|
||||
// abort if running in parallel and not all atoms are local
|
||||
const int nlocal = lmp->atom->nlocal;
|
||||
ASSERT_EQ(lmp->atom->natoms, nlocal);
|
||||
|
||||
// relax error a bit for USER-OMP package
|
||||
double epsilon = 5.0 * test_config.epsilon;
|
||||
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
|
||||
const std::vector<coord_t> &f_ref = test_config.init_forces;
|
||||
ErrorStats stats;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
auto dihedral = lmp->force->dihedral;
|
||||
auto stress = dihedral->virial;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stress = dihedral->virial;
|
||||
|
||||
const std::vector<coord_t> &f_run = test_config.run_forces;
|
||||
ASSERT_EQ(nlocal + 1, f_run.size());
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
int id = lmp->modify->find_compute("sum");
|
||||
double energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.run_energy, epsilon);
|
||||
// TODO: this is currently broken for USER-OMP with dihedral style hybrid
|
||||
// needs to be fixed in the main code somewhere. Not sure where, though.
|
||||
if (test_config.dihedral_style.substr(0, 6) != "hybrid")
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
lmp = init_lammps(argc, argv, test_config, false);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
// skip over these tests if newton bond is forced to be on
|
||||
if (lmp->force->newton_bond == 0) {
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
dihedral = lmp->force->dihedral;
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton off:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
stress = dihedral->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
id = lmp->modify->find_compute("sum");
|
||||
energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, test_config.run_energy, epsilon);
|
||||
// TODO: this is currently broken for USER-OMP with dihedral style hybrid
|
||||
// needs to be fixed in the main code somewhere. Not sure where, though.
|
||||
if (test_config.dihedral_style.substr(0, 6) != "hybrid")
|
||||
EXPECT_FP_LE_WITH_EPS(dihedral->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton off:" << stats << std::endl;
|
||||
}
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
};
|
||||
@ -42,7 +42,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <mpi.h>
|
||||
|
||||
#include <map>
|
||||
@ -193,41 +192,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
std::string block("");
|
||||
YamlWriter writer(outfile);
|
||||
|
||||
// lammps_version
|
||||
writer.emit("lammps_version", lmp->version);
|
||||
|
||||
// date_generated
|
||||
std::time_t now = time(NULL);
|
||||
block = ctime(&now);
|
||||
block = block.substr(0, block.find("\n") - 1);
|
||||
writer.emit("date_generated", block);
|
||||
|
||||
// epsilon
|
||||
writer.emit("epsilon", config.epsilon);
|
||||
|
||||
// prerequisites
|
||||
block.clear();
|
||||
for (auto &prerequisite : config.prerequisites) {
|
||||
block += prerequisite.first + " " + prerequisite.second + "\n";
|
||||
}
|
||||
writer.emit_block("prerequisites", block);
|
||||
|
||||
// pre_commands
|
||||
block.clear();
|
||||
for (auto &command : config.pre_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("pre_commands", block);
|
||||
|
||||
// post_commands
|
||||
block.clear();
|
||||
for (auto &command : config.post_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("post_commands", block);
|
||||
|
||||
// input_file
|
||||
writer.emit("input_file", config.input_file);
|
||||
// write yaml header
|
||||
write_yaml_header(&writer, &test_config, lmp->version);
|
||||
|
||||
// natoms
|
||||
writer.emit("natoms", natoms);
|
||||
@ -288,6 +254,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
TEST(FixTimestep, plain)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"FixTimestep", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -730,6 +698,8 @@ TEST(FixTimestep, omp)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||
if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"FixTimestep", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "omp", "4", "-sf", "omp"};
|
||||
|
||||
|
||||
702
unittest/force-styles/test_improper_style.cpp
Normal file
702
unittest/force-styles/test_improper_style.cpp
Normal file
@ -0,0 +1,702 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://lammps.sandia.gov/, 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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
// unit tests for improper styles intended for molecular systems
|
||||
|
||||
#include "error_stats.h"
|
||||
#include "test_config.h"
|
||||
#include "test_config_reader.h"
|
||||
#include "test_main.h"
|
||||
#include "yaml_reader.h"
|
||||
#include "yaml_writer.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
#include "fmt/format.h"
|
||||
#include "force.h"
|
||||
#include "improper.h"
|
||||
#include "info.h"
|
||||
#include "input.h"
|
||||
#include "lammps.h"
|
||||
#include "modify.h"
|
||||
#include "universe.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <mpi.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using ::testing::HasSubstr;
|
||||
using ::testing::StartsWith;
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
static void delete_file(const std::string &filename)
|
||||
{
|
||||
remove(filename.c_str());
|
||||
};
|
||||
|
||||
void cleanup_lammps(LAMMPS *lmp, const TestConfig &cfg)
|
||||
{
|
||||
delete_file(cfg.basename + ".restart");
|
||||
delete_file(cfg.basename + ".data");
|
||||
delete_file(cfg.basename + "-coeffs.in");
|
||||
delete lmp;
|
||||
}
|
||||
|
||||
LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool newton = true)
|
||||
{
|
||||
LAMMPS *lmp;
|
||||
|
||||
lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD);
|
||||
|
||||
// check if prerequisite styles are available
|
||||
Info *info = new Info(lmp);
|
||||
int nfail = 0;
|
||||
for (auto &prerequisite : cfg.prerequisites) {
|
||||
std::string style = prerequisite.second;
|
||||
|
||||
// this is a test for improper styles, so if the suffixed
|
||||
// version is not available, there is no reason to test.
|
||||
if (prerequisite.first == "improper") {
|
||||
if (lmp->suffix_enable) {
|
||||
style += "/";
|
||||
style += lmp->suffix;
|
||||
}
|
||||
}
|
||||
|
||||
if (!info->has_style(prerequisite.first, style)) ++nfail;
|
||||
}
|
||||
delete info;
|
||||
if (nfail > 0) {
|
||||
cleanup_lammps(lmp, cfg);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// utility lambdas to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
auto parse_input_script = [&](const std::string &filename) {
|
||||
lmp->input->file(filename.c_str());
|
||||
};
|
||||
|
||||
if (newton) {
|
||||
command("variable newton_bond index on");
|
||||
} else {
|
||||
command("variable newton_bond index off");
|
||||
}
|
||||
|
||||
command("variable input_dir index " + INPUT_FOLDER);
|
||||
|
||||
for (auto &pre_command : cfg.pre_commands) {
|
||||
command(pre_command);
|
||||
}
|
||||
|
||||
std::string input_file = INPUT_FOLDER + PATH_SEP + cfg.input_file;
|
||||
parse_input_script(input_file);
|
||||
|
||||
command("improper_style " + cfg.improper_style);
|
||||
|
||||
for (auto &improper_coeff : cfg.improper_coeff) {
|
||||
command("improper_coeff " + improper_coeff);
|
||||
}
|
||||
|
||||
for (auto &post_command : cfg.post_commands) {
|
||||
command(post_command);
|
||||
}
|
||||
|
||||
command("run 0 post no");
|
||||
command("write_restart " + cfg.basename + ".restart");
|
||||
command("write_data " + cfg.basename + ".data");
|
||||
command("write_coeff " + cfg.basename + "-coeffs.in");
|
||||
|
||||
return lmp;
|
||||
}
|
||||
|
||||
void run_lammps(LAMMPS *lmp)
|
||||
{
|
||||
// utility lambda to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
|
||||
command("fix 1 all nve");
|
||||
command("compute pe all pe/atom improper");
|
||||
command("compute sum all reduce sum c_pe");
|
||||
command("thermo_style custom step temp pe press c_sum");
|
||||
command("thermo 2");
|
||||
command("run 4 post no");
|
||||
}
|
||||
|
||||
void restart_lammps(LAMMPS *lmp, const TestConfig &cfg)
|
||||
{
|
||||
// utility lambda to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
|
||||
command("clear");
|
||||
command("read_restart " + cfg.basename + ".restart");
|
||||
|
||||
if (!lmp->force->improper) {
|
||||
command("improper_style " + cfg.improper_style);
|
||||
}
|
||||
|
||||
if ((cfg.improper_style.substr(0, 6) == "hybrid") || !lmp->force->improper->writedata) {
|
||||
for (auto &improper_coeff : cfg.improper_coeff) {
|
||||
command("improper_coeff " + improper_coeff);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &post_command : cfg.post_commands) {
|
||||
command(post_command);
|
||||
}
|
||||
|
||||
command("run 0 post no");
|
||||
}
|
||||
|
||||
void data_lammps(LAMMPS *lmp, const TestConfig &cfg)
|
||||
{
|
||||
// utility lambdas to improve readability
|
||||
auto command = [&](const std::string &line) {
|
||||
lmp->input->one(line.c_str());
|
||||
};
|
||||
auto parse_input_script = [&](const std::string &filename) {
|
||||
lmp->input->file(filename.c_str());
|
||||
};
|
||||
|
||||
command("clear");
|
||||
command("variable improper_style delete");
|
||||
command("variable data_file delete");
|
||||
command("variable newton_bond delete");
|
||||
command("variable newton_bond index on");
|
||||
|
||||
for (auto &pre_command : cfg.pre_commands) {
|
||||
command(pre_command);
|
||||
}
|
||||
|
||||
command("variable improper_style index '" + cfg.improper_style + "'");
|
||||
command("variable data_file index " + cfg.basename + ".data");
|
||||
|
||||
std::string input_file = INPUT_FOLDER + PATH_SEP + cfg.input_file;
|
||||
parse_input_script(input_file);
|
||||
|
||||
for (auto &improper_coeff : cfg.improper_coeff) {
|
||||
command("improper_coeff " + improper_coeff);
|
||||
}
|
||||
for (auto &post_command : cfg.post_commands) {
|
||||
command(post_command);
|
||||
}
|
||||
command("run 0 post no");
|
||||
}
|
||||
|
||||
// re-generate yaml file with current settings.
|
||||
|
||||
void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
{
|
||||
// initialize system geometry
|
||||
const char *args[] = {"ImproperStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
LAMMPS *lmp = init_lammps(argc, argv, config);
|
||||
if (!lmp) {
|
||||
std::cerr << "One or more prerequisite styles are not available "
|
||||
"in this LAMMPS configuration:\n";
|
||||
for (auto &prerequisite : config.prerequisites) {
|
||||
std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const int natoms = lmp->atom->natoms;
|
||||
std::string block("");
|
||||
|
||||
YamlWriter writer(outfile);
|
||||
|
||||
// write yaml header
|
||||
write_yaml_header(&writer, &test_config, lmp->version);
|
||||
|
||||
// improper_style
|
||||
writer.emit("improper_style", config.improper_style);
|
||||
|
||||
// improper_coeff
|
||||
block.clear();
|
||||
for (auto &improper_coeff : config.improper_coeff) {
|
||||
block += improper_coeff + "\n";
|
||||
}
|
||||
writer.emit_block("improper_coeff", block);
|
||||
|
||||
// extract
|
||||
block.clear();
|
||||
for (auto data : config.extract)
|
||||
block += fmt::format("{} {}\n", data.first, data.second);
|
||||
writer.emit_block("extract", block);
|
||||
|
||||
// natoms
|
||||
writer.emit("natoms", natoms);
|
||||
|
||||
// init_energy
|
||||
writer.emit("init_energy", lmp->force->improper->energy);
|
||||
|
||||
// init_stress
|
||||
auto 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]);
|
||||
writer.emit_block("init_stress", block);
|
||||
|
||||
// init_forces
|
||||
block.clear();
|
||||
auto f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
}
|
||||
writer.emit_block("init_forces", block);
|
||||
|
||||
// do a few steps of MD
|
||||
run_lammps(lmp);
|
||||
|
||||
// run_energy
|
||||
writer.emit("run_energy", lmp->force->improper->energy);
|
||||
|
||||
// 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]);
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
}
|
||||
writer.emit_block("run_forces", block);
|
||||
|
||||
cleanup_lammps(lmp, config);
|
||||
return;
|
||||
}
|
||||
|
||||
TEST(ImproperStyle, plain)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"ImproperStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
if (!lmp) {
|
||||
std::cerr << "One or more prerequisite styles are not available "
|
||||
"in this LAMMPS configuration:\n";
|
||||
for (auto &prerequisite : test_config.prerequisites) {
|
||||
std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n";
|
||||
}
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
EXPECT_THAT(output, HasSubstr("Loop time"));
|
||||
|
||||
// abort if running in parallel and not all atoms are local
|
||||
const int nlocal = lmp->atom->nlocal;
|
||||
ASSERT_EQ(lmp->atom->natoms, nlocal);
|
||||
|
||||
double epsilon = test_config.epsilon;
|
||||
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
ErrorStats stats;
|
||||
stats.reset();
|
||||
const std::vector<coord_t> &f_ref = test_config.init_forces;
|
||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
auto improper = lmp->force->improper;
|
||||
auto stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stress = improper->virial;
|
||||
|
||||
const std::vector<coord_t> &f_run = test_config.run_forces;
|
||||
ASSERT_EQ(nlocal + 1, f_run.size());
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
int id = lmp->modify->find_compute("sum");
|
||||
double energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.run_energy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
lmp = init_lammps(argc, argv, test_config, false);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
// skip over these tests if newton bond is forced to be on
|
||||
if (lmp->force->newton_bond == 0) {
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
improper = lmp->force->improper;
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 2 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 2 * epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton off:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
id = lmp->modify->find_compute("sum");
|
||||
energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.run_energy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton off:" << stats << std::endl;
|
||||
}
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
restart_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "restart_forces stats:" << stats << std::endl;
|
||||
|
||||
improper = lmp->force->improper;
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "restart_stress stats:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "restart_energy stats:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
data_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "data_forces stats:" << stats << std::endl;
|
||||
|
||||
improper = lmp->force->improper;
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, epsilon);
|
||||
if (print_stats) std::cerr << "data_stress stats:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "data_energy stats:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
};
|
||||
|
||||
TEST(ImproperStyle, omp)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"ImproperStyle", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "omp", "4", "-sf", "omp"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
if (!lmp) {
|
||||
std::cerr << "One or more prerequisite styles with /omp suffix\n"
|
||||
"are not available in this LAMMPS configuration:\n";
|
||||
for (auto &prerequisite : test_config.prerequisites) {
|
||||
std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n";
|
||||
}
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
EXPECT_THAT(output, HasSubstr("Loop time"));
|
||||
|
||||
// abort if running in parallel and not all atoms are local
|
||||
const int nlocal = lmp->atom->nlocal;
|
||||
ASSERT_EQ(lmp->atom->natoms, nlocal);
|
||||
|
||||
// relax error a bit for USER-OMP package
|
||||
double epsilon = 5.0 * test_config.epsilon;
|
||||
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
|
||||
const std::vector<coord_t> &f_ref = test_config.init_forces;
|
||||
ErrorStats stats;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
auto improper = lmp->force->improper;
|
||||
auto stress = improper->virial;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stress = improper->virial;
|
||||
|
||||
const std::vector<coord_t> &f_run = test_config.run_forces;
|
||||
ASSERT_EQ(nlocal + 1, f_run.size());
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton on: " << stats << std::endl;
|
||||
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton on: " << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
int id = lmp->modify->find_compute("sum");
|
||||
double energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.run_energy, epsilon);
|
||||
// TODO: this is currently broken for USER-OMP with improper style hybrid
|
||||
// needs to be fixed in the main code somewhere. Not sure where, though.
|
||||
if (test_config.improper_style.substr(0, 6) != "hybrid")
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton on: " << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
lmp = init_lammps(argc, argv, test_config, false);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
// skip over these tests if newton bond is forced to be on
|
||||
if (lmp->force->newton_bond == 0) {
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
improper = lmp->force->improper;
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.init_energy, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton off:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 10 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
stress = improper->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
id = lmp->modify->find_compute("sum");
|
||||
energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, test_config.run_energy, epsilon);
|
||||
// TODO: this is currently broken for USER-OMP with improper style hybrid
|
||||
// needs to be fixed in the main code somewhere. Not sure where, though.
|
||||
if (test_config.improper_style.substr(0, 6) != "hybrid")
|
||||
EXPECT_FP_LE_WITH_EPS(improper->energy, energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton off:" << stats << std::endl;
|
||||
}
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
};
|
||||
@ -16,16 +16,19 @@
|
||||
#include "test_config.h"
|
||||
#include "test_config_reader.h"
|
||||
#include "utils.h"
|
||||
#include "yaml_writer.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
#include <mpi.h>
|
||||
#include <vector>
|
||||
|
||||
using LAMMPS_NS::utils::split_words;
|
||||
using LAMMPS_NS::utils::trim;
|
||||
|
||||
// common read_yaml_file function
|
||||
bool read_yaml_file(const char *infile, TestConfig &config)
|
||||
@ -37,6 +40,55 @@ bool read_yaml_file(const char *infile, TestConfig &config)
|
||||
return true;
|
||||
}
|
||||
|
||||
// write out common header items for yaml files
|
||||
void write_yaml_header(YamlWriter *writer,
|
||||
TestConfig *cfg,
|
||||
const char *version)
|
||||
{
|
||||
// lammps_version
|
||||
writer->emit("lammps_version", version);
|
||||
|
||||
// date_generated
|
||||
std::time_t now = time(NULL);
|
||||
std::string block = trim(ctime(&now));
|
||||
writer->emit("date_generated", block);
|
||||
|
||||
// epsilon
|
||||
writer->emit("epsilon", cfg->epsilon);
|
||||
|
||||
// skip tests
|
||||
block.clear();
|
||||
for (auto &skip : cfg->skip_tests) {
|
||||
if (block.empty()) block = skip;
|
||||
else block += " " + skip;
|
||||
}
|
||||
writer->emit("skip_tests", block);
|
||||
|
||||
// prerequisites
|
||||
block.clear();
|
||||
for (auto &prerequisite : cfg->prerequisites) {
|
||||
block += prerequisite.first + " " + prerequisite.second + "\n";
|
||||
}
|
||||
writer->emit_block("prerequisites", block);
|
||||
|
||||
// pre_commands
|
||||
block.clear();
|
||||
for (auto &command : cfg->pre_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer->emit_block("pre_commands", block);
|
||||
|
||||
// post_commands
|
||||
block.clear();
|
||||
for (auto &command : cfg->post_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer->emit_block("post_commands", block);
|
||||
|
||||
// input_file
|
||||
writer->emit("input_file", cfg->input_file);
|
||||
}
|
||||
|
||||
// need to be defined in unit test body
|
||||
extern void generate_yaml_file(const char *, const TestConfig &);
|
||||
|
||||
|
||||
@ -22,6 +22,10 @@ extern bool print_stats;
|
||||
extern bool verbose;
|
||||
extern std::string INPUT_FOLDER;
|
||||
|
||||
// convenience method to write out common entries
|
||||
void write_yaml_header(class YamlWriter *writer, TestConfig *cfg,
|
||||
const char *version);
|
||||
|
||||
#define EXPECT_FP_LE_WITH_EPS(val1, val2, eps) \
|
||||
do { \
|
||||
const double diff = fabs(val1 - val2); \
|
||||
@ -31,10 +35,11 @@ extern std::string INPUT_FOLDER;
|
||||
EXPECT_PRED_FORMAT2(::testing::DoubleLE, err, eps); \
|
||||
} while (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined _WIN32
|
||||
static const char PATH_SEP = '\\';
|
||||
#else
|
||||
static const char PATH_SEP = '/';
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
#include "fmt/format.h"
|
||||
#include "force.h"
|
||||
#include "info.h"
|
||||
#include "input.h"
|
||||
@ -40,7 +39,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <mpi.h>
|
||||
|
||||
#include <map>
|
||||
@ -125,6 +123,13 @@ LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool new
|
||||
command("pair_coeff " + pair_coeff);
|
||||
}
|
||||
|
||||
// set this here explicitly to a setting different
|
||||
// from the default, so we can spot YAML files for
|
||||
// long-range interactions that do not include these
|
||||
// settings. they will fail after restart or read data.
|
||||
command("pair_modify table 0");
|
||||
command("pair_modify table/disp 0");
|
||||
|
||||
for (auto &post_command : cfg.post_commands) {
|
||||
command(post_command);
|
||||
}
|
||||
@ -238,41 +243,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
YamlWriter writer(outfile);
|
||||
|
||||
// lammps_version
|
||||
writer.emit("lammps_version", lmp->version);
|
||||
|
||||
// date_generated
|
||||
std::time_t now = time(NULL);
|
||||
block = ctime(&now);
|
||||
block = block.substr(0, block.find("\n") - 1);
|
||||
writer.emit("date_generated", block);
|
||||
|
||||
// epsilon
|
||||
writer.emit("epsilon", config.epsilon);
|
||||
|
||||
// prerequisites
|
||||
block.clear();
|
||||
for (auto &prerequisite : config.prerequisites) {
|
||||
block += prerequisite.first + " " + prerequisite.second + "\n";
|
||||
}
|
||||
writer.emit_block("prerequisites", block);
|
||||
|
||||
// pre_commands
|
||||
block.clear();
|
||||
for (auto &command : config.pre_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("pre_commands", block);
|
||||
|
||||
// post_commands
|
||||
block.clear();
|
||||
for (auto &command : config.post_commands) {
|
||||
block += command + "\n";
|
||||
}
|
||||
writer.emit_block("post_commands", block);
|
||||
|
||||
// input_file
|
||||
writer.emit("input_file", config.input_file);
|
||||
// write yaml header
|
||||
write_yaml_header(&writer, &test_config, lmp->version);
|
||||
|
||||
// pair_style
|
||||
writer.emit("pair_style", config.pair_style);
|
||||
@ -307,8 +279,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
// init_forces
|
||||
block.clear();
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
auto f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
@ -331,8 +302,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
writer.emit_block("run_stress", block);
|
||||
|
||||
block.clear();
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
f = lmp->atom->f;
|
||||
for (int i = 1; i <= natoms; ++i) {
|
||||
const int j = lmp->atom->map(i);
|
||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]);
|
||||
@ -345,6 +315,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
|
||||
TEST(PairStyle, plain)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -627,9 +599,14 @@ TEST(PairStyle, plain)
|
||||
TEST(PairStyle, omp)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "omp", "4", "-sf", "omp"};
|
||||
|
||||
// cannot run dpd styles with more than 1 thread due to using multiple pRNGs
|
||||
if (utils::strmatch(test_config.pair_style, "^dpd")) args[8] = "1";
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
@ -651,14 +628,6 @@ TEST(PairStyle, omp)
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
EXPECT_THAT(output, HasSubstr("Loop time"));
|
||||
|
||||
if (utils::strmatch(test_config.pair_style, "^dpd")) {
|
||||
std::cerr << "Skipping pair style " << lmp->force->pair_style << "\n";
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
// abort if running in parallel and not all atoms are local
|
||||
const int nlocal = lmp->atom->nlocal;
|
||||
ASSERT_EQ(lmp->atom->natoms, nlocal);
|
||||
@ -806,13 +775,136 @@ TEST(PairStyle, omp)
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
};
|
||||
|
||||
TEST(PairStyle, gpu)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("GPU")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args_neigh[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf", "gpu"};
|
||||
const char *args_noneigh[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf", "gpu", "-pk", "gpu", "0", "neigh", "no"};
|
||||
|
||||
char **argv = (char **)args_neigh;
|
||||
int argc = sizeof(args_neigh) / sizeof(char *);
|
||||
|
||||
// cannot use GPU neighbor list with hybrid pair style (yet)
|
||||
if (test_config.pair_style.substr(0, 6) == "hybrid") {
|
||||
argv = (char **)args_noneigh;
|
||||
argc = sizeof(args_noneigh) / sizeof(char *);
|
||||
}
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
LAMMPS *lmp = init_lammps(argc, argv, test_config, false);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
if (!lmp) {
|
||||
std::cerr << "One or more prerequisite styles with /gpu suffix\n"
|
||||
"are not available in this LAMMPS configuration:\n";
|
||||
for (auto &prerequisite : test_config.prerequisites) {
|
||||
std::cerr << prerequisite.first << "_style " << prerequisite.second << "\n";
|
||||
}
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
EXPECT_THAT(output, HasSubstr("Loop time"));
|
||||
|
||||
// abort if running in parallel and not all atoms are local
|
||||
const int nlocal = lmp->atom->nlocal;
|
||||
ASSERT_EQ(lmp->atom->natoms, nlocal);
|
||||
|
||||
// relax error for GPU package depending on precision setting
|
||||
double epsilon = test_config.epsilon;
|
||||
if (Info::has_accelerator_feature("GPU","precision","double"))
|
||||
epsilon *= 7.5;
|
||||
else if (Info::has_accelerator_feature("GPU","precision","mixed"))
|
||||
epsilon *= 5.0e8;
|
||||
else epsilon *= 1.0e10;
|
||||
// relax test precision when using pppm and single precision FFTs, but only when also running with double precision
|
||||
#if defined(FFT_SINGLE)
|
||||
if (lmp->force->kspace && lmp->force->kspace->compute_flag && Info::has_accelerator_feature("GPU","precision","double"))
|
||||
if (utils::strmatch(lmp->force->kspace_style, "^pppm")) epsilon *= 2.0e8;
|
||||
#endif
|
||||
const std::vector<coord_t> &f_ref = test_config.init_forces;
|
||||
const std::vector<coord_t> &f_run = test_config.run_forces;
|
||||
ErrorStats stats;
|
||||
|
||||
auto f = lmp->atom->f;
|
||||
auto tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "init_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
auto pair = lmp->force->pair;
|
||||
auto stress = pair->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "init_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(pair->eng_vdwl, test_config.init_vdwl, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(pair->eng_coul, test_config.init_coul, epsilon);
|
||||
if (print_stats) std::cerr << "init_energy stats, newton off:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
run_lammps(lmp);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
f = lmp->atom->f;
|
||||
tag = lmp->atom->tag;
|
||||
stats.reset();
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 5 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_run[tag[i]].y, 5 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_run[tag[i]].z, 5 * epsilon);
|
||||
}
|
||||
if (print_stats) std::cerr << "run_forces stats, newton off:" << stats << std::endl;
|
||||
|
||||
stress = pair->virial;
|
||||
stats.reset();
|
||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.run_stress.xx, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.run_stress.yy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.run_stress.zz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.run_stress.xy, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.run_stress.xz, 10 * epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.run_stress.yz, 10 * epsilon);
|
||||
if (print_stats) std::cerr << "run_stress stats, newton off:" << stats << std::endl;
|
||||
|
||||
stats.reset();
|
||||
auto id = lmp->modify->find_compute("sum");
|
||||
auto energy = lmp->modify->compute[id]->compute_scalar();
|
||||
EXPECT_FP_LE_WITH_EPS(pair->eng_vdwl, test_config.run_vdwl, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS(pair->eng_coul, test_config.run_coul, epsilon);
|
||||
EXPECT_FP_LE_WITH_EPS((pair->eng_vdwl + pair->eng_coul), energy, epsilon);
|
||||
if (print_stats) std::cerr << "run_energy stats, newton off:" << stats << std::endl;
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
};
|
||||
|
||||
TEST(PairStyle, intel)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-INTEL")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "intel", "0", "mode", "double", "omp",
|
||||
"4", "lrt", "no", "-sf", "intel"};
|
||||
|
||||
// cannot use more than 1 thread for dpd styles due to pRNG
|
||||
if (utils::strmatch(test_config.pair_style, "^dpd")) args[12] = "1";
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
@ -831,22 +923,6 @@ TEST(PairStyle, intel)
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
if ((test_config.pair_style == "rebo") || utils::strmatch(test_config.pair_style, "^dpd")) {
|
||||
std::cerr << "Skipping pair style " << lmp->force->pair_style << "\n";
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
if (lmp->force->kspace && utils::strmatch(lmp->force->kspace_style, "^pppm/disp/intel")) {
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
cleanup_lammps(lmp, test_config);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
std::cerr << "Skipping kspace style pppm/disp/intel\n";
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
// relax error a bit for USER-INTEL package
|
||||
double epsilon = 7.5 * test_config.epsilon;
|
||||
// relax test precision when using pppm and single precision FFTs
|
||||
@ -947,6 +1023,8 @@ TEST(PairStyle, intel)
|
||||
TEST(PairStyle, opt)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("OPT")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf", "opt"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -1052,6 +1130,8 @@ TEST(PairStyle, opt)
|
||||
|
||||
TEST(PairStyle, single)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -1309,6 +1389,8 @@ TEST(PairStyle, single)
|
||||
|
||||
TEST(PairStyle, extract)
|
||||
{
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 8 Apr 2021
|
||||
date_generated: Thu Apr 8 09:28:11 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -11,32 +11,32 @@ input_file: in.fourmol
|
||||
angle_style: cosine/periodic
|
||||
angle_coeff: ! |
|
||||
1 75.0 1 2
|
||||
2 45.0 1 2
|
||||
2 45.0 -1 2
|
||||
3 50.0 -1 3
|
||||
4 100.0 -1 4
|
||||
equilibrium: 4 3.141592653589793 3.141592653589793 3.141592653589793 3.141592653589793
|
||||
equilibrium: 4 3.141592653589793 1.5707963267948966 2.0943951023931957 2.356194490192345
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 946.676664091363
|
||||
init_stress: ! |2-
|
||||
3.8581448829084906e+00 -6.3926599144452858e+01 6.0068454261544439e+01 1.4347370855129017e+02 1.0109551149053127e+02 4.9470344115369670e+01
|
||||
init_energy: 605.3643061001458
|
||||
init_stress: ! |-
|
||||
-1.7082420754402889e+01 -7.3281097507808681e+00 2.4410530505183818e+01 8.5827033671406951e+01 1.4260977966148616e+02 4.1579557432232576e+01
|
||||
init_forces: ! |2
|
||||
1 7.9609486050127529e+00 -3.9274211736421961e+01 -3.8917410871887981e+01
|
||||
2 4.6997439470662350e+00 3.8052682089524090e+01 3.0599010994189470e+01
|
||||
3 -4.4330179925982058e+01 -1.6514501437366098e+00 1.9894582317318523e+01
|
||||
4 1.1465928779203908e+01 -7.1462736556935234e+00 -1.8983545733370338e+01
|
||||
5 2.7634466780141157e+01 1.5504150132065057e+01 1.0078115065618357e+01
|
||||
6 2.2512674572611367e+01 -5.4260358088923418e+01 -6.0646506351853276e+01
|
||||
3 -7.1532072701475698e+01 9.6873528247272844e+01 7.3410935137796983e+01
|
||||
4 3.1784763224659116e+01 -4.4133218046130608e+01 -6.2234613362865147e+01
|
||||
5 5.8817481848549889e+01 -2.5112568523390145e+01 3.9611729278121981e+00
|
||||
6 -8.7258065964885336e+00 -4.2663580774228997e+01 -1.6819642012415606e+01
|
||||
7 -1.5578858996464229e+01 1.3895348629116569e+01 -3.3939856789628062e+00
|
||||
8 -2.6028225001107934e+00 4.7418887884887312e+01 1.2659217319984802e+02
|
||||
9 9.4419020144376677e+00 -1.3812152922900303e+01 1.2280697239365450e+00
|
||||
10 3.7181742871134183e+01 -2.6592777970320334e+01 -1.0034832175946605e+02
|
||||
11 1.1888648487599809e+01 -1.7288532453781471e+00 -1.8714004234488471e+00
|
||||
12 1.3452345752647041e+01 3.9195153629390539e+01 -3.9429673136141247e+01
|
||||
13 -4.6656310032990458e+00 -1.2502935413462930e+01 1.4918864440944628e+01
|
||||
14 -2.1383527724886850e+01 -9.3422692044635554e+00 7.5125645645164223e+00
|
||||
15 -8.0644375221897171e+00 -2.6783296801963008e+00 6.9267625241565547e+00
|
||||
16 -7.0395776185793807e+01 4.3227686209287491e+01 3.0567216126495769e+01
|
||||
8 -1.6678237064738614e+01 -2.6557373913973738e+01 8.7708427797183326e+00
|
||||
9 -9.4419020144376677e+00 1.3812152922900303e+01 -1.2280697239365450e+00
|
||||
10 1.0844630504236606e+02 1.9274264686364820e+01 1.2594098114786526e+01
|
||||
11 -1.1888648487599809e+01 1.7288532453781471e+00 1.8714004234488471e+00
|
||||
12 9.7432958614920665e+01 1.1284647087939499e+02 -1.3445218835244805e+02
|
||||
13 -2.2887258478933525e+01 -5.9815335453575649e+01 4.1237962971772127e+01
|
||||
14 -4.6498844054867675e+01 -3.0251289808967520e+01 1.5556535565006259e+01
|
||||
15 -5.3477741242848616e+01 -1.7885978453267143e+01 4.6284681424489207e+01
|
||||
16 -7.3215663693592745e+01 1.7514552522777997e+01 7.4857846653898914e+00
|
||||
17 2.0782832048872386e+01 -2.8304296512773977e+01 1.5273484998106287e+01
|
||||
18 1.6481336531704756e+00 1.7222946144801426e+01 -6.9896289164966490e+01
|
||||
19 -2.0180190840279820e+01 -2.5140421523544326e+01 2.9933594625645306e+01
|
||||
@ -50,27 +50,27 @@ init_forces: ! |2
|
||||
27 -8.7971258084923178e+00 7.2217511410368814e+01 -2.4599681382405976e+01
|
||||
28 -1.9235439225569891e+01 -4.3179911322776611e+01 1.0030656861974458e+00
|
||||
29 2.8032565034062209e+01 -2.9037600087592210e+01 2.3596615696208531e+01
|
||||
run_energy: 945.667120914027
|
||||
run_stress: ! |2-
|
||||
4.9007195370705645e+00 -6.4584848054201885e+01 5.9684128517131313e+01 1.4440631784196160e+02 1.0147779649040916e+02 5.0605123164347972e+01
|
||||
run_energy: 603.8182365368202
|
||||
run_stress: ! |-
|
||||
-1.6098625319219664e+01 -7.7961962067566510e+00 2.3894821525976329e+01 8.7036156470651477e+01 1.4262918929621054e+02 4.2523803236880880e+01
|
||||
run_forces: ! |2
|
||||
1 8.0595707378962782e+00 -3.9275884216073550e+01 -3.8921834622274609e+01
|
||||
2 4.6450877231394490e+00 3.7989319504376653e+01 3.0709930231636147e+01
|
||||
3 -4.4174062041610540e+01 -1.3116774304574319e+00 1.9852389406583850e+01
|
||||
4 1.1432955350908090e+01 -7.3978491536336328e+00 -1.8963452260213845e+01
|
||||
5 2.7565769765719310e+01 1.5533965769082254e+01 1.0064393083030197e+01
|
||||
6 2.2437947870916961e+01 -5.4321180615060769e+01 -6.0748488446866872e+01
|
||||
7 -1.5585343433722571e+01 1.3904433399215314e+01 -3.4020204287915634e+00
|
||||
8 -2.7173598979194153e+00 4.7428178462168347e+01 1.2654691883960646e+02
|
||||
9 9.4915406599908749e+00 -1.3885257714808199e+01 1.2160209239091246e+00
|
||||
10 3.7036130179485966e+01 -2.6384482125884212e+01 -1.0013051660330657e+02
|
||||
11 1.1913327728618880e+01 -1.7105485662994653e+00 -1.8898750666441195e+00
|
||||
12 1.3449580650332301e+01 3.9344535800585398e+01 -3.9552691785632291e+01
|
||||
13 -4.6002052262583266e+00 -1.2370495939576998e+01 1.4765847794019894e+01
|
||||
14 -2.1313398317698834e+01 -9.6666833306404527e+00 7.4826992840481967e+00
|
||||
15 -8.0459573339780484e+00 -2.8098768831377434e+00 7.2021609989661499e+00
|
||||
16 -7.0394187900784956e+01 4.3284348202675552e+01 3.0478355256814506e+01
|
||||
17 2.0798603484964556e+01 -2.8350845162531051e+01 1.5290163395115368e+01
|
||||
1 8.1036664069391833e+00 -3.9279459516104339e+01 -3.8959949625007155e+01
|
||||
2 4.6488532958171156e+00 3.7987813821226069e+01 3.0712083303318757e+01
|
||||
3 -7.1419656269516480e+01 9.7015207052323333e+01 7.3123837986656483e+01
|
||||
4 3.1774739774255771e+01 -4.4324760214341296e+01 -6.1918121921961003e+01
|
||||
5 5.8630133295649813e+01 -2.5003101567718115e+01 3.8957656941403842e+00
|
||||
6 -8.6686835699933500e+00 -4.2717543793109854e+01 -1.6944132920021204e+01
|
||||
7 -1.5605967450730276e+01 1.3924972058096937e+01 -3.4081311693274161e+00
|
||||
8 -1.6735469954990947e+01 -2.6654949908594496e+01 8.9412902423392993e+00
|
||||
9 -9.4705763934675620e+00 1.3861186924074314e+01 -1.2218212802251793e+00
|
||||
10 1.0864309846473817e+02 1.9311615651482960e+01 1.2534898619395602e+01
|
||||
11 -1.1889594908454491e+01 1.6849924892427488e+00 1.9039966312260486e+00
|
||||
12 9.6643785665770423e+01 1.1329932305772147e+02 -1.3435213826206018e+02
|
||||
13 -2.2815824864999897e+01 -5.9701629573330088e+01 4.1148977584672039e+01
|
||||
14 -4.6226658006998740e+01 -3.0469540424436548e+01 1.5534272011399247e+01
|
||||
15 -5.3141801628038777e+01 -1.8156497866651446e+01 4.6272398149175629e+01
|
||||
16 -7.3254211788300807e+01 1.7569251761827239e+01 7.4522974142679850e+00
|
||||
17 2.0784167932320894e+01 -2.8346879951708846e+01 1.5284477542010659e+01
|
||||
18 1.7456021018344252e+00 1.7528557172698406e+01 -7.0852460721917453e+01
|
||||
19 -2.0389936120749365e+01 -2.5462340563923114e+01 3.0421727677614534e+01
|
||||
20 1.8644334018914940e+01 7.9337833912247095e+00 4.0430733044302912e+01
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 29 Oct 2020
|
||||
date_generated: Sat Nov 14 17:18:12 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
epsilon: 2.5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
angle harmonic
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:35 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:24 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:35 202
|
||||
epsilon: 2.5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:25 2021
|
||||
epsilon: 4e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
angle quartic
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:35 202
|
||||
epsilon: 2.5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:25 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
angle table
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:35 202
|
||||
epsilon: 2.5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:25 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
angle table
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:35 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:25 2021
|
||||
epsilon: 1e-14
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:58 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair adp
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:58 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair atm
|
||||
pre_commands: ! |
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on"
|
||||
post_commands: ! ""
|
||||
input_file: in.metal
|
||||
pair_style: atm 12.0 5.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
epsilon: 5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:59 2021
|
||||
epsilon: 2e-12
|
||||
prerequisites: ! |
|
||||
pair beck
|
||||
pre_commands: ! ""
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:59 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair born
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:59 2021
|
||||
epsilon: 5e-14
|
||||
prerequisites: ! |
|
||||
pair colloid
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:59 2021
|
||||
epsilon: 5e-14
|
||||
prerequisites: ! |
|
||||
pair colloid
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:59 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair colloid
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:59 2021
|
||||
epsilon: 5e-14
|
||||
prerequisites: ! |
|
||||
pair colloid
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:59 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair colloid
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:21 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:00 2021
|
||||
epsilon: 6e-12
|
||||
prerequisites: ! |
|
||||
pair eam
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:00 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/alloy
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:00 2021
|
||||
epsilon: 7.5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/alloy
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:00 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/cd
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:00 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/cd/old
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:00 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/cd
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:01 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/fs
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:01 2021
|
||||
epsilon: 7.5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/fs
|
||||
|
||||
89
unittest/force-styles/tests/atomic-pair-eam_he.yaml
Normal file
89
unittest/force-styles/tests/atomic-pair-eam_he.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:01 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/he
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.metal
|
||||
pair_style: eam/he
|
||||
pair_coeff: ! |
|
||||
* * PdHHe.eam.he Pd He
|
||||
extract: ! ""
|
||||
natoms: 32
|
||||
init_vdwl: -15.3146152609365
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
1.0127679615895376e+02 9.3559970433415444e+01 9.1432412459889193e+01 4.0035576925472673e+00 -9.7686923241135581e-01 2.8980241224200443e+00
|
||||
init_forces: ! |2
|
||||
1 1.2005847856522014e+00 2.2040396377071869e+00 -1.0711805842453261e+00
|
||||
2 -1.5935390465573379e-01 -8.3057674140080351e-01 3.5885201320339977e-01
|
||||
3 -8.3922102051696701e-02 4.1053523947712707e+00 3.2379570522514384e-01
|
||||
4 9.6680271004438867e-01 -6.0272944088190550e-01 1.7088406391974090e-01
|
||||
5 -1.5118032750014099e-01 4.8152982355843301e+00 -2.3396251503834162e-01
|
||||
6 6.9769996639420007e-01 2.1986594375389688e+00 3.7782787462812606e-01
|
||||
7 -1.9293747297385899e+00 2.3965302429887498e+00 5.3526894592078611e-01
|
||||
8 -5.7898968354416502e-01 -1.7424269600946102e-01 4.6553500563912831e-01
|
||||
9 -1.9170501143342826e+00 -1.5811474204082574e+00 -1.5153955037081890e+00
|
||||
10 -1.0389874633978984e+00 -1.0136677465869111e+00 -2.8606245342679020e+00
|
||||
11 -6.8937210559650852e-01 -4.9861949626741522e+00 1.7468278589450823e+00
|
||||
12 -1.0247245841335400e+00 -2.9144176183755111e+00 1.0162869145592908e+00
|
||||
13 8.8392380716960872e-01 -2.1032444766660849e-01 -4.5408294970791102e-01
|
||||
14 3.9708226038326155e-01 -7.8680161984030961e-01 -1.9977901194159892e-01
|
||||
15 -7.8687732774064545e-02 -2.1157301146984339e-01 3.4042801915998766e-01
|
||||
16 4.0325457730206029e+00 -2.3548979291247609e+00 9.2949967143894952e-01
|
||||
17 7.4997446543261548e-01 2.0845833390037725e+00 1.7238817466288217e+00
|
||||
18 -2.1412087035667221e-01 -5.6906054172322229e-01 -5.2781467006833294e-01
|
||||
19 -3.0256742141254084e-01 6.0688322127888294e-01 -9.1127162282408275e-02
|
||||
20 2.3174481031809935e-01 3.0892939020181726e-01 -3.7137738763066941e-01
|
||||
21 1.1702211057625094e+00 4.2920154821923315e+00 1.3460541385609648e+00
|
||||
22 3.8027613826247031e-02 4.3239633632972230e-01 -3.8188409283423194e-02
|
||||
23 1.4000432801696054e+00 1.0040601640391840e+00 -2.4122350019076917e+00
|
||||
24 -1.5604155772955447e-01 3.4572668285914510e-01 -2.8556703863036959e-01
|
||||
25 -2.9449464597969849e-01 -3.4630638648128692e-01 1.1805865362173559e-01
|
||||
26 -1.8108866036308173e+00 -1.8950909756776353e+00 3.3196635723271326e+00
|
||||
27 -7.7538420123902196e-01 -1.2937697587184989e+00 -9.6725767253143236e-01
|
||||
28 -3.5707629120214823e-01 -2.8995606245962768e-01 -1.2007211500278167e-01
|
||||
29 3.6987879522593697e-01 -4.9287949481541249e-01 5.4972323630766012e-02
|
||||
30 1.1712105233973889e-01 -6.9110122964840481e-01 9.5437848811806628e-02
|
||||
31 1.9388288555816860e-01 -2.0146460156127194e-01 -2.0863139798712499e-01
|
||||
32 -8.8731897202011578e-01 -3.3482718789714783e+00 -1.5659784019873610e+00
|
||||
run_vdwl: -15.3236335310355
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
1.0125543392557182e+02 9.3539230810233988e+01 9.1388997082229878e+01 4.0040941706030253e+00 -9.7826716756924303e-01 2.9018476991088571e+00
|
||||
run_forces: ! |2
|
||||
1 1.1949883047712304e+00 2.2060858143622002e+00 -1.0733885545165418e+00
|
||||
2 -1.5963527935293531e-01 -8.3496477000211577e-01 3.6354718487355586e-01
|
||||
3 -8.4458087648033864e-02 4.1335068175946956e+00 3.2562083254074076e-01
|
||||
4 9.7516402928123347e-01 -6.1050193540570252e-01 1.7035859794498676e-01
|
||||
5 -1.5399721579534215e-01 4.8120569088649683e+00 -2.3294021119313149e-01
|
||||
6 6.9813149221746262e-01 2.1977391468237610e+00 3.7752101367086355e-01
|
||||
7 -1.9335938530288574e+00 2.3989898112356141e+00 5.3226592065468015e-01
|
||||
8 -5.8346129298071359e-01 -1.7815682091755050e-01 4.6582930751668622e-01
|
||||
9 -1.9172329351091069e+00 -1.5829627245185132e+00 -1.5163042130781048e+00
|
||||
10 -1.0334176082685609e+00 -1.0148545000176199e+00 -2.8584769425899079e+00
|
||||
11 -6.8756244404382794e-01 -4.9891360565883884e+00 1.7443920243481270e+00
|
||||
12 -1.0236334662680082e+00 -2.9150791430800980e+00 1.0158839648906106e+00
|
||||
13 8.8312645129364897e-01 -2.1071143805836662e-01 -4.5244072317123446e-01
|
||||
14 3.9927871470591697e-01 -7.8979672016550584e-01 -2.0106817979273284e-01
|
||||
15 -7.8923521050882781e-02 -2.1032668862489418e-01 3.3903131601122610e-01
|
||||
16 4.0274555753165444e+00 -2.3555929271854597e+00 9.2684665883544881e-01
|
||||
17 7.5117151275169469e-01 2.0849083749786277e+00 1.7261549167735377e+00
|
||||
18 -2.1494836879728668e-01 -5.7509260272248663e-01 -5.3373034744908598e-01
|
||||
19 -3.0249976756523766e-01 6.0674463278548640e-01 -9.1809428603960672e-02
|
||||
20 2.3156742504597116e-01 3.0887145855490367e-01 -3.7127049070468199e-01
|
||||
21 1.1686499084188677e+00 4.2891627780548545e+00 1.3459230037755703e+00
|
||||
22 3.8179702424449569e-02 4.3243601345801236e-01 -3.8079863481504578e-02
|
||||
23 1.4067770990537660e+00 1.0070141778822215e+00 -2.4069585948142982e+00
|
||||
24 -1.5591693014836788e-01 3.4568121542161234e-01 -2.8546260901671355e-01
|
||||
25 -2.9429104311734711e-01 -3.4618233584978003e-01 1.1804410855998390e-01
|
||||
26 -1.8072996525588660e+00 -1.8933503719653344e+00 3.3208542120004427e+00
|
||||
27 -7.7461160804433704e-01 -1.2927908441630280e+00 -9.6864680654489232e-01
|
||||
28 -3.5780846246953718e-01 -2.8988724628268286e-01 -1.1924240028778682e-01
|
||||
29 3.6970648233559189e-01 -4.9268726775164107e-01 5.5185028378882096e-02
|
||||
30 1.1705695741665428e-01 -6.9122064837750197e-01 9.5592509524696681e-02
|
||||
31 1.9349589373949760e-01 -1.9991899011439837e-01 -2.0661879538790651e-01
|
||||
32 -8.9145801252527535e-01 -3.3499831182258872e+00 -1.5666124396675569e+00
|
||||
...
|
||||
90
unittest/force-styles/tests/atomic-pair-eam_he_real.yaml
Normal file
90
unittest/force-styles/tests/atomic-pair-eam_he_real.yaml
Normal file
@ -0,0 +1,90 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:02 2021
|
||||
epsilon: 7.5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/he
|
||||
pre_commands: ! |
|
||||
variable units index real
|
||||
post_commands: ! ""
|
||||
input_file: in.metal
|
||||
pair_style: eam/he
|
||||
pair_coeff: ! |
|
||||
* * PdHHe.eam.he Pd He
|
||||
extract: ! ""
|
||||
natoms: 32
|
||||
init_vdwl: -353.163435640974
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
2.3354985203865667e+03 2.1575442826183294e+03 2.1084816277194832e+03 9.2324238343315059e+01 -2.2527140800613445e+01 6.6830027278251166e+01
|
||||
init_forces: ! |2
|
||||
1 2.7686144278186653e+01 5.0826364063289034e+01 -2.4702012350837244e+01
|
||||
2 -3.6747885266547895e+00 -1.9153555643332677e+01 8.2753244342250110e+00
|
||||
3 -1.9352897465461538e+00 9.4671680061884146e+01 7.4669067263334208e+00
|
||||
4 2.2295001268309708e+01 -1.3899271805198000e+01 3.9406803293404700e+00
|
||||
5 -3.4863013501526918e+00 1.1104342091130563e+02 -5.3953040422049119e+00
|
||||
6 1.6089344262331657e+01 5.0702293693679884e+01 8.7129182164280419e+00
|
||||
7 -4.4492440494497494e+01 5.5265303098423985e+01 1.2343595755584241e+01
|
||||
8 -1.3351819967863772e+01 -4.0181322292175965e+00 1.0735492808756252e+01
|
||||
9 -4.4208228097061294e+01 -3.6462127564548197e+01 -3.4945852267642280e+01
|
||||
10 -2.3959621310073842e+01 -2.3375734739886113e+01 -6.5967572243087659e+01
|
||||
11 -1.5897299220341502e+01 -1.1498439326030027e+02 4.0282809435768357e+01
|
||||
12 -2.3630711483916183e+01 -6.7208070295011467e+01 2.3436134191253181e+01
|
||||
13 2.0383768267501306e+01 -4.8501972313137021e+00 -1.0471402111803629e+01
|
||||
14 9.1569349225997474e+00 -1.8144077307608963e+01 -4.6070136940518891e+00
|
||||
15 -1.8145823173352931e+00 -4.8789897980772752e+00 7.8504570168111005e+00
|
||||
16 9.2992719393484805e+01 -5.4305239084580101e+01 2.1434772718702309e+01
|
||||
17 1.7294822908857860e+01 4.8071636233680366e+01 3.9753659488339430e+01
|
||||
18 -4.9377448227825411e+00 -1.3122848506373817e+01 -1.2171696062028875e+01
|
||||
19 -6.9773708472871210e+00 1.3995060261579386e+01 -2.1014423910442734e+00
|
||||
20 5.3441625538361990e+00 7.1240813402889511e+00 -8.5641664449490893e+00
|
||||
21 2.6985941150269763e+01 9.8976233335854843e+01 3.1040747418937880e+01
|
||||
22 8.7693765199327156e-01 9.9712969013523196e+00 -8.8064568351232408e-01
|
||||
23 3.2285766664472092e+01 2.3154178611774061e+01 -5.5627463461007146e+01
|
||||
24 -3.5984039880587519e+00 7.9726471106807173e+00 -6.5853326871205784e+00
|
||||
25 -6.7912082138528707e+00 -7.9860153944650030e+00 2.7224973667181924e+00
|
||||
26 -4.1760039256471202e+01 -4.3701838304071202e+01 7.6553264473163750e+01
|
||||
27 -1.7880785366498504e+01 -2.9835040915646299e+01 -2.2305492953037302e+01
|
||||
28 -8.2343753100058397e+00 -6.6865459861976770e+00 -2.7689288915546530e+00
|
||||
29 8.5296080813687887e+00 -1.1366071741285882e+01 1.2676919627309815e+00
|
||||
30 2.7008757664122220e+00 -1.5937173770267322e+01 2.2008491889792485e+00
|
||||
31 4.4710457826753673e+00 -4.6458843160683996e+00 -4.8111545762194012e+00
|
||||
32 -2.0462062632899592e+01 -7.7212987730343386e+01 -3.6112321671970648e+01
|
||||
run_vdwl: -353.230598025017
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
2.3352018947327042e+03 2.1575803047701361e+03 2.1079997407908877e+03 9.2286943467903825e+01 -2.2591362673321409e+01 6.6981941401935686e+01
|
||||
run_forces: ! |2
|
||||
1 2.7570840184953529e+01 5.0878936563954468e+01 -2.4745193716885819e+01
|
||||
2 -3.6751057733124783e+00 -1.9167341173087838e+01 8.2931871358142466e+00
|
||||
3 -1.9458273195805660e+00 9.4745013001500453e+01 7.4613246126708113e+00
|
||||
4 2.2322999682742939e+01 -1.3910836126089546e+01 3.9444558071725182e+00
|
||||
5 -3.5611755339443869e+00 1.1098583048019351e+02 -5.3589546434886657e+00
|
||||
6 1.6098529359830774e+01 5.0681471667414634e+01 8.7065695410635300e+00
|
||||
7 -4.4532333454110486e+01 5.5329574524982760e+01 1.2275125678150991e+01
|
||||
8 -1.3365798458276837e+01 -4.0311665119688325e+00 1.0738893622536514e+01
|
||||
9 -4.4219909611484340e+01 -3.6506027825529728e+01 -3.4970646977778003e+01
|
||||
10 -2.3838805073020580e+01 -2.3388505371089686e+01 -6.5920271795280030e+01
|
||||
11 -1.5863107119046816e+01 -1.1501474143750076e+02 4.0236861649778703e+01
|
||||
12 -2.3597639915238879e+01 -6.7219256881236532e+01 2.3428611972869568e+01
|
||||
13 2.0372282061050672e+01 -4.8599967847476790e+00 -1.0435173423332810e+01
|
||||
14 9.1868968538149876e+00 -1.8180822851027013e+01 -4.6226879613716969e+00
|
||||
15 -1.8187982708833512e+00 -4.8633248636475823e+00 7.8331412550634454e+00
|
||||
16 9.2883964220226872e+01 -5.4312212635591663e+01 2.1376066838247318e+01
|
||||
17 1.7335571325471630e+01 4.8086629272887443e+01 3.9799611586568851e+01
|
||||
18 -4.9380025631152833e+00 -1.3140883981374724e+01 -1.2192856535881621e+01
|
||||
19 -6.9765790243039625e+00 1.3993117559236460e+01 -2.1082447485751517e+00
|
||||
20 5.3413030155749288e+00 7.1244381338347607e+00 -8.5630059362592803e+00
|
||||
21 2.6939069851048053e+01 9.8929039552947501e+01 3.1025635765431552e+01
|
||||
22 8.7771899094057326e-01 9.9759331856305540e+00 -8.7675403015085085e-01
|
||||
23 3.2451609933852048e+01 2.3224549699639688e+01 -5.5509981817200973e+01
|
||||
24 -3.5964621834607793e+00 7.9732311561843838e+00 -6.5839559665478173e+00
|
||||
25 -6.7879787318782503e+00 -7.9847098239766732e+00 2.7230073490545976e+00
|
||||
26 -4.1688921616984544e+01 -4.3653314583134815e+01 7.6583618010794297e+01
|
||||
27 -1.7863754347437737e+01 -2.9811723761490370e+01 -2.2339924855988965e+01
|
||||
28 -8.2430574229283415e+00 -6.6852368720976481e+00 -2.7583576098041354e+00
|
||||
29 8.5269603298722565e+00 -1.1364005508745327e+01 1.2731276160949609e+00
|
||||
30 2.6994843727982003e+00 -1.5940803816308822e+01 2.2046514286792602e+00
|
||||
31 4.4654048480426765e+00 -4.6271939008948024e+00 -4.7862215560852475e+00
|
||||
32 -2.0559378611212470e+01 -7.7265660088866639e+01 -3.6131658295360147e+01
|
||||
...
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:02 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:02 2021
|
||||
epsilon: 7.5e-13
|
||||
prerequisites: ! |
|
||||
pair edip
|
||||
pre_commands: ! |
|
||||
echo screen
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on"
|
||||
atom_modify map array
|
||||
units metal
|
||||
lattice diamond 5.43
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:02 2021
|
||||
epsilon: 1e-11
|
||||
prerequisites: ! |
|
||||
pair eim
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:22 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:02 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair gauss
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
epsilon: 5e-12
|
||||
lammps_version: 8 Apr 2021
|
||||
date_generated: Mon Apr 19 08:49:08 2021
|
||||
epsilon: 1e-11
|
||||
prerequisites: ! |
|
||||
pair eam/fs
|
||||
pre_commands: ! ""
|
||||
@ -13,7 +13,7 @@ pair_coeff: ! |
|
||||
2 2 eam Ni_u3.eam
|
||||
extract: ! ""
|
||||
natoms: 32
|
||||
init_vdwl: 0.713225916338978
|
||||
init_vdwl: 0.7132259163389776
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
2.6556151567263032e+02 2.6660724159085703e+02 2.4812081237895359e+02 6.0264893464561915e+00 -6.6027371615114303e+00 -1.4187579099120772e+01
|
||||
@ -50,7 +50,7 @@ init_forces: ! |2
|
||||
30 -8.7442364632334701e-01 -8.5922993943854902e+00 -3.1671240722317777e+00
|
||||
31 3.1880080741982892e+00 -5.0021160844369490e+00 -2.7083467494366831e-01
|
||||
32 -1.5986786450380142e+01 -5.5759911113046883e+00 -1.5504124024744577e+00
|
||||
run_vdwl: 0.669352105052575
|
||||
run_vdwl: 0.6693521050525746
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
2.6541041873586806e+02 2.6644256162479292e+02 2.4793398704069506e+02 5.9903981717659827e+00 -6.6045526000630410e+00 -1.4160943794248436e+01
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
lammps_version: 8 Apr 2021
|
||||
date_generated: Mon Apr 19 08:49:08 2021
|
||||
epsilon: 5e-12
|
||||
prerequisites: ! |
|
||||
pair eam/fs
|
||||
@ -13,7 +13,7 @@ pair_coeff: ! |
|
||||
* * eam/fs AlFe_mm.eam.fs NULL Al
|
||||
extract: ! ""
|
||||
natoms: 32
|
||||
init_vdwl: 15.6583494469006
|
||||
init_vdwl: 15.658349446900637
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
3.1757662346015599e+02 3.1488042003987044e+02 2.9518192213010605e+02 8.0970202601485379e+00 -4.6038792816319125e+00 -1.1521259274290610e+01
|
||||
@ -50,7 +50,7 @@ init_forces: ! |2
|
||||
30 -2.0584055270338175e+00 -5.2207163606526530e+00 -4.6304543222177532e+00
|
||||
31 1.2014109675977875e+00 -6.5554529419137078e+00 2.1453874832093329e+00
|
||||
32 -1.5986786450380142e+01 -5.5759911113046883e+00 -1.5504124024744577e+00
|
||||
run_vdwl: 15.6055369596825
|
||||
run_vdwl: 15.605536959682482
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
3.1739734448741643e+02 3.1467775824072135e+02 2.9494960877836593e+02 8.0575431550134713e+00 -4.6069278562709943e+00 -1.1484582135772436e+01
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:03 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair kim
|
||||
|
||||
91
unittest/force-styles/tests/atomic-pair-lj_relres.yaml
Normal file
91
unittest/force-styles/tests/atomic-pair-lj_relres.yaml
Normal file
@ -0,0 +1,91 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Sun Feb 28 23:32:03 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair born
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.metal
|
||||
pair_style: lj/relres 4.0 5.0 7.0 8.0
|
||||
pair_coeff: ! |
|
||||
1 1 0.00121585 3.905 0 3.905
|
||||
1 2 0.00121585 3.905 0.00121585 3.905
|
||||
2 2 0.00121585 3.905 0.00121585 3.905
|
||||
extract: ! ""
|
||||
natoms: 32
|
||||
init_vdwl: 278.180950996338
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
1.1877397131221412e+03 1.1638761902735005e+03 1.0939934354329380e+03 6.8492993891187240e+01 -3.1686913926055702e+00 -3.0318931219574608e+01
|
||||
init_forces: ! |2
|
||||
1 1.1257725802206693e-01 1.5003115850475984e+01 3.7161715906573249e+00
|
||||
2 -3.9371074133244033e+00 -1.5797318896888202e+01 9.8265483014448343e+00
|
||||
3 -9.8213019857385877e+00 4.5398626929289222e+01 -1.1984345677554444e+01
|
||||
4 3.8619783724436347e+00 -2.2367670285503563e+00 -9.8667499113042698e+00
|
||||
5 1.7421331278287461e+01 3.5003615980663376e+01 5.4604696757275848e+00
|
||||
6 9.1359404522604510e+00 4.9829473194427507e+00 -2.4129924428156402e+00
|
||||
7 -1.5766701507678247e+01 2.0974333341024735e+01 -2.6155159105794188e+00
|
||||
8 -1.5183115657866077e+01 -1.2451351620442299e+01 1.1636254945740577e+01
|
||||
9 3.8090425554608491e+00 -1.0907791092741443e+01 -6.1447809963829947e+00
|
||||
10 -1.0395436945303533e+01 -3.8367074884512746e+01 -2.5800182132854442e+01
|
||||
11 -7.9545805384553478e+00 -1.0115999734551822e+01 9.0610883954699659e+00
|
||||
12 9.1249981420231450e+00 -2.0896442188182313e+01 -1.2969177591443883e+00
|
||||
13 -4.5921575862854080e+00 4.6114711730821698e+00 -1.0000636415917823e+01
|
||||
14 1.2749517192690996e+01 -3.9970170399846938e+00 1.6639389558970819e+01
|
||||
15 -6.5965824174094028e+00 6.6153731373766966e+00 -5.6427929840815771e+00
|
||||
16 2.4351513585083858e+01 -2.0415196023133920e+01 8.4814988111712459e+00
|
||||
17 1.0299109427501774e+01 2.9546303629211895e+01 -1.9341947600693978e+00
|
||||
18 -3.7195187867020032e+01 -1.1030315937513105e+01 -1.6710107278365474e+01
|
||||
19 -3.9497427656163509e+01 -2.2552418505155995e+01 8.0707729455886117e+00
|
||||
20 4.7864511359094548e+00 3.9752456387755553e+00 -7.5621289377276177e+00
|
||||
21 3.8528644298025895e+01 1.3519655659162099e+01 8.5256493265734801e-01
|
||||
22 1.1077729180999789e+00 -1.6208072481067383e+01 -3.0979650557204157e+00
|
||||
23 1.4113913436346907e+01 3.1494001129414158e+01 -1.8142897754964714e+01
|
||||
24 3.3881181432547542e+01 2.4370415248363962e+01 2.0078166368292568e+01
|
||||
25 1.4753375696198107e+01 -1.6860224492541906e-01 -1.0357256153984068e+01
|
||||
26 -1.4396504175389046e+01 -3.8109515237450715e+01 3.1516681941309770e+01
|
||||
27 1.1459132062617343e+01 -2.7648747331934835e+00 -6.0134710728971097e-01
|
||||
28 8.6792370740090519e-01 1.3711362475104321e+01 1.7060845401384995e+01
|
||||
29 1.4886320532090263e+01 2.6415990570893030e+01 -6.3587763727632818e-01
|
||||
30 -8.3053344792491117e+00 -6.7854505410487436e+00 -1.9926676569327796e+01
|
||||
31 -3.9722675775001202e+00 -2.6202171362782902e+01 1.7034787150328516e+01
|
||||
32 -4.7637017675627781e+01 -1.6616078530154439e+01 -4.7018745333836263e+00
|
||||
run_vdwl: 277.787230338519
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
1.1861045479571328e+03 1.1621545499754693e+03 1.0925950582629255e+03 6.7871794269310669e+01 -3.2811225906376507e+00 -3.0119921761225132e+01
|
||||
run_forces: ! |2
|
||||
1 5.0761504793041319e-02 1.4972569031846831e+01 3.7082674582636526e+00
|
||||
2 -3.9381058430565288e+00 -1.5782802165860760e+01 9.8125660936307053e+00
|
||||
3 -9.7425327584084691e+00 4.5033863259233172e+01 -1.1963779315033937e+01
|
||||
4 3.8461752102094633e+00 -2.2100266107527706e+00 -9.8627527183535459e+00
|
||||
5 1.7286298464840606e+01 3.4803069057765718e+01 5.5124972577097848e+00
|
||||
6 9.1365148074930023e+00 4.9905844771929031e+00 -2.4069911355223432e+00
|
||||
7 -1.5710733381690963e+01 2.0948145953415406e+01 -2.6352545999033143e+00
|
||||
8 -1.5191011151562712e+01 -1.2423405537748620e+01 1.1609656474941872e+01
|
||||
9 3.8300649394200663e+00 -1.0939289188313623e+01 -6.1652357236607127e+00
|
||||
10 -1.0179095304450680e+01 -3.8138499760472136e+01 -2.5614937128525611e+01
|
||||
11 -7.9328424473210770e+00 -1.0126931858947339e+01 9.0323728831931760e+00
|
||||
12 9.1240445709604625e+00 -2.0801517592482849e+01 -1.2864845436518126e+00
|
||||
13 -4.6154026287895666e+00 4.5678314059294269e+00 -9.9574005013456635e+00
|
||||
14 1.2739453844823467e+01 -3.8639640724167696e+00 1.6503517451482374e+01
|
||||
15 -6.5851001501170838e+00 6.5954448786505750e+00 -5.6251052965943709e+00
|
||||
16 2.4131969420516253e+01 -2.0319213195026325e+01 8.4318175142187748e+00
|
||||
17 1.0274453472246744e+01 2.9448733262109759e+01 -1.9321994588155988e+00
|
||||
18 -3.6997902937678973e+01 -1.0947728341166549e+01 -1.6629476705430637e+01
|
||||
19 -3.9256632036490366e+01 -2.2382462798833316e+01 8.0133124681507351e+00
|
||||
20 4.7785967094492916e+00 3.9919292918758300e+00 -7.5598392292642806e+00
|
||||
21 3.8336179494883886e+01 1.3372767736301565e+01 8.9441495342140864e-01
|
||||
22 1.1374772919402263e+00 -1.6159423036575365e+01 -3.0958996778988328e+00
|
||||
23 1.4060431172656273e+01 3.1322405912593315e+01 -1.8048650528231175e+01
|
||||
24 3.3628163932173699e+01 2.4221707885083035e+01 1.9997423960892526e+01
|
||||
25 1.4719235839277802e+01 -1.3664529090023003e-01 -1.0322356751316049e+01
|
||||
26 -1.4249543090594170e+01 -3.7792175725759691e+01 3.1320364026272529e+01
|
||||
27 1.1432267884704974e+01 -2.7686316107074638e+00 -6.2637494606673982e-01
|
||||
28 8.4057547201635785e-01 1.3690742783314787e+01 1.7006819241247609e+01
|
||||
29 1.4764759789215882e+01 2.6280384715684544e+01 -6.1061690968417726e-01
|
||||
30 -8.2772161889870315e+00 -6.7692020199003098e+00 -1.9822795745009806e+01
|
||||
31 -4.0013247597925483e+00 -2.6130935247333245e+01 1.6988712159243850e+01
|
||||
32 -4.7439981142681432e+01 -1.6547325597799496e+01 -4.6655910283603808e+00
|
||||
...
|
||||
@ -1,12 +1,12 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:03 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair meam/c
|
||||
pre_commands: ! |
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on"
|
||||
post_commands: ! ""
|
||||
input_file: in.metal
|
||||
pair_style: meam/c
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:03 2021
|
||||
epsilon: 1e-14
|
||||
prerequisites: ! |
|
||||
pair meam/spline
|
||||
pre_commands: ! |
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on"
|
||||
post_commands: ! ""
|
||||
input_file: in.metal
|
||||
pair_style: meam/spline
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:03 2021
|
||||
epsilon: 1e-14
|
||||
prerequisites: ! |
|
||||
pair meam/sw/spline
|
||||
pre_commands: ! |
|
||||
echo screen
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on"
|
||||
atom_modify map array
|
||||
units metal
|
||||
lattice diamond 5.43
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:03 2021
|
||||
epsilon: 2.5e-12
|
||||
prerequisites: ! |
|
||||
pair momb
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:23 202
|
||||
epsilon: 1e-12
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:04 2021
|
||||
epsilon: 1e-14
|
||||
prerequisites: ! |
|
||||
pair polymorphic
|
||||
pre_commands: ! |
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on"
|
||||
post_commands: ! |
|
||||
change_box all x final 0 18 y final 0 18 z final 0 18
|
||||
input_file: in.metal
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:24 202
|
||||
epsilon: 2.5e-11
|
||||
epsilon: 5e-11
|
||||
prerequisites: ! |
|
||||
pair reax/c
|
||||
fix qeq/reax
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:25 202
|
||||
epsilon: 1e-10
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:06 2021
|
||||
epsilon: 2e-10
|
||||
prerequisites: ! |
|
||||
pair reax/c
|
||||
fix qeq/reax
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:26 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:08 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair reax/c
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:27 202
|
||||
epsilon: 5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:09 2021
|
||||
epsilon: 2e-12
|
||||
prerequisites: ! |
|
||||
pair table
|
||||
pre_commands: ! ""
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:27 202
|
||||
epsilon: 5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:10 2021
|
||||
epsilon: 2e-12
|
||||
prerequisites: ! |
|
||||
pair table
|
||||
pre_commands: ! ""
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:27 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:10 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
pair table
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:27 202
|
||||
epsilon: 5e-13
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:10 2021
|
||||
epsilon: 2e-12
|
||||
prerequisites: ! |
|
||||
pair table
|
||||
pre_commands: ! ""
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:27 202
|
||||
epsilon: 5e-14
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:10 2021
|
||||
epsilon: 2e-13
|
||||
prerequisites: ! |
|
||||
atom sphere
|
||||
pair yukawa/colloid
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:21 2021
|
||||
epsilon: 1e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:21 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:21 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 29 Oct 2020
|
||||
date_generated: Sat Nov 14 16:49:01 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:21 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:21 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 350.0 1.3
|
||||
4 650.0 1.2
|
||||
5 450.0 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! |
|
||||
kappa 1
|
||||
r0 1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:21 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 350.0 1.3
|
||||
4 650.0 1.2
|
||||
5 450.0 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! |
|
||||
kappa 1
|
||||
r0 1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 350.0 1.3 0.3
|
||||
4 650.0 1.2 0.2
|
||||
5 450.0 1.0 0.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: -9395.51998238922
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 350.0 1.3 0.3
|
||||
4 650.0 1.2 0.2
|
||||
5 450.0 1.0 0.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -16,7 +16,7 @@ bond_coeff: ! |
|
||||
3 morse 7000.0 0.2 1.3
|
||||
4 harmonic 650.0 1.2
|
||||
5 harmonic 450.0 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 4.63957309438403
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 350.0 1.3
|
||||
4 650.0 1.2
|
||||
5 450.0 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 4.24726500827314
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 7000.0 0.2 1.3
|
||||
4 7500.0 0.4 1.2
|
||||
5 7000.0 0.3 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! |
|
||||
r0 1
|
||||
natoms: 29
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 350.0 1.3 2.0
|
||||
4 650.0 1.2 1.4
|
||||
5 450.0 1.0 1.1
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 1.94517280328209
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 10:06:36 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:33 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:22 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 ${input_dir}/bond_table.txt harmonic_3
|
||||
4 ${input_dir}/bond_table.txt harmonic_4
|
||||
5 ${input_dir}/bond_table.txt harmonic_5
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 4.83475893645922
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 ${input_dir}/bond_table.txt harmonic_3
|
||||
4 ${input_dir}/bond_table.txt harmonic_4
|
||||
5 ${input_dir}/bond_table.txt harmonic_5
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 4.78937402460163
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
lammps_version: 24 Aug 2020
|
||||
date_generated: Tue Sep 15 09:44:34 202
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:23 2021
|
||||
epsilon: 1e-14
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
@ -15,7 +15,7 @@ bond_coeff: ! |
|
||||
3 1.3
|
||||
4 1.2
|
||||
5 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1.0
|
||||
equilibrium: 5 1.5 1.1 1.3 1.2 1
|
||||
extract: ! |
|
||||
r0 1
|
||||
natoms: 29
|
||||
|
||||
@ -46,6 +46,19 @@ Angle Coeffs # zero
|
||||
3 120
|
||||
4 108.5
|
||||
|
||||
Dihedral Coeffs # zero
|
||||
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
||||
Improper Coeffs # zero
|
||||
|
||||
1
|
||||
2
|
||||
|
||||
Atoms # full
|
||||
|
||||
10 2 1 7.0000000000000007e-02 2.0185283555536988e+00 -1.4283966846517357e+00 -9.6733527271133024e-01 0 0 0
|
||||
|
||||
89
unittest/force-styles/tests/dihedral-charmm.yaml
Normal file
89
unittest/force-styles/tests/dihedral-charmm.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:34 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral charmm
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
special_bonds charmm
|
||||
pair_style lj/charmm/coul/charmm 7.0 8.0
|
||||
pair_coeff * * 0.1 3.0
|
||||
input_file: in.fourmol
|
||||
dihedral_style: charmm
|
||||
dihedral_coeff: ! |
|
||||
1 75.0 2 160 0.5
|
||||
2 45.0 4 120 1.0
|
||||
3 56.0 0 110 0.0
|
||||
4 23.0 1 180 0.5
|
||||
5 19.0 3 90 1.0
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 1317.95984412099
|
||||
init_stress: ! |2-
|
||||
1.1266474992363544e+02 -1.4270359924600960e+01 -9.8394389999034431e+01 -1.4122826669412839e+02 1.1178234052730829e+02 -5.8711817976295805e+01
|
||||
init_forces: ! |2
|
||||
1 -9.0728070828324405e+00 -4.2409023620772402e+01 1.3161109399402682e+02
|
||||
2 3.3181828946933209e+01 1.4051671303009513e+01 6.3548249417335567e+00
|
||||
3 5.5350289840861464e+01 1.1131831288815475e+02 -3.9480881018342950e+02
|
||||
4 -1.1844907978543657e+02 -2.8998271771801804e+01 1.2935080865553104e+02
|
||||
5 -1.1583671402383914e+01 5.0372406935691121e+00 -3.9128008893243305e-02
|
||||
6 1.0321597937823311e+02 2.6974953442199936e+01 1.1570366758787367e+02
|
||||
7 -8.9000331915157602e+01 -2.3564688140264529e+01 3.2374751781728959e+00
|
||||
8 -5.6173305934035355e+01 1.4732923726825511e+01 -6.4812947497159044e+01
|
||||
9 -1.0285573098962932e+02 -4.0305092163391558e+00 3.5869756696647038e+01
|
||||
10 -4.3851647747590441e+01 -1.5710005359777315e+02 1.3867075586374912e+02
|
||||
11 -2.1619094578728090e+02 -3.3233741870916771e+02 1.4579886837322184e+02
|
||||
12 7.1261053740020756e+01 -4.9392232887317356e+01 1.0428582135201829e+01
|
||||
13 1.3045274807944942e+01 3.7064676200410256e+00 -1.7391883697148632e+01
|
||||
14 2.1115231856154324e+02 4.1325149711628239e+02 -1.8182836867325446e+02
|
||||
15 6.6217480580178957e+01 7.9628926680111661e+01 -9.6844899654306644e+01
|
||||
16 7.8335001553658429e+01 3.3029014991818336e+01 6.4117995352193278e+00
|
||||
17 1.7022736711084285e+01 -6.4494546990630354e+01 3.0252482246684398e+01
|
||||
18 6.6888062606310128e-01 2.5109175640033401e+00 3.5221262532274022e+00
|
||||
19 -1.0595281330291315e+00 -2.2909074264278830e+00 -7.4205308886987997e-01
|
||||
20 -5.6590649610114355e-02 -1.3306687981692766e-01 -1.1723524532058045e+00
|
||||
21 -1.3602839150541590e+00 -5.2316783809516321e-02 2.6862171884490484e+00
|
||||
22 2.1188881771188520e-01 7.6506576725652897e-01 -9.9588370661762238e-01
|
||||
23 1.7197280817140093e-01 3.2328958511427264e-01 -7.9666865784211760e-01
|
||||
24 8.3440060469976285e-01 -6.3373419421074084e-01 2.0837043868722125e+00
|
||||
25 -1.0278907497984688e+00 3.6727316840487179e-01 -1.2445837805673781e+00
|
||||
26 -5.4322936895149698e-01 -4.6377955792927761e-01 -1.3336861388577368e+00
|
||||
27 -1.3095161641895547e+00 -1.2565785999785013e+00 1.5351009379260916e-01
|
||||
28 6.7218786721800217e-01 7.6800634603799567e-01 -1.7119977008252721e-01
|
||||
29 1.1932647806568950e+00 6.9156748341000629e-01 4.6792179831738293e-02
|
||||
run_energy: 1317.13089096787
|
||||
run_stress: ! |2-
|
||||
1.1432326918192217e+02 -1.5602913994604187e+01 -9.8720355187318063e+01 -1.4093459949789184e+02 1.1435885495687606e+02 -5.7664013010033671e+01
|
||||
run_forces: ! |2
|
||||
1 -8.6738392290797321e+00 -4.3410976862478378e+01 1.3347585412854920e+02
|
||||
2 3.2238389882602903e+01 1.3927988326640385e+01 6.0326853193447016e+00
|
||||
3 5.5781319921623364e+01 1.1281438896518540e+02 -3.9723915447363220e+02
|
||||
4 -1.1781245729470949e+02 -2.8715133630261910e+01 1.2947327229271528e+02
|
||||
5 -1.1698125655644814e+01 4.8914276366056813e+00 -1.2206916593051020e-01
|
||||
6 1.0064255236909239e+02 2.4089902585533437e+01 1.1708688508535455e+02
|
||||
7 -8.8938396678183068e+01 -2.4269612244372958e+01 3.4046423133252497e+00
|
||||
8 -5.2440942113044144e+01 1.8663724891736056e+01 -6.5986905005646207e+01
|
||||
9 -1.0273771792476782e+02 -3.4152751230288336e+00 3.5403342910779550e+01
|
||||
10 -4.6264267786523504e+01 -1.5988311874558323e+02 1.3948502740217890e+02
|
||||
11 -2.0740380294773800e+02 -3.1362984721556523e+02 1.3680307896600868e+02
|
||||
12 7.1727029511898778e+01 -4.9953583843530197e+01 1.0566391313536254e+01
|
||||
13 1.2717601183517756e+01 3.6639042127491406e+00 -1.6991918462597582e+01
|
||||
14 2.0160316516219288e+02 3.9605544797472220e+02 -1.7309385003473275e+02
|
||||
15 6.6950478180516200e+01 8.0016328186605023e+01 -9.7109615235144631e+01
|
||||
16 7.9788925340074712e+01 3.4209121284318734e+01 6.5473927657876567e+00
|
||||
17 1.6122485334835080e+01 -6.5651549116138114e+01 3.0223626886103975e+01
|
||||
18 6.7123875238643738e-01 2.5225106816598521e+00 3.5235417346122380e+00
|
||||
19 -1.0614663134700668e+00 -2.3016803913636772e+00 -7.2888942997786199e-01
|
||||
20 -5.4056934695977041e-02 -1.3199262460437394e-01 -1.1690871662309097e+00
|
||||
21 -1.3614683789342612e+00 -6.1659172840990539e-02 2.6843872547994612e+00
|
||||
22 2.1301744794630889e-01 7.6998500648265933e-01 -9.9626778434974805e-01
|
||||
23 1.7137646754555280e-01 3.2261162434818480e-01 -7.9603557873164577e-01
|
||||
24 8.3450290990328380e-01 -6.2976630391752642e-01 2.0675159711292510e+00
|
||||
25 -1.0267254825899825e+00 3.6901966109757989e-01 -1.2397266170577683e+00
|
||||
26 -5.4220092253858421e-01 -4.6310693711038375e-01 -1.3315676468107509e+00
|
||||
27 -1.3087239984049934e+00 -1.2556095274814956e+00 1.5425738299910141e-01
|
||||
28 6.7103315457032875e-01 7.6674467322075168e-01 -1.7140189867370823e-01
|
||||
29 1.1910760416184893e+00 6.8980602737225627e-01 4.4586772292204771e-02
|
||||
...
|
||||
89
unittest/force-styles/tests/dihedral-charmmfsw.yaml
Normal file
89
unittest/force-styles/tests/dihedral-charmmfsw.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:34 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral charmmfsw
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
special_bonds charmm
|
||||
pair_style lj/charmmfsw/coul/charmmfsh 7.0 8.0
|
||||
pair_coeff * * 0.1 3.0
|
||||
input_file: in.fourmol
|
||||
dihedral_style: charmmfsw
|
||||
dihedral_coeff: ! |
|
||||
1 75.0 2 160 0.5
|
||||
2 45.0 4 120 1.0
|
||||
3 56.0 0 110 0.0
|
||||
4 23.0 1 180 0.5
|
||||
5 19.0 3 90 1.0
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 1317.95984412099
|
||||
init_stress: ! |2-
|
||||
1.1266474992363544e+02 -1.4270359924600960e+01 -9.8394389999034431e+01 -1.4122826669412839e+02 1.1178234052730829e+02 -5.8711817976295805e+01
|
||||
init_forces: ! |2
|
||||
1 -8.9693997732828734e+00 -4.2090832180473811e+01 1.3129896410266406e+02
|
||||
2 3.2939174268614089e+01 1.3776993828220547e+01 6.6047608190284564e+00
|
||||
3 5.5339891213774308e+01 1.1132435962327280e+02 -3.9478906486222957e+02
|
||||
4 -1.1853376295969241e+02 -2.8731355857128989e+01 1.2940461683448865e+02
|
||||
5 -1.1704542931552981e+01 5.1612910145764337e+00 1.1531982356444204e-01
|
||||
6 1.0315985347478912e+02 2.7858195004320272e+01 1.1495266502109652e+02
|
||||
7 -8.8909058225650583e+01 -2.3837347272152069e+01 3.9392213448182849e+00
|
||||
8 -5.5853617515784052e+01 1.3539223737174332e+01 -6.3713599961688189e+01
|
||||
9 -1.0311156651288640e+02 -3.6164116725708757e+00 3.5075828453521936e+01
|
||||
10 -4.3826637468354527e+01 -1.5710289244173734e+02 1.3864307003008477e+02
|
||||
11 -2.1622582834796196e+02 -3.3219826841101195e+02 1.4556774326995796e+02
|
||||
12 7.1412702974492348e+01 -4.9974052650356612e+01 1.0723258124306223e+01
|
||||
13 1.2983841333488790e+01 3.6226253549259608e+00 -1.7369216643277348e+01
|
||||
14 2.1111361658245866e+02 4.1312473179030422e+02 -1.8177665169218727e+02
|
||||
15 6.6205967662062449e+01 7.9562081373822039e+01 -9.6816806108613221e+01
|
||||
16 7.8024062158787302e+01 3.4094331075850761e+01 5.9763314082458487e+00
|
||||
17 1.7445214070241107e+01 -6.4435014330300476e+01 2.9813113022057500e+01
|
||||
18 2.0800160412943211e-01 2.2891124106778022e+00 3.4660835897877700e+00
|
||||
19 -8.0963080390688746e-01 -2.4045945217436877e+00 -1.8583563864926739e-01
|
||||
20 -3.8753637434211785e-02 -5.5448402782730866e-01 -6.7086657947375039e-01
|
||||
21 -1.3905969243613909e+00 9.2263911023596146e-01 2.4245678407761346e+00
|
||||
22 1.3613731081665018e-01 8.4084293030416840e-02 -8.1025131035386821e-01
|
||||
23 4.1866083933707599e-01 -5.5509350762570908e-02 -7.0997382727305158e-01
|
||||
24 7.1694861345295280e-01 -2.3511767137443013e-01 8.0781359710835909e-01
|
||||
25 -1.0629765873976795e+00 -1.8433966653787029e-01 -1.2964080715678894e+00
|
||||
26 -3.5304755132121918e-01 -1.9129024515386733e-01 -4.7932022297094667e-01
|
||||
27 -7.5085140414840501e-01 -2.1332740916449014e-01 -3.4556428061080330e-01
|
||||
28 3.0509542011027740e-01 4.6221002204910822e-02 8.8498260667955922e-02
|
||||
29 1.1311031171809240e+00 4.1894808967987129e-01 6.1703656720310460e-02
|
||||
run_energy: 1317.13142783318
|
||||
run_stress: ! |2-
|
||||
1.1432271538886499e+02 -1.5603844203952541e+01 -9.8718871184912416e+01 -1.4093580634465189e+02 1.1435865928680047e+02 -5.7664143378423546e+01
|
||||
run_forces: ! |2
|
||||
1 -8.5717926119025947e+00 -4.3091412260618227e+01 1.3316006725249042e+02
|
||||
2 3.1997674214676874e+01 1.3654655784189870e+01 6.2828676384712061e+00
|
||||
3 5.5770382737530170e+01 1.1281783434187146e+02 -3.9721453377879095e+02
|
||||
4 -1.1789680795379847e+02 -2.8447706749956993e+01 1.2952665428714013e+02
|
||||
5 -1.1819996113850017e+01 5.0146666822935302e+00 3.2281792318776925e-02
|
||||
6 1.0058447730534851e+02 2.4972369765865452e+01 1.1633752546321533e+02
|
||||
7 -8.8848296871465919e+01 -2.4542246520962529e+01 4.1058609991775068e+00
|
||||
8 -5.2109635323526945e+01 1.7483153474801384e+01 -6.4894524111023628e+01
|
||||
9 -1.0299581329057062e+02 -3.0071901661917311e+00 3.4614355229661122e+01
|
||||
10 -4.6248656852080643e+01 -1.5989736943052526e+02 1.3946110129960286e+02
|
||||
11 -2.0744046131487352e+02 -3.1349391104875059e+02 1.3657355191843646e+02
|
||||
12 7.1878446763226236e+01 -5.0535379590486308e+01 1.0860480569904183e+01
|
||||
13 1.2656630660306188e+01 3.5801817290072018e+00 -1.6968929416398453e+01
|
||||
14 2.0156828471782353e+02 3.9593474256507108e+02 -1.7304498843642651e+02
|
||||
15 6.6938931982383480e+01 7.9950072669406069e+01 -9.7082424123877473e+01
|
||||
16 7.9480812177410172e+01 3.5274424529763422e+01 6.1163506563185468e+00
|
||||
17 1.6544041468715115e+01 -6.5589692620159624e+01 2.9781616838343403e+01
|
||||
18 2.1267286099045599e-01 2.2942619216574771e+00 3.4659719272782654e+00
|
||||
19 -8.1337490705231874e-01 -2.4098575977295353e+00 -1.8396289009644590e-01
|
||||
20 -3.7941149699885969e-02 -5.5340608883683873e-01 -6.6993848517114352e-01
|
||||
21 -1.3889998509458839e+00 9.1890355468961316e-01 2.4229472564481020e+00
|
||||
22 1.3595436261854707e-01 8.5481963099478642e-02 -8.0999717836214991e-01
|
||||
23 4.1797076633887387e-01 -5.5351208630107784e-02 -7.0920364554695203e-01
|
||||
24 7.1594583142507817e-01 -2.3421203522820028e-01 8.0152300676926436e-01
|
||||
25 -1.0620978751652836e+00 -1.8302578820695936e-01 -1.2914119694215400e+00
|
||||
26 -3.5226930669430428e-01 -1.9104656198469849e-01 -4.7741349806842143e-01
|
||||
27 -7.4942338430179933e-01 -2.1202918409495525e-01 -3.4599837098455843e-01
|
||||
28 3.0447869914249726e-01 4.5993592160623709e-02 8.8399467006803928e-02
|
||||
29 1.1288622579925440e+00 4.1709427848592429e-01 6.1770301585805341e-02
|
||||
...
|
||||
87
unittest/force-styles/tests/dihedral-class2.yaml
Normal file
87
unittest/force-styles/tests/dihedral-class2.yaml
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:34 2021
|
||||
epsilon: 8e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral class2
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: class2
|
||||
dihedral_coeff: ! |
|
||||
* 75.0 169 45.0 10 24.0 40.0
|
||||
* mbt 75 42 31 5.2
|
||||
* ebt 75 42 31 75 42 31 1.4 1.4
|
||||
* at 75 42 31 75 42 31 120 50
|
||||
* aat 75 120 160
|
||||
* bb13 75 1.4 1.4
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 3355.00747173759
|
||||
init_stress: ! |2-
|
||||
2.1875123407705587e+01 -7.3463171958190321e+02 7.0422332087828568e+02 -2.0890942199873339e+02 -3.6451752675970380e+02 1.3400265327626121e+02
|
||||
init_forces: ! |2
|
||||
1 -1.0952511200405197e+03 6.4823297173207970e+02 -4.4760954488358391e+02
|
||||
2 9.0092068008499132e+02 -3.6118332267415013e+02 3.5713667026397326e+02
|
||||
3 -7.7532838532500693e+02 -1.2468325260439517e+03 3.8359187812682325e+02
|
||||
4 1.2904186368708332e+02 2.2136621866894416e+02 -1.4642984375119335e+02
|
||||
5 5.9556699584425348e+02 1.5024609743159468e+02 2.2329142626092334e+02
|
||||
6 7.3251103695180063e+02 1.1448501937143062e+03 -3.0258310893753855e+02
|
||||
7 -5.6987565445561142e+02 -6.9068345660300258e+02 1.5974567786362655e+02
|
||||
8 2.3172356712469091e+03 1.7621991394557467e+03 -1.0823598208966904e+02
|
||||
9 -1.0665980086873585e+03 -9.7028318259088303e+02 4.0830286870801143e+02
|
||||
10 -1.1831159209684265e+03 -1.2136533632807443e+03 1.0278790875590396e+03
|
||||
11 -6.8651636455995185e+02 9.1292605610303031e+02 -5.0138124218536382e+02
|
||||
12 9.4590221018670803e+01 -1.4167468342595586e+02 -3.9159227689650663e+02
|
||||
13 1.7016834910937868e+02 3.5891736246788633e+02 8.2250630442549743e+02
|
||||
14 5.6198417641541641e+02 -7.5542769524397647e+02 -2.9572420497952066e+02
|
||||
15 -7.0833278096116078e+02 2.2547367398085970e+02 -6.9838585028829266e+02
|
||||
16 9.0926990053407053e+02 1.5375356733249265e+02 -3.5329802202150256e+02
|
||||
17 -3.2627065989453854e+02 -1.9822705102427648e+02 -1.3721383717472295e+02
|
||||
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_energy: 3232.22368557986
|
||||
run_stress: ! |2-
|
||||
3.4186200218682700e+01 -7.5351720154542477e+02 5.8894003293457865e+02 -1.4452761583493597e+02 -3.8479488337510423e+02 1.2221118941124658e+02
|
||||
run_forces: ! |2
|
||||
1 -1.1114877010468704e+03 6.6412899312329989e+02 -4.8306781555357099e+02
|
||||
2 9.0918809418895717e+02 -3.7552925375399423e+02 3.7963210720241710e+02
|
||||
3 -7.4768553265259493e+02 -1.2526329500283782e+03 3.9165439571062751e+02
|
||||
4 1.1598833343613694e+02 2.0353476227252435e+02 -1.2759176729615673e+02
|
||||
5 5.9446880390197896e+02 1.5266302110358913e+02 2.1506481482921635e+02
|
||||
6 7.6270375928437579e+02 1.1975511187402499e+03 -3.1848407740344737e+02
|
||||
7 -5.6563612620259039e+02 -6.9106367799535462e+02 1.6626389201928362e+02
|
||||
8 2.2261446006370847e+03 1.6471763697379154e+03 -5.9204553180719302e+01
|
||||
9 -1.0508281810786864e+03 -9.5153190588270775e+02 3.6074532374710634e+02
|
||||
10 -1.1002869875539902e+03 -1.1259097891078113e+03 9.9461497198463974e+02
|
||||
11 -6.8671642743708378e+02 9.0225692086600691e+02 -4.6762764620034005e+02
|
||||
12 8.0194355742839932e+01 -1.4025133105503551e+02 -4.1215700309601090e+02
|
||||
13 1.6121978561368979e+02 3.6583968779424583e+02 8.2543084661182979e+02
|
||||
14 5.6039463771180522e+02 -7.5245341384736207e+02 -2.8267617778550414e+02
|
||||
15 -6.9314762831894063e+02 2.1107046433802870e+02 -6.8684015745129102e+02
|
||||
16 8.5054295795981488e+02 1.2889703114277438e+02 -3.6104879490120936e+02
|
||||
17 -3.0505674418592668e+02 -1.8374604744798970e+02 -1.3470835923687093e+02
|
||||
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
|
||||
...
|
||||
86
unittest/force-styles/tests/dihedral-cosine_shift_exp.yaml
Normal file
86
unittest/force-styles/tests/dihedral-cosine_shift_exp.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:34 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral cosine/shift/exp
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: cosine/shift/exp
|
||||
dihedral_coeff: ! |
|
||||
1 75 160 5.1
|
||||
2 45 120 2.4
|
||||
3 56 110 7.5
|
||||
4 23 180 5.5
|
||||
5 19 90 2.1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: -252.253036379603
|
||||
init_stress: ! |2-
|
||||
1.2648173379127915e+01 9.8987186508472114e+00 -2.2546892029975140e+01 -4.8774048841283184e+00 2.3394385854749725e+01 8.0008046681362437e+00
|
||||
init_forces: ! |2
|
||||
1 -2.1552264641323678e+01 9.3802303976266224e+00 -5.7580855394682011e+00
|
||||
2 1.7542053448836405e+01 -9.0585245111022275e+00 8.5707996887760274e+00
|
||||
3 -4.5368370292539865e+01 6.2901866813565608e+00 -1.8171838280442625e+01
|
||||
4 -3.9437738551082751e+00 -4.2378540140894083e+00 3.8839120634338524e+00
|
||||
5 3.0958932417316447e+01 -1.7216940826097481e+01 8.8151959108927258e-01
|
||||
6 1.2935503074785331e+01 4.8389291078610510e+00 1.2199210336313424e+01
|
||||
7 1.0262636687925307e+01 1.0876998682721958e+01 -1.7791589083223791e+00
|
||||
8 1.8474452366832249e+01 1.9606544103980980e+01 6.2220353299406197e+00
|
||||
9 1.7020916758045722e+01 1.2650017097294752e+01 -6.9250534440155018e+00
|
||||
10 -6.9954140460001156e+01 -4.0784510598700408e+01 -7.4483410064839335e+00
|
||||
11 9.9800939432401670e+00 -4.1410083603937675e-01 -2.2031105090375496e+00
|
||||
12 6.9055058996213878e+00 2.5245282650526435e+00 1.4073615205210855e+01
|
||||
13 -7.1665608596457320e-02 -1.6473434103906204e-01 -3.4575048440907352e-01
|
||||
14 2.4318532883817405e+00 -3.3839834090561496e+00 -1.2032631916318084e+00
|
||||
15 -8.5093986224928719e-01 2.8808607565855016e-01 -8.7054599213134165e-01
|
||||
16 9.8383158994739350e+00 4.3782146730454237e+00 -1.9942921984521147e+00
|
||||
17 5.3908909353600105e+00 4.4269134515255688e+00 8.6834733963048583e-01
|
||||
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_energy: -252.29533087732
|
||||
run_stress: ! |2-
|
||||
1.2679233523358512e+01 9.9049911944774891e+00 -2.2584224717836005e+01 -4.9222953229219746e+00 2.3439232765403958e+01 8.0455044326920557e+00
|
||||
run_forces: ! |2
|
||||
1 -2.1681260602243135e+01 9.4640446498660182e+00 -5.8153660416206314e+00
|
||||
2 1.7622228873435517e+01 -9.1203004442484552e+00 8.6207493217103508e+00
|
||||
3 -4.5422186497022935e+01 6.2789238657259032e+00 -1.8158223155939911e+01
|
||||
4 -3.9417660078991212e+00 -4.2340583918337522e+00 3.8803641977291665e+00
|
||||
5 3.1033325732076925e+01 -1.7261278784796644e+01 8.6126955781857584e-01
|
||||
6 1.3057761350645071e+01 5.0037796191582586e+00 1.2206425951334531e+01
|
||||
7 1.0204581390079650e+01 1.0787383771900220e+01 -1.7693012874559422e+00
|
||||
8 1.8495759477703640e+01 1.9607876365921989e+01 6.2445967454739897e+00
|
||||
9 1.6979375388826224e+01 1.2610145808112222e+01 -6.9025331116309552e+00
|
||||
10 -6.9958416307959141e+01 -4.0778006073824884e+01 -7.4878188339111018e+00
|
||||
11 9.9719586693041080e+00 -4.1438168249956409e-01 -2.1985928209527419e+00
|
||||
12 6.8945633023312496e+00 2.5226410282917007e+00 1.4050126397293486e+01
|
||||
13 -6.8568730429444003e-02 -1.5852707806876509e-01 -3.3190435067363921e-01
|
||||
14 2.4388776536331709e+00 -3.3933646938491453e+00 -1.2019882913884326e+00
|
||||
15 -8.5054571191848705e-01 2.8798818238768842e-01 -8.7036353952742662e-01
|
||||
16 9.8265119994301369e+00 4.3670820826747221e+00 -1.9950230823005020e+00
|
||||
17 5.3978000200065610e+00 4.4300517750824797e+00 8.6758234404118428e-01
|
||||
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
|
||||
...
|
||||
86
unittest/force-styles/tests/dihedral-fourier.yaml
Normal file
86
unittest/force-styles/tests/dihedral-fourier.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:35 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral fourier
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: fourier
|
||||
dihedral_coeff: ! |
|
||||
1 1 75 1 120
|
||||
2 2 75 1 120 42 2 140
|
||||
3 3 75 1 120 42 2 140 35 1 160
|
||||
4 4 75 1 120 42 2 140 35 2 160 21 2 110
|
||||
5 5 75 1 120 42 2 140 35 2 160 21 2 110 10 2 20
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 4237.11651056645
|
||||
init_stress: ! |-
|
||||
-1.3707440529302690e+02 -1.1775005714687839e+02 2.5482446243990526e+02 -6.0912155352783621e+01 -5.1858430299845004e+01 6.0101035915715130e+01
|
||||
init_forces: ! |2
|
||||
1 1.2746097289536124e+01 1.7790368163729774e+01 -6.0266215656413465e+01
|
||||
2 -1.1610373332641466e+01 5.9954697848533023e+00 -5.6726645165123202e+00
|
||||
3 -3.0005227165688689e+02 -4.9050080271628303e+02 3.9338967778175328e+02
|
||||
4 2.2841720862146582e+02 2.7139158135197215e+02 -2.1470031526034018e+02
|
||||
5 8.8728374601790705e+00 5.0910313257182963e+01 1.7059542215878547e+01
|
||||
6 -1.7146773646607862e+01 5.7418005757422108e+01 -1.2055217754071802e+02
|
||||
7 -1.3811348109784333e+01 -1.6092405824046040e+01 2.6858660625110637e+00
|
||||
8 2.7655221748363908e+02 2.5865412863270615e+02 5.0126271505349962e+01
|
||||
9 -7.2800478794159957e+01 -8.5596953503127224e+01 3.7283780582768628e+01
|
||||
10 -2.4238052366585617e+02 -2.5593760501061624e+01 -9.7931335578075107e+01
|
||||
11 1.0347877593619343e+01 -4.9780495945302690e+01 2.7793211018332766e+01
|
||||
12 -6.7005988611830034e+00 1.4693253477499198e+01 1.1054970688694432e+01
|
||||
13 5.9402228888983188e+00 1.3654509078936314e+01 2.8658585080877884e+01
|
||||
14 5.1102705146276143e+01 -7.1110665762227086e+01 -2.5285244134215667e+01
|
||||
15 -2.2979041686027728e+01 7.7795649674038003e+00 -2.3508491645829253e+01
|
||||
16 2.7292929150263575e+01 -1.3982140480955508e+01 -3.0800243561758844e+01
|
||||
17 6.6209314119270019e+01 5.4370030261297515e+01 1.0664782957696374e+01
|
||||
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_energy: 4233.36580637715
|
||||
run_stress: ! |-
|
||||
-1.3658608701216593e+02 -1.1640355380892572e+02 2.5298964082109160e+02 -5.9498600086177774e+01 -5.3758494802170190e+01 5.9305904454019270e+01
|
||||
run_forces: ! |2
|
||||
1 1.2656448076133628e+01 1.7635520324005068e+01 -6.0006796640617665e+01
|
||||
2 -1.1573163528233266e+01 5.9836034352265699e+00 -5.6594485084542114e+00
|
||||
3 -2.9941157363456563e+02 -4.8872262595805654e+02 3.9031433907767348e+02
|
||||
4 2.2905499925998637e+02 2.7059530582038133e+02 -2.1229559164622748e+02
|
||||
5 8.1750794627657726e+00 5.0657842720903609e+01 1.6780715006767107e+01
|
||||
6 -1.7443005461507592e+01 5.7218771827645256e+01 -1.2012649417671597e+02
|
||||
7 -1.3525119390116430e+01 -1.6087558115506980e+01 2.7080662413770291e+00
|
||||
8 2.7459081991569656e+02 2.5647694865384881e+02 5.0613483765327558e+01
|
||||
9 -7.2124239500896806e+01 -8.4574727373775019e+01 3.6604250699658223e+01
|
||||
10 -2.4164669112795698e+02 -2.5230852547950050e+01 -9.7455774332284349e+01
|
||||
11 1.0412773068661206e+01 -4.9306338476077684e+01 2.7538061026160925e+01
|
||||
12 -6.0804141958446536e+00 1.4416738345165744e+01 1.1575195905170951e+01
|
||||
13 5.8163363064274805e+00 1.3466130968991664e+01 2.8195551304909998e+01
|
||||
14 5.0845396842328462e+01 -7.0714301419334163e+01 -2.4989421719429810e+01
|
||||
15 -2.3126568730718233e+01 7.8313348391903830e+00 -2.3688838429532481e+01
|
||||
16 2.6928856175808562e+01 -1.4197456731253766e+01 -3.0770505097537921e+01
|
||||
17 6.6450066462031486e+01 5.4551663686595774e+01 1.0663207523754473e+01
|
||||
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
|
||||
...
|
||||
86
unittest/force-styles/tests/dihedral-harmonic.yaml
Normal file
86
unittest/force-styles/tests/dihedral-harmonic.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:35 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral harmonic
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: harmonic
|
||||
dihedral_coeff: ! |
|
||||
1 75.0 +1 2
|
||||
2 45.0 -1 4
|
||||
3 56.0 -1 2
|
||||
4 23.0 +1 1
|
||||
5 19.0 -1 3
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 789.17395858648
|
||||
init_stress: ! |-
|
||||
-6.2042484436524219e+01 1.2714037725306221e+02 -6.5097892816538135e+01 2.6648135399224223e+01 1.3495574921305175e+02 1.6236422290928121e+02
|
||||
init_forces: ! |2
|
||||
1 -2.1511698742845866e+01 4.0249060564855860e+01 -9.0013321196300495e+01
|
||||
2 -8.1931697051663761e+00 4.2308632119002461e+00 -4.0030670619001576e+00
|
||||
3 9.1213724359021342e+01 -1.3766351447039605e+02 8.1969246558440773e+01
|
||||
4 -4.8202572898596316e+01 -8.0465316960733553e+00 6.4757081520864901e+01
|
||||
5 -6.2252471689207432e+01 2.2804485244022331e+01 -5.3285277341381354e+00
|
||||
6 9.1271091191895337e+01 1.3743691097166200e+02 -3.9344000137592637e+01
|
||||
7 -4.7435622518386936e+01 -5.1206081255886986e+01 8.4101355581705430e+00
|
||||
8 2.2568717344776448e+02 1.6221073825524249e+02 5.7667169753528370e+01
|
||||
9 -2.0794865226210746e+00 5.0314964909952629e+00 -7.5468528100469179e-01
|
||||
10 -4.0476567806811568e+02 -4.7270660984257171e+02 -9.9999223894595431e+01
|
||||
11 3.9909170606249432e+01 2.0810704935563001e+02 -1.3665198019985243e+02
|
||||
12 6.2493704719337885e+01 7.0253447917427593e+01 1.9569964347346627e+02
|
||||
13 2.9234925409867770e+01 6.7200938735330823e+01 1.4104379799580224e+02
|
||||
14 7.2099736490024156e+01 -1.0032854911322366e+02 -3.5674421421421059e+01
|
||||
15 -1.0059762933494233e+02 3.4057372960589944e+01 -1.0291545492293889e+02
|
||||
16 -9.2273705073611623e+01 -1.2566881299602966e+02 -6.3115663814665538e+01
|
||||
17 1.7540250832933316e+02 1.4403773566652495e+02 2.8253270804136417e+01
|
||||
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_energy: 786.186635855008
|
||||
run_stress: ! |-
|
||||
-6.1891690150881182e+01 1.2738938495389695e+02 -6.5497694803015833e+01 2.6197221636385819e+01 1.3475397071041999e+02 1.6145289649182780e+02
|
||||
run_forces: ! |2
|
||||
1 -2.2302877929458532e+01 4.0672550312262075e+01 -9.0501596668366560e+01
|
||||
2 -7.6795593796038659e+00 3.9696254383022342e+00 -3.7581780677357415e+00
|
||||
3 9.2113038158654348e+01 -1.3743858583367683e+02 8.2424527694664079e+01
|
||||
4 -4.8297128598674483e+01 -8.1171172512686596e+00 6.4789088490585272e+01
|
||||
5 -6.2249945690217793e+01 2.2813353689490402e+01 -5.3758961093281030e+00
|
||||
6 9.1082266628006465e+01 1.3760435354837995e+02 -3.9497610280357797e+01
|
||||
7 -4.6896902011280687e+01 -5.0626904069869454e+01 8.3785410081476979e+00
|
||||
8 2.2272760695742204e+02 1.5895499756012089e+02 5.7194518287049874e+01
|
||||
9 -1.3424389406805730e+00 5.5961120716834856e+00 -1.0522843139661155e+00
|
||||
10 -4.0569661830987485e+02 -4.7090645706702168e+02 -9.7628440388580174e+01
|
||||
11 4.2260633810406503e+01 2.0874271156158215e+02 -1.3676519733514763e+02
|
||||
12 6.2351939715965052e+01 6.8740733618467218e+01 1.9368291702263934e+02
|
||||
13 2.9034913938879313e+01 6.7392732937882698e+01 1.4128237950589556e+02
|
||||
14 7.1584708215786904e+01 -9.9391162196277406e+01 -3.5112483074387470e+01
|
||||
15 -1.0011391208839508e+02 3.3797184010534480e+01 -1.0280672267359482e+02
|
||||
16 -9.3370884293886093e+01 -1.2693997516553819e+02 -6.3467167983741767e+01
|
||||
17 1.7679515981695124e+02 1.4513584683494673e+02 2.8213604886224289e+01
|
||||
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
|
||||
...
|
||||
86
unittest/force-styles/tests/dihedral-helix.yaml
Normal file
86
unittest/force-styles/tests/dihedral-helix.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:35 2021
|
||||
epsilon: 4e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral helix
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: helix
|
||||
dihedral_coeff: ! |
|
||||
1 75 60 42
|
||||
2 45 20 75
|
||||
3 56 10 32
|
||||
4 23 80 61
|
||||
5 19 90 13
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 4634.43654570767
|
||||
init_stress: ! |-
|
||||
-8.0823732518007063e+01 9.9479187244686372e+01 -1.8655454726675949e+01 3.1101576556766464e+01 7.4461883645297817e+01 4.1747530138691431e+01
|
||||
init_forces: ! |2
|
||||
1 1.5382329638267035e+02 -8.7367671314025870e+01 9.6804569946208261e+01
|
||||
2 -1.1019792518885538e+02 5.6905003129041866e+01 -5.3841150676408077e+01
|
||||
3 2.3246539083975540e+02 4.0296299562627843e+02 -1.1393686865859719e+02
|
||||
4 3.1568060813146815e+01 7.2317480245219112e+00 -4.1634456256848267e+01
|
||||
5 6.2738188559800125e+00 -1.7156050770489149e+00 7.1235927088545736e-01
|
||||
6 -1.0269680933720128e+03 -1.1690454281502080e+03 2.1661954258810474e+02
|
||||
7 4.5805034065516077e+02 4.9842112368971334e+02 -8.2004595690709891e+01
|
||||
8 -5.7825681205863634e+02 -3.5494272038879524e+02 -3.0370616059225443e+02
|
||||
9 4.4268140801703601e+02 4.4489087402560148e+02 -2.0831276526993508e+02
|
||||
10 -8.7951164139994106e+01 1.0636363540938811e+02 -5.4515993120398562e+01
|
||||
11 7.1220902371740760e+02 -3.3016873225873167e+02 2.5993521030531866e+01
|
||||
12 -1.7787675730154284e+01 1.3423193485792939e+02 1.6661355844612928e+02
|
||||
13 -1.3886141645948561e+02 -3.1919416278193785e+02 -6.6993643041455698e+02
|
||||
14 -3.7790416886453352e+02 5.2586290618778116e+02 1.8698421427449404e+02
|
||||
15 4.7485173910262199e+02 -1.6076127127963423e+02 4.8579258849115138e+02
|
||||
16 -2.4610027154189740e+02 1.8711434954391689e+02 3.3675371434963506e+02
|
||||
17 7.2104448971790220e+01 5.9211020756208853e+01 1.1614352282568388e+01
|
||||
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_energy: 4604.29767615419
|
||||
run_stress: ! |-
|
||||
-7.9493088618049043e+01 1.0569468868590617e+02 -2.6201600067857370e+01 4.3225252542366661e+01 6.6510401367367706e+01 3.7958321007398133e+01
|
||||
run_forces: ! |2
|
||||
1 1.5239538662222483e+02 -8.5304318790181981e+01 9.1857296044358804e+01
|
||||
2 -1.0967028219095423e+02 5.6694684619133220e+01 -5.3333029655051035e+01
|
||||
3 2.4083923292691799e+02 4.0545658790486630e+02 -1.0928376525899010e+02
|
||||
4 2.9004572124849197e+01 3.3433497097463150e+00 -3.9484083494241339e+01
|
||||
5 5.4495253574218356e+00 -2.3234784690594568e+00 3.6744082833339320e-01
|
||||
6 -1.0416416920207600e+03 -1.1728713553808166e+03 2.1517006495886761e+02
|
||||
7 4.6730984467782685e+02 5.0224210584028452e+02 -7.9280667353675966e+01
|
||||
8 -5.6864896514161364e+02 -3.4977436236350320e+02 -3.0403472535369667e+02
|
||||
9 4.3781190409126589e+02 4.4179927003638215e+02 -2.1089303274257958e+02
|
||||
10 -8.5863568189987490e+01 1.0020124487504943e+02 -6.5522998341248922e+01
|
||||
11 7.1073054117197967e+02 -3.3058374406671203e+02 3.2522201110837969e+01
|
||||
12 -2.4832249967654064e+01 1.3872033356079328e+02 1.6239068437785096e+02
|
||||
13 -1.4153451065060841e+02 -3.1548547899029609e+02 -6.6874565279275259e+02
|
||||
14 -3.7582648536581155e+02 5.2528558881481820e+02 1.8878887552977594e+02
|
||||
15 4.8083127351494102e+02 -1.6542050766651528e+02 4.8868255420903807e+02
|
||||
16 -2.5031689931311919e+02 1.8736345330256745e+02 3.3892450313503065e+02
|
||||
17 7.3962372353081548e+01 6.0656627063443544e+01 1.1874334798142684e+01
|
||||
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
|
||||
...
|
||||
87
unittest/force-styles/tests/dihedral-hybrid.yaml
Normal file
87
unittest/force-styles/tests/dihedral-hybrid.yaml
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:35 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral harmonic
|
||||
dihedral opls
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: hybrid harmonic opls
|
||||
dihedral_coeff: ! |
|
||||
1 harmonic 75.0 +1 2
|
||||
2 harmonic 45.0 -1 4
|
||||
3 opls 56 10 32 84
|
||||
4 opls 23 80 61 83
|
||||
5 opls 19 90 13 15
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 1501.66406241746
|
||||
init_stress: ! |-
|
||||
-2.4645376253219257e+02 2.3613233899749815e+01 2.2284052863244389e+02 -1.0599361078821747e+02 1.5465939277742063e+02 2.1207702997596056e+02
|
||||
init_forces: ! |2
|
||||
1 1.4485898476422688e+02 -4.5669120902309771e+01 -8.7100920472046255e+00
|
||||
2 -1.3855214618931836e+02 7.1546812691134122e+01 -6.7694622804688365e+01
|
||||
3 6.5964354373895731e+01 -2.7120798820857840e+02 5.7779867477146780e+01
|
||||
4 3.8353068558669833e+01 1.2204757513167141e+02 -5.8324764485431615e+00
|
||||
5 -3.7665970146318045e+01 1.7971807362873875e+02 4.6710944552079511e+01
|
||||
6 -1.7267806226531070e+02 -1.4225589912924301e+02 2.2077313521312504e+01
|
||||
7 -3.7144952722106751e+01 -3.8425708934662325e+01 6.2505576173423023e+00
|
||||
8 5.2208543487497695e+02 4.6179315154002813e+02 -1.5460707336634505e+02
|
||||
9 -2.0849607802277379e+02 -1.7315826143535537e+02 8.9258128356805344e+01
|
||||
10 -6.3617202713506140e+02 -6.2240030689383138e+02 -1.4760361206040028e+02
|
||||
11 2.5886970042458915e+02 1.5666256285978619e+02 -1.5917139508413430e+02
|
||||
12 4.2729200582282026e+01 1.3521565741148760e+02 2.5947570019542530e+02
|
||||
13 -9.3214628811766573e+00 -2.1426805343932180e+01 -4.4971365899031198e+01
|
||||
14 -8.9873999491195278e+00 1.2506187138703197e+01 4.4468996542326877e+00
|
||||
15 2.2596508786687970e+01 -7.6500582811265403e+00 2.3117144974751533e+01
|
||||
16 -1.3401658013513540e+01 4.5597188897388733e+01 5.2580299101894475e+01
|
||||
17 1.6696250495937039e+02 1.3710693983010100e+02 2.6893782259356598e+01
|
||||
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_energy: 1495.65001965091
|
||||
run_stress: ! |-
|
||||
-2.4383465439885845e+02 2.5649599381834832e+01 2.1818505501701961e+02 -1.0616938394760371e+02 1.5358337500265804e+02 2.1056893001808325e+02
|
||||
run_forces: ! |2
|
||||
1 1.4397575702511341e+02 -4.5331119446881701e+01 -9.1122967211867660e+00
|
||||
2 -1.3764123886019212e+02 7.1062183101822228e+01 -6.6967960649665798e+01
|
||||
3 6.7085675178242056e+01 -2.6933932441988645e+02 5.4616974104117872e+01
|
||||
4 3.6908108135605985e+01 1.2125433276949988e+02 -3.9610937280282741e+00
|
||||
5 -3.7050315406580609e+01 1.7986384304333143e+02 4.6504988994828153e+01
|
||||
6 -1.6439068516180080e+02 -1.3508359739557659e+02 2.0551321088938856e+01
|
||||
7 -3.6875480266122125e+01 -3.8594365820736940e+01 6.2927149422567155e+00
|
||||
8 4.9895893276330048e+02 4.4194751828933101e+02 -1.4833194600243888e+02
|
||||
9 -2.0282594711246924e+02 -1.7015693059626273e+02 8.5956679467201681e+01
|
||||
10 -6.3121339395976145e+02 -6.1281424455658635e+02 -1.4607947541321980e+02
|
||||
11 2.6261030068321173e+02 1.5729875558190750e+02 -1.5871767602077460e+02
|
||||
12 4.2642412010734539e+01 1.3415403646699093e+02 2.5857538812174545e+02
|
||||
13 -9.3211564144894474e+00 -2.1403608395474237e+01 -4.5071336492666035e+01
|
||||
14 -9.4170480596117798e+00 1.3082488091561686e+01 4.6355646706629088e+00
|
||||
15 2.2722879492421981e+01 -7.7075345088958080e+00 2.3305867532534780e+01
|
||||
16 -1.6645135391836931e+01 4.1502173593178441e+01 5.0575052872103598e+01
|
||||
17 1.7047633534423403e+02 1.4026539420267756e+02 2.7227233233590255e+01
|
||||
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
|
||||
...
|
||||
86
unittest/force-styles/tests/dihedral-multi_harmonic.yaml
Normal file
86
unittest/force-styles/tests/dihedral-multi_harmonic.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:35 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral multi/harmonic
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: multi/harmonic
|
||||
dihedral_coeff: ! |
|
||||
1 75 60 42 23 91
|
||||
2 45 20 75 52 24
|
||||
3 56 10 32 84 52
|
||||
4 23 80 61 83 74
|
||||
5 19 90 13 15 58
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 2854.98573165667
|
||||
init_stress: ! |2-
|
||||
1.5681915450818258e+02 1.8843677355938829e+02 -3.4525592806757135e+02 1.8730498639126836e+02 3.9598161309144100e+00 -4.8403883145099769e+01
|
||||
init_forces: ! |2
|
||||
1 1.3738709657144352e+02 -8.1922817594424572e+01 9.7075104799546850e+01
|
||||
2 -1.0659916463476705e+02 5.5046642545209522e+01 -5.2082847070338147e+01
|
||||
3 1.5886334395918402e+02 2.5338186929832096e+02 -1.6850515833682286e+02
|
||||
4 -9.5225444536502579e+01 -1.1265598934657196e+02 8.9698661383677717e+01
|
||||
5 -1.2852852144878329e+02 -9.0809475595387653e+01 -5.2501247333692461e+01
|
||||
6 4.9246759553241205e+01 -1.8277982378705346e+01 7.0990893782854002e+01
|
||||
7 7.4663926284829870e+01 8.0704027294328569e+01 -1.3258721042376479e+01
|
||||
8 -5.7664771790647706e+02 -5.3918019517298592e+02 1.5396929378643614e+02
|
||||
9 2.9901970531305994e+02 2.8758255690187787e+02 -1.3756295870594514e+02
|
||||
10 4.5524976502054687e+02 4.2063419413217622e+02 -1.3246733864751559e+02
|
||||
11 -8.1758898081829770e+01 -1.4048792663689201e+02 1.0573752188920433e+02
|
||||
12 1.3599907767871962e+01 -1.1383028650554325e+01 4.1418406115814665e+00
|
||||
13 -2.8222212138596170e+00 -6.4873062691689682e+00 -1.3615796627027152e+01
|
||||
14 -3.5095181390137633e+01 4.8835804416914783e+01 1.7364838648837505e+01
|
||||
15 3.4824444714752772e+01 -1.1789831526216862e+01 3.5626819378860084e+01
|
||||
16 -2.0052943268182560e+02 -1.3676403262886782e+02 -5.3118534908764730e+00
|
||||
17 4.3516327092523319e+00 3.5734912109474788e+00 7.0094697359617353e-01
|
||||
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_energy: 2849.07207400097
|
||||
run_stress: ! |2-
|
||||
1.6000445937817227e+02 1.9195362353354110e+02 -3.5195808291171227e+02 1.9139433603598457e+02 1.5540720550179767e+00 -4.9876733950141848e+01
|
||||
run_forces: ! |2
|
||||
1 1.3690524660841163e+02 -8.1763135128653829e+01 9.6470097213552307e+01
|
||||
2 -1.0625167472058520e+02 5.4933080224948007e+01 -5.1680471871853584e+01
|
||||
3 1.5673974552236709e+02 2.5097042976431126e+02 -1.6860187704443382e+02
|
||||
4 -9.5460708012333725e+01 -1.1311361496535775e+02 9.0478655531755578e+01
|
||||
5 -1.2825502974007455e+02 -9.0458764515265173e+01 -5.2676495841154534e+01
|
||||
6 6.3049547051303456e+01 -4.3984759358165917e+00 6.7752322411553308e+01
|
||||
7 7.2063814036924853e+01 7.7736010485627787e+01 -1.2790559661004870e+01
|
||||
8 -5.9873994171892593e+02 -5.6106760521575166e+02 1.6173242713877039e+02
|
||||
9 3.0322958895200122e+02 2.9158961031453970e+02 -1.4193327505162301e+02
|
||||
10 4.6742911058701714e+02 4.3476296748266782e+02 -1.3368162420202023e+02
|
||||
11 -8.2306796650785643e+01 -1.4192288611323806e+02 1.0746321420675316e+02
|
||||
12 1.3859227344215885e+01 -1.1441899351494421e+01 4.4569325586518920e+00
|
||||
13 -2.7707098933678509e+00 -6.4032868562592995e+00 -1.3395365036245792e+01
|
||||
14 -3.5084705415423898e+01 4.8852109825670325e+01 1.7330779402092446e+01
|
||||
15 3.4829566930810564e+01 -1.1798517720623494e+01 3.5597334528573512e+01
|
||||
16 -2.0666495176453031e+02 -1.4254747520758420e+02 -7.7166962667997083e+00
|
||||
17 7.4286708829750996e+00 6.0714529122795415e+00 1.1946019834330359e+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
|
||||
...
|
||||
86
unittest/force-styles/tests/dihedral-nharmonic.yaml
Normal file
86
unittest/force-styles/tests/dihedral-nharmonic.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:35 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral nharmonic
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: nharmonic
|
||||
dihedral_coeff: ! |
|
||||
1 1 75
|
||||
2 2 75 42
|
||||
3 3 75 42 35
|
||||
4 4 75 42 35 21
|
||||
5 5 75 42 35 21 10
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 2981.00073511673
|
||||
init_stress: ! |2-
|
||||
9.7597564011001154e+01 5.1552482481468100e+00 -1.0275281225914760e+02 1.8493829126960399e+01 -2.0812476993720594e+01 -1.8522149185389509e+01
|
||||
init_forces: ! |2
|
||||
1 -2.2513291756353219e+01 4.7119202966322113e+00 7.8626223248943488e+00
|
||||
2 1.6503301622376316e+01 -8.5221244306678052e+00 8.0632802095482496e+00
|
||||
3 1.6036976766592576e+02 1.6287909459293988e+02 -7.5360356553197050e+01
|
||||
4 -5.5774232874990290e+01 -5.3058913648795475e+01 5.7643742847181294e+01
|
||||
5 -5.5693897474981654e+01 -4.6866567575987339e+01 -2.5012126373852766e+01
|
||||
6 -1.4807705653098827e+02 -1.7439629259562869e+02 4.3508953332564516e+01
|
||||
7 5.7230190824331977e+01 6.2118378860762746e+01 -1.0214660840095114e+01
|
||||
8 -4.9646451985301219e+01 -1.6916018705669373e+01 -4.3263724045252935e+01
|
||||
9 5.6208167529396206e+01 5.1711293643508995e+01 -2.5287150384768847e+01
|
||||
10 3.0991849000677316e+01 7.1919803329260148e+01 6.0749104476882920e+01
|
||||
11 4.5844405619977813e+01 -3.2881788637711445e+01 8.7606207362048369e+00
|
||||
12 1.1196936677514067e+01 -5.1163625458728184e+01 -5.6831813719102982e+01
|
||||
13 -5.9988298526181154e+00 -1.3789226131337799e+01 -2.8941334177588317e+01
|
||||
14 -4.7822307931026252e+01 6.6545912697330365e+01 2.3662127623898343e+01
|
||||
15 4.0718083591203595e+01 -1.3785125636399199e+01 4.1656250988047944e+01
|
||||
16 -2.7739760389786966e+01 -3.7464205631044081e+00 1.3938205295403176e+01
|
||||
17 -5.7968737353570745e+00 -4.7603000364046579e+00 -9.3374174076756766e-01
|
||||
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_energy: 2980.50579322915
|
||||
run_stress: ! |2-
|
||||
9.7895434490619337e+01 5.4213709524395828e+00 -1.0331680544305857e+02 1.8675877873066675e+01 -2.0991434453341569e+01 -1.8585983190992422e+01
|
||||
run_forces: ! |2
|
||||
1 -2.2591052968690096e+01 4.7210385354547846e+00 7.9294392105535936e+00
|
||||
2 1.6498095517116187e+01 -8.5356068598615717e+00 8.0720766878856693e+00
|
||||
3 1.6108997640769729e+02 1.6342942942760337e+02 -7.5708178587991824e+01
|
||||
4 -5.5915690600613786e+01 -5.3286178349242775e+01 5.7920314335763067e+01
|
||||
5 -5.5815960140690187e+01 -4.6852076880395700e+01 -2.5129655662229876e+01
|
||||
6 -1.4887539913047536e+02 -1.7507990917559269e+02 4.3681610088691990e+01
|
||||
7 5.7525784565224839e+01 6.2341547610308091e+01 -1.0221945594991276e+01
|
||||
8 -4.9834734857855565e+01 -1.7115522841200708e+01 -4.3399122618009173e+01
|
||||
9 5.6179010600229461e+01 5.1726594605296690e+01 -2.5317658955721360e+01
|
||||
10 3.1482397830029917e+01 7.2536730495593062e+01 6.0942772446916798e+01
|
||||
11 4.5792301818163743e+01 -3.2904155663801774e+01 8.8203497710706404e+00
|
||||
12 1.1154082762390011e+01 -5.1190045193979515e+01 -5.6802626362359284e+01
|
||||
13 -5.9632993131627696e+00 -1.3785699614683910e+01 -2.8834090735086761e+01
|
||||
14 -4.7767992294731812e+01 6.6549040073025040e+01 2.3624991066144862e+01
|
||||
15 4.0707922113447012e+01 -1.3798576461581593e+01 4.1602789182915110e+01
|
||||
16 -2.8021580173481375e+01 -4.1280758811589067e+00 1.3726590420250155e+01
|
||||
17 -5.6438621345975122e+00 -4.6285338257819220e+00 -9.0765469380235686e-01
|
||||
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
|
||||
...
|
||||
86
unittest/force-styles/tests/dihedral-opls.yaml
Normal file
86
unittest/force-styles/tests/dihedral-opls.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:35 2021
|
||||
epsilon: 2.5e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
dihedral opls
|
||||
pre_commands: ! ""
|
||||
post_commands: ! ""
|
||||
input_file: in.fourmol
|
||||
dihedral_style: opls
|
||||
dihedral_coeff: ! |
|
||||
1 75 60 42 23
|
||||
2 45 20 75 52
|
||||
3 56 10 32 84
|
||||
4 23 80 61 83
|
||||
5 19 90 13 15
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_energy: 2260.68345252858
|
||||
init_stress: ! |-
|
||||
-3.2511829957222659e+02 -2.5747791683620072e+01 3.5086609125584744e+02 -1.7284868467618747e+02 2.1513133474621105e+02 1.2517993158427078e+02
|
||||
init_forces: ! |2
|
||||
1 3.8418843300789013e+02 -2.0215855127626560e+02 1.9798867612265633e+02
|
||||
2 -2.9487545045054014e+02 1.5227045701458118e+02 -1.4407198258290703e+02
|
||||
3 -9.8281517150962827e+01 -1.6227125420394071e+02 -6.7942361484037406e+01
|
||||
4 1.0637245492200609e+02 1.3269987633301724e+02 -9.7489660444067837e+01
|
||||
5 -3.7665970146318045e+01 1.7971807362873875e+02 4.6710944552079511e+01
|
||||
6 1.1702706522755878e+02 8.6982608420528493e+01 3.1913126533391559e+01
|
||||
7 -7.7554238578063618e+01 -8.2420107806847682e+01 1.3489747654226816e+01
|
||||
8 9.1569783748212430e+00 -4.0548521525557376e+01 -1.0326672032405810e+01
|
||||
9 -1.7725494652391845e+02 -1.4026459257463597e+02 7.4192724911953562e+01
|
||||
10 -4.1110104786839429e+02 -2.5073752258808298e+02 -1.5153435376208625e+02
|
||||
11 2.5176689706800320e+02 6.4942280703724947e+01 -1.0152404897547778e+02
|
||||
12 5.0683700189254068e+01 5.3499935743815783e+01 1.5370438642303918e+02
|
||||
13 -9.3214628811766573e+00 -2.1426805343932180e+01 -4.4971365899031198e+01
|
||||
14 -3.2894997260227250e+01 4.5774194315657610e+01 1.6276203659637716e+01
|
||||
15 2.2596508786687970e+01 -7.6500582811265403e+00 2.3117144974751533e+01
|
||||
16 1.2469191655312414e+01 3.9926824651176759e+01 3.0718477775528918e+01
|
||||
17 1.8468840162806748e+02 1.5166316278914834e+02 2.9749012572748249e+01
|
||||
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_energy: 2256.24323239172
|
||||
run_stress: ! |-
|
||||
-3.2088111205783395e+02 -2.5173179880186485e+01 3.4605429193802195e+02 -1.7344996511494091e+02 2.1594264221200305e+02 1.2609209164416541e+02
|
||||
run_forces: ! |2
|
||||
1 3.8221543296352581e+02 -2.0141948919000066e+02 1.9557532679638945e+02
|
||||
2 -2.9287695305319323e+02 1.5117733528609159e+02 -1.4124998061827318e+02
|
||||
3 -9.6968901157768613e+01 -1.6021972846441955e+02 -7.1973012575105997e+01
|
||||
4 1.0455346745780875e+02 1.3193080713496886e+02 -9.4604433863044719e+01
|
||||
5 -3.6711061261645170e+01 1.7985412946903816e+02 4.6622409203885653e+01
|
||||
6 1.1487205026090723e+02 8.2985262131686909e+01 3.2425068981410632e+01
|
||||
7 -7.6158592387354744e+01 -8.0468484105613015e+01 1.3255468327869348e+01
|
||||
8 6.8336233635044792e+00 -4.1069837122711107e+01 -9.2791833285164600e+00
|
||||
9 -1.7541465338683531e+02 -1.3916262246574487e+02 7.2948347484376768e+01
|
||||
10 -4.1175393396497520e+02 -2.5092469444234629e+02 -1.5026151846272987e+02
|
||||
11 2.5362614760259910e+02 6.5949894447338195e+01 -1.0158950310115290e+02
|
||||
12 5.0514163619643369e+01 5.3693737562222708e+01 1.5397975467197989e+02
|
||||
13 -9.3356957620871128e+00 -2.1480978772005329e+01 -4.5135381377713500e+01
|
||||
14 -3.2924384373551227e+01 4.5813164716459632e+01 1.6248139979025197e+01
|
||||
15 2.2683225187118740e+01 -7.6931274678125519e+00 2.3250324273162178e+01
|
||||
16 1.0385303766648718e+01 3.7834438086310726e+01 2.9952789739539185e+01
|
||||
17 1.8646076112565459e+02 1.5320019319653665e+02 2.9835383868898358e+01
|
||||
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
|
||||
...
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user