Unverified Commit e78100bd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add (partial) tests for pair styles dpd and dpd/tstat

parent 9152a8e9
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -651,6 +651,14 @@ 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);
@@ -823,11 +831,11 @@ TEST(PairStyle, intel)
        GTEST_SKIP();
    }

    if (test_config.pair_style == "rebo") {
    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();
        std::cerr << "Skipping pair style rebo/intel\n";
        GTEST_SKIP();
    }

@@ -1105,6 +1113,7 @@ TEST(PairStyle, single)
    // Pair styles colloid  and yukawa/colloid are also not compatible with this single tester
    if ((test_config.pair_style.substr(0, 7) == "colloid") ||
        (test_config.pair_style.substr(0, 14) == "yukawa/colloid") ||
        (test_config.pair_style.substr(0, 3) == "dpd") ||
        (test_config.pair_style.substr(0, 3) == "eam") ||
        ((test_config.pair_style.substr(0, 6) == "hybrid") &&
         (test_config.pair_style.find("eam") != std::string::npos))) {
+93 −0
Original line number Diff line number Diff line
---
lammps_version: 21 Aug 2020
date_generated: Sat Aug 22 21:10:43 202
epsilon: 5e-14
prerequisites: ! |
  atom full
  pair dpd
pre_commands: ! |
  variable newton_pair delete
  variable newton_pair index on
  comm_modify vel yes
post_commands: ! ""
input_file: in.fourmol
pair_style: dpd 100.0 8.0 11223344
pair_coeff: ! |
  * * 0.4 4.0
  1 1 0.4 4.0
  2 2 0.1 2.0
  2 4 0.1 1.0
  3 3 0.4 3.2
  4 4 0.3 3.1
  5 5 0.3 3.1
extract: ! ""
natoms: 29
init_vdwl: 50.8160702483393
init_coul: 0
init_stress: ! |2-
   3.6659006242073438e+01  5.4261754086936989e+01  3.3682647206296181e+01 -1.0639502210269674e+01 -1.3242166325151132e+01 -1.4005742776704770e+00
init_forces: ! |2
    1 -1.1844697157183162e+00  1.6367083324345932e+00 -1.6164431978301712e+00
    2  5.9078058310112114e-01 -6.0553807698868589e-01 -2.1617375342810174e-01
    3 -7.6670713851187267e-01  9.5003276134905523e-01 -6.7203322276142896e-01
    4  4.4787169248842112e-01 -4.3914625391182971e-01 -5.8111112052406744e-01
    5 -1.2566744054424648e+00  1.8761399407436345e+00 -4.8645772466641685e-01
    6 -1.6171557231152949e+00  7.1464499795349412e-01 -1.1092084859232529e+00
    7  1.1956986434615127e-01  1.2135254550373868e+00  2.6819777778344200e-01
    8 -2.1606790779612939e+00 -1.0009077427785185e+00  1.7624525183721518e+00
    9  1.3390099051452800e+00 -2.4735014123573014e+00  2.6740746462472815e+00
   10 -7.8052872767806614e-01 -5.1102960795557006e-01  1.2478278288073179e+00
   11  4.0096519237235989e-01  2.7454704972916344e-01 -3.3778771500254134e-01
   12  3.9978944625028723e-01  3.4308831109613191e-01 -1.5338273501432327e+00
   13  1.5638145849054872e+00 -1.6306100536412178e+00 -6.9077800227627340e-01
   14 -4.5890077116425876e-01  1.1040393265955490e+00 -6.5255433176928690e-01
   15  9.9955212362127699e-01  3.1523397810554382e-01  7.6033632594470357e-01
   16  1.5206637793429758e+00 -6.8865472048468579e-01  4.3111441160847097e-01
   17  1.2013544348947844e+00 -1.4553000830334836e-01 -2.1134769947313517e-01
   18 -3.8609684136209549e-01  1.9552632553349421e+00 -1.0993171536681696e+00
   19 -8.7985885053838198e-02  1.1064297962553900e+00 -6.4383823839455312e-01
   20 -4.9390620910171601e-01 -6.2494494552751112e-01  5.9205844998622170e-01
   21  1.8588598933035880e+00 -2.0526524676732811e+00 -1.6157827761100985e+00
   22  3.0244171858353114e-01 -2.0994555123327979e-01 -4.2015481943755384e-01
   23  1.1308097884067911e+00 -7.4934399707572041e-01 -7.2061737164241713e-01
   24 -9.7930735171085498e-02 -7.1020024239408686e-01 -1.3895944206820467e+00
   25 -6.7072087315358186e-02  2.5524051048184027e+00  2.5032108743828103e+00
   26  5.8007929647205347e-01  1.1494769544353340e+00  1.2006491604999117e+00
   27 -8.5101327467370091e-01 -1.3381699849691291e+00  4.7454538915767125e-01
   28 -5.0171482039485948e-01 -7.6930558428086560e-01  6.3938995552320765e-01
   29 -1.7447268905698865e+00 -1.2420546143135882e+00  1.4431700454195584e+00
run_vdwl: 50.7374424640537
run_coul: 0
run_stress: ! |2-
   4.1422955803623331e+01  4.3064652697165656e+01  4.1559179146658437e+01  7.4714571002631666e-02 -6.1411164156467883e+00  1.4393452677580411e+01
run_forces: ! |2
    1  3.4481229012955250e-02  8.7676427505874033e-01  8.6953159985570505e-01
    2 -6.0685163413262000e-01  1.8054270473749765e+00 -1.3447724583087066e+00
    3 -1.5489568074370474e+00 -1.1697195695126381e+00 -4.2016898199405944e-01
    4  6.6483248479230617e-01 -2.8537552833949398e-01 -1.4262159415572853e-01
    5 -2.5079573819493115e+00 -5.4749684288447742e-01 -9.2176487630526061e-01
    6 -3.3683366742684075e+00 -2.8370086919843733e+00  2.3787004700359460e+00
    7 -1.1088909812982797e+00  1.0662320225284174e+00 -1.5547571601775303e+00
    8  4.8274899963537232e-02 -1.2662741349835094e+00 -1.1264999586848734e-02
    9 -7.9392140576769521e-01  6.6309466709101994e-01 -9.3428302967917221e-01
   10  6.5582745048635882e-01 -1.3935631322559230e+00  3.9652481372835024e-01
   11 -8.9581634608744354e-01  5.8270221289096336e-01 -1.3470229861712517e+00
   12 -2.4813480073283825e-01 -2.7914371015992118e-01  8.8475895601011501e-01
   13  1.4411772191850578e+00  3.4229035626071758e-01 -9.6466421809601099e-01
   14 -3.1820502106474224e-01  2.1107989751378229e+00 -8.3403511682963416e-01
   15  2.0411952060439429e+00 -5.1687781239112196e-01  3.4118955931228845e-01
   16  3.0305751663940432e+00 -2.4465966801613774e+00  1.3803648518062497e+00
   17 -1.0562126497005115e+00  9.6026338984160364e-01 -2.3396185799019276e-01
   18 -7.5924641415145447e-02  7.1108337715179815e-01 -1.6611081292757415e-01
   19  3.1563313366696760e-01  9.5045473920794418e-02 -1.0350203415743287e+00
   20  7.1217787971185398e-01  8.5821099595470418e-01 -6.2148643809194115e-01
   21  1.1641790863537491e+00 -1.2981288871776584e+00 -1.0807519983757896e+00
   22  6.7878931351872340e-01 -9.8995510259034769e-01 -9.1730222916933746e-01
   23  8.2288292170920641e-01 -5.9516667563818060e-01 -3.0490413116568965e-01
   24  1.5162054875185491e+00  2.0320373989442251e+00  3.4664118563573796e+00
   25 -3.1630494516391483e-01  6.7230329810281941e-01 -3.3471315058754225e-01
   26  1.5511596931497584e+00  1.6116056217251533e+00  2.0701295755454581e+00
   27 -3.7771214801276926e-01  5.3972810782104752e-01  1.8785917006737876e-01
   28 -6.7292064687859554e-01 -5.3102331619676224e-01  1.3811176625034274e-01
   29 -7.8124508759768641e-01 -7.7125713552902087e-01  1.0560237622173840e+00
...
+93 −0
Original line number Diff line number Diff line
---
lammps_version: 21 Aug 2020
date_generated: Sat Aug 22 21:31:49 202
epsilon: 5e-14
prerequisites: ! |
  atom full
  pair dpd/tstat
pre_commands: ! |
  variable newton_pair delete
  variable newton_pair index on
  comm_modify vel yes
post_commands: ! ""
input_file: in.fourmol
pair_style: dpd/tstat 100.0 100.0 8.0 55667788
pair_coeff: ! |
  * * 4.0
  1 1 4.0
  2 2 2.0
  2 4 1.0
  3 3 3.2
  4 4 3.1
  5 5 3.1
extract: ! ""
natoms: 29
init_vdwl: 0
init_coul: 0
init_stress: ! |-
  -1.4863518588872060e+01  1.5507190667237291e+01  6.1320555319686756e+00  3.9903391393997706e-01  8.4645463107459147e+00  9.5549166743249305e+00
init_forces: ! |2
    1 -2.2862827209360765e+00  1.8273528276910633e+00 -6.0159909432330982e-01
    2 -1.4856656887782247e+00  8.2761293548833348e-01  4.2555006425664910e-01
    3  2.1292650733221401e+00 -1.8951288305607377e+00 -1.0712180441166039e+00
    4  2.1475547687962981e+00  1.4267316029329133e-01  2.3856061975565590e-01
    5  7.2250550075718567e-01 -9.8475783851067783e-02 -2.2535728434952168e-01
    6  1.2405083695898295e-01  8.3877987836870205e-01 -1.8325499188852330e+00
    7 -6.8641567371201515e-02 -2.2059602234048303e+00  8.0324856247662213e-01
    8  7.2737406915213798e-02  1.6777618193756783e-02 -2.0734596877401831e-01
    9  1.4450773135946633e+00  1.2980713925188412e+00 -8.2828426571510438e-01
   10  4.1171139262563566e-01 -1.3556848612751655e+00 -1.0739762365888486e+00
   11  2.6835323013616164e-01 -1.9588302977733782e+00  2.6813105151748928e-01
   12 -1.6632137162094256e+00  1.9498046949511176e+00  1.0143819707834012e-02
   13 -8.7976243986653102e-01  1.3631910113257160e+00  1.1410083492464635e+00
   14 -1.8965600133047860e+00  9.3937776064309891e-02  2.0467744909156078e+00
   15  1.6976061149407253e+00 -1.1280904614799869e+00  5.1319657625596116e-01
   16 -1.5977255554923007e+00  1.0221367042201095e-02 -5.8489694260239411e-01
   17  9.5438719219347445e-01 -1.7720481905618479e-01  1.0156393167078182e-01
   18 -9.8730930021237306e-01 -1.3247846104852807e+00  1.8813126261912012e+00
   19 -1.3254672806140730e-01  1.8620333793350834e+00 -1.9282622481261882e+00
   20  7.2225428344170295e-01 -2.5659914253624355e-03 -2.2920240922768265e-01
   21 -2.4203470930416701e-01  2.4120310618804819e-01  1.8895553235188441e-02
   22  5.2798332199600295e-01 -9.3201542918092561e-01 -7.4176429016929357e-01
   23 -5.2845051218111827e-01 -4.1317228656597849e-01 -2.5007643564248250e-01
   24  5.6707723481417194e-01  5.1429055736404905e-01  7.3131657174007469e-01
   25 -6.6896850435818875e-02  3.3284288810290708e-01  4.5699653538675844e-01
   26 -2.6362901957130650e-02  4.6946935629112840e-01  8.0786005811105099e-01
   27 -3.9512178307521062e-01 -6.2478190671493694e-01  2.4875747677438484e-01
   28  9.4276840865047695e-01  1.2060543067370164e+00 -7.3475860849092600e-01
   29 -4.7675759195706352e-01 -8.7762075418173024e-01  6.1597545976988388e-01
run_vdwl: 0
run_coul: 0
run_stress: ! |2-
   8.3092195130617679e+00  8.8087197187448734e+00  1.0866432257972122e+01 -8.1281050865178219e+00  6.1784321167959544e-01  1.2769573774314161e+01
run_forces: ! |2
    1 -2.6266020324984418e+00  8.2201323231265433e-01  1.4749772754591481e+00
    2 -6.7727359927535269e-01  3.4376214998698523e-01  3.3945746781764990e-01
    3  1.2005782584962879e+00 -1.2936196454264879e+00 -2.2402845222284338e+00
    4 -4.6620764610046389e-01  1.2647101563213287e-01  5.5250822226653018e-01
    5  4.7978394625545873e-01  8.4332151113409659e-01  4.0792830629323895e-01
    6 -1.9542443055945939e+00  1.8975617142665895e+00 -1.4594911348609056e+00
    7 -1.4108099415497104e+00  2.3954491258832861e-01 -1.2427949751680076e-01
    8 -1.1547560498892029e+00 -1.8379407309448745e+00 -4.6290176506793662e-01
    9  8.7444831756269625e-01  1.7307448537307921e-01 -9.4793513740431135e-01
   10 -1.5440048971445408e+00  1.1902331107098123e+00  1.5660650435305974e+00
   11  3.2614898531042802e-01 -4.2343515656746933e-01  5.0440985609457700e-02
   12  1.3776465372608324e+00  1.4429336351759697e-01 -1.6572768459783505e+00
   13 -8.6025935005236043e-01  2.7602052190506163e+00  2.5047228082143205e+00
   14  4.4891746327495946e-01  1.3153910663546353e-01 -3.2960784140102711e-01
   15  2.8031565087975010e+00 -4.0492304325231793e-02 -4.5542531410557574e-01
   16  1.1568450190673436e+00 -1.1170400443284660e+00 -1.2861306908004659e+00
   17 -8.2046202580916117e-01 -6.3104829619459157e-01  8.5616193459003953e-01
   18  6.0985267110501340e-01  2.9694956148679935e-01 -4.9116597815368851e-01
   19  8.9776027762713906e-01 -2.1131588536445838e+00  9.4252335520116859e-02
   20 -6.9884697162063159e-01 -5.5952187995536673e-01  5.5287452375002544e-01
   21  1.1130356718786313e-01 -1.5375054927828511e+00 -8.7481829335361294e-01
   22 -2.2236601797334588e-01 -3.7232353752499980e-01 -1.2962704074569753e-01
   23  5.4653190458065948e-01 -2.7157662292855400e-01 -1.4905757681812964e-01
   24 -2.8461666700526816e-01 -1.1789184552344745e+00 -1.5110335752078661e+00
   25  2.9600652072485212e-01  1.6062798669357845e+00  2.8507004383966761e+00
   26  4.3391222627809989e-01  5.1464600762894475e-01  7.3814317764947623e-01
   27 -4.1598115100324368e-01 -7.2346157494410113e-01  8.9386495870487659e-01
   28  1.6883094994906600e+00  1.4344049162319250e+00 -1.0316591583781085e+00
   29 -1.1477104750347786e-01 -4.2425757868875719e-01  2.6859689421875543e-01
...