diff --git a/source/module_io/test/print_info_test.cpp b/source/module_io/test/print_info_test.cpp index 38ef261972..ff07dd68ff 100644 --- a/source/module_io/test/print_info_test.cpp +++ b/source/module_io/test/print_info_test.cpp @@ -1,13 +1,13 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" #define private public -#include "module_io/print_info.h" -#include "module_io/input.h" -#include "prepare_unitcell.h" -#include "module_cell/unitcell.h" #include "module_cell/klist.h" #include "module_cell/parallel_kpoints.h" +#include "module_cell/unitcell.h" #include "module_io/berryphase.h" +#include "module_io/print_info.h" +#include "module_parameter/parameter.h" +#include "prepare_unitcell.h" #undef private #ifdef __LCAO InfoNonlocal::InfoNonlocal(){} @@ -106,32 +106,32 @@ TEST_F(PrintInfoTest, SetupParameters) GlobalV::CALCULATION = cal_type[i]; for(int j=0; jbefore_all_runners(input, ucell); + p_esolver->before_all_runners(param_in.inp, ucell); - mdrun = new FIRE(input.mdp, ucell); + mdrun = new FIRE(param_in, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); } @@ -172,7 +169,7 @@ TEST_F(FIREtest, Restart) EXPECT_EQ(fire->alpha, 0.1); EXPECT_EQ(fire->negative_count, 0); EXPECT_EQ(fire->dt_max, -1); - EXPECT_EQ(mdrun->mdp.md_dt, 41.3414); + EXPECT_EQ(fire->md_dt, 41.3414); } TEST_F(FIREtest, PrintMD) diff --git a/source/module_md/test/langevin_test.cpp b/source/module_md/test/langevin_test.cpp index 0f267c4add..1ab900c475 100644 --- a/source/module_md/test/langevin_test.cpp +++ b/source/module_md/test/langevin_test.cpp @@ -1,13 +1,10 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_esolver/esolver_lj.h" -#include "setcell.h" - #define private public #define protected public +#include "module_esolver/esolver_lj.h" #include "module_md/langevin.h" -#undef private -#undef protected +#include "setcell.h" #define doublethreshold 1e-12 /************************************************ @@ -40,18 +37,18 @@ class Langevin_test : public testing::Test protected: MD_base* mdrun; UnitCell ucell; - Input_para input; + Parameter param_in; ModuleESolver::ESolver* p_esolver; void SetUp() { Setcell::setupcell(ucell); - Setcell::parameters(input); + Setcell::parameters(param_in.input); p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->before_all_runners(input, ucell); + p_esolver->before_all_runners(param_in.inp, ucell); - mdrun = new Langevin(input.mdp, ucell); + mdrun = new Langevin(param_in, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); } diff --git a/source/module_md/test/md_func_test.cpp b/source/module_md/test/md_func_test.cpp index 44ede5fa53..dd1a4e58f5 100644 --- a/source/module_md/test/md_func_test.cpp +++ b/source/module_md/test/md_func_test.cpp @@ -1,8 +1,9 @@ -#include "module_md/md_func.h" - #include "gmock/gmock.h" #include "gtest/gtest.h" +#define private public +#define protected public #include "module_esolver/esolver_lj.h" +#include "module_md/md_func.h" #include "setcell.h" #define doublethreshold 1e-12 @@ -58,12 +59,12 @@ class MD_func_test : public testing::Test int natom; // atom number double temperature; // temperature int frozen_freedom; // frozen_freedom - Input_para input; + Parameter param_in; void SetUp() { Setcell::setupcell(ucell); - Setcell::parameters(input); + Setcell::parameters(param_in.input); natom = ucell.nat; allmass = new double[natom]; pos = new ModuleBase::Vector3[natom]; @@ -210,7 +211,7 @@ TEST_F(MD_func_test, compute_stress) TEST_F(MD_func_test, dump_info) { - MD_func::dump_info(0, GlobalV::MY_RANK, GlobalV::global_out_dir, ucell, input.mdp, virial, force, vel); + MD_func::dump_info(0, GlobalV::global_out_dir, ucell, param_in, virial, force, vel); std::ifstream ifs("MD_dump"); std::string output_str; getline(ifs, output_str); @@ -256,7 +257,7 @@ TEST_F(MD_func_test, dump_info) ifs.close(); // append - MD_func::dump_info(1, GlobalV::MY_RANK, GlobalV::global_out_dir, ucell, input.mdp, virial, force, vel); + MD_func::dump_info(1, GlobalV::global_out_dir, ucell, param_in, virial, force, vel); std::ifstream ifs2("MD_dump"); getline(ifs2, output_str); EXPECT_THAT(output_str, testing::HasSubstr("MDSTEP: 0")); diff --git a/source/module_md/test/msst_test.cpp b/source/module_md/test/msst_test.cpp index 2ac151c0bf..e9e4b249fb 100644 --- a/source/module_md/test/msst_test.cpp +++ b/source/module_md/test/msst_test.cpp @@ -1,13 +1,10 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_esolver/esolver_lj.h" -#include "setcell.h" - #define private public #define protected public +#include "module_esolver/esolver_lj.h" #include "module_md/msst.h" -#undef private -#undef protected +#include "setcell.h" #define doublethreshold 1e-12 /************************************************ @@ -40,18 +37,18 @@ class MSST_test : public testing::Test protected: MD_base* mdrun; UnitCell ucell; - Input_para input; + Parameter param_in; ModuleESolver::ESolver* p_esolver; void SetUp() { Setcell::setupcell(ucell); - Setcell::parameters(input); + Setcell::parameters(param_in.input); p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->before_all_runners(input, ucell); + p_esolver->before_all_runners(param_in.inp, ucell); - mdrun = new MSST(input.mdp, ucell); + mdrun = new MSST(param_in, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); } diff --git a/source/module_md/test/nhchain_test.cpp b/source/module_md/test/nhchain_test.cpp index 8a0eeac147..040be99270 100644 --- a/source/module_md/test/nhchain_test.cpp +++ b/source/module_md/test/nhchain_test.cpp @@ -1,13 +1,10 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_esolver/esolver_lj.h" -#include "setcell.h" - #define private public #define protected public +#include "module_esolver/esolver_lj.h" #include "module_md/nhchain.h" -#undef private -#undef protected +#include "setcell.h" #define doublethreshold 1e-12 /************************************************ * unit test of functions in nhchain.h @@ -33,25 +30,27 @@ * - Nose_Hoover::print_md * - output MD information such as energy, temperature, and pressure */ -Input_para input; // md_pfirst/md_last will change at differen tests class NHC_test : public testing::Test { protected: MD_base* mdrun; UnitCell ucell; + Parameter param_in; ModuleESolver::ESolver* p_esolver; void SetUp() { Setcell::setupcell(ucell); - Setcell::parameters(input); + Setcell::parameters(param_in.input); p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->before_all_runners(input, ucell); + p_esolver->before_all_runners(param_in.inp, ucell); - input.mdp.md_type = "npt"; - input.mdp.md_pmode = "tri"; - mdrun = new Nose_Hoover(input.mdp, ucell); + param_in.input.mdp.md_type = "npt"; + param_in.input.mdp.md_pmode = "tri"; + param_in.input.mdp.md_pfirst = 1; + param_in.input.mdp.md_plast = 1; + mdrun = new Nose_Hoover(param_in, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); } @@ -80,31 +79,31 @@ TEST_F(NHC_test, first_half) { mdrun->first_half(GlobalV::ofs_running); - EXPECT_NEAR(mdrun->pos[0].x, -0.00023793471204889866, doublethreshold); - EXPECT_NEAR(mdrun->pos[0].y, 0.00017779705725471447, doublethreshold); - EXPECT_NEAR(mdrun->pos[0].z, -4.2849245001782489e-05, doublethreshold); - EXPECT_NEAR(mdrun->pos[1].x, 0.00024735043800072474, doublethreshold); - EXPECT_NEAR(mdrun->pos[1].y, -0.00035118366823219693, doublethreshold); - EXPECT_NEAR(mdrun->pos[1].z, 0.00029481907729065568, doublethreshold); - EXPECT_NEAR(mdrun->pos[2].x, -0.0002466402027798198, doublethreshold); - EXPECT_NEAR(mdrun->pos[2].y, -1.7332719211775936e-05, doublethreshold); - EXPECT_NEAR(mdrun->pos[2].z, -0.00016536863874868282, doublethreshold); - EXPECT_NEAR(mdrun->pos[3].x, 0.00023722447682995553, doublethreshold); - EXPECT_NEAR(mdrun->pos[3].y, 0.00019071933018949112, doublethreshold); - EXPECT_NEAR(mdrun->pos[3].z, -8.6601193540496082e-05, doublethreshold); - - EXPECT_NEAR(mdrun->vel[0].x, -8.2616217816642025e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[0].y, 5.3600943884620578e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[0].z, -1.1709907223974946e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[1].x, 8.7469528771814826e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[1].y, -0.00010625642709930989, doublethreshold); - EXPECT_NEAR(mdrun->vel[1].z, 8.0568608450110721e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[2].x, -8.5722227110122785e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[2].y, -4.9154485954659712e-06, doublethreshold); - EXPECT_NEAR(mdrun->vel[2].z, -4.519219457475971e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[3].x, 8.0868916155623938e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[3].y, 5.7570931810225902e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[3].z, -2.3666506651459607e-05, doublethreshold); + EXPECT_NEAR(mdrun->pos[0].x, -0.00035596392702161582, doublethreshold); + EXPECT_NEAR(mdrun->pos[0].y, 0.00026566987683715606, doublethreshold); + EXPECT_NEAR(mdrun->pos[0].z, -6.4082739615824722e-05, doublethreshold); + EXPECT_NEAR(mdrun->pos[1].x, 0.00037007414441809518, doublethreshold); + EXPECT_NEAR(mdrun->pos[1].y, -0.00052501803299631633, doublethreshold); + EXPECT_NEAR(mdrun->pos[1].z, 0.00044091358349508534, doublethreshold); + EXPECT_NEAR(mdrun->pos[2].x, -0.00036876922955593201, doublethreshold); + EXPECT_NEAR(mdrun->pos[2].y, -2.6151466573228018e-05, doublethreshold); + EXPECT_NEAR(mdrun->pos[2].z, -0.00024731533582713971, doublethreshold); + EXPECT_NEAR(mdrun->pos[3].x, 0.00035465901216238645, doublethreshold); + EXPECT_NEAR(mdrun->pos[3].y, 0.00028549962273273618, doublethreshold); + EXPECT_NEAR(mdrun->pos[3].z, -0.00012951550805257814, doublethreshold); + + EXPECT_NEAR(mdrun->vel[0].x, -0.00010335325828338315, doublethreshold); + EXPECT_NEAR(mdrun->vel[0].y, 6.6973537793984337e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[0].z, -1.4644123959592966e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[1].x, 0.00010943331752057692, doublethreshold); + EXPECT_NEAR(mdrun->vel[1].y, -0.00013283409023334643, doublethreshold); + EXPECT_NEAR(mdrun->vel[1].z, 0.00010075713383789103, doublethreshold); + EXPECT_NEAR(mdrun->vel[2].x, -0.00010717693628353973, doublethreshold); + EXPECT_NEAR(mdrun->vel[2].y, -6.2046899135633754e-06, doublethreshold); + EXPECT_NEAR(mdrun->vel[2].z, -5.6516254714969195e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[3].x, 0.00010109687704718878, doublethreshold); + EXPECT_NEAR(mdrun->vel[3].y, 7.2065242353013738e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[3].z, -2.9596755163433345e-05, doublethreshold); } TEST_F(NHC_test, second_half) @@ -113,31 +112,31 @@ TEST_F(NHC_test, second_half) mdrun->second_half(); ; - EXPECT_NEAR(mdrun->pos[0].x, -0.00023793503786683287, doublethreshold); - EXPECT_NEAR(mdrun->pos[0].y, 0.0001777972998948069, doublethreshold); - EXPECT_NEAR(mdrun->pos[0].z, -4.2849303620229072e-05, doublethreshold); - EXPECT_NEAR(mdrun->pos[1].x, 0.00024735077679297626, doublethreshold); - EXPECT_NEAR(mdrun->pos[1].y, -0.00035118414817912879, doublethreshold); - EXPECT_NEAR(mdrun->pos[1].z, 0.00029481948060782815, doublethreshold); - EXPECT_NEAR(mdrun->pos[2].x, -0.00024664053996740619, doublethreshold); - EXPECT_NEAR(mdrun->pos[2].y, -1.7332743502090304e-05, doublethreshold); - EXPECT_NEAR(mdrun->pos[2].z, -0.00016536886497560272, doublethreshold); - EXPECT_NEAR(mdrun->pos[3].x, 0.00023722480104322458, doublethreshold); - EXPECT_NEAR(mdrun->pos[3].y, 0.00019071959178664489, doublethreshold); - EXPECT_NEAR(mdrun->pos[3].z, -8.6601312012301988e-05, doublethreshold); - - EXPECT_NEAR(mdrun->vel[0].x, -5.6948727377433429e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[0].y, 4.4909079540334415e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[0].z, -1.0924710610576888e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[1].x, 5.2747513075088019e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[1].y, -8.5437169183397464e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[1].z, 7.5166157577425953e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[2].x, -6.0819449850070865e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[2].y, -6.6143171452658542e-06, doublethreshold); - EXPECT_NEAR(mdrun->vel[2].z, -4.2161875251693203e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[3].x, 6.5020664152924765e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[3].y, 4.7142406788383824e-05, doublethreshold); - EXPECT_NEAR(mdrun->vel[3].z, -2.2079571715233809e-05, doublethreshold); + EXPECT_NEAR(mdrun->pos[0].x, -0.00035596392702161582, doublethreshold); + EXPECT_NEAR(mdrun->pos[0].y, 0.00026566987683715606, doublethreshold); + EXPECT_NEAR(mdrun->pos[0].z, -6.4082739615824722e-05, doublethreshold); + EXPECT_NEAR(mdrun->pos[1].x, 0.00037007414441809518, doublethreshold); + EXPECT_NEAR(mdrun->pos[1].y, -0.00052501803299631633, doublethreshold); + EXPECT_NEAR(mdrun->pos[1].z, 0.00044091358349508534, doublethreshold); + EXPECT_NEAR(mdrun->pos[2].x, -0.00036876922955593201, doublethreshold); + EXPECT_NEAR(mdrun->pos[2].y, -2.6151466573228018e-05, doublethreshold); + EXPECT_NEAR(mdrun->pos[2].z, -0.00024731533582713971, doublethreshold); + EXPECT_NEAR(mdrun->pos[3].x, 0.00035465901216238645, doublethreshold); + EXPECT_NEAR(mdrun->pos[3].y, 0.00028549962273273618, doublethreshold); + EXPECT_NEAR(mdrun->pos[3].z, -0.00012951550805257814, doublethreshold); + + EXPECT_NEAR(mdrun->vel[0].x, -8.4972683205367143e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[0].y, 6.6834262571392232e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[0].z, -1.6287026488367857e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[1].x, 7.8726485842843947e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[1].y, -0.00012727726730227848, doublethreshold); + EXPECT_NEAR(mdrun->vel[1].z, 0.00011206092711573642, doublethreshold); + EXPECT_NEAR(mdrun->vel[2].x, -9.0636235945876312e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[2].y, -9.9771188254262979e-06, doublethreshold); + EXPECT_NEAR(mdrun->vel[2].z, -6.285672943672849e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[3].x, 9.6882433309157637e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[3].y, 7.0420123556394411e-05, doublethreshold); + EXPECT_NEAR(mdrun->vel[3].z, -3.2917171190756263e-05, doublethreshold); } TEST_F(NHC_test, write_restart) @@ -158,19 +157,18 @@ TEST_F(NHC_test, write_restart) getline(ifs, output_str); EXPECT_THAT(output_str, testing::HasSubstr("4")); getline(ifs, output_str); - EXPECT_THAT(output_str, testing::HasSubstr("-0.110497 -0.554723 -0.465415 -0.424699 ")); + EXPECT_THAT(output_str, testing::HasSubstr("-0.0626326 -0.578523 -0.462472 -0.424503 ")); getline(ifs, output_str); - EXPECT_THAT(output_str, testing::HasSubstr("-0.0116537 -0.0247908 -0.020418 -0.0171934 ")); + EXPECT_THAT(output_str, testing::HasSubstr("-0.00658882 -0.0304055 -0.0188618 -0.0175663 ")); getline(ifs, output_str); - EXPECT_THAT( - output_str, - testing::HasSubstr("0.00391652 0.00331999 0.00198239 -0.000609301 0.000658853 -0.000356508 ")); + EXPECT_THAT(output_str, + testing::HasSubstr("0.583152 -0.106519 -0.895936 -0.634424 0.627532 -0.473422 ")); getline(ifs, output_str); EXPECT_THAT(output_str, testing::HasSubstr("4")); getline(ifs, output_str); - EXPECT_THAT(output_str, testing::HasSubstr("0.537401 2.2182 2.83291 77.7478 ")); + EXPECT_THAT(output_str, testing::HasSubstr("-6.08823 -0.525329 0.121814 4771.79 ")); getline(ifs, output_str); - EXPECT_THAT(output_str, testing::HasSubstr("0.327474 -0.152756 1.07616e-10 3.60329 ")); + EXPECT_THAT(output_str, testing::HasSubstr("255.853 -0.266732 0 226.197 ")); ifs.close(); } @@ -183,28 +181,28 @@ TEST_F(NHC_test, restart) EXPECT_EQ(mdrun->step_rst_, 3); EXPECT_EQ(mdrun->mdp.md_tchain, 4); EXPECT_EQ(mdrun->mdp.md_pchain, 4); - EXPECT_EQ(nhc->eta[0], -0.110497); - EXPECT_EQ(nhc->eta[1], -0.554723); - EXPECT_EQ(nhc->eta[2], -0.465415); - EXPECT_EQ(nhc->eta[3], -0.424699); - EXPECT_EQ(nhc->v_eta[0], -0.0116537); - EXPECT_EQ(nhc->v_eta[1], -0.0247908); - EXPECT_EQ(nhc->v_eta[2], -0.020418); - EXPECT_EQ(nhc->v_eta[3], -0.0171934); - EXPECT_EQ(nhc->v_omega[0], 0.00391652); - EXPECT_EQ(nhc->v_omega[1], 0.00331999); - EXPECT_EQ(nhc->v_omega[2], 0.00198239); - EXPECT_EQ(nhc->v_omega[3], -0.000609301); - EXPECT_EQ(nhc->v_omega[4], 0.000658853); - EXPECT_EQ(nhc->v_omega[5], -0.000356508); - EXPECT_EQ(nhc->peta[0], 0.537401); - EXPECT_EQ(nhc->peta[1], 2.2182); - EXPECT_EQ(nhc->peta[2], 2.83291); - EXPECT_EQ(nhc->peta[3], 77.7478); - EXPECT_EQ(nhc->v_peta[0], 0.327474); - EXPECT_EQ(nhc->v_peta[1], -0.152756); - EXPECT_EQ(nhc->v_peta[2], 1.07616e-10); - EXPECT_EQ(nhc->v_peta[3], 3.60329); + EXPECT_EQ(nhc->eta[0], -0.0626326); + EXPECT_EQ(nhc->eta[1], -0.578523); + EXPECT_EQ(nhc->eta[2], -0.462472); + EXPECT_EQ(nhc->eta[3], -0.424503); + EXPECT_EQ(nhc->v_eta[0], -0.00658882); + EXPECT_EQ(nhc->v_eta[1], -0.0304055); + EXPECT_EQ(nhc->v_eta[2], -0.0188618); + EXPECT_EQ(nhc->v_eta[3], -0.0175663); + EXPECT_EQ(nhc->v_omega[0], 0.583152); + EXPECT_EQ(nhc->v_omega[1], -0.106519); + EXPECT_EQ(nhc->v_omega[2], -0.895936); + EXPECT_EQ(nhc->v_omega[3], -0.634424); + EXPECT_EQ(nhc->v_omega[4], 0.627532); + EXPECT_EQ(nhc->v_omega[5], -0.473422); + EXPECT_EQ(nhc->peta[0], -6.08823); + EXPECT_EQ(nhc->peta[1], -0.525329); + EXPECT_EQ(nhc->peta[2], 0.121814); + EXPECT_EQ(nhc->peta[3], 4771.79); + EXPECT_EQ(nhc->v_peta[0], 255.853); + EXPECT_EQ(nhc->v_peta[1], -0.266732); + EXPECT_EQ(nhc->v_peta[2], 0); + EXPECT_EQ(nhc->v_peta[3], 226.197); } TEST_F(NHC_test, print_md) diff --git a/source/module_md/test/verlet_test.cpp b/source/module_md/test/verlet_test.cpp index 5a9e5bc972..325d2445eb 100644 --- a/source/module_md/test/verlet_test.cpp +++ b/source/module_md/test/verlet_test.cpp @@ -1,13 +1,10 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "module_esolver/esolver_lj.h" -#include "setcell.h" - #define private public #define protected public +#include "module_esolver/esolver_lj.h" #include "module_md/verlet.h" -#undef private -#undef protected +#include "setcell.h" #define doublethreshold 1e-12 @@ -41,17 +38,18 @@ class Verlet_test : public testing::Test protected: MD_base* mdrun; UnitCell ucell; - Input_para input; + Parameter param_in; + ModuleESolver::ESolver* p_esolver; void SetUp() { Setcell::setupcell(ucell); - Setcell::parameters(input); + Setcell::parameters(param_in.input); - ModuleESolver::ESolver* p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->before_all_runners(input, ucell); + p_esolver = new ModuleESolver::ESolver_LJ(); + p_esolver->before_all_runners(param_in.inp, ucell); - mdrun = new Verlet(input.mdp, ucell); + mdrun = new Verlet(param_in, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); } @@ -109,7 +107,7 @@ TEST_F(Verlet_test, first_half) TEST_F(Verlet_test, NVE) { mdrun->first_half(GlobalV::ofs_running); - mdrun->mdp.md_type = "nve"; + param_in.input.mdp.md_type = "nve"; mdrun->second_half(); ; @@ -143,8 +141,8 @@ TEST_F(Verlet_test, NVE) TEST_F(Verlet_test, Anderson) { mdrun->first_half(GlobalV::ofs_running); - mdrun->mdp.md_type = "nvt"; - mdrun->mdp.md_thermostat = "anderson"; + param_in.input.mdp.md_type = "nvt"; + param_in.input.mdp.md_thermostat = "anderson"; mdrun->second_half(); ; @@ -178,8 +176,8 @@ TEST_F(Verlet_test, Anderson) TEST_F(Verlet_test, Berendsen) { mdrun->first_half(GlobalV::ofs_running); - mdrun->mdp.md_type = "nvt"; - mdrun->mdp.md_thermostat = "berendsen"; + param_in.input.mdp.md_type = "nvt"; + param_in.input.mdp.md_thermostat = "berendsen"; mdrun->second_half(); ; @@ -213,8 +211,8 @@ TEST_F(Verlet_test, Berendsen) TEST_F(Verlet_test, rescaling) { mdrun->first_half(GlobalV::ofs_running); - mdrun->mdp.md_type = "nvt"; - mdrun->mdp.md_thermostat = "rescaling"; + param_in.input.mdp.md_type = "nvt"; + param_in.input.mdp.md_thermostat = "rescaling"; mdrun->second_half(); ; @@ -248,8 +246,8 @@ TEST_F(Verlet_test, rescaling) TEST_F(Verlet_test, rescale_v) { mdrun->first_half(GlobalV::ofs_running); - mdrun->mdp.md_type = "nvt"; - mdrun->mdp.md_thermostat = "rescale_v"; + param_in.input.mdp.md_type = "nvt"; + param_in.input.mdp.md_thermostat = "rescale_v"; mdrun->second_half(); ;