diff --git a/doc/lammps.1 b/doc/lammps.1 index 78b6c9fd67..a374e62604 100644 --- a/doc/lammps.1 +++ b/doc/lammps.1 @@ -1,4 +1,4 @@ -.TH LAMMPS "1" "27 October 2021" "2021-10-27" +.TH LAMMPS "1" "14 December 2021" "2021-12-14" .SH NAME .B LAMMPS \- Molecular Dynamics Simulator. diff --git a/doc/src/angle_class2.rst b/doc/src/angle_class2.rst index f257d96dc3..4e8e515564 100644 --- a/doc/src/angle_class2.rst +++ b/doc/src/angle_class2.rst @@ -64,34 +64,44 @@ These are the 4 coefficients for the :math:`E_a` formula: radians internally; hence the various :math:`K` are effectively energy per radian\^2 or radian\^3 or radian\^4. -For the :math:`E_{bb}` formula, each line in a :doc:`angle_coeff ` -command in the input script lists 4 coefficients, the first of which -is "bb" to indicate they are BondBond coefficients. In a data file, -these coefficients should be listed under a "BondBond Coeffs" heading -and you must leave out the "bb", i.e. only list 3 coefficients after -the angle type. +For the :math:`E_{bb}` formula, each line in a :doc:`angle_coeff +` command in the input script lists 4 coefficients, the +first of which is "bb" to indicate they are BondBond coefficients. In +a data file, these coefficients should be listed under a "BondBond +Coeffs" heading and you must leave out the "bb", i.e. only list 3 +coefficients after the angle type. * bb * :math:`M` (energy/distance\^2) * :math:`r_1` (distance) * :math:`r_2` (distance) -For the :math:`E_{ba}` formula, each line in a :doc:`angle_coeff ` -command in the input script lists 5 coefficients, the first of which -is "ba" to indicate they are BondAngle coefficients. In a data file, -these coefficients should be listed under a "BondAngle Coeffs" heading -and you must leave out the "ba", i.e. only list 4 coefficients after -the angle type. +For the :math:`E_{ba}` formula, each line in a :doc:`angle_coeff +` command in the input script lists 5 coefficients, the +first of which is "ba" to indicate they are BondAngle coefficients. +In a data file, these coefficients should be listed under a "BondAngle +Coeffs" heading and you must leave out the "ba", i.e. only list 4 +coefficients after the angle type. * ba -* :math:`N_1` (energy/distance\^2) -* :math:`N_2` (energy/distance\^2) +* :math:`N_1` (energy/distance) +* :math:`N_2` (energy/distance) * :math:`r_1` (distance) * :math:`r_2` (distance) The :math:`\theta_0` value in the :math:`E_{ba}` formula is not specified, since it is the same value from the :math:`E_a` formula. +.. note:: + + It is important that the order of the I,J,K atoms in each angle + listed in the Angles section of the data file read by the + :doc:`read_data ` command be consistent with the order + of the :math:`r_1` and :math:`r_2` BondBond and BondAngle + coefficients. This is because the terms in the formulas for + :math:`E_{bb}` and :math:`E_{ba}` will use the I,J atoms to compute + :math:`r_{ij}` and the J,K atoms to compute :math:`r_{jk}`. + ---------- .. include:: accel_styles.rst diff --git a/src/CLASS2/angle_class2.cpp b/src/CLASS2/angle_class2.cpp index 82e31440f5..c37c5a8f65 100644 --- a/src/CLASS2/angle_class2.cpp +++ b/src/CLASS2/angle_class2.cpp @@ -169,6 +169,8 @@ void AngleClass2::compute(int eflag, int vflag) // force & energy for bond-angle term + dr1 = r1 - ba_r1[type]; + dr2 = r2 - ba_r2[type]; aa1 = s * dr1 * ba_k1[type]; aa2 = s * dr2 * ba_k2[type]; @@ -459,6 +461,9 @@ double AngleClass2::single(int type, int i1, int i2, int i3) double dr2 = r2 - bb_r2[type]; energy += bb_k[type]*dr1*dr2; + dr1 = r1 - ba_r1[type]; + dr2 = r2 - ba_r2[type]; energy += ba_k1[type]*dr1*dtheta + ba_k2[type]*dr2*dtheta; + return energy; } diff --git a/src/KOKKOS/angle_class2_kokkos.cpp b/src/KOKKOS/angle_class2_kokkos.cpp index 146e8b40ea..2a386f6489 100644 --- a/src/KOKKOS/angle_class2_kokkos.cpp +++ b/src/KOKKOS/angle_class2_kokkos.cpp @@ -224,8 +224,8 @@ void AngleClass2Kokkos::operator()(TagAngleClass2Compute::operator()(TagAngleClass2Compute bool check_divisibility_and_divide_by_pow5(uint32_t& n) FMT_NOEXCEPT { +#if defined(LAMMPS_WORKAROUND_FOR_DPCXX) + struct infos1 { + uint32_t magic_number; + int bits_for_comparison; + uint32_t threshold; + int shift_amount; + }; + static constexpr infos1 infos[] = {{0xcccd, 16, 0x3333, 18}, {0xa429, 8, 0x0a, 20}}; +#else static constexpr struct { uint32_t magic_number; int bits_for_comparison; uint32_t threshold; int shift_amount; } infos[] = {{0xcccd, 16, 0x3333, 18}, {0xa429, 8, 0x0a, 20}}; +#endif constexpr auto info = infos[N - 1]; n *= info.magic_number; const uint32_t comparison_mask = (1u << info.bits_for_comparison) - 1; @@ -1013,11 +1024,20 @@ bool check_divisibility_and_divide_by_pow5(uint32_t& n) FMT_NOEXCEPT { // Computes floor(n / pow(10, N)) for small n and N. // Precondition: n <= pow(10, N + 1). template uint32_t small_division_by_pow10(uint32_t n) FMT_NOEXCEPT { +#if defined(LAMMPS_WORKAROUND_FOR_DPCXX) + struct infos2 { + uint32_t magic_number; + int shift_amount; + uint32_t divisor_times_10; + }; + static constexpr infos2 infos[] = {{0xcccd, 19, 100}, {0xa3d8, 22, 1000}}; +#else static constexpr struct { uint32_t magic_number; int shift_amount; uint32_t divisor_times_10; } infos[] = {{0xcccd, 19, 100}, {0xa3d8, 22, 1000}}; +#endif constexpr auto info = infos[N - 1]; FMT_ASSERT(n <= info.divisor_times_10, "n is too large"); return n * info.magic_number >> info.shift_amount; diff --git a/src/reader_native.cpp b/src/reader_native.cpp index 7c7d351d74..7be546719f 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -38,8 +38,6 @@ ReaderNative::ReaderNative(LAMMPS *lmp) : Reader(lmp) fieldindex = nullptr; maxbuf = 0; databuf = nullptr; - magic_string = nullptr; - unit_style = nullptr; } /* ---------------------------------------------------------------------- */ @@ -47,8 +45,6 @@ ReaderNative::ReaderNative(LAMMPS *lmp) : Reader(lmp) ReaderNative::~ReaderNative() { delete[] line; - delete[] magic_string; - delete[] unit_style; memory->destroy(fieldindex); memory->destroy(databuf); } @@ -64,10 +60,8 @@ int ReaderNative::read_time(bigint &ntimestep) if (binary) { int endian = 0x0001; revision = 0x0001; - delete[] magic_string; - delete[] unit_style; - magic_string = nullptr; - unit_style = nullptr; + magic_string = ""; + unit_style = ""; fread(&ntimestep, sizeof(bigint), 1, fp); @@ -79,9 +73,7 @@ int ReaderNative::read_time(bigint &ntimestep) // first bigint encodes negative format name length bigint magic_string_len = -ntimestep; - magic_string = new char[magic_string_len + 1]; - read_buf(magic_string, sizeof(char), magic_string_len); - magic_string[magic_string_len] = '\0'; + magic_string = read_binary_str(magic_string_len); // read endian flag read_buf(&endian, sizeof(int), 1); @@ -92,6 +84,7 @@ int ReaderNative::read_time(bigint &ntimestep) // read the real ntimestep read_buf(&ntimestep, sizeof(bigint), 1); } + } else { char *eof = fgets(line,MAXLINE,fp); if (eof == nullptr) return 1; @@ -123,7 +116,6 @@ int ReaderNative::read_time(bigint &ntimestep) void ReaderNative::skip() { if (binary) { - bigint natoms; int triclinic; skip_buf(sizeof(bigint)); read_buf(&triclinic, sizeof(int), 1); @@ -137,7 +129,6 @@ void ReaderNative::skip() // read chunk and skip them - int nchunk; read_buf(&nchunk, sizeof(int), 1); int n; @@ -169,7 +160,7 @@ void ReaderNative::skip() void ReaderNative::skip_reading_magic_str() { - if (magic_string && revision > 0x0001) { + if (is_known_magic_str() && revision > 0x0001) { int len; read_buf(&len, sizeof(int), 1); @@ -213,7 +204,7 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, { bigint natoms = 0; int len = 0; - char *labelline; + std::string labelline; if (binary) { read_buf(&natoms, sizeof(bigint), 1); @@ -242,17 +233,15 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, return natoms; } - if (magic_string && revision > 0x0001) { + + if (is_known_magic_str() && revision > 0x0001) { // newer format includes units string, columns string // and time read_buf(&len, sizeof(int), 1); - labelline = new char[len + 1]; if (len > 0) { // has units - unit_style = new char[len + 1]; - read_buf(unit_style, sizeof(char), len); - unit_style[len] = '\0'; + unit_style = read_binary_str(len); } char flag = 0; @@ -264,9 +253,14 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, } read_buf(&len, sizeof(int), 1); - read_buf(labelline, sizeof(char), len); - labelline[len] = '\0'; + labelline = read_binary_str(len); + } else { + error->one(FLERR, "Unsupported old binary dump format"); } + + read_buf(&nchunk, sizeof(int), 1); + ichunk = 0; + iatom_chunk = 0; } else { int rv; @@ -307,14 +301,15 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, labelline = &line[strlen("ITEM: ATOMS ")]; } - std::map labels; Tokenizer tokens(labelline); + std::map labels; nwords = 0; while (tokens.has_next()) { labels[tokens.next()] = nwords++; } + if (nwords == 0) { return 1; } @@ -461,27 +456,34 @@ void ReaderNative::read_atoms(int n, int nfield, double **fields) error->one(FLERR,"Unexpected end of dump file"); } - int i_atom = 0; - int nchunk; - read_buf(&nchunk, sizeof(int), 1); - for (int i = 0; i < nchunk; i++) { + // read chunks until n atoms have been read + int m = size_one*iatom_chunk; - read_buf(&n, sizeof(int), 1); + for (int i = 0; i < n; i++) { + // if the last chunk has finished + if (iatom_chunk == 0) { + read_buf(&natom_chunk, sizeof(int), 1); + read_double_chunk(natom_chunk); + natom_chunk /= size_one; + m = 0; + } - // read chunk and write as size_one values per line - read_double_chunk(n); - n /= size_one; - int m = 0; - for (int j = 0; j < n; j++) - { - double *words = &databuf[m]; - for (int k = 0; k < nfield; k++) - fields[i_atom][k] = words[fieldindex[k]]; - i_atom += 1; - m+=size_one; - } + // read one line of atom + double *words = &databuf[m]; + + for (int k = 0; k < nfield; k++) + fields[i][k] = words[fieldindex[k]]; + + m += size_one; + + iatom_chunk++; + + // hit the end of current chunk + if (iatom_chunk == natom_chunk) { + iatom_chunk = 0; + ichunk++; + } } - } else { int i,m; char *eof; @@ -539,8 +541,16 @@ void ReaderNative::read_buf(void * ptr, size_t size, size_t count) if (feof(fp)) error->one(FLERR,"Unexpected end of dump file"); } +std::string ReaderNative::read_binary_str(size_t size) +{ + std::string str(size, '\0'); + read_buf(&str[0], sizeof(char), size); + return str; +} + void ReaderNative::read_double_chunk(size_t count) { + if (count < 0) return; // extend buffer to fit chunk size if (count > maxbuf) { memory->grow(databuf,count,"reader:databuf"); @@ -555,3 +565,8 @@ void ReaderNative::skip_buf(size_t size) pos += size; platform::fseek(fp,pos); } + +bool ReaderNative::is_known_magic_str() const +{ + return magic_string == "DUMPATOM" || magic_string == "DUMPCUSTOM"; +} diff --git a/src/reader_native.h b/src/reader_native.h index 2ca43039c2..c07dbbac08 100644 --- a/src/reader_native.h +++ b/src/reader_native.h @@ -24,6 +24,7 @@ ReaderStyle(native,ReaderNative); #include "reader.h" +#include #include namespace LAMMPS_NS { @@ -42,16 +43,20 @@ class ReaderNative : public Reader { private: int revision; - char *magic_string; - char *unit_style; + std::string magic_string; + std::string unit_style; int *fieldindex; - char *line; // line read from dump file - double *databuf; // buffer for binary data - int nwords; // # of per-atom columns in dump file + char *line; // line read from dump file + double *databuf; // buffer for binary data + int nwords; // # of per-atom columns in dump file - int size_one; // number of double for one atom - int maxbuf; // maximum buffer size + int size_one; // number of double for one atom + int maxbuf; // maximum buffer size + int nchunk; // number of chunks in the binary file + int ichunk; // index of current reading chunk + int natom_chunk; // number of atoms in the current chunks + int iatom_chunk; // index of current atom in the current chunk int find_label(const std::string &label, const std::map &labels); void read_lines(int); @@ -60,6 +65,8 @@ class ReaderNative : public Reader { void read_double_chunk(size_t); void skip_buf(size_t); void skip_reading_magic_str(); + bool is_known_magic_str() const; + std::string read_binary_str(size_t); }; } // namespace LAMMPS_NS diff --git a/src/version.h b/src/version.h index 21f49398e0..6bb32291be 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "27 Oct 2021" +#define LAMMPS_VERSION "14 Dec 2021" diff --git a/unittest/force-styles/tests/angle-class2.yaml b/unittest/force-styles/tests/angle-class2.yaml index c8896efba1..0b50cce4f6 100644 --- a/unittest/force-styles/tests/angle-class2.yaml +++ b/unittest/force-styles/tests/angle-class2.yaml @@ -1,7 +1,8 @@ --- -lammps_version: 10 Feb 2021 -date_generated: Fri Feb 26 23:09:23 2021 +lammps_version: 14 Dec 2021 +date_generated: Tue Dec 21 11:26:44 2021 epsilon: 1e-12 +skip_tests: prerequisites: ! | atom full angle class2 @@ -21,73 +22,73 @@ angle_coeff: ! | 1 ba 20.0 0.0 1.5 1.5 3 ba 10.0 10.0 1.5 1.5 4 ba 0.0 20.0 1.5 1.5 -equilibrium: 4 1.9216075064457565 1.9373154697137058 2.0943951023931953 1.8936822384138474 +equilibrium: 4 1.9216075064457567 1.9373154697137058 2.0943951023931953 1.8936822384138476 extract: ! "" natoms: 29 -init_energy: 45.6315872862689 +init_energy: 46.440896837749044 init_stress: ! |2- - 1.0380900034455654e+02 -8.5596888576343744e+01 1.0543371457027396e+01 9.3533772092305199e+01 -3.0453078736699425e+01 1.6197471265279837e+00 + 1.1893382158997322e+02 -8.8291447119046992e+01 -1.8868912456859972e+00 1.1299617626314146e+02 -8.5358891009896780e+00 7.6967639957246794e+00 init_forces: ! |2 - 1 4.7202113476907201e+01 9.2452097148049379e+00 -2.1894202744712533e+01 - 2 -1.7062797644104073e+00 -1.3815331678107317e+01 -1.1109216556988997e+01 - 3 -1.0818552868961547e+01 4.2757153900854306e+01 4.0134050204129267e+01 - 4 -1.6107291199158311e+01 -2.0450831607561582e+01 1.2394641799374179e+01 - 5 -4.1997303662023540e+01 -4.1453062742803219e+01 -1.7536792897035419e+01 - 6 5.6639792403457349e+01 -1.3580769610788053e+01 -3.9712060060785255e+01 - 7 -1.8054439727078506e+01 1.6983062508083172e+01 1.5587306726806713e+00 - 8 -1.0525801597483865e+01 -1.5574411954009244e+01 8.4303126221362277e+01 - 9 -1.4606126670427546e+01 1.7088847325775880e+01 3.5265027966992148e+00 - 10 -9.2168170333014618e+00 2.5310906045489432e+01 -6.6219876033939016e+01 + 1 4.9843771864003834e+01 3.0925122596911816e+00 -3.5312722193312226e+01 + 2 -7.6547115157834666e-01 -6.1978334793953476e+00 -4.9838162348189323e+00 + 3 -2.0132137208074248e+01 6.1565994561526715e+01 5.8548546756498347e+01 + 4 -1.1800898073962109e+01 -2.7342191490108263e+01 3.6024091179236257e+00 + 5 -3.5756372747916700e+01 -5.0661360858658405e+01 -1.9085859271498553e+01 + 6 5.0734800121225135e+01 -1.5633459340466136e+01 -3.6451541950394720e+01 + 7 -1.8030285239813821e+01 1.7009172193091111e+01 1.5544411167675971e+00 + 8 -1.5632958318497042e+01 -2.1571227015465091e+01 7.4636601692831320e+01 + 9 -1.4606126670427546e+01 1.7088847325775880e+01 3.5265027966992157e+00 + 10 4.9412614063426892e+00 3.2891848318072718e+01 -5.8999099084298045e+01 11 -2.0537012066379056e+01 -7.0930129287428976e+00 7.5068656204459945e+00 - 12 -2.8436344574011141e-01 -6.5767250423083183e+00 -7.8126221608778286e+00 - 13 3.1055904718024561e+00 8.1431271170459514e+00 -1.2597779054058647e+00 - 14 1.6321646299623836e+01 -6.4737292023940052e+00 -6.0969666237587319e+00 - 15 1.2014703003264437e+01 -4.7819952969181587e+00 1.5497667618539472e+01 - 16 9.3845211462413065e+00 9.2380044230210405e+00 6.9332654848904189e+00 - 17 -8.1437876633224571e-01 1.0335590285580882e+00 -2.1333543461785509e-01 - 18 4.7908728028679270e-01 1.6800089801308631e+00 -5.5268875505867383e+00 - 19 -2.0533806941129176e+00 -2.3525964439530416e+00 2.1320670955883561e+00 - 20 1.5742934138261249e+00 6.7258746382217860e-01 3.3948204549983823e+00 - 21 3.9487378529081880e+00 4.3175316427012014e+00 -1.1481919601133793e+01 - 22 -6.5477089696018744e+00 -4.1918690971369452e+00 3.4304260006102911e+00 - 23 2.5989711166936864e+00 -1.2566254556425660e-01 8.0514936005235018e+00 - 24 -8.4094048868779181e-01 4.6838060982897600e+00 -2.5056979703433946e+00 - 25 -1.3589399152326838e+00 -3.2194810517526529e+00 2.1726606908305435e-01 - 26 2.1998804039204756e+00 -1.4643250465371074e+00 2.2884319012603402e+00 - 27 -1.3120258950869723e-01 2.3248353742613195e+00 -7.0687277526256109e-01 - 28 -7.9798149428972343e-01 -1.3623378004463826e+00 -7.5274691791676882e-02 - 29 9.2918408379842066e-01 -9.6249757381493684e-01 7.8214746705423799e-01 -run_energy: 45.4459195202412 + 12 1.3804183606931298e+01 6.4447653590032914e+00 -2.7232856026007504e+01 + 13 3.5360349619705711e-01 9.1396982628926138e-01 4.4753951517849107e+00 + 14 9.6171168365401805e+00 -1.2052302426663841e+01 -3.9493877514992031e+00 + 15 6.4860723734536965e+00 -7.3468753785680629e+00 2.2291265160011950e+01 + 16 -2.1230106290243054e+00 1.3874285421512146e+01 6.8398804299585079e+00 + 17 3.6034624009792791e+00 -4.9831323468942506e+00 3.0333746689077179e+00 + 18 8.4504245756073892e-01 5.5042293626682808e+00 -2.1046811461460457e+01 + 19 -6.5342341140829419e+00 -7.9348302620004993e+00 8.7785874834232587e+00 + 20 5.6891916565222029e+00 2.4306008993322186e+00 1.2268223978037199e+01 + 21 7.8687847056106097e+00 9.2247825951126554e+00 -2.6147407661059020e+01 + 22 -1.3528173582118603e+01 -8.9511461518324538e+00 8.6148798736605858e+00 + 23 5.6593888765079932e+00 -2.7363644328020120e-01 1.7532527787398436e+01 + 24 -4.3228091413199312e+00 1.8218035887352222e+01 -1.0563459250035294e+01 + 25 -4.1518972409293955e+00 -1.2576945219214169e+01 1.7476216234117312e+00 + 26 8.4747063822493267e+00 -5.6410906681380535e+00 8.8158376266235621e+00 + 27 -1.9941459534406549e+00 1.7618141002760062e+01 -5.9162802776486032e+00 + 28 -4.8714180504657234e+00 -1.0506429973856317e+01 1.3714179563487131e-01 + 29 6.8655640039063783e+00 -7.1117110289037466e+00 5.7791384820137317e+00 +run_energy: 46.04254213414856 run_stress: ! |2- - 1.0224296939567702e+02 -8.5149951148281033e+01 1.1077450496851872e+01 9.2245165502849829e+01 -3.1084418227269154e+01 5.2366663320491313e-01 + 1.1725321346181148e+02 -8.7851127936553254e+01 -1.2820805825603960e+00 1.1164348489319656e+02 -9.3238396977559397e+00 6.5868867241338807e+00 run_forces: ! |2 - 1 4.6696948163060675e+01 9.5469544165543052e+00 -2.1330948302985508e+01 - 2 -1.7341210851964273e+00 -1.4128897827282087e+01 -1.1408863992275160e+01 - 3 -1.0105551089272240e+01 4.2277702428791336e+01 3.9657670069675063e+01 - 4 -1.6122111935066883e+01 -2.0098532812588481e+01 1.2653235408843411e+01 - 5 -4.2111565648427224e+01 -4.1283493356078523e+01 -1.7589964848850386e+01 - 6 5.6633343610296642e+01 -1.3630420678353568e+01 -3.9740642386699271e+01 - 7 -1.8067962126721181e+01 1.7005582120491120e+01 1.5568169485445109e+00 - 8 -1.0459403976386902e+01 -1.5611162457913967e+01 8.4226500676174069e+01 - 9 -1.4631300686651667e+01 1.7116506905325277e+01 3.5366459989463483e+00 - 10 -9.1067423535925318e+00 2.5083637022662394e+01 -6.6120603070314331e+01 - 11 -2.0531188000382802e+01 -7.0572039110412836e+00 7.4976926119744087e+00 - 12 -4.5804053460484440e-01 -6.7408368318088137e+00 -7.3612432437675679e+00 - 13 3.0256565331949181e+00 7.9773964875310250e+00 -1.1599249084139895e+00 - 14 1.6325797226942768e+01 -6.0364594808671850e+00 -6.0596304628457736e+00 - 15 1.2032950547216590e+01 -4.6547008559207024e+00 1.4984306358892226e+01 - 16 9.4390365741788855e+00 9.1831264349550388e+00 6.8856125869099509e+00 - 17 -8.2574521858778427e-01 1.0508023955441044e+00 -2.2665944380799952e-01 - 18 4.1662989783566795e-01 1.4355996853101134e+00 -4.6916036738076876e+00 - 19 -1.7454972366844239e+00 -2.0016596312326365e+00 1.8125096846165301e+00 - 20 1.3288673388487560e+00 5.6605994592252307e-01 2.8790939891911576e+00 - 21 3.7257661846966093e+00 4.0481711597815977e+00 -1.0827752619904448e+01 - 22 -6.1593135050903065e+00 -3.9305106214838132e+00 3.2463364124342222e+00 - 23 2.4335473203936973e+00 -1.1766053829778456e-01 7.5814162074702249e+00 - 24 -7.6007405188534261e-01 4.2086623877720974e+00 -2.2508903613389659e+00 - 25 -1.2107922910240914e+00 -2.8924997143595577e+00 1.9797185345341334e-01 - 26 1.9708663429094340e+00 -1.3161626734125400e+00 2.0529185078855527e+00 - 27 -1.2690270648686752e-01 2.1785298399231308e+00 -6.5914069723159696e-01 - 28 -7.4337188418354749e-01 -1.2769741286441925e+00 -7.1075298614674390e-02 - 29 8.7027459067041502e-01 -9.0155571127893830e-01 7.3021599584627139e-01 + 1 4.9310488854556048e+01 3.4204699131043999e+00 -3.4719646460390109e+01 + 2 -8.0299294685685085e-01 -6.5454065929116556e+00 -5.2863994125400326e+00 + 3 -1.9344188743451483e+01 6.1008236345827427e+01 5.7990450617574737e+01 + 4 -1.1820915021801847e+01 -2.6960419197209372e+01 3.9252515610422387e+00 + 5 -3.5905034771726200e+01 -5.0435101635947014e+01 -1.9146824911182328e+01 + 6 5.0729278972279332e+01 -1.5703691297521928e+01 -3.6490325001299325e+01 + 7 -1.8043757960499846e+01 1.7038616039733434e+01 1.5516900804512148e+00 + 8 -1.5552591757457865e+01 -2.1589081417070179e+01 7.4580844287823936e+01 + 9 -1.4632487393832747e+01 1.7116771489893083e+01 3.5369114786793467e+00 + 10 5.0177324966376649e+00 3.2655409113932286e+01 -5.8914010758009439e+01 + 11 -2.0526018243356614e+01 -7.0603095274350611e+00 7.4991583014498691e+00 + 12 1.3523522841409502e+01 6.2514718031216852e+00 -2.6685798485651077e+01 + 13 3.0043046271322960e-01 7.8431109074530148e-01 4.5328635576848786e+00 + 14 9.6740453376714228e+00 -1.1603919453433887e+01 -3.9205080570168040e+00 + 15 6.5345442098934683e+00 -7.2391735244141353e+00 2.1740136588792641e+01 + 16 -2.0494434617404407e+00 1.3825958913895089e+01 6.7881976680816249e+00 + 17 3.5873871255632257e+00 -4.9641420643094554e+00 3.0180089445086313e+00 + 18 7.9531230378610207e-01 5.2629626454507630e+00 -2.0172279025467247e+01 + 19 -6.1997999385006839e+00 -7.5645533008417640e+00 8.4605118212170112e+00 + 20 5.4044876347145818e+00 2.3015906553910015e+00 1.1711767204250236e+01 + 21 7.6462499201271452e+00 8.9238366526271982e+00 -2.5489460284469285e+01 + 22 -1.3116044133706563e+01 -8.6583255717724796e+00 8.4434021193141291e+00 + 23 5.4697942135794175e+00 -2.6551108085471875e-01 1.7046058165155156e+01 + 24 -4.2497082139356905e+00 1.7742951256065766e+01 -1.0303002556901220e+01 + 25 -3.9777181755411437e+00 -1.2246864111150519e+01 1.7323644652289971e+00 + 26 8.2274263894768342e+00 -5.4960871449152453e+00 8.5706380916722225e+00 + 27 -2.0048516565658536e+00 1.7446299537442144e+01 -5.8315780788096188e+00 + 28 -4.7894277572886974e+00 -1.0406054769833135e+01 1.3027326655161572e-01 + 29 6.7942794138545510e+00 -7.0402447676090096e+00 5.7013048122580035e+00 ... diff --git a/unittest/force-styles/tests/angle-class2_p6.yaml b/unittest/force-styles/tests/angle-class2_p6.yaml index 68676960f7..367dc2f450 100644 --- a/unittest/force-styles/tests/angle-class2_p6.yaml +++ b/unittest/force-styles/tests/angle-class2_p6.yaml @@ -1,7 +1,8 @@ --- -lammps_version: 10 Feb 2021 -date_generated: Fri Feb 26 23:09:23 2021 +lammps_version: 14 Dec 2021 +date_generated: Tue Dec 21 11:26:44 2021 epsilon: 5e-13 +skip_tests: prerequisites: ! | atom full angle class2/p6 @@ -21,73 +22,73 @@ angle_coeff: ! | 1 ba 20.0 0.0 1.5 1.5 3 ba 10.0 10.0 1.5 1.5 4 ba 0.0 20.0 1.5 1.5 -equilibrium: 4 1.9216075064457565 1.9373154697137058 2.0943951023931953 1.8936822384138474 +equilibrium: 4 1.9216075064457567 1.9373154697137058 2.0943951023931953 1.8936822384138476 extract: ! "" natoms: 29 -init_energy: 45.6314933281677 +init_energy: 46.440802879647805 init_stress: ! |2- - 1.0380655176146676e+02 -8.5598294304263064e+01 1.0547225768036466e+01 9.3533997442530364e+01 -3.0452940351933286e+01 1.6213985364060581e+00 + 1.1893137300688346e+02 -8.8292852846966269e+01 -1.8830369346769591e+00 1.1299640161336661e+02 -8.5357507162235464e+00 7.6984154056027378e+00 init_forces: ! |2 - 1 4.7202230480286389e+01 9.2446782757168187e+00 -2.1892853730746999e+01 - 2 -1.7062799943363052e+00 -1.3815333539761312e+01 -1.1109218053986531e+01 - 3 -1.0819442137600213e+01 4.2755643579721394e+01 4.0131978148937094e+01 - 4 -1.6107331786015202e+01 -2.0450833016170897e+01 1.2394698445624217e+01 - 5 -4.1996775288710346e+01 -4.1451276926607676e+01 -1.7536151963373857e+01 - 6 5.6640330905804802e+01 -1.3581373316126099e+01 -3.9714075413905050e+01 - 7 -1.8054191673295325e+01 1.6982840171711775e+01 1.5587849314106879e+00 - 8 -1.0524752828621686e+01 -1.5572494690475857e+01 8.4307006012653105e+01 - 9 -1.4606116746275049e+01 1.7088845087132931e+01 3.5265010989798085e+00 - 10 -9.2183983294618113e+00 2.5308833813269253e+01 -6.6220570658369525e+01 - 11 -2.0536178089795950e+01 -7.0922505905966178e+00 7.5061958159305595e+00 - 12 -2.8507497680544613e-01 -6.5761946491161254e+00 -7.8131884119322397e+00 - 13 3.1055913097859387e+00 8.1431291943766304e+00 -1.2597770427903630e+00 - 14 1.6321556949530429e+01 -6.4737931388148002e+00 -6.0969371866598330e+00 - 15 1.2014697273266693e+01 -4.7819939276460772e+00 1.5497663357748195e+01 - 16 9.3845137052789855e+00 9.2380146356987876e+00 6.9332800900251534e+00 - 17 -8.1437877303591466e-01 1.0335590376878656e+00 -2.1333543954444023e-01 - 18 4.7908727278798890e-01 1.6800089017685975e+00 -5.5268872325673071e+00 - 19 -2.0533806022955563e+00 -2.3525963295672470e+00 2.1320669593942201e+00 - 20 1.5742933295075674e+00 6.7258742779864933e-01 3.3948202731730870e+00 - 21 3.9487365123920992e+00 4.3175299645965515e+00 -1.1481914586060395e+01 - 22 -6.5477065825321601e+00 -4.1918674696340856e+00 3.4304242277121375e+00 - 23 2.5989700701400609e+00 -1.2566249496246562e-01 8.0514903583482571e+00 - 24 -8.4094044796366130e-01 4.6838059399926504e+00 -2.5056978760993669e+00 - 25 -1.3589398825660985e+00 -3.2194809423072277e+00 2.1726605118393005e-01 - 26 2.1998803305297598e+00 -1.4643249976854225e+00 2.2884318249154370e+00 - 27 -1.3120258888530634e-01 2.3248353691437700e+00 -7.0687277351935407e-01 - 28 -7.9798149292664289e-01 -1.3623377973865247e+00 -7.5274691862757134e-02 - 29 9.2918408181194923e-01 -9.6249757175724537e-01 7.8214746538211122e-01 -run_energy: 45.4458285940593 + 1 4.9843888867383036e+01 3.0919808206030721e+00 -3.5311373179346681e+01 + 2 -7.6547138150424543e-01 -6.1978353410493483e+00 -4.9838177318164663e+00 + 3 -2.0133026476712903e+01 6.1564484240393824e+01 5.8546474701306153e+01 + 4 -1.1800938660819003e+01 -2.7342192898717585e+01 3.6024657641736728e+00 + 5 -3.5755844374603512e+01 -5.0659575042462862e+01 -1.9085218337836995e+01 + 6 5.0735338623572588e+01 -1.5634063045804186e+01 -3.6453557303514501e+01 + 7 -1.8030037186030640e+01 1.7008949856719713e+01 1.5544953754976136e+00 + 8 -1.5631909549634866e+01 -2.1569309751931716e+01 7.4640481484122148e+01 + 9 -1.4606116746275049e+01 1.7088845087132935e+01 3.5265010989798080e+00 + 10 4.9396801101823433e+00 3.2889776085852560e+01 -5.8999793708728561e+01 + 11 -2.0536178089795950e+01 -7.0922505905966178e+00 7.5061958159305604e+00 + 12 1.3803472075865960e+01 6.4452957521954772e+00 -2.7233422277061912e+01 + 13 3.5360433418053783e-01 9.1397190361994329e-01 4.4753960144004115e+00 + 14 9.6170274864467693e+00 -1.2052366363084635e+01 -3.9493583144003042e+00 + 15 6.4860666434559526e+00 -7.3468740092959814e+00 2.2291260899220667e+01 + 16 -2.1230180699866263e+00 1.3874295634189895e+01 6.8398950350932433e+00 + 17 3.6034623942756108e+00 -4.9831323377644736e+00 3.0333746639811334e+00 + 18 8.4504245006193557e-01 5.5042292843060157e+00 -2.1046811143441026e+01 + 19 -6.5342340222655810e+00 -7.9348301476147052e+00 8.7785873472291236e+00 + 20 5.6891915722036455e+00 2.4306008633086891e+00 1.2268223796211903e+01 + 21 7.8687833650945196e+00 9.2247809170080028e+00 -2.6147402645985622e+01 + 22 -1.3528171195048888e+01 -8.9511445243295924e+00 8.6148781007624322e+00 + 23 5.6593878299543681e+00 -2.7363639267841045e-01 1.7532524545223190e+01 + 24 -4.3228091005958014e+00 1.8218035729055110e+01 -1.0563459155791266e+01 + 25 -4.1518972082628096e+00 -1.2576945109768744e+01 1.7476216055126070e+00 + 26 8.4747063088586110e+00 -5.6410906192863681e+00 8.8158375502786583e+00 + 27 -1.9941459528172638e+00 1.7618140997642513e+01 -5.9162802759053958e+00 + 28 -4.8714180491026431e+00 -1.0506429970796459e+01 1.3714179556379100e-01 + 29 6.8655640019199069e+00 -7.1117110268460557e+00 5.7791384803416053e+00 +run_energy: 46.04245232805462 run_stress: ! |2- - 1.0224054425179162e+02 -8.5151354715203126e+01 1.1081280882090672e+01 9.2245389115064398e+01 -3.1084294543117402e+01 5.2530572051471558e-01 + 1.1725078883087194e+02 -8.7852531332776422e+01 -1.2782508811995987e+00 1.1164371026778049e+02 -9.3237176305934248e+00 6.5885234111489295e+00 run_forces: ! |2 - 1 4.6697063144899758e+01 9.5464292184313084e+00 -2.1329615486413495e+01 - 2 -1.7341213469343071e+00 -1.4128899311205867e+01 -1.1408865229626386e+01 - 3 -1.0106423829890657e+01 4.2276216760085092e+01 3.9655618981253937e+01 - 4 -1.6122153804166530e+01 -2.0098535935851185e+01 1.2653292967815302e+01 - 5 -4.2111045474433908e+01 -4.1281732299841927e+01 -1.7589329659171515e+01 - 6 5.6633872451307042e+01 -1.3631017853516695e+01 -3.9742648484553712e+01 - 7 -1.8067710814224181e+01 1.7005356519278848e+01 1.5568722867815019e+00 - 8 -1.0458368774535296e+01 -1.5609267760781632e+01 8.4230369919214809e+01 - 9 -1.4631291097137083e+01 1.7116505329041448e+01 3.5366441447941890e+00 - 10 -9.1083165882262076e+00 2.5081593622661249e+01 -6.6121298210985884e+01 - 11 -2.0530357257878578e+01 -7.0564447871249403e+00 7.4970247183653580e+00 - 12 -4.5873997835014801e-01 -6.7403152848189372e+00 -7.3618095936615644e+00 - 13 3.0256572433426814e+00 7.9773984059331964e+00 -1.1599242567025270e+00 - 14 1.6325706512702343e+01 -6.0365250687180749e+00 -6.0596004500231722e+00 - 15 1.2032945183866531e+01 -4.6546995895395877e+00 1.4984301967909428e+01 - 16 9.4390297519529085e+00 9.1831355042234861e+00 6.8856259318712949e+00 - 17 -8.2574532229437936e-01 1.0508025317442151e+00 -2.2665954686757872e-01 - 18 4.1662989358421232e-01 1.4355996421935044e+00 -4.6916034993533247e+00 - 19 -1.7454971864999060e+00 -2.0016595685522596e+00 1.8125096096904596e+00 - 20 1.3288672929156937e+00 5.6605992635875502e-01 2.8790938896628648e+00 - 21 3.7257651397379274e+00 4.0481698601097618e+00 -1.0827748711362894e+01 - 22 -6.1593116505043302e+00 -3.9305093611054267e+00 3.2463350269770475e+00 - 23 2.4335465107664027e+00 -1.1766049900433539e-01 7.5814136843858462e+00 - 24 -7.6007402633523591e-01 4.2086622887143186e+00 -2.2508903023980524e+00 - 25 -1.2107922707762828e+00 -2.8924996458903025e+00 1.9797184221876996e-01 - 26 1.9708662971115187e+00 -1.3161626428240165e+00 2.0529184601792827e+00 - 27 -1.2690270602781828e-01 2.1785298361926788e+00 -6.5914069596767511e-01 - 28 -7.4337188319492098e-01 -1.2769741264135199e+00 -7.1075298663885261e-02 - 29 8.7027458922273926e-01 -9.0155570977915866e-01 7.3021599463156039e-01 + 1 4.9310604335655682e+01 3.4199456337672487e+00 -3.4718316191911107e+01 + 2 -8.0299317271452264e-01 -6.5454081333117653e+00 -5.2864006747626604e+00 + 3 -1.9345060126536442e+01 6.1006753750400470e+01 5.7988403049659411e+01 + 4 -1.1820957153105841e+01 -2.6960422682106536e+01 3.9253092142830135e+00 + 5 -3.5904516097808205e+01 -5.0433344031821314e+01 -1.9146190690682918e+01 + 6 5.0729808044888514e+01 -1.5704289267936588e+01 -3.6492333161602460e+01 + 7 -1.8043506480508537e+01 1.7038390298430201e+01 1.5517454554100727e+00 + 8 -1.5551557230614444e+01 -2.1587186230569777e+01 7.4584717878493251e+01 + 9 -1.4632477702925939e+01 1.7116769814092336e+01 3.5369096257061594e+00 + 10 5.0161578855418893e+00 3.2653366582115979e+01 -5.8914707964769292e+01 + 11 -2.0525187366514267e+01 -7.0595502886286221e+00 7.4984902661515953e+00 + 12 1.3522823846822945e+01 6.2519930281569955e+00 -2.6686365074578834e+01 + 13 3.0043118312382699e-01 7.8431307047186760e-01 4.5328641811452499e+00 + 14 9.6739544192178748e+00 -1.1603985265483198e+01 -3.9204779603734119e+00 + 15 6.5345389143893406e+00 -7.2391722622226151e+00 2.1740132205563690e+01 + 16 -2.0494503520587521e+00 1.3825967887607892e+01 6.7882109957643362e+00 + 17 3.5873870531468781e+00 -4.9641419029625879e+00 3.0180088465038910e+00 + 18 7.9531229968056927e-01 5.2629626038099762e+00 -2.0172278856982508e+01 + 19 -6.1997998900621667e+00 -7.5645532403308380e+00 8.4605117488474431e+00 + 20 5.4044875903815974e+00 2.3015906365208618e+00 1.1711767108135064e+01 + 21 7.6462488915955822e+00 8.9238353733854954e+00 -2.5489456437353834e+01 + 22 -1.3116042308945529e+01 -8.6583243315139509e+00 8.4434007553408890e+00 + 23 5.4697934173499467e+00 -2.6551104187154384e-01 1.7046055682012945e+01 + 24 -4.2497081893768893e+00 1.7742951160854016e+01 -1.0303002500248269e+01 + 25 -3.9777181560986339e+00 -1.2246864045350220e+01 1.7323644544198329e+00 + 26 8.2274263454755232e+00 -5.4960871155037951e+00 8.5706380458284350e+00 + 27 -2.0048516561480048e+00 1.7446299534047586e+01 -5.8315780776594286e+00 + 28 -4.7894277563898591e+00 -1.0406054767803472e+01 1.3027326650644638e-01 + 29 6.7942794125378638e+00 -7.0402447662441157e+00 5.7013048111529825e+00 ...