Merge branch 'develop' into nm_split_styles
This commit is contained in:
34
unittest/force-styles/CMakeLists.libyaml
Normal file
34
unittest/force-styles/CMakeLists.libyaml
Normal file
@ -0,0 +1,34 @@
|
||||
# Custom minimal -*- CMake -*- file for libyaml
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(libyaml VERSION 0.2.5
|
||||
DESCRIPTION "LibYAML a YAML parser and emitter library"
|
||||
LANGUAGES C
|
||||
HOMEPAGE_URL https://pyyaml.org/wiki/LibYAML)
|
||||
|
||||
# compilation settings and options
|
||||
option(BUILD_SHARED_LIBS "Build libYAML as a shared library" OFF)
|
||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Create objects compatible with shared libraries" ON)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
add_library(yaml
|
||||
src/api.c
|
||||
src/dumper.c
|
||||
src/emitter.c
|
||||
src/loader.c
|
||||
src/parser.c
|
||||
src/reader.c
|
||||
src/scanner.c
|
||||
src/writer.c
|
||||
)
|
||||
|
||||
set(YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VERSION_PATCH}")
|
||||
set(CONFIG_H_FILE "#ifndef LIBYAML_CONFIG_H\n#define LIBYAML_CONFIG_H\n")
|
||||
set(CONFIG_H_FILE "${CONFIG_H_FILE}#define YAML_VERSION_MAJOR ${libyaml_VERSION_MAJOR}\n")
|
||||
set(CONFIG_H_FILE "${CONFIG_H_FILE}#define YAML_VERSION_MINOR ${libyaml_VERSION_MINOR}\n")
|
||||
set(CONFIG_H_FILE "${CONFIG_H_FILE}#define YAML_VERSION_PATCH ${libyaml_VERSION_PATCH}\n")
|
||||
set(CONFIG_H_FILE "${CONFIG_H_FILE}#define YAML_VERSION_STRING \"${libyaml_VERSION_MAJOR}.${libyaml_VERSION_MINOR}.${libyaml_VERSION_PATCH}\"\n#endif\n")
|
||||
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h "${CONFIG_H_FILE}")
|
||||
target_compile_definitions(yaml PRIVATE YAML_DECLARE_STATIC HAVE_CONFIG_H)
|
||||
target_include_directories(yaml PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR})
|
||||
@ -1,8 +1,15 @@
|
||||
|
||||
find_package(YAML)
|
||||
if(NOT YAML_FOUND)
|
||||
set(YAML_URL "https://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz" CACHE STRING "URL for libyaml tarball")
|
||||
set(YAML_MD5 "bb15429d8fb787e7d3f1c83ae129a999" CACHE STRING "MD5 checksum of libyaml tarball")
|
||||
mark_as_advanced(YAML_URL)
|
||||
mark_as_advanced(YAML_MD5)
|
||||
|
||||
# download and build a local copy of libyaml
|
||||
include(YAML)
|
||||
include(ExternalCMakeProject)
|
||||
ExternalCMakeProject(libyaml ${YAML_URL} ${YAML_MD5} yaml . CMakeLists.libyaml)
|
||||
add_library(Yaml::Yaml ALIAS yaml)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
@ -24,9 +31,14 @@ endif()
|
||||
|
||||
set(TEST_INPUT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
||||
add_library(style_tests STATIC yaml_writer.cpp error_stats.cpp test_config_reader.cpp test_main.cpp)
|
||||
target_compile_definitions(style_tests PRIVATE -DTEST_INPUT_FOLDER=${TEST_INPUT_FOLDER})
|
||||
if(YAML_FOUND)
|
||||
target_compile_definitions(style_tests PRIVATE TEST_INPUT_FOLDER=${TEST_INPUT_FOLDER})
|
||||
else()
|
||||
# we always use static linkage with local compiled libyaml
|
||||
target_compile_definitions(style_tests PRIVATE TEST_INPUT_FOLDER=${TEST_INPUT_FOLDER} YAML_DECLARE_STATIC)
|
||||
endif()
|
||||
target_include_directories(style_tests PRIVATE ${LAMMPS_SOURCE_DIR})
|
||||
target_link_libraries(style_tests PUBLIC GTest::GTest GTest::GMock Yaml::Yaml lammps)
|
||||
target_link_libraries(style_tests PUBLIC gmock Yaml::Yaml lammps)
|
||||
if(BUILD_MPI)
|
||||
target_link_libraries(style_tests PUBLIC MPI::MPI_CXX)
|
||||
else()
|
||||
@ -43,7 +55,7 @@ endif()
|
||||
# unit test for error stats class
|
||||
add_executable(test_error_stats test_error_stats.cpp)
|
||||
target_include_directories(test_error_stats PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${LAMMPS_SOURCE_DIR})
|
||||
target_link_libraries(test_error_stats PRIVATE GTest::GTestMain GTest::GTest)
|
||||
target_link_libraries(test_error_stats PRIVATE gtest_main)
|
||||
add_test(NAME ErrorStats COMMAND test_error_stats)
|
||||
|
||||
# pair style tester
|
||||
|
||||
@ -83,10 +83,10 @@ void TestConfigReader::prerequisites(const yaml_event_t &event)
|
||||
std::stringstream data((char *)event.data.scalar.value);
|
||||
std::string key, value;
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
data >> key >> value;
|
||||
if (data.eof()) break;
|
||||
config.prerequisites.push_back(std::make_pair(key, value));
|
||||
config.prerequisites.emplace_back(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,10 +138,10 @@ void TestConfigReader::extract(const yaml_event_t &event)
|
||||
std::stringstream data((char *)event.data.scalar.value);
|
||||
std::string name;
|
||||
int value;
|
||||
while (1) {
|
||||
while (true) {
|
||||
data >> name >> value;
|
||||
if (data.eof()) break;
|
||||
config.extract.push_back(make_pair(name, value));
|
||||
config.extract.emplace_back(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,11 @@
|
||||
#include "fmtlib_format.cpp"
|
||||
#include "fmtlib_os.cpp"
|
||||
|
||||
// Windows may define this as a macro
|
||||
#if defined(max)
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
TEST(ErrorStats, test)
|
||||
{
|
||||
ErrorStats stats;
|
||||
|
||||
@ -47,7 +47,7 @@ void write_yaml_header(YamlWriter *writer, TestConfig *cfg, const char *version)
|
||||
writer->emit("lammps_version", version);
|
||||
|
||||
// date_generated
|
||||
std::time_t now = time(NULL);
|
||||
std::time_t now = time(nullptr);
|
||||
std::string block = trim(ctime(&now));
|
||||
writer->emit("date_generated", block);
|
||||
|
||||
|
||||
@ -858,6 +858,13 @@ TEST(PairStyle, gpu)
|
||||
if (!Info::has_gpu_device()) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
// when testing PPPM styles with GPUs and GPU support is compiled with single precision
|
||||
// we also must have single precision FFTs; otherwise skip since the test would abort
|
||||
if (utils::strmatch(test_config.basename, ".*pppm.*") &&
|
||||
(Info::has_accelerator_feature("GPU", "precision", "single")) &&
|
||||
(!Info::has_fft_single_support()))
|
||||
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",
|
||||
@ -1252,7 +1259,7 @@ TEST(PairStyle, single)
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
// need to add this dependency
|
||||
test_config.prerequisites.push_back(std::make_pair("atom", "full"));
|
||||
test_config.prerequisites.emplace_back("atom", "full");
|
||||
|
||||
// create a LAMMPS instance with standard settings to detect the number of atom types
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:02 2021
|
||||
epsilon: 1e-11
|
||||
epsilon: 2e-11
|
||||
prerequisites: ! |
|
||||
pair eim
|
||||
pre_commands: ! ""
|
||||
|
||||
173
unittest/force-styles/tests/atomic-pair-reaxff-acks2.yaml
Normal file
173
unittest/force-styles/tests/atomic-pair-reaxff-acks2.yaml
Normal file
@ -0,0 +1,173 @@
|
||||
---
|
||||
lammps_version: 31 Aug 2021
|
||||
date_generated: Tue Sep 21 15:02:20 2021
|
||||
epsilon: 5e-9
|
||||
skip_tests: omp
|
||||
prerequisites: ! |
|
||||
pair reaxff
|
||||
fix acks2/reaxff
|
||||
pre_commands: ! |
|
||||
echo screen
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
atom_modify map array
|
||||
units real
|
||||
atom_style charge
|
||||
lattice diamond 3.77
|
||||
region box block 0 2 0 2 0 2
|
||||
create_box 2 box
|
||||
create_atoms 1 box
|
||||
displace_atoms all random 0.1 0.1 0.1 623426
|
||||
mass 1 1.0
|
||||
mass 2 16.0
|
||||
set type 1 type/fraction 2 0.333333333 998877
|
||||
set type 1 charge 0.01
|
||||
set type 2 charge -0.02
|
||||
velocity all create 100 4534624 loop geom
|
||||
post_commands: ! |
|
||||
fix qeq all acks2/reaxff 1 0.0 8.0 1.0e-20 reaxff
|
||||
input_file: in.empty
|
||||
pair_style: reaxff NULL checkqeq yes
|
||||
pair_coeff: ! |
|
||||
* * acks2_ff.water H O
|
||||
extract: ! ""
|
||||
natoms: 64
|
||||
init_vdwl: -1315.674323112547
|
||||
init_coul: -251.82520863781136
|
||||
init_stress: ! |-
|
||||
-3.6252552634610828e+02 -5.3642230434120154e+02 -3.2708821928047780e+02 -1.8739746594217769e+02 -7.3161204592256269e+01 2.8634078571435208e+02
|
||||
init_forces: ! |2
|
||||
1 -6.0368026319723334e-01 2.0490281105259228e+01 1.6647650192347417e+01
|
||||
2 -1.2754929753354234e+02 -6.4506752258382122e+01 -3.3765604494033497e+01
|
||||
3 -1.6340638699344356e+02 -1.3395894275690221e+01 4.5681732661684634e+01
|
||||
4 -7.8669167893588874e+00 1.2975050709670612e+02 -1.6422202215654622e+02
|
||||
5 4.8895820330576854e+01 1.3583526793691512e+00 1.9082272968463208e+01
|
||||
6 -3.2215264081964378e+01 -1.0434725558607181e+02 -2.9321909814724460e+01
|
||||
7 5.4687724085035022e+01 -4.0913013646280532e+01 -5.8353503975056263e+01
|
||||
8 -3.4374174863798075e+01 -5.4582176195261731e+01 3.9162148827896928e+01
|
||||
9 1.0602587269872288e+02 2.4517278481186896e+01 -8.2926292024679384e+01
|
||||
10 8.3433641774183407e+00 5.5896742851927943e+00 1.5837228744594089e+01
|
||||
11 8.6970191683169129e-01 -5.8991563586004766e+01 -3.9877951865531514e+01
|
||||
12 4.4192147377965640e+01 1.4903341767625852e+02 -1.6218738820961934e+02
|
||||
13 -1.4906540622411359e+02 -1.1995838086244909e+02 1.0915797981155475e+02
|
||||
14 -1.6840918424164060e+00 -2.4233434851726496e+01 -2.4811432594512457e+01
|
||||
15 2.8916293161615947e+01 9.0150734924389738e+01 5.2202528013163860e+00
|
||||
16 1.1511072719898208e+02 2.8294359308952078e+01 6.7521666411546050e+01
|
||||
17 4.4257318509790032e+01 4.2406840066994654e+01 7.2795080140788869e+01
|
||||
18 -7.8848831769041654e+00 -1.3664596390464098e+02 6.1096090529306210e+01
|
||||
19 1.0685808811691570e+02 2.0723200091856646e+02 4.4123703145411937e+01
|
||||
20 -4.9541566255910801e+01 -8.1664859207282433e+01 -2.8988844313476029e+01
|
||||
21 -1.3289404043644814e+02 3.7558583406053941e+01 -1.0102514473761195e+02
|
||||
22 1.3266704365038908e+02 -1.1782659065785897e+02 5.4036616742189061e+01
|
||||
23 5.1406826507867223e+01 -2.3873203577956730e+01 -4.7707992031474234e+01
|
||||
24 3.2375661774934940e+01 8.7122524112522697e+01 6.6904840845090462e+01
|
||||
25 -7.6343346793073664e+01 1.4702372716259256e+02 -6.9634429545332381e+01
|
||||
26 1.3052482043203892e+02 -7.6695952258764208e+01 -6.8144336882390846e+01
|
||||
27 6.2295256121926471e+01 5.0088548894938114e+01 3.3482187356569881e+01
|
||||
28 8.1224991426364603e+00 -3.8522307644648572e+00 -1.5910295435991639e+01
|
||||
29 -1.1706768240874355e+02 7.1116543353676818e+01 1.0440306737798934e+02
|
||||
30 2.6668840384251649e+01 -1.1285667565996226e+02 1.8633172811903989e+01
|
||||
31 -1.0847355678967622e+02 1.0996595842176285e+02 -5.5616286819737311e+01
|
||||
32 -1.4603119222198394e+01 4.2813303531510641e+01 3.8845175595330531e+01
|
||||
33 -2.9522724683327016e+01 -7.8740075435568029e+00 4.0691892849331758e+01
|
||||
34 9.4358005650347835e+01 5.1578786222111148e+01 4.9877606247135589e+00
|
||||
35 1.3878162567772878e+02 1.3002914177061694e+01 -3.9262700309813695e+01
|
||||
36 -5.4285827285916746e+01 -8.6097074177259515e+01 6.3573072280656689e+01
|
||||
37 4.8502367882367082e+01 7.1094372467616139e+01 -6.4170831125588478e+01
|
||||
38 -1.2068302892901679e+02 -2.3921624494724261e+02 1.0639158013338042e+02
|
||||
39 4.7483616773316575e+00 1.1147185880245857e+01 9.5242536579092729e+01
|
||||
40 -4.2106716215321676e+00 2.8923432927375652e+00 -3.8847459020822011e+00
|
||||
41 -1.2582176673926276e+02 -1.1458507442867946e+02 1.5633840332025807e+01
|
||||
42 4.3299931174721657e+01 -1.1323682562113908e+02 -1.2149036854079469e+02
|
||||
43 -6.1455115997918410e+00 -1.1290761800594723e+01 1.3010001275147209e+02
|
||||
44 2.3306479216564437e+01 -7.2456643864466814e+00 -2.1408875167843437e+01
|
||||
45 -2.2863088909548026e+01 1.3728756890564244e+02 1.7762941813938326e+02
|
||||
46 4.5766906983362070e+01 -6.7544686606488227e+01 3.7528326465811972e+01
|
||||
47 -3.2700893536527538e+01 -5.3002101899722568e+01 -5.4679464444461047e+01
|
||||
48 2.0328502419620253e+02 -3.0317080221415955e+02 -1.7385360483394399e+02
|
||||
49 -6.8067873927712014e+01 3.9176176719051938e+01 3.5930432225694524e+01
|
||||
50 8.9353300749969620e+00 1.4185265656301095e+02 1.5862761052665803e+02
|
||||
51 3.5555345549045576e+01 -3.2564032333055451e+01 1.4767362774338116e+02
|
||||
52 -1.0584640086659454e+02 1.0312320105331467e+02 -5.0601860204759092e+01
|
||||
53 -3.3989834984567189e+01 9.4952795280998046e+01 -2.0788572482728082e+02
|
||||
54 3.1058276661162811e+01 -5.5555419356318176e+01 4.7450764854663454e+01
|
||||
55 8.0177808131181635e+01 -1.2981809858342260e+02 5.6596128355738813e+01
|
||||
56 -1.2360446884305839e+01 -2.8595758498921775e+01 -5.6863776538006210e+00
|
||||
57 4.5290996755611062e+01 1.5919693798996261e+02 9.9974122525349088e+01
|
||||
58 -2.8760688272312827e+01 6.0635769417465973e+01 -2.3798836888216112e+01
|
||||
59 -2.2258012527336544e+02 1.3033272684720029e+02 1.4065235688360508e+02
|
||||
60 -2.7053865051546467e+01 1.4140560377577856e+02 -1.2766809320306062e+02
|
||||
61 -6.3880582214376446e+01 -1.6334264803781880e+02 -1.2897713279774706e+02
|
||||
62 6.9329936622438794e+01 6.4175913906891367e+01 -9.4055044619463501e+01
|
||||
63 1.1093666087049192e+02 -1.8945409551622827e+01 -7.9769943280840309e+01
|
||||
64 -3.2043182569612747e+00 6.0969354223353436e-02 8.3726884654705636e+00
|
||||
run_vdwl: -1315.67379925802
|
||||
run_coul: -251.82538792482003
|
||||
run_stress: ! |-
|
||||
-3.6252933525980472e+02 -5.3641871517019717e+02 -3.2709175284369167e+02 -1.8738655015007816e+02 -7.3168357673524369e+01 2.8633318365887470e+02
|
||||
run_forces: ! |2
|
||||
1 -6.0427779703512252e-01 2.0490756272412511e+01 1.6647493421616424e+01
|
||||
2 -1.2754841307685804e+02 -6.4508077454175094e+01 -3.3763524679658680e+01
|
||||
3 -1.6340651846845867e+02 -1.3399328724256982e+01 4.5679725510421832e+01
|
||||
4 -7.8684594311176888e+00 1.2975107988543994e+02 -1.6422243689311080e+02
|
||||
5 4.8894979857641701e+01 1.3587905179520945e+00 1.9080723746040558e+01
|
||||
6 -3.2215908697921762e+01 -1.0434604335770943e+02 -2.9323571125825332e+01
|
||||
7 5.4688956076284285e+01 -4.0913951081108415e+01 -5.8353333114689789e+01
|
||||
8 -3.4374795730683481e+01 -5.4582565197183818e+01 3.9161685070849273e+01
|
||||
9 1.0602750268492444e+02 2.4518806007662270e+01 -8.2928224031342211e+01
|
||||
10 8.3448765452309477e+00 5.5864371171692877e+00 1.5832573244721663e+01
|
||||
11 8.7180631758889338e-01 -5.8993323881745852e+01 -3.9884267152772146e+01
|
||||
12 4.4192365852491093e+01 1.4903429729452878e+02 -1.6219206584779144e+02
|
||||
13 -1.4906927452343609e+02 -1.1995874777506886e+02 1.0916264378106862e+02
|
||||
14 -1.6828280298940346e+00 -2.4232825100885098e+01 -2.4809440148861022e+01
|
||||
15 2.8919110783949506e+01 9.0150838201145390e+01 5.2192985984410605e+00
|
||||
16 1.1511130216873305e+02 2.8295862401014123e+01 6.7521012199711848e+01
|
||||
17 4.4256599992638108e+01 4.2406484713402243e+01 7.2795346026494585e+01
|
||||
18 -7.8848008384430539e+00 -1.3664634639099947e+02 6.1095756801901778e+01
|
||||
19 1.0685903199732036e+02 2.0723222350990062e+02 4.4124512300846625e+01
|
||||
20 -4.9546858835888280e+01 -8.1659242595103365e+01 -2.8998046004100793e+01
|
||||
21 -1.3289412244333695e+02 3.7556999753658936e+01 -1.0102308037606839e+02
|
||||
22 1.3266755025284439e+02 -1.1782686540823109e+02 5.4036617937847950e+01
|
||||
23 5.1405885909264370e+01 -2.3873943214452368e+01 -4.7708844268632390e+01
|
||||
24 3.2373370471025311e+01 8.7125637769180997e+01 6.6908838382987426e+01
|
||||
25 -7.6344016160229543e+01 1.4702421930244424e+02 -6.9633680565374561e+01
|
||||
26 1.3052497933070995e+02 -7.6696652508392248e+01 -6.8143428678963431e+01
|
||||
27 6.2295886509448287e+01 5.0089165913467404e+01 3.3482708752529071e+01
|
||||
28 8.1190626623672930e+00 -3.8523237731699100e+00 -1.5914254496826086e+01
|
||||
29 -1.1706723439423264e+02 7.1117332937318878e+01 1.0440215382628243e+02
|
||||
30 2.6668772919869735e+01 -1.1285862351526934e+02 1.8633778385120795e+01
|
||||
31 -1.0847428154293594e+02 1.0996582278921207e+02 -5.5617081154122886e+01
|
||||
32 -1.4603651831782168e+01 4.2816664679363605e+01 3.8851610792442827e+01
|
||||
33 -2.9519680131282556e+01 -7.8704683492661038e+00 4.0688290026701139e+01
|
||||
34 9.4358200696983218e+01 5.1577940760121209e+01 4.9883503942774707e+00
|
||||
35 1.3878184805054929e+02 1.3003401024036332e+01 -3.9263099864942795e+01
|
||||
36 -5.4286023648995418e+01 -8.6096314968346391e+01 6.3573237117647288e+01
|
||||
37 4.8502340503125687e+01 7.1092674139180076e+01 -6.4168924259418233e+01
|
||||
38 -1.2068169270717785e+02 -2.3921584479385240e+02 1.0639203784120866e+02
|
||||
39 4.7485776026051134e+00 1.1146641081166505e+01 9.5242256869966710e+01
|
||||
40 -4.2108599786857281e+00 2.8922835579037174e+00 -3.8847867381075893e+00
|
||||
41 -1.2582200605811198e+02 -1.1458626320666988e+02 1.5634634730428779e+01
|
||||
42 4.3298811262104522e+01 -1.1323825959325698e+02 -1.2148951307455756e+02
|
||||
43 -6.1445155174009782e+00 -1.1289851749911026e+01 1.3009938178494568e+02
|
||||
44 2.3304112892355839e+01 -7.2440612084043048e+00 -2.1407988900122422e+01
|
||||
45 -2.2861406128358620e+01 1.3728999900873370e+02 1.7762870040423550e+02
|
||||
46 4.5768613429530582e+01 -6.7545097081622060e+01 3.7529079576855302e+01
|
||||
47 -3.2701732666230441e+01 -5.3001652471881712e+01 -5.4679269668412701e+01
|
||||
48 2.0328585168114128e+02 -3.0317396492632025e+02 -1.7385434764992988e+02
|
||||
49 -6.8067688050655704e+01 3.9177224134041339e+01 3.5930110316890534e+01
|
||||
50 8.9327213346898784e+00 1.4185280256429226e+02 1.5862826485318126e+02
|
||||
51 3.5558738484365847e+01 -3.2568300408296722e+01 1.4767879474338230e+02
|
||||
52 -1.0584741977885415e+02 1.0312398264883062e+02 -5.0601463470758752e+01
|
||||
53 -3.3993088743715688e+01 9.4956349730017635e+01 -2.0789074418856003e+02
|
||||
54 3.1064727433155586e+01 -5.5559689516396887e+01 4.7459382807520264e+01
|
||||
55 8.0177886992157639e+01 -1.2981800298783250e+02 5.6595487267941550e+01
|
||||
56 -1.2360401264720954e+01 -2.8594676148725313e+01 -5.6861881216640269e+00
|
||||
57 4.5290952881935198e+01 1.5919551554155248e+02 9.9973551309890851e+01
|
||||
58 -2.8760842576207317e+01 6.0634819158216445e+01 -2.3799874997643553e+01
|
||||
59 -2.2258027485314665e+02 1.3033435434930627e+02 1.4065348873603111e+02
|
||||
60 -2.7053242000018251e+01 1.4140890863215688e+02 -1.2766702327645474e+02
|
||||
61 -6.3880091105988988e+01 -1.6334055272776587e+02 -1.2897680193744620e+02
|
||||
62 6.9331724159145509e+01 6.4173290531939443e+01 -9.4050280780932169e+01
|
||||
63 1.1093735613545634e+02 -1.8944653137110969e+01 -7.9770997264690990e+01
|
||||
64 -3.2080968598290363e+00 5.4907326642554835e-02 8.3750551713524164e+00
|
||||
...
|
||||
176
unittest/force-styles/tests/atomic-pair-reaxff-acks2_efield.yaml
Normal file
176
unittest/force-styles/tests/atomic-pair-reaxff-acks2_efield.yaml
Normal file
@ -0,0 +1,176 @@
|
||||
---
|
||||
lammps_version: 29 Sep 2021
|
||||
date_generated: Wed Oct 13 18:05:37 2021
|
||||
epsilon: 5e-09
|
||||
skip_tests: omp
|
||||
prerequisites: ! |
|
||||
pair reaxff
|
||||
fix acks2/reaxff
|
||||
fix efield
|
||||
pre_commands: ! |
|
||||
echo screen
|
||||
boundary m p m
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
atom_modify map array
|
||||
units real
|
||||
atom_style charge
|
||||
lattice diamond 3.77
|
||||
region box block 0 2 0 2 0 2
|
||||
create_box 2 box
|
||||
create_atoms 1 box
|
||||
displace_atoms all random 0.1 0.1 0.1 623426
|
||||
mass 1 1.0
|
||||
mass 2 16.0
|
||||
set type 1 type/fraction 2 0.333333333 998877
|
||||
set type 1 charge 0.01
|
||||
set type 2 charge -0.02
|
||||
velocity all create 100 4534624 loop geom
|
||||
post_commands: ! |
|
||||
fix qeq all acks2/reaxff 1 0.0 8.0 1.0e-20 reaxff
|
||||
fix field all efield 0.001 0.000 -0.001
|
||||
input_file: in.empty
|
||||
pair_style: reaxff NULL checkqeq yes
|
||||
pair_coeff: ! |
|
||||
* * acks2_ff.water H O
|
||||
extract: ! ""
|
||||
natoms: 64
|
||||
init_vdwl: -1263.7843580276833
|
||||
init_coul: -241.77421360301622
|
||||
init_stress: ! |-
|
||||
-1.0732687705180101e+03 -1.0968581855302236e+03 -8.9675214779212911e+02 -6.2181509337974205e+02 8.0965758549240192e+01 -3.3557256247328615e+02
|
||||
init_forces: ! |2
|
||||
1 1.6544873233628813e+01 1.8862665510840209e+01 2.0996152926847120e+01
|
||||
2 1.4107834931964554e+01 1.1562492571378540e+01 1.7399331363893921e+01
|
||||
3 -1.6237159803722722e+02 7.3768611650058613e-01 3.1249313093594427e+01
|
||||
4 -3.7132168139442896e+01 -4.1348791089422249e+01 9.7297469776452239e+00
|
||||
5 8.4639020127616135e+01 1.1700543338567250e+01 -2.0669303202462331e+01
|
||||
6 -6.7193803612931589e+01 -1.0878669861242204e+02 -6.7762372009491596e+00
|
||||
7 5.5859023847810974e+01 -3.6423373006689900e+01 -5.9883505955638867e+01
|
||||
8 7.5524936995194892e+01 3.7206352688917150e+01 -9.1328349315703619e+01
|
||||
9 9.1130895600440979e+01 -8.0301316370963942e+00 -5.4852426195812804e+01
|
||||
10 -5.0551266395515722e+00 2.0267717120929724e+01 3.8895863126909710e+01
|
||||
11 2.2566658900909613e+00 -5.5304165456265110e+01 -3.3341598415342069e+01
|
||||
12 -8.6535829138121315e+01 -6.9396569247311319e+01 7.0609040432477826e+01
|
||||
13 6.5588331967798567e+01 3.4684525121633868e+01 -1.0088769226898077e+02
|
||||
14 -3.6420201957516922e+00 -2.4435068124276075e+01 -2.4467648024146090e+01
|
||||
15 -1.8836951424155945e+01 4.6726538059504868e+01 4.0645964870661466e+01
|
||||
16 -3.5128322960337672e+00 1.9617147249697741e+01 2.1986616163791854e+01
|
||||
17 3.0824371211950428e+01 5.1089885717446847e+01 2.4230958400273195e+01
|
||||
18 6.5737244296448072e+00 -1.4597245806268733e+01 -7.6810211814524658e+00
|
||||
19 5.4554598758648780e+01 2.1142177097216361e+02 7.1040683521812937e+01
|
||||
20 6.6655564140916761e+00 -1.2392613251772549e+02 6.2549558370165414e+01
|
||||
21 -1.6665361076208004e+02 5.0057857067631467e+01 -1.1352343180529587e+02
|
||||
22 3.1292433219186524e+01 -2.6413949828022356e+00 1.5285607176899094e+02
|
||||
23 4.4081782799617116e+01 -3.6246774449704979e+01 -4.5797722792608511e+01
|
||||
24 2.8700709559300659e+01 7.2175615569147638e+01 5.7369098498268578e+01
|
||||
25 -5.5580855024638424e+01 -6.4654228469645361e+01 9.7692246756652978e+01
|
||||
26 1.2973493969999291e+02 -7.5778827402876644e+01 -6.6515328508133550e+01
|
||||
27 8.8126716297991138e+01 5.1433527767092137e+01 2.3407077354386384e+01
|
||||
28 1.2511253239242043e+01 1.3636132025181478e+01 -9.4253259151143549e+00
|
||||
29 -1.1778606765410751e+02 6.6008522248248454e+01 9.0944536800011150e+01
|
||||
30 1.9914163526214200e+01 -1.1702697898021106e+02 1.5464671145793428e+01
|
||||
31 -1.1140631382104954e+02 -4.6409410482794783e+01 -2.1344928927691623e+01
|
||||
32 -1.1955448702076986e+01 9.5875384658668636e+00 2.7935715319779696e+01
|
||||
33 8.7786579760163562e+01 -6.1345188767581263e+01 -7.1583281055181686e+01
|
||||
34 1.2872548655914446e+02 8.7759051883822295e+01 6.8846205973723400e+01
|
||||
35 1.6202753364566260e+02 2.8107190316085855e+01 -3.5703982160947440e+01
|
||||
36 -5.1138513989988184e+01 -6.9911430734306776e+01 4.6497683634936855e+01
|
||||
37 2.2164674302914040e+01 4.4737593543364085e+01 -6.8023531826609343e+01
|
||||
38 -1.3243129081970449e+02 -9.8322438904976408e+01 -4.8865871604589785e+01
|
||||
39 -1.4539914202022622e+01 7.0254382906605883e-01 -6.9870852838183719e+00
|
||||
40 -6.3757234386642994e+00 3.6220340490265279e+00 -6.3430626603811451e+00
|
||||
41 -1.2630715661950779e+02 -1.1405926855800243e+02 1.4235856837032820e+01
|
||||
42 3.3348455809719603e+01 -1.2561825182001029e+02 -1.1707774931406259e+02
|
||||
43 2.4855608100273688e+01 -3.4752760572532353e+01 1.1721316758164591e+02
|
||||
44 4.0739282283363146e+01 -1.2074985902270566e+01 -2.3182902503712622e+01
|
||||
45 -2.3237992224046511e+01 1.3605501182748912e+02 1.7647506188220666e+02
|
||||
46 2.6919517337707384e+00 4.1721320911687787e+00 -3.8364966679971597e+00
|
||||
47 -3.9485981497722868e+01 -4.3831504145579089e+01 -5.0164524782887561e+01
|
||||
48 9.2976340136280768e+01 -8.8061944561111218e+01 -5.6621723131204867e+01
|
||||
49 5.7415986126026773e+01 2.1746462671254432e+00 -4.3765218912166020e+01
|
||||
50 5.0097667749424950e+01 2.7265189853128518e+01 1.0400665840596920e+02
|
||||
51 1.8957139639185641e+01 -6.2782103815444735e+01 1.6722596849835512e+02
|
||||
52 -1.0201283330855033e+02 1.0135195584789010e+02 -4.9656402161283062e+01
|
||||
53 -8.9760482392830099e+01 1.0161186676769185e+02 -2.2025992484840475e+02
|
||||
54 -3.0614746621547880e+01 -1.9050762297562603e+01 -2.5859185152914435e+01
|
||||
55 -7.5153564648369642e-01 -9.6902529050367114e-01 1.2743187960663205e+00
|
||||
56 -8.4859544509025913e+00 -1.4740153224666239e+01 1.0257345367891229e+01
|
||||
57 4.7507280968459092e+01 1.6105950569287401e+02 1.0237884790486045e+02
|
||||
58 -1.3171330115126645e+01 7.3223243955129831e+01 4.4809585421873388e+00
|
||||
59 -6.4621630782895465e+01 9.6129174704686022e+01 1.5093371796835154e+02
|
||||
60 3.0088516319665583e+01 1.7978356604345029e+02 -9.7558160484741677e+01
|
||||
61 -5.1750730839626343e+01 -1.7194405989348417e+02 -1.2738166548385770e+02
|
||||
62 5.7609018186683649e+01 5.3316676874956656e+01 -1.0988014102420154e+02
|
||||
63 -2.5215659343014210e+01 -5.4629420152948171e+01 -5.0894419130817056e+01
|
||||
64 -8.8059251331362219e+01 -3.0748812251211561e+01 3.1311409613927594e+01
|
||||
run_vdwl: -1263.7812226205149
|
||||
run_coul: -241.77431297463355
|
||||
run_stress: ! |-
|
||||
-1.0732623865648388e+03 -1.0968521804966483e+03 -8.9674335342881352e+02 -6.2181391692244063e+02 8.0959729084010746e+01 -3.3558013691685204e+02
|
||||
run_forces: ! |2
|
||||
1 1.6544232553581971e+01 1.8862019986836589e+01 2.0994941865486204e+01
|
||||
2 1.4107290444024050e+01 1.1562222232717577e+01 1.7398935380843948e+01
|
||||
3 -1.6237215881974376e+02 7.3432961093932936e-01 3.1246919721674431e+01
|
||||
4 -3.7132561907901767e+01 -4.1349112476812373e+01 9.7306813516100714e+00
|
||||
5 8.4639859379463857e+01 1.1701335850556484e+01 -2.0670118889863986e+01
|
||||
6 -6.7193179286828212e+01 -1.0878480473686349e+02 -6.7776201873383126e+00
|
||||
7 5.5860279340002492e+01 -3.6424202640975622e+01 -5.9883243627543052e+01
|
||||
8 7.5523949595969242e+01 3.7205843645225180e+01 -9.1328163429407269e+01
|
||||
9 9.1132153498365000e+01 -8.0294015106958536e+00 -5.4854373254291879e+01
|
||||
10 -5.0543438938869816e+00 2.0265568551370560e+01 3.8892408370645036e+01
|
||||
11 2.2590900417619166e+00 -5.5306216756222348e+01 -3.3348769387388884e+01
|
||||
12 -8.6529917311355064e+01 -6.9392956100368195e+01 7.0605936206703788e+01
|
||||
13 6.5582829942500510e+01 3.4683277452110765e+01 -1.0088129053457016e+02
|
||||
14 -3.6407547584093862e+00 -2.4434434655450158e+01 -2.4465678413828943e+01
|
||||
15 -1.8835383504020545e+01 4.6725147451466299e+01 4.0644786358859363e+01
|
||||
16 -3.5128444201904752e+00 1.9614904774654285e+01 2.1983872664041776e+01
|
||||
17 3.0824498024574577e+01 5.1089866020602130e+01 2.4231024241605290e+01
|
||||
18 6.5739130682327769e+00 -1.4597089579069062e+01 -7.6808820450601480e+00
|
||||
19 5.4555769907347333e+01 2.1142176567824694e+02 7.1041499624047702e+01
|
||||
20 6.6656938419689631e+00 -1.2392554538030720e+02 6.2549560025499467e+01
|
||||
21 -1.6665373624470132e+02 5.0057368819337832e+01 -1.1352271444751825e+02
|
||||
22 3.1294137972313312e+01 -2.6433268939701646e+00 1.5285580563663439e+02
|
||||
23 4.4080875001871384e+01 -3.6247455920969131e+01 -4.5798644712663076e+01
|
||||
24 2.8698567600094101e+01 7.2178641106694457e+01 5.7372823020059315e+01
|
||||
25 -5.5580418986766084e+01 -6.4654019131590019e+01 9.7691735465611018e+01
|
||||
26 1.2973502303885829e+02 -7.5779455574870099e+01 -6.6514358152908059e+01
|
||||
27 8.8126287913796759e+01 5.1435504570072304e+01 2.3409291923481693e+01
|
||||
28 1.2510113771398244e+01 1.3634931483058264e+01 -9.4252533397897764e+00
|
||||
29 -1.1778523460931234e+02 6.6009613580347121e+01 9.0943212016746855e+01
|
||||
30 1.9914063738336566e+01 -1.1702883459063344e+02 1.5465197779555830e+01
|
||||
31 -1.1140726302354332e+02 -4.6410020081938136e+01 -2.1345709679555512e+01
|
||||
32 -1.1957048806890009e+01 9.5906378303466582e+00 2.7942436601482576e+01
|
||||
33 8.7786367176445452e+01 -6.1345385969144544e+01 -7.1583303703860352e+01
|
||||
34 1.2872581367351663e+02 8.7758298153621197e+01 6.8846441344195767e+01
|
||||
35 1.6202779191187562e+02 2.8107540424415969e+01 -3.5704512791568746e+01
|
||||
36 -5.1137206842063968e+01 -6.9909055340457016e+01 4.6496527650762957e+01
|
||||
37 2.2163372903721005e+01 4.4734516931542203e+01 -6.8020131205899546e+01
|
||||
38 -1.3243178798824840e+02 -9.8321818047878409e+01 -4.8866073883159153e+01
|
||||
39 -1.4539787995247799e+01 7.0253538717035013e-01 -6.9871154389387859e+00
|
||||
40 -6.3759251823074372e+00 3.6219715809810360e+00 -6.3431123972910317e+00
|
||||
41 -1.2630739214311127e+02 -1.1406046951535005e+02 1.4236670870575175e+01
|
||||
42 3.3347539164801596e+01 -1.2561964397086489e+02 -1.1707704405287748e+02
|
||||
43 2.4855187641070557e+01 -3.4751994200759135e+01 1.1721400031115856e+02
|
||||
44 4.0736513361477975e+01 -1.2073170509775336e+01 -2.3181680396846534e+01
|
||||
45 -2.3236271184767592e+01 1.3605750605535329e+02 1.7647433643140135e+02
|
||||
46 2.6919972472205083e+00 4.1721174495610596e+00 -3.8364650402611424e+00
|
||||
47 -3.9486312669643070e+01 -4.3831801629913109e+01 -5.0165032821803521e+01
|
||||
48 9.2977999041840789e+01 -8.8063595664574294e+01 -5.6623443462956914e+01
|
||||
49 5.7416262761079196e+01 2.1747968406494360e+00 -4.3764886460190468e+01
|
||||
50 5.0095819904085424e+01 2.7265328004138762e+01 1.0400611458885135e+02
|
||||
51 1.8960698364911142e+01 -6.2786559548989580e+01 1.6723090861991949e+02
|
||||
52 -1.0201510984444386e+02 1.0135385381698417e+02 -4.9656785152734628e+01
|
||||
53 -8.9763310205569240e+01 1.0161533612990944e+02 -2.2026493760153934e+02
|
||||
54 -3.0614025776936483e+01 -1.9050045961497887e+01 -2.5858482423080094e+01
|
||||
55 -7.5156660469712333e-01 -9.6904023224723745e-01 1.2743032380741282e+00
|
||||
56 -8.4859915855388337e+00 -1.4739109817962941e+01 1.0257420490900687e+01
|
||||
57 4.7507223485547648e+01 1.6105805016960610e+02 1.0237826693894539e+02
|
||||
58 -1.3170532544205338e+01 7.3223353402828366e+01 4.4818703297184754e+00
|
||||
59 -6.4622658207012819e+01 9.6130764940749344e+01 1.5093510874841516e+02
|
||||
60 3.0089230627199072e+01 1.7978668287947750e+02 -9.7557372159122423e+01
|
||||
61 -5.1750204112643075e+01 -1.7194201577527312e+02 -1.2738134561846734e+02
|
||||
62 5.7608008441869174e+01 5.3315211268989366e+01 -1.0988080965709574e+02
|
||||
63 -2.5216351744964118e+01 -5.4629182629703294e+01 -5.0894055553792974e+01
|
||||
64 -8.8059174176173670e+01 -3.0751077235434341e+01 3.1310372105706474e+01
|
||||
...
|
||||
@ -14,7 +14,7 @@ post_commands: ! ""
|
||||
input_file: in.bilayer
|
||||
pair_style: hybrid/overlay lebedeva/z 16.0
|
||||
pair_coeff: ! |
|
||||
* * lebedeva/z CC.Lebedeva C C C
|
||||
* * lebedeva/z CC.Lebedeva C1 C1 C1
|
||||
extract: ! ""
|
||||
natoms: 48
|
||||
init_vdwl: 2360.887727742073
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:09:15 2021
|
||||
epsilon: 7.5e-12
|
||||
epsilon: 1e-10
|
||||
prerequisites: ! |
|
||||
pair meam
|
||||
pre_commands: ! |
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
lammps_version: 10 Feb 2021
|
||||
date_generated: Fri Feb 26 23:08:42 2021
|
||||
epsilon: 1.5e-13
|
||||
epsilon: 2.0e-13
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
pair coul/long
|
||||
|
||||
@ -31,9 +31,9 @@ YamlWriter::YamlWriter(const char *outfile)
|
||||
|
||||
yaml_stream_start_event_initialize(&event, YAML_UTF8_ENCODING);
|
||||
yaml_emitter_emit(&emitter, &event);
|
||||
yaml_document_start_event_initialize(&event, NULL, NULL, NULL, 0);
|
||||
yaml_document_start_event_initialize(&event, nullptr, nullptr, nullptr, 0);
|
||||
yaml_emitter_emit(&emitter, &event);
|
||||
yaml_mapping_start_event_initialize(&event, NULL, (yaml_char_t *)YAML_MAP_TAG, 1,
|
||||
yaml_mapping_start_event_initialize(&event, nullptr, (yaml_char_t *)YAML_MAP_TAG, 1,
|
||||
YAML_ANY_MAPPING_STYLE);
|
||||
yaml_emitter_emit(&emitter, &event);
|
||||
}
|
||||
@ -67,11 +67,11 @@ void YamlWriter::emit(const std::string &key, const int value)
|
||||
|
||||
void YamlWriter::emit(const std::string &key, const std::string &value)
|
||||
{
|
||||
yaml_scalar_event_initialize(&event, NULL, (yaml_char_t *)YAML_STR_TAG,
|
||||
yaml_scalar_event_initialize(&event, nullptr, (yaml_char_t *)YAML_STR_TAG,
|
||||
(yaml_char_t *)key.c_str(), key.size(), 1, 0,
|
||||
YAML_PLAIN_SCALAR_STYLE);
|
||||
yaml_emitter_emit(&emitter, &event);
|
||||
yaml_scalar_event_initialize(&event, NULL, (yaml_char_t *)YAML_STR_TAG,
|
||||
yaml_scalar_event_initialize(&event, nullptr, (yaml_char_t *)YAML_STR_TAG,
|
||||
(yaml_char_t *)value.c_str(), value.size(), 1, 0,
|
||||
YAML_PLAIN_SCALAR_STYLE);
|
||||
yaml_emitter_emit(&emitter, &event);
|
||||
@ -79,11 +79,11 @@ void YamlWriter::emit(const std::string &key, const std::string &value)
|
||||
|
||||
void YamlWriter::emit_block(const std::string &key, const std::string &value)
|
||||
{
|
||||
yaml_scalar_event_initialize(&event, NULL, (yaml_char_t *)YAML_STR_TAG,
|
||||
yaml_scalar_event_initialize(&event, nullptr, (yaml_char_t *)YAML_STR_TAG,
|
||||
(yaml_char_t *)key.c_str(), key.size(), 1, 0,
|
||||
YAML_PLAIN_SCALAR_STYLE);
|
||||
yaml_emitter_emit(&emitter, &event);
|
||||
yaml_scalar_event_initialize(&event, NULL, (yaml_char_t *)YAML_STR_TAG,
|
||||
yaml_scalar_event_initialize(&event, nullptr, (yaml_char_t *)YAML_STR_TAG,
|
||||
(yaml_char_t *)value.c_str(), value.size(), 1, 0,
|
||||
YAML_LITERAL_SCALAR_STYLE);
|
||||
yaml_emitter_emit(&emitter, &event);
|
||||
|
||||
Reference in New Issue
Block a user