diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index da403aa87e..080f3eff20 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -187,7 +187,7 @@ OPT. * :doc:`mgpt ` * :doc:`mie/cut (g) ` * :doc:`mliap ` - * :doc:`mm3/switch3/coulgauss/long ` + * :doc:`mm3/switch3/coulgauss/long ` * :doc:`momb ` * :doc:`morse (gkot) ` * :doc:`morse/smooth/linear (o) ` diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 301e6bfd4a..b662ae73c7 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -2479,6 +2479,6 @@ which discuss the `QuickFF `_ methodology. * :doc:`bond_style mm3 ` * :doc:`improper_style distharm ` * :doc:`improper_style sqdistharm ` -* :doc:`pair_style mm3/switch3/coulgauss/long ` +* :doc:`pair_style mm3/switch3/coulgauss/long ` * :doc:`pair_style lj/switch3/coulgauss/long ` * examples/USER/yaff diff --git a/doc/src/fix_halt.rst b/doc/src/fix_halt.rst index 964132518d..06f068bb7d 100644 --- a/doc/src/fix_halt.rst +++ b/doc/src/fix_halt.rst @@ -115,6 +115,18 @@ The version with "bondmax" will just run somewhat faster, due to less overhead in computing bond lengths and not storing them in a separate compute. +A variable can be used to implement a large variety of conditions, +including to stop when a specific file exists. Example: + +.. code-block:: LAMMPS + + variable exit equal is_file(EXIT) + fix 10 all halt 100 v_exit != 0 error soft + +Will stop the current run command when a file ``EXIT`` is created +in the current working directory. The condition can be cleared +by removing the file through the :doc:`shell ` command. + The choice of operators listed above are the usual comparison operators. The XOR operation (exclusive or) is also included as "\|\^". In this context, XOR means that if either the attribute or avalue is diff --git a/doc/src/pair_lj_switch3_coulgauss_long.rst b/doc/src/pair_lj_switch3_coulgauss_long.rst index f791b9836b..6b918c1071 100644 --- a/doc/src/pair_lj_switch3_coulgauss_long.rst +++ b/doc/src/pair_lj_switch3_coulgauss_long.rst @@ -1,8 +1,12 @@ .. index:: pair_style lj/switch3/coulgauss/long +.. index:: pair_style mm3/switch3/coulgauss/long pair_style lj/switch3/coulgauss/long command ============================================ +pair_style mm3/switch3/coulgauss/long command +============================================= + Syntax """""" @@ -10,7 +14,7 @@ Syntax pair_style style args -* style = *lj/switch3/coulgauss/long* +* style = *lj/switch3/coulgauss/long* or *mm3/switch3/coulgauss/long* * args = list of arguments for a particular style .. parsed-literal:: @@ -20,6 +24,11 @@ Syntax cutoff2 = global cutoff for Coulombic (optional) (distance units) width = width parameter of the smoothing function (distance units) + *mm3/switch3/coulgauss/long* args = cutoff (cutoff2) width + cutoff = global cutoff for MM3 (and Coulombic if only 1 arg) (distance units) + cutoff2 = global cutoff for Coulombic (optional) (distance units) + width = width parameter of the smoothing function (distance units) + Examples """""""" @@ -31,6 +40,12 @@ Examples pair_style lj/switch3/coulgauss/long 12.0 10.0 3.0 pair_coeff 1 0.2 2.5 1.2 + pair_style mm3/switch3/coulgauss/long 12.0 3.0 + pair_coeff 1 0.2 2.5 1.2 + + pair_style mm3/switch3/coulgauss/long 12.0 10.0 3.0 + pair_coeff 1 0.2 2.5 1.2 + Description """"""""""" @@ -41,8 +56,17 @@ vdW potential E = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12}-\left(\frac{\sigma}{r}\right)^{6} \right] -, which goes smoothly to zero at the cutoff r_c as defined -by the switching function +The *mm3/switch3/coulgauss/long* style evaluates the MM3 +vdW potential :ref:`(Allinger) ` + +.. math:: + + E & = \epsilon_{ij} \left[ -2.25 \left(\frac{r_{v,ij}}{r_{ij}}\right)^6 + 1.84(10)^5 \exp\left[-12.0 r_{ij}/r_{v,ij}\right] \right] S_3(r_{ij}) \\ + r_{v,ij} & = r_{v,i} + r_{v,j} \\ + \epsilon_{ij} & = \sqrt{\epsilon_i \epsilon_j} + +Both potentials go smoothly to zero at the cutoff r_c as defined by the +switching function .. math:: @@ -85,14 +109,35 @@ commands: Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" +For atom type pairs I,J and I != J, the epsilon and sigma coefficients +and cutoff distance for all of the lj/long pair styles can be mixed. +The default mix value is *geometric*\ . See the "pair_modify" command +for details. + Shifting the potential energy is not necessary because the switching function ensures that the potential is zero at the cut-off. +These pair styles support the :doc:`pair_modify ` table and +options since they can tabulate the short-range portion of the +long-range Coulombic interactions. + +Thes pair styles do not support the :doc:`pair_modify ` +tail option for adding a long-range tail correction to the +Lennard-Jones portion of the energy and pressure. + +These pair styles write their information to :doc:`binary restart files `, so pair_style and pair_coeff commands do not need +to be specified in an input script that reads a restart file. + +These pair styles can only be used via the *pair* keyword of the +:doc:`run_style respa ` command. They do not support the +*inner*\ , *middle*\ , *outer* keywords. + Restrictions """""""""""" -These styles are part of the USER-YAFF package. They are only -enabled if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. +These styles are part of the USER-YAFF package. They are only enabled +if LAMMPS was built with that package. See the :doc:`Build package +` doc page for more info. Related commands """""""""""""""" diff --git a/doc/src/pair_mm3_switch3_coulgauss_long.rst b/doc/src/pair_mm3_switch3_coulgauss_long.rst deleted file mode 100644 index 798df0bf7a..0000000000 --- a/doc/src/pair_mm3_switch3_coulgauss_long.rst +++ /dev/null @@ -1,109 +0,0 @@ -.. index:: pair_style mm3/switch3/coulgauss/long - -pair_style mm3/switch3/coulgauss/long command -============================================= - -Syntax -"""""" - -.. code-block:: LAMMPS - - pair_style style args - -* style = *mm3/switch3/coulgauss/long* -* args = list of arguments for a particular style - -.. parsed-literal:: - - *mm3/switch3/coulgauss/long* args = cutoff (cutoff2) width - cutoff = global cutoff for MM3 (and Coulombic if only 1 arg) (distance units) - cutoff2 = global cutoff for Coulombic (optional) (distance units) - width = width parameter of the smoothing function (distance units) - -Examples -"""""""" - -.. code-block:: LAMMPS - - pair_style mm3/switch3/coulgauss/long 12.0 3.0 - pair_coeff 1 0.2 2.5 1.2 - - pair_style mm3/switch3/coulgauss/long 12.0 10.0 3.0 - pair_coeff 1 0.2 2.5 1.2 - -Description -""""""""""" - -The *mm3/switch3/coulgauss/long* style evaluates the MM3 -vdW potential :ref:`(Allinger) ` - -.. math:: - - E & = \epsilon_{ij} \left[ -2.25 \left(\frac{r_{v,ij}}{r_{ij}}\right)^6 + 1.84(10)^5 \exp\left[-12.0 r_{ij}/r_{v,ij}\right] \right] S_3(r_{ij}) \\ - r_{v,ij} & = r_{v,i} + r_{v,j} \\ - \epsilon_{ij} & = \sqrt{\epsilon_i \epsilon_j} - -, which goes smoothly to zero at the cutoff r_c as defined -by the switching function - -.. math:: - - S_3(r) = \left\lbrace \begin{array}{ll} - 1 & \quad\mathrm{if}\quad r < r_\mathrm{c} - w \\ - 3x^2 - 2x^3 & \quad\mathrm{if}\quad r < r_\mathrm{c} \quad\mathrm{with\quad} x=\frac{r_\mathrm{c} - r}{w} \\ - 0 & \quad\mathrm{if}\quad r >= r_\mathrm{c} - \end{array} \right. - -where w is the width defined in the arguments. This potential -is combined with Coulomb interaction between Gaussian charge densities: - -.. math:: - - E = \frac{q_i q_j \mathrm{erf}\left( r/\sqrt{\gamma_1^2+\gamma_2^2} \right) }{\epsilon r_{ij}} - -where :math:`q_i` and :math:`q_j` are the charges on the 2 atoms, -epsilon is the dielectric constant which can be set by the -:doc:`dielectric ` command, ::math:`\gamma_i` and -:math:`\gamma_j` are the widths of the Gaussian charge distribution and -erf() is the error-function. This style has to be used in conjunction -with the :doc:`kspace_style ` command - -If one cutoff is specified it is used for both the vdW and Coulomb -terms. If two cutoffs are specified, the first is used as the cutoff -for the vdW terms, and the second is the cutoff for the Coulombic term. - -The following coefficients must be defined for each pair of atoms -types via the :doc:`pair_coeff ` command as in the examples -above, or in the data file or restart files read by the -:doc:`read_data ` or :doc:`read_restart ` -commands: - -* :math:`\epsilon` (energy) -* :math:`r_v` (distance) -* :math:`\gamma` (distance) - ----------- - -Mixing, shift, table, tail correction, restart, rRESPA info -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -Mixing rules are fixed for this style as defined above. - -Shifting the potential energy is not necessary because the switching -function ensures that the potential is zero at the cut-off. - -Restrictions -"""""""""""" - -These styles are part of the USER-YAFF package. They are only -enabled if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. - -Related commands -"""""""""""""""" - -:doc:`pair_coeff ` - -Default -""""""" - -none diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index fc66b778a1..89530895c4 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -250,7 +250,7 @@ accelerated styles exist. * :doc:`mgpt ` - simplified model generalized pseudopotential theory (MGPT) potential * :doc:`mesont/tpm ` - nanotubes mesoscopic force field * :doc:`mie/cut ` - Mie potential -* :doc:`mm3/switch3/coulgauss/long ` - smoothed MM3 vdW potential with Gaussian electrostatics +* :doc:`mm3/switch3/coulgauss/long ` - smoothed MM3 vdW potential with Gaussian electrostatics * :doc:`momb ` - Many-Body Metal-Organic (MOMB) force field * :doc:`morse ` - Morse potential * :doc:`morse/smooth/linear ` - linear smoothed Morse potential diff --git a/doc/src/variable.rst b/doc/src/variable.rst index ea6b7ef8ec..af324c180f 100644 --- a/doc/src/variable.rst +++ b/doc/src/variable.rst @@ -65,8 +65,8 @@ Syntax bound(group,dir,region), gyration(group,region), ke(group,reigon), angmom(group,dim,region), torque(group,dim,region), inertia(group,dimdim,region), omega(group,dim,region) - special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x) - feature functions = is_active(category,feature,exact), is_defined(category,id,exact) + special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name) + feature functions = is_available(category,feature), is_active(category,feature), is_defined(category,id) atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i] atom vector = id, mass, type, mol, x, y, z, vx, vy, vz, fx, fy, fz, q compute references = c_ID, c_ID[i], c_ID[i][j], C_ID, C_ID[i] @@ -429,7 +429,7 @@ argument. For *equal*\ -style variables the formula computes a scalar quantity, which becomes the value of the variable whenever it is evaluated. For *vector*\ -style variables the formula must compute a vector of quantities, which becomes the value of the variable whenever -it is evaluated. The calculated vector can be on length one, but it +it is evaluated. The calculated vector can be of length one, but it cannot be a simple scalar value like that produced by an equal-style compute. I.e. the formula for a vector-style variable must have at least one quantity in it that refers to a global vector produced by a @@ -821,6 +821,10 @@ Special Functions Special functions take specific kinds of arguments, meaning their arguments cannot be formulas themselves. +The is_file(x) function is a test whether 'x' is a (readable) file +and returns 1 in this case, otherwise it returns 0. For that 'x' +is taken as a literal string and must not have any blanks in it. + The sum(x), min(x), max(x), ave(x), trap(x), and slope(x) functions each take 1 argument which is of the form "c_ID" or "c_ID[N]" or "f_ID" or "f_ID[N]" or "v_name". The first two are computes and the diff --git a/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp b/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp index 556d303d30..c6bc65c196 100644 --- a/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp +++ b/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp @@ -17,21 +17,20 @@ #include "pair_lj_switch3_coulgauss_long.h" -#include -#include #include "atom.h" #include "comm.h" +#include "error.h" #include "force.h" #include "kspace.h" -#include "update.h" -#include "respa.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" #include "memory.h" -#include "error.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "update.h" +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -49,7 +48,6 @@ using namespace MathConst; PairLJSwitch3CoulGaussLong::PairLJSwitch3CoulGaussLong(LAMMPS *lmp) : Pair(lmp) { ewaldflag = pppmflag = 1; - respa_enable = 1; writedata = 1; ftable = nullptr; qdist = 0.0; @@ -170,8 +168,8 @@ void PairLJSwitch3CoulGaussLong::compute(int eflag, int vflag) expn2 = 0.0; erfc2 = 0.0; forcecoul2 = 0.0; - } - else { + prefactor2 = 0.0; + } else { rrij = lj2[itype][jtype]*r; expn2 = exp(-rrij*rrij); erfc2 = erfc(rrij); @@ -333,42 +331,19 @@ void PairLJSwitch3CoulGaussLong::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style lj/switch3/coulgauss/long requires atom attribute q"); - // request regular or rRESPA neighbor list - - int irequest; - int respa = 0; - - if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { - if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; - if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; - } - - irequest = neighbor->request(this,instance_me); - - if (respa >= 1) { - neighbor->requests[irequest]->respaouter = 1; - neighbor->requests[irequest]->respainner = 1; - } - if (respa == 2) neighbor->requests[irequest]->respamiddle = 1; - cut_coulsq = cut_coul * cut_coul; - // set rRESPA cutoffs - - if (strstr(update->integrate_style,"respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; - else cut_respa = nullptr; - // insure use of KSpace long-range solver, set g_ewald if (force->kspace == nullptr) error->all(FLERR,"Pair style requires a KSpace style"); g_ewald = force->kspace->g_ewald; + neighbor->request(this,instance_me); + // setup force tables - if (ncoultablebits) init_tables(cut_coul,cut_respa); + if (ncoultablebits) init_tables(cut_coul,nullptr); } /* ---------------------------------------------------------------------- @@ -413,11 +388,6 @@ double PairLJSwitch3CoulGaussLong::init_one(int i, int j) lj4[j][i] = lj4[i][j]; offset[j][i] = offset[i][j]; - // check interior rRESPA cutoff - - if (cut_respa && MIN(cut_lj[i][j],cut_coul) < cut_respa[3]) - error->all(FLERR,"Pair cutoff < Respa interior cutoff"); - // compute I,J contribution to long-range tail correction // count total # of atoms of type I and J via Allreduce @@ -610,7 +580,7 @@ double PairLJSwitch3CoulGaussLong::single(int i, int j, int itype, int jtype, double &fforce) { double r2inv,r6inv,r,grij,expm2,t,erfc1,prefactor,prefactor2; - double fraction,table,forcecoul,forcecoul2,forcelj,phicoul; + double fraction,table,forcecoul,forcecoul2,forcelj; double rrij,expn2,erfc2,expb,ecoul,evdwl,trx,tr,ftr; int itable; @@ -643,32 +613,31 @@ double PairLJSwitch3CoulGaussLong::single(int i, int j, int itype, int jtype, } else forcecoul = 0.0; if (rsq < cut_ljsq[itype][jtype]) { - r = sqrt(rsq); r6inv = r2inv*r2inv*r2inv; - rrij = lj2[itype][jtype] * r; - if (rrij==0.0) { + forcelj = r6inv*(12.0*lj3[itype][jtype]*r6inv-6.0*lj4[itype][jtype]); + if (lj2[itype][jtype] == 0.0) { expn2 = 0.0; erfc2 = 0.0; - } - else { + forcecoul2 = 0.0; + } else { + r = sqrt(rsq); + rrij = lj2[itype][jtype]*r; expn2 = exp(-rrij*rrij); erfc2 = erfc(rrij); + prefactor2 = -force->qqrd2e*atom->q[i]*atom->q[j]/r; + forcecoul2 = prefactor2*(erfc2+EWALD_F*rrij*expn2); } - prefactor2 = -force->qqrd2e * atom->q[i]*atom->q[j]/r; - forcecoul2 = prefactor2 * (erfc2 + EWALD_F*rrij*expn2); - forcelj = expb*lj1[itype][jtype]*r-6.0*lj4[itype][jtype]*r6inv; } else forcelj = 0.0; - double eng = 0.0; + evdwl = ecoul = 0.0; if (rsq < cut_coulsq) { if (!ncoultablebits || rsq <= tabinnersq) - phicoul = prefactor*erfc1; + ecoul = prefactor*erfc1; else { table = etable[itable] + fraction*detable[itable]; - phicoul = atom->q[i]*atom->q[j] * table; + ecoul = atom->q[i]*atom->q[j] * table; } - if (factor_coul < 1.0) phicoul -= (1.0-factor_coul)*prefactor; - eng += phicoul; + if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; } if (rsq < cut_ljsq[itype][jtype]) { @@ -678,7 +647,7 @@ double PairLJSwitch3CoulGaussLong::single(int i, int j, int itype, int jtype, } else evdwl = 0.0; // Truncation, see Yaff Switch3 - if (truncw>0) { + if (truncw > 0) { if (rsq < cut_ljsq[itype][jtype]) { if (r>cut_lj[itype][jtype]-truncw) { trx = (cut_lj[itype][jtype]-r)*truncwi; @@ -689,10 +658,9 @@ double PairLJSwitch3CoulGaussLong::single(int i, int j, int itype, int jtype, } } } - eng += evdwl*factor_lj; fforce = (forcecoul + factor_coul*forcecoul2 + factor_lj*forcelj) * r2inv; - return eng; + return evdwl*factor_lj + ecoul; } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp b/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp index 47ddf8c7ad..e91ea5c695 100644 --- a/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp +++ b/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp @@ -17,21 +17,20 @@ #include "pair_mm3_switch3_coulgauss_long.h" -#include -#include #include "atom.h" #include "comm.h" +#include "error.h" #include "force.h" #include "kspace.h" -#include "update.h" -#include "respa.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" #include "memory.h" -#include "error.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "update.h" +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -49,7 +48,6 @@ using namespace MathConst; PairMM3Switch3CoulGaussLong::PairMM3Switch3CoulGaussLong(LAMMPS *lmp) : Pair(lmp) { ewaldflag = pppmflag = 1; - respa_enable = 1; writedata = 1; ftable = nullptr; qdist = 0.0; @@ -173,8 +171,7 @@ void PairMM3Switch3CoulGaussLong::compute(int eflag, int vflag) expn2 = 0.0; erfc2 = 0.0; forcecoul2 = 0.0; - } - else { + } else { rrij = lj2[itype][jtype]*r; expn2 = exp(-rrij*rrij); erfc2 = erfc(rrij); @@ -335,42 +332,19 @@ void PairMM3Switch3CoulGaussLong::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style mm3/switch3/coulgauss/long requires atom attribute q"); - // request regular or rRESPA neighbor list - - int irequest; - int respa = 0; - - if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { - if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; - if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; - } - - irequest = neighbor->request(this,instance_me); - - if (respa >= 1) { - neighbor->requests[irequest]->respaouter = 1; - neighbor->requests[irequest]->respainner = 1; - } - if (respa == 2) neighbor->requests[irequest]->respamiddle = 1; - cut_coulsq = cut_coul * cut_coul; - // set rRESPA cutoffs - - if (strstr(update->integrate_style,"respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; - else cut_respa = nullptr; - // insure use of KSpace long-range solver, set g_ewald if (force->kspace == nullptr) error->all(FLERR,"Pair style requires a KSpace style"); g_ewald = force->kspace->g_ewald; + neighbor->request(this,instance_me); + // setup force tables - if (ncoultablebits) init_tables(cut_coul,cut_respa); + if (ncoultablebits) init_tables(cut_coul,nullptr); } /* ---------------------------------------------------------------------- @@ -414,11 +388,6 @@ double PairMM3Switch3CoulGaussLong::init_one(int i, int j) lj4[j][i] = lj4[i][j]; offset[j][i] = offset[i][j]; - // check interior rRESPA cutoff - - if (cut_respa && MIN(cut_lj[i][j],cut_coul) < cut_respa[3]) - error->all(FLERR,"Pair cutoff < Respa interior cutoff"); - // compute I,J contribution to long-range tail correction // count total # of atoms of type I and J via Allreduce @@ -610,8 +579,8 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype, double &fforce) { double r2inv,r6inv,r,grij,expm2,t,erfc1,prefactor,prefactor2; - double fraction,table,forcecoul,forcecoul2,forcelj,phicoul; - double expb,rrij,expn2,erfc2,ecoul,evdwl,trx,tr,ftr; + double fraction,table,forcecoul,forcecoul2,forcelj; + double expb,rrij,expn2,erfc2,evdwl,ecoul,trx,tr,ftr; int itable; @@ -644,32 +613,34 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype, if (rsq < cut_ljsq[itype][jtype]) { r = sqrt(rsq); - r6inv = r2inv*r2inv*r2inv; expb = lj3[itype][jtype]*exp(-lj1[itype][jtype]*r); - rrij = lj2[itype][jtype] * r; - if (rrij==0.0) { + forcelj = expb*lj1[itype][jtype]*r; + r6inv = r2inv*r2inv*r2inv; + forcelj -= 6.0*lj4[itype][jtype]*r6inv; + + if (lj2[itype][jtype] == 0.0) { expn2 = 0.0; erfc2 = 0.0; - } - else { + forcecoul2 = 0.0; + prefactor2 = 0.0; + } else { + rrij = lj2[itype][jtype]*r; expn2 = exp(-rrij*rrij); erfc2 = erfc(rrij); + prefactor2 = -force->qqrd2e * atom->q[i]*atom->q[j]/r; + forcecoul2 = prefactor2 * (erfc2 + EWALD_F*rrij*expn2); } - prefactor2 = -force->qqrd2e * atom->q[i]*atom->q[j]/r; - forcecoul2 = prefactor2 * (erfc2 + EWALD_F*rrij*expn2); - forcelj = expb*lj1[itype][jtype]*r-6.0*lj4[itype][jtype]*r6inv; - } else forcelj = 0.0; + } else expb = forcelj = 0.0; - double eng = 0.0; + evdwl = ecoul = 0.0; if (rsq < cut_coulsq) { if (!ncoultablebits || rsq <= tabinnersq) - phicoul = prefactor*erfc1; + ecoul = prefactor*erfc1; else { table = etable[itable] + fraction*detable[itable]; - phicoul = atom->q[i]*atom->q[j] * table; + ecoul = atom->q[i]*atom->q[j] * table; } - if (factor_coul < 1.0) phicoul -= (1.0-factor_coul)*prefactor; - eng += phicoul; + if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; } if (rsq < cut_ljsq[itype][jtype]) { @@ -678,7 +649,7 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype, } else evdwl = 0.0; // Truncation, see Yaff Switch3 - if (truncw>0) { + if (truncw > 0) { if (rsq < cut_ljsq[itype][jtype]) { if (r>cut_lj[itype][jtype]-truncw) { trx = (cut_lj[itype][jtype]-r)*truncwi; @@ -689,10 +660,10 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype, } } } - eng += evdwl*factor_lj; fforce = (forcecoul + factor_coul*forcecoul2 + factor_lj*forcelj) * r2inv; - return eng; + return ecoul + evdwl*factor_lj; +; } /* ---------------------------------------------------------------------- */ diff --git a/src/info.cpp b/src/info.cpp index 98ad5a3097..948073bb10 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -64,9 +64,6 @@ #endif namespace LAMMPS_NS { -// same as in variable.cpp -enum {INDEX,LOOP,WORLD,UNIVERSE,ULOOP,STRING,GETENV, - SCALARFILE,ATOMFILE,FORMAT,EQUAL,ATOM,VECTOR,PYTHON,INTERNAL}; enum {COMPUTES=1<<0, DUMPS=1<<1, @@ -106,9 +103,11 @@ static const int STYLES = ATOM_STYLES | INTEGRATE_STYLES | MINIMIZE_STYLES using namespace LAMMPS_NS; +// must match enumerator in variable.h static const char *varstyles[] = { "index", "loop", "world", "universe", "uloop", "string", "getenv", - "file", "atomfile", "format", "equal", "atom", "vector", "python", "internal", "(unknown)"}; + "file", "atomfile", "format", "equal", "atom", "vector", "python", + "internal", "(unknown)"}; static const char *mapstyles[] = { "none", "array", "hash", "yes" }; @@ -649,11 +648,11 @@ void Info::command(int narg, char **arg) fmt::print(out,"Variable[{:3d}]: {:16} style = {:16} def =", i,std::string(names[i])+',', std::string(varstyles[style[i]])+','); - if (style[i] == INTERNAL) { + if (style[i] == Variable::INTERNAL) { fmt::print(out,"{:.8}\n",input->variable->dvalue[i]); continue; } - if ((style[i] != LOOP) && (style[i] != ULOOP)) + if ((style[i] != Variable::LOOP) && (style[i] != Variable::ULOOP)) ndata = input->variable->num[i]; for (int j=0; j < ndata; ++j) if (data[i][j]) fmt::print(out," {}",data[i][j]); diff --git a/src/variable.cpp b/src/variable.cpp index 1af4a4728a..1a4feb3573 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include using namespace LAMMPS_NS; @@ -53,8 +54,6 @@ using namespace MathConst; #define MYROUND(a) (( a-floor(a) ) >= .5) ? ceil(a) : floor(a) -enum{INDEX,LOOP,WORLD,UNIVERSE,ULOOP,STRING,GETENV, - SCALARFILE,ATOMFILE,FORMAT,EQUAL,ATOM,VECTOR,PYTHON,INTERNAL}; enum{ARG,OP}; // customize by adding a function @@ -66,7 +65,7 @@ enum{DONE,ADD,SUBTRACT,MULTIPLY,DIVIDE,CARAT,MODULO,UNARY, SQRT,EXP,LN,LOG,ABS,SIN,COS,TAN,ASIN,ACOS,ATAN,ATAN2, RANDOM,NORMAL,CEIL,FLOOR,ROUND,RAMP,STAGGER,LOGFREQ,LOGFREQ2, LOGFREQ3,STRIDE,STRIDE2,VDISPLACE,SWIGGLE,CWIGGLE,GMASK,RMASK, - GRMASK,IS_ACTIVE,IS_DEFINED,IS_AVAILABLE, + GRMASK,IS_ACTIVE,IS_DEFINED,IS_AVAILABLE,IS_FILE, VALUE,ATOMARRAY,TYPEARRAY,INTARRAY,BIGINTARRAY,VECTORARRAY}; // customize by adding a special function @@ -76,6 +75,20 @@ enum{SUM,XMIN,XMAX,AVE,TRAP,SLOPE}; #define BIG 1.0e20 +// constants for variable expressions. customize by adding new items. +// if needed (cf. 'version') initialize in Variable class constructor. + +static std::unordered_map constants = { + {"PI", MY_PI }, + {"version", -1 }, + {"yes", 1 }, + {"no", 0 }, + {"on", 1 }, + {"off", 0 }, + {"true", 1 }, + {"false", 0 } +}; + /* ---------------------------------------------------------------------- */ Variable::Variable(LAMMPS *lmp) : Pointers(lmp) @@ -98,6 +111,10 @@ Variable::Variable(LAMMPS *lmp) : Pointers(lmp) randomequal = nullptr; randomatom = nullptr; + // override initializer since LAMMPS class needs to be instantiated + + constants["version"] = lmp->num_ver; + // customize by assigning a precedence level precedence[DONE] = 0; @@ -517,12 +534,10 @@ void Variable::set(int narg, char **arg) if (replaceflag) return; + if (!utils::is_id(arg[0])) + error->all(FLERR,fmt::format("Variable name '{}' must have only alphanu" + "meric characters or underscores",arg[0])); names[nvar] = utils::strdup(arg[0]); - for (auto c : std::string(arg[0])) - if (!isalnum(c) && (c != '_')) - error->all(FLERR,fmt::format("Variable name '{}' must have only " - "alphanumeric characters or underscores", - names[nvar])); nvar++; } @@ -966,9 +981,12 @@ double Variable::compute_equal(int ivar) don't need to flag eval_in_progress since is an immediate variable ------------------------------------------------------------------------- */ -double Variable::compute_equal(char *str) +double Variable::compute_equal(const std::string &str) { - return evaluate(str,nullptr,-1); + char *ptr = utils::strdup(str); + double val = evaluate(ptr,nullptr,-1); + delete[] ptr; + return val; } /* ---------------------------------------------------------------------- @@ -1215,6 +1233,9 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) int i = 0; int expect = ARG; + if (str == nullptr) + print_var_error(FLERR,"Invalid syntax in variable formula",ivar); + while (1) { onechar = str[i]; @@ -2093,8 +2114,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) // constant // ---------------- - } else if (is_constant(word)) { - value1 = constant(word); + } else if (constants.find(word) != constants.end()) { + value1 = constants[word]; if (tree) { Tree *newtree = new Tree(); newtree->type = VALUE; @@ -4058,7 +4079,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, strcmp(word,"gmask") && strcmp(word,"rmask") && strcmp(word,"grmask") && strcmp(word,"next") && strcmp(word,"is_active") && strcmp(word,"is_defined") && - strcmp(word,"is_available")) + strcmp(word,"is_available") && strcmp(word,"is_file")) return 0; // parse contents for comma-separated args @@ -4467,6 +4488,26 @@ int Variable::special_function(char *word, char *contents, Tree **tree, // save value in tree or on argstack + if (tree) { + Tree *newtree = new Tree(); + newtree->type = VALUE; + newtree->value = value; + newtree->first = newtree->second = nullptr; + newtree->nextra = 0; + treestack[ntreestack++] = newtree; + } else argstack[nargstack++] = value; + + } else if (strcmp(word,"is_file") == 0) { + if (narg != 1) + print_var_error(FLERR,"Invalid is_file() function in " + "variable formula",ivar); + + FILE *fp = fopen(args[0],"r"); + value = (fp == nullptr) ? 0.0 : 1.0; + if (fp) fclose(fp); + + // save value in tree or on argstack + if (tree) { Tree *newtree = new Tree(); newtree->type = VALUE; @@ -4663,43 +4704,6 @@ void Variable::atom_vector(char *word, Tree **tree, } } -/* ---------------------------------------------------------------------- - check if word matches a constant - return 1 if yes, else 0 - customize by adding a constant: PI, version -------------------------------------------------------------------------- */ - -int Variable::is_constant(char *word) -{ - if (strcmp(word,"PI") == 0) return 1; - if (strcmp(word,"version") == 0) return 1; - if (strcmp(word,"yes") == 0) return 1; - if (strcmp(word,"no") == 0) return 1; - if (strcmp(word,"on") == 0) return 1; - if (strcmp(word,"off") == 0) return 1; - if (strcmp(word,"true") == 0) return 1; - if (strcmp(word,"false") == 0) return 1; - return 0; -} - -/* ---------------------------------------------------------------------- - process a constant in formula - customize by adding a constant: PI, version -------------------------------------------------------------------------- */ - -double Variable::constant(char *word) -{ - if (strcmp(word,"PI") == 0) return MY_PI; - if (strcmp(word,"version") == 0) return lmp->num_ver; - if (strcmp(word,"yes") == 0) return 1.0; - if (strcmp(word,"no") == 0) return 0.0; - if (strcmp(word,"on") == 0) return 1.0; - if (strcmp(word,"off") == 0) return 0.0; - if (strcmp(word,"true") == 0) return 1.0; - if (strcmp(word,"false") == 0) return 0.0; - return 0.0; -} - /* ---------------------------------------------------------------------- parse string for comma-separated args store copy of each arg in args array @@ -4725,7 +4729,6 @@ int Variable::parse_args(char *str, char **args) return narg; } - /* ---------------------------------------------------------------------- find next comma in str skip commas inside one or more nested parenthesis @@ -5059,7 +5062,7 @@ VarReader::VarReader(LAMMPS *lmp, char *name, char *file, int flag) : id_fix = nullptr; buffer = nullptr; - if (style == ATOMFILE) { + if (style == Variable::ATOMFILE) { if (atom->map_style == Atom::MAP_NONE) error->all(FLERR,"Cannot use atomfile-style " "variable unless an atom map exists"); diff --git a/src/variable.h b/src/variable.h index 2519bc7ac9..da759ecf6a 100644 --- a/src/variable.h +++ b/src/variable.h @@ -41,7 +41,7 @@ class Variable : protected Pointers { char *retrieve(const char *); double compute_equal(int); - double compute_equal(char *); + double compute_equal(const std::string &); void compute_atom(int, int, double *, int, int); int compute_vector(int, double **); void internal_set(int, double); @@ -53,6 +53,10 @@ class Variable : protected Pointers { int nvar; // # of defined variables char **names; // name of each variable + // must match "varstyles" array in info.cpp + enum{INDEX,LOOP,WORLD,UNIVERSE,ULOOP,STRING,GETENV, + SCALARFILE,ATOMFILE,FORMAT,EQUAL,ATOM,VECTOR,PYTHON,INTERNAL}; + private: int me; int maxvar; // max # of variables following lists can hold @@ -122,8 +126,6 @@ class Variable : protected Pointers { Tree **, Tree **, int &, double *, int &); int is_atom_vector(char *); void atom_vector(char *, Tree **, Tree **, int &); - int is_constant(char *); - double constant(char *); int parse_args(char *, char **); char *find_next_comma(char *); void print_var_error(const std::string &, int, const std::string &, diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt index c7f46a7f7b..4e27f4be45 100644 --- a/unittest/CMakeLists.txt +++ b/unittest/CMakeLists.txt @@ -1,5 +1,14 @@ include(GTest) +# check if we can run the compiled executable and whether it prints +# the LAMMPS version header in the output for an empty input +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/in.empty "") +add_test(NAME RunLammps + COMMAND $ -log none -echo none -in in.empty + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set_tests_properties(RunLammps PROPERTIES + PASS_REGULAR_EXPRESSION "^LAMMPS \\([0-9]+ [A-Za-z]+ 2[0-9][0-9][0-9]\\)") + if(BUILD_MPI) function(add_mpi_test) set(MPI_TEST_NUM_PROCS 1) diff --git a/unittest/c-library/test_library_mpi.cpp b/unittest/c-library/test_library_mpi.cpp index 7502da767a..6fdec7b7e4 100644 --- a/unittest/c-library/test_library_mpi.cpp +++ b/unittest/c-library/test_library_mpi.cpp @@ -191,7 +191,7 @@ TEST(MPI, multi_partition) EXPECT_EQ(lammps_extract_setting(lmp, "world_rank"), 0); char *part_id = (char *)lammps_extract_variable(lmp, "partition", nullptr); - ASSERT_THAT(part_id, StrEq(std::to_string(me+1))); + ASSERT_THAT(part_id, StrEq(std::to_string(me + 1))); lammps_close(lmp); }; diff --git a/unittest/commands/CMakeLists.txt b/unittest/commands/CMakeLists.txt index a658c8a25d..a5af2214e5 100644 --- a/unittest/commands/CMakeLists.txt +++ b/unittest/commands/CMakeLists.txt @@ -37,6 +37,10 @@ add_executable(test_groups test_groups.cpp) target_link_libraries(test_groups PRIVATE lammps GTest::GMock GTest::GTest) add_test(NAME Groups COMMAND test_groups WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +add_executable(test_variables test_variables.cpp) +target_link_libraries(test_variables PRIVATE lammps GTest::GMock GTest::GTest) +add_test(NAME Variables COMMAND test_variables WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + add_executable(test_kim_commands test_kim_commands.cpp) if(KIM_EXTRA_UNITTESTS) if(CURL_FOUND) diff --git a/unittest/commands/test_groups.cpp b/unittest/commands/test_groups.cpp index 7fa7ee721f..181f000a7c 100644 --- a/unittest/commands/test_groups.cpp +++ b/unittest/commands/test_groups.cpp @@ -22,6 +22,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -29,12 +30,6 @@ // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif - using LAMMPS_NS::utils::split_words; namespace LAMMPS_NS { @@ -42,54 +37,22 @@ using ::testing::ExitedWithCode; using ::testing::MatchesRegex; using ::testing::StrEq; -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - if (verbose) std::cout << mesg; \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - if (verbose) std::cout << mesg; \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } - -class GroupTest : public ::testing::Test { +class GroupTest : public LAMMPSTest { protected: - LAMMPS *lmp; Group *group; Domain *domain; void SetUp() override { - const char *args[] = {"GroupTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); - group = lmp->group; + testbinary = "GroupTest"; + LAMMPSTest::SetUp(); + group = lmp->group; domain = lmp->domain; } - void TearDown() override - { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); - std::cout.flush(); - } - - void command(const std::string &cmd) { lmp->input->one(cmd); } - void atomic_system() { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("units real"); command("lattice sc 1.0 origin 0.125 0.125 0.125"); command("region box block -2 2 -2 2 -2 2"); @@ -101,23 +64,25 @@ protected: command("region top block INF INF -2.0 -1.0 INF INF"); command("set region left type 2"); command("set region right type 3"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void molecular_system() { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("fix props all property/atom mol rmass q"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); + atomic_system(); - if (!verbose) ::testing::internal::CaptureStdout(); + + BEGIN_HIDE_OUTPUT(); command("variable molid atom floor(id/4)+1"); command("variable charge atom 2.0*sin(PI/32*id)"); command("set atom * mol v_molid"); command("set atom * charge v_charge"); command("set type 1 mass 0.5"); command("set type 2*4 mass 2.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } }; @@ -131,7 +96,7 @@ TEST_F(GroupTest, EmptyDelete) { atomic_system(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group new1 empty"); command("group new2 empty"); command("group new2 empty"); @@ -143,16 +108,16 @@ TEST_F(GroupTest, EmptyDelete) command("compute 1 new3 ke"); command("dump 1 new4 atom 50 dump.melt"); command("atom_modify first new5"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->ngroup, 7); TEST_FAILURE(".*ERROR: Illegal group command.*", command("group new3 xxx");); TEST_FAILURE(".*ERROR: Illegal group command.*", command("group new3 empty xxx");); TEST_FAILURE(".*ERROR: Group command requires atom attribute molecule.*", command("group new2 include molecule");); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); group->assign("new1 delete"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->ngroup, 6); TEST_FAILURE(".*ERROR: Illegal group command.*", command("group new2 delete xxx");); @@ -172,13 +137,13 @@ TEST_F(GroupTest, RegionClear) { atomic_system(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group one region left"); command("group two region right"); command("group three empty"); command("group four region left"); command("group four region right"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("one")), 16); ASSERT_EQ(group->count(group->find("two")), 16); ASSERT_EQ(group->count(group->find("three")), 0); @@ -189,20 +154,20 @@ TEST_F(GroupTest, RegionClear) TEST_FAILURE(".*ERROR: Illegal group command.*", command("group three region left xxx");); TEST_FAILURE(".*ERROR: Group region ID does not exist.*", command("group four region dummy");); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group one clear"); command("group two clear"); command("group three clear"); command("group four clear"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("one")), 0); ASSERT_EQ(group->count(group->find("two")), 0); ASSERT_EQ(group->count(group->find("three")), 0); ASSERT_EQ(group->count(group->find("four")), 0); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("delete_atoms region box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("all")), 0); } @@ -214,7 +179,7 @@ TEST_F(GroupTest, SelectRestart) for (int i = 0; i < lmp->atom->natoms; ++i) flags[i] = i & 1; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group one region left"); command("group two region right"); group->create("half", flags); @@ -224,7 +189,7 @@ TEST_F(GroupTest, SelectRestart) command("group five subtract all half four"); command("group top region top"); command("group six intersect half top"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("one")), 16); ASSERT_EQ(group->count(group->find("two")), 16); ASSERT_EQ(group->count(group->find("three")), 0); @@ -235,12 +200,12 @@ TEST_F(GroupTest, SelectRestart) ASSERT_EQ(group->count(group->find("half"), domain->find_region("top")), 8); ASSERT_DOUBLE_EQ(group->mass(group->find("half"), domain->find_region("top")), 8.0); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_restart group.restart"); command("clear"); command("read_restart group.restart"); unlink("group.restart"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); group = lmp->group; ASSERT_EQ(group->count(group->find("one")), 16); ASSERT_EQ(group->count(group->find("two")), 16); @@ -250,11 +215,11 @@ TEST_F(GroupTest, SelectRestart) ASSERT_EQ(group->count(group->find("five")), 16); ASSERT_DOUBLE_EQ(group->mass(group->find("six")), 8.0); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group four clear"); command("group five clear"); command("group six clear"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Group ID does not exist.*", command("group four union one two xxx");); TEST_FAILURE(".*ERROR: Group ID does not exist.*", @@ -267,14 +232,14 @@ TEST_F(GroupTest, Molecular) { molecular_system(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group one region left"); command("group two region right"); command("group half id 1:1000:2"); command("group top region top"); command("group three intersect half top"); command("group three include molecule"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("one")), 16); ASSERT_EQ(group->count(group->find("two")), 16); ASSERT_EQ(group->count(group->find("three")), 15); @@ -290,36 +255,36 @@ TEST_F(GroupTest, Dynamic) { atomic_system(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("variable step atom id<=step"); command("group half id 1:1000:2"); command("group grow dynamic half var step every 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("grow")), 0); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("run 10 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("grow")), 5); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group grow dynamic half var step every 1"); command("run 10 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("grow")), 10); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group grow static"); command("run 10 post no"); command("group part variable step"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("grow")), 10); ASSERT_EQ(group->count(group->find("part")), 30); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group grow dynamic half var step every 1"); command("run 10 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->count(group->find("grow")), 20); TEST_FAILURE(".*ERROR: Cannot subtract groups using a dynamic group.*", command("group chunk subtract half grow");); @@ -328,10 +293,10 @@ TEST_F(GroupTest, Dynamic) TEST_FAILURE(".*ERROR: Cannot intersect groups using a dynamic group.*", command("group chunk intersect half grow");); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group grow delete"); command("variable ramp equal step"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(group->ngroup, 4); TEST_FAILURE(".*ERROR: Group dynamic cannot reference itself.*", @@ -351,7 +316,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/commands/test_kim_commands.cpp b/unittest/commands/test_kim_commands.cpp index 311ce6acf1..83e1e5b2d2 100644 --- a/unittest/commands/test_kim_commands.cpp +++ b/unittest/commands/test_kim_commands.cpp @@ -22,6 +22,7 @@ #include "variable.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -29,52 +30,22 @@ // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif - using LAMMPS_NS::utils::split_words; namespace LAMMPS_NS { using ::testing::MatchesRegex; using ::testing::StrEq; -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } -class KimCommandsTest : public ::testing::Test { +class KimCommandsTest : public LAMMPSTest { protected: - LAMMPS *lmp; + Variable *variable; void SetUp() override { - const char *args[] = {"KimCommandsTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); - } - - void TearDown() override - { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "KimCommandsTest"; + LAMMPSTest::SetUp(); + variable = lmp->input->variable; } }; @@ -82,48 +53,38 @@ TEST_F(KimCommandsTest, kim) { if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP(); - TEST_FAILURE(".*ERROR: Illegal kim command.*", - lmp->input->one("kim");); - TEST_FAILURE(".*ERROR: Unknown kim subcommand.*", - lmp->input->one("kim unknown");); - TEST_FAILURE(".*kim_init.*has been renamed to.*", - lmp->input->one("kim_init");); - TEST_FAILURE(".*kim_interactions.*has been renamed to.*", - lmp->input->one("kim_interactions");); - TEST_FAILURE(".*kim_param.*has been renamed to.*", - lmp->input->one("kim_param");); - TEST_FAILURE(".*kim_property.*has been renamed to.*", - lmp->input->one("kim_property");); - TEST_FAILURE(".*kim_query.*has been renamed to.*", - lmp->input->one("kim_query");); + TEST_FAILURE(".*ERROR: Illegal kim command.*", command("kim");); + TEST_FAILURE(".*ERROR: Unknown kim subcommand.*", command("kim unknown");); + TEST_FAILURE(".*kim_init.*has been renamed to.*", command("kim_init");); + TEST_FAILURE(".*kim_interactions.*has been renamed to.*", command("kim_interactions");); + TEST_FAILURE(".*kim_param.*has been renamed to.*", command("kim_param");); + TEST_FAILURE(".*kim_property.*has been renamed to.*", command("kim_property");); + TEST_FAILURE(".*kim_query.*has been renamed to.*", command("kim_query");); } TEST_F(KimCommandsTest, kim_init) { if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP(); + TEST_FAILURE(".*ERROR: Illegal 'kim init' command.*", command("kim init");); TEST_FAILURE(".*ERROR: Illegal 'kim init' command.*", - lmp->input->one("kim init");); - TEST_FAILURE(".*ERROR: Illegal 'kim init' command.*", - lmp->input->one("kim init LennardJones_Ar real si");); + command("kim init LennardJones_Ar real si");); TEST_FAILURE(".*ERROR: LAMMPS unit_style lj not supported by KIM models.*", - lmp->input->one("kim init LennardJones_Ar lj");); + command("kim init LennardJones_Ar lj");); TEST_FAILURE(".*ERROR: LAMMPS unit_style micro not supported by KIM models.*", - lmp->input->one("kim init LennardJones_Ar micro");); + command("kim init LennardJones_Ar micro");); TEST_FAILURE(".*ERROR: LAMMPS unit_style nano not supported by KIM models.*", - lmp->input->one("kim init LennardJones_Ar nano");); - TEST_FAILURE(".*ERROR: Unknown unit_style.*", - lmp->input->one("kim init LennardJones_Ar new_style");); - TEST_FAILURE(".*ERROR: KIM Model name not found.*", - lmp->input->one("kim init Unknown_Model real");); + command("kim init LennardJones_Ar nano");); + TEST_FAILURE(".*ERROR: Unknown unit_style.*", command("kim init LennardJones_Ar new_style");); + TEST_FAILURE(".*ERROR: KIM Model name not found.*", command("kim init Unknown_Model real");); TEST_FAILURE(".*ERROR: Incompatible units for KIM Simulator Model, required units = metal.*", - lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real");); + command("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real");); // TEST_FAILURE(".*ERROR: KIM Model does not support the requested unit system.*", - // lmp->input->one("kim init ex_model_Ar_P_Morse real");); + // command("kim init ex_model_Ar_P_Morse real");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim init LennardJones_Ar real"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim init LennardJones_Ar real"); + END_HIDE_OUTPUT(); int ifix = lmp->modify->find_fix("KIM_MODEL_STORE"); ASSERT_GE(ifix, 0); @@ -133,314 +94,311 @@ TEST_F(KimCommandsTest, kim_interactions) { if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP(); - TEST_FAILURE(".*ERROR: Illegal 'kim interactions' command.*", - lmp->input->one("kim interactions");); + TEST_FAILURE(".*ERROR: Illegal 'kim interactions' command.*", command("kim interactions");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim init LennardJones_Ar real"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim init LennardJones_Ar real"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Must use 'kim interactions' command " "after simulation box is defined.*", - lmp->input->one("kim interactions Ar");); + command("kim interactions Ar");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim init LennardJones_Ar real"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim init LennardJones_Ar real"); + command("lattice fcc 4.4300"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal 'kim interactions' command.*", - lmp->input->one("kim interactions Ar Ar");); + command("kim interactions Ar Ar");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 20 0 20 0 20"); - lmp->input->one("create_box 4 box"); - lmp->input->one("create_atoms 4 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("lattice fcc 4.4300"); + command("region box block 0 20 0 20 0 20"); + command("create_box 4 box"); + command("create_atoms 4 box"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal 'kim interactions' command.*", - lmp->input->one("kim interactions Ar Ar");); + command("kim interactions Ar Ar");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("lattice fcc 4.4300"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Must use 'kim init' before 'kim interactions'.*", - lmp->input->one("kim interactions Ar");); + command("kim interactions Ar");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init LennardJones_Ar real"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init LennardJones_Ar real"); + command("lattice fcc 4.4300"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: fixed_types cannot be used with a KIM Portable Model.*", - lmp->input->one("kim interactions fixed_types");); + command("kim interactions fixed_types");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("pair_style kim LennardJones_Ar"); - lmp->input->one("region box block 0 1 0 1 0 1"); - lmp->input->one("create_box 4 box"); - lmp->input->one("pair_coeff * * Ar Ar Ar Ar"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("pair_style kim LennardJones_Ar"); + command("region box block 0 1 0 1 0 1"); + command("create_box 4 box"); + command("pair_coeff * * Ar Ar Ar Ar"); + END_HIDE_OUTPUT(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal"); - lmp->input->one("lattice fcc 4.920"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal"); + command("lattice fcc 4.920"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Species 'Ar' is not supported by this KIM Simulator Model.*", - lmp->input->one("kim interactions Ar");); + command("kim interactions Ar");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal"); - lmp->input->one("lattice fcc 4.08"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - lmp->input->one("kim interactions Au"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal"); + command("lattice fcc 4.08"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + command("kim interactions Au"); + END_HIDE_OUTPUT(); // ASSERT_EQ(lmp->output->var_kim_periodic, 1); // TEST_FAILURE(".*ERROR: Incompatible units for KIM Simulator Model.*", - // lmp->input->one("kim interactions Au");); + // command("kim interactions Au");); - - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init LennardJones_Ar real"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - lmp->input->one("kim interactions Ar"); - lmp->input->one("mass 1 39.95"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init LennardJones_Ar real"); + command("lattice fcc 4.4300"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + command("kim interactions Ar"); + command("mass 1 39.95"); + END_HIDE_OUTPUT(); int ifix = lmp->modify->find_fix("KIM_MODEL_STORE"); ASSERT_GE(ifix, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init LennardJones_Ar real"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - lmp->input->one("kim interactions Ar"); - lmp->input->one("mass 1 39.95"); - lmp->input->one("run 1"); - lmp->input->one("kim interactions Ar"); - lmp->input->one("run 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init LennardJones_Ar real"); + command("lattice fcc 4.4300"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + command("kim interactions Ar"); + command("mass 1 39.95"); + command("run 1"); + command("kim interactions Ar"); + command("run 1"); + END_HIDE_OUTPUT(); } TEST_F(KimCommandsTest, kim_param) { if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP(); - TEST_FAILURE(".*ERROR: Illegal 'kim param' command.*", - lmp->input->one("kim param");); + TEST_FAILURE(".*ERROR: Illegal 'kim param' command.*", command("kim param");); TEST_FAILURE(".*ERROR: Incorrect arguments in 'kim param' command.\n" "'kim param get/set' is mandatory.*", - lmp->input->one("kim param unknown shift 1 shift");); + command("kim param unknown shift 1 shift");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: 'kim param' can only be used with a KIM Portable Model.*", - lmp->input->one("kim param get shift 1 shift");); + command("kim param get shift 1 shift");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal 'kim param get' command.\nTo get the new " "parameter values, pair style must be assigned.\nMust use 'kim" " interactions' or 'pair_style kim' before 'kim param get'.*", - lmp->input->one("kim param get shift 1 shift");); + command("kim param get shift 1 shift");); TEST_FAILURE(".*ERROR: Illegal 'kim param set' command.\nTo set the new " "parameter values, pair style must be assigned.\nMust use 'kim" " interactions' or 'pair_style kim' before 'kim param set'.*", - lmp->input->one("kim param set shift 1 2");); + command("kim param set shift 1 2");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - lmp->input->one("kim interactions Ar"); - lmp->input->one("mass 1 39.95"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real"); + command("lattice fcc 4.4300"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + command("kim interactions Ar"); + command("mass 1 39.95"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal index '0' for " "'shift' parameter with the extent of '1'.*", - lmp->input->one("kim param get shift 0 shift");); + command("kim param get shift 0 shift");); TEST_FAILURE(".*ERROR: Illegal index '2' for " "'shift' parameter with the extent of '1'.*", - lmp->input->one("kim param get shift 2 shift");); + command("kim param get shift 2 shift");); TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer " "parameter\\(s\\) instead of '1.' in index_range.*", - lmp->input->one("kim param get shift 1. shift");); + command("kim param get shift 1. shift");); TEST_FAILURE(".*ERROR: Illegal index_range '1-2' for 'shift' " "parameter with the extent of '1'.*", - lmp->input->one("kim param get shift 1:2 shift");); + command("kim param get shift 1:2 shift");); TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer " "parameter\\(s\\) instead of '1-2' in index_range.*", - lmp->input->one("kim param get shift 1-2 shift");); + command("kim param get shift 1-2 shift");); TEST_FAILURE(".*ERROR: Wrong number of arguments in 'kim param " "get' command.\nThe LAMMPS '3' variable names or " "'s1 split' is mandatory.*", - lmp->input->one("kim param get sigmas 1:3 s1 s2");); + command("kim param get sigmas 1:3 s1 s2");); TEST_FAILURE(".*ERROR: Wrong argument in 'kim param get' command.\nThis " "Model does not have the requested 'unknown' parameter.*", - lmp->input->one("kim param get unknown 1 unknown");); + command("kim param get unknown 1 unknown");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param get shift 1 shift"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param get shift 1 shift"); + END_HIDE_OUTPUT(); - ASSERT_FALSE(lmp->input->variable->find("shift") == -1); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "1"); + ASSERT_FALSE(variable->find("shift") == -1); + ASSERT_THAT(variable->retrieve("shift"), StrEq("1")); TEST_FAILURE(".*ERROR: Illegal index '2' for " "'shift' parameter with the extent of '1'.*", - lmp->input->one("kim param set shift 2 2");); + command("kim param set shift 2 2");); TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer " "parameter\\(s\\) instead of '1.' in index_range.*", - lmp->input->one("kim param set shift 1. shift");); + command("kim param set shift 1. shift");); TEST_FAILURE(".*ERROR: Illegal index_range '1-2' for " "'shift' parameter with the extent of '1'.*", - lmp->input->one("kim param set shift 1:2 2");); + command("kim param set shift 1:2 2");); TEST_FAILURE(".*ERROR: Wrong number of variable values for pair coefficients.*", - lmp->input->one("kim param set sigmas 1:3 0.5523570 0.4989030");); + command("kim param set sigmas 1:3 0.5523570 0.4989030");); TEST_FAILURE(".*ERROR: Wrong argument for pair coefficients.\nThis " "Model does not have the requested '0.4989030' parameter.*", - lmp->input->one("kim param set sigmas 1:1 0.5523570 0.4989030");); + command("kim param set sigmas 1:1 0.5523570 0.4989030");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("variable new_shift equal 2"); - lmp->input->one("kim param set shift 1 ${new_shift}"); - lmp->input->one("kim param get shift 1 shift"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("variable new_shift equal 2"); + command("kim param set shift 1 ${new_shift}"); + command("kim param get shift 1 shift"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "2"); + ASSERT_THAT(variable->retrieve("shift"), StrEq("2")); TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*", - lmp->input->one("kim param get cutoffs 1:3 list");); + command("kim param get cutoffs 1:3 list");); TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*", - lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 list");); + command("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 list");); TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*", - lmp->input->one("kim param get cutoffs 1:3 split");); + command("kim param get cutoffs 1:3 split");); TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*", - lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 split");); + command("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 split");); TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*", - lmp->input->one("kim param get cutoffs 1:3 explicit");); + command("kim param get cutoffs 1:3 explicit");); TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*", - lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 explicit");); + command("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 explicit");); TEST_FAILURE(".*ERROR: Wrong number of arguments in 'kim param get' " "command.\nThe LAMMPS '3' variable names or 'cutoffs " "split/list' is mandatory.*", - lmp->input->one("kim param get cutoffs 1:3 cutoffs");); + command("kim param get cutoffs 1:3 cutoffs");); TEST_FAILURE(".*ERROR: Wrong number of arguments in 'kim param get' " "command.\nThe LAMMPS '3' variable names or 'cutoffs_1 " "split' is mandatory.*", - lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2");); + command("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 cutoffs_3"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 cutoffs_3"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_1")) == "2.20943"); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_2")) == "2.10252"); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_3")) == "5.666115"); + ASSERT_THAT(variable->retrieve("cutoffs_1"), StrEq("2.20943")); + ASSERT_THAT(variable->retrieve("cutoffs_2"), StrEq("2.10252")); + ASSERT_THAT(variable->retrieve("cutoffs_3"), StrEq("5.666115")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 cutoffs_3 explicit"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 cutoffs_3 explicit"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_1")) == "2.20943"); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_2")) == "2.10252"); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_3")) == "5.666115"); + ASSERT_THAT(variable->retrieve("cutoffs_1"), StrEq("2.20943")); + ASSERT_THAT(variable->retrieve("cutoffs_2"), StrEq("2.10252")); + ASSERT_THAT(variable->retrieve("cutoffs_3"), StrEq("5.666115")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param get cutoffs 1:3 cutoffs split"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param get cutoffs 1:3 cutoffs split"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_1")) == "2.20943"); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_2")) == "2.10252"); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_3")) == "5.666115"); + ASSERT_THAT(variable->retrieve("cutoffs_1"), StrEq("2.20943")); + ASSERT_THAT(variable->retrieve("cutoffs_2"), StrEq("2.10252")); + ASSERT_THAT(variable->retrieve("cutoffs_3"), StrEq("5.666115")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param get cutoffs 1:3 cutoffs list"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param get cutoffs 1:3 cutoffs list"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs")) == "2.20943 2.10252 5.666115"); + ASSERT_THAT(variable->retrieve("cutoffs"), StrEq("2.20943 2.10252 5.666115")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param set cutoffs 1 2.21 cutoffs 2 2.11"); - lmp->input->one("kim param get cutoffs 1:2 cutoffs list"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param set cutoffs 1 2.21 cutoffs 2 2.11"); + command("kim param get cutoffs 1:2 cutoffs list"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs")) == "2.21 2.11"); + ASSERT_THAT(variable->retrieve("cutoffs"), StrEq("2.21 2.11")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param set cutoffs 1:3 2.3 2.2 5.7"); - lmp->input->one("kim param get cutoffs 1:3 cutoffs list"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param set cutoffs 1:3 2.3 2.2 5.7"); + command("kim param get cutoffs 1:3 cutoffs list"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs")) == "2.3 2.2 5.7"); + ASSERT_THAT(variable->retrieve("cutoffs"), StrEq("2.3 2.2 5.7")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("lattice fcc 4.4300"); - lmp->input->one("region box block 0 10 0 10 0 10"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - lmp->input->one("mass 1 39.95"); - lmp->input->one("pair_style kim LennardJones612_UniversalShifted__MO_959249795837_003"); - lmp->input->one("pair_coeff * * Ar"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("lattice fcc 4.4300"); + command("region box block 0 10 0 10 0 10"); + command("create_box 1 box"); + command("create_atoms 1 box"); + command("mass 1 39.95"); + command("pair_style kim LennardJones612_UniversalShifted__MO_959249795837_003"); + command("pair_coeff * * Ar"); + END_HIDE_OUTPUT(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("kim param get shift 1 shift"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("kim param get shift 1 shift"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "1"); + ASSERT_THAT(variable->retrieve("shift"), StrEq("1")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("variable new_shift equal 2"); - lmp->input->one("kim param set shift 1 ${new_shift}"); - lmp->input->one("kim param get shift 1 shift"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("variable new_shift equal 2"); + command("kim param set shift 1 ${new_shift}"); + command("kim param get shift 1 shift"); + END_HIDE_OUTPUT(); - ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "2"); + ASSERT_THAT(variable->retrieve("shift"), StrEq("2")); } TEST_F(KimCommandsTest, kim_property) @@ -452,39 +410,37 @@ TEST_F(KimCommandsTest, kim_property) TEST_FAILURE(".*ERROR: Invalid Python version.\n" "The kim-property Python package requires Python " "3 >= 3.6 support.*", - lmp->input->one("kim property");); + command("kim property");); } else { - TEST_FAILURE(".*ERROR: Invalid 'kim property' command.*", - lmp->input->one("kim property");); - TEST_FAILURE(".*ERROR: Invalid 'kim property' command.*", - lmp->input->one("kim property create");); + TEST_FAILURE(".*ERROR: Invalid 'kim property' command.*", command("kim property");); + TEST_FAILURE(".*ERROR: Invalid 'kim property' command.*", command("kim property create");); TEST_FAILURE(".*ERROR: Incorrect arguments in 'kim property' command." "\n'kim property create/destroy/modify/remove/dump' " "is mandatory.*", - lmp->input->one("kim property unknown 1 atomic-mass");); + command("kim property unknown 1 atomic-mass");); } #if defined(KIM_EXTRA_UNITTESTS) TEST_FAILURE(".*ERROR: Invalid 'kim property create' command.*", - lmp->input->one("kim property create 1");); + command("kim property create 1");); TEST_FAILURE(".*ERROR: Invalid 'kim property destroy' command.*", - lmp->input->one("kim property destroy 1 cohesive-potential-energy-cubic-crystal");); + command("kim property destroy 1 cohesive-potential-energy-cubic-crystal");); TEST_FAILURE(".*ERROR: Invalid 'kim property modify' command.*", - lmp->input->one("kim property modify 1 key short-name");); + command("kim property modify 1 key short-name");); TEST_FAILURE(".*ERROR: There is no property instance to modify the content.*", - lmp->input->one("kim property modify 1 key short-name source-value 1 fcc");); + command("kim property modify 1 key short-name source-value 1 fcc");); TEST_FAILURE(".*ERROR: Invalid 'kim property remove' command.*", - lmp->input->one("kim property remove 1 key");); + command("kim property remove 1 key");); TEST_FAILURE(".*ERROR: There is no property instance to remove the content.*", - lmp->input->one("kim property remove 1 key short-name");); + command("kim property remove 1 key short-name");); TEST_FAILURE(".*ERROR: There is no property instance to dump the content.*", - lmp->input->one("kim property dump results.edn");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real"); - lmp->input->one("kim property create 1 cohesive-potential-energy-cubic-crystal"); - lmp->input->one("kim property modify 1 key short-name source-value 1 fcc"); - lmp->input->one("kim property destroy 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("kim property dump results.edn");); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real"); + command("kim property create 1 cohesive-potential-energy-cubic-crystal"); + command("kim property modify 1 key short-name source-value 1 fcc"); + command("kim property destroy 1"); + END_HIDE_OUTPUT(); #endif } @@ -492,265 +448,234 @@ TEST_F(KimCommandsTest, kim_query) { if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP(); - TEST_FAILURE(".*ERROR: Illegal 'kim query' command.*", - lmp->input->one("kim query");); + TEST_FAILURE(".*ERROR: Illegal 'kim query' command.*", command("kim query");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe keyword 'split' " "must be followed by the name of the query function.*", - lmp->input->one("kim query a0 split");); + command("kim query a0 split");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe keyword 'list' " "must be followed by the name of the query function.*", - lmp->input->one("kim query a0 list");); + command("kim query a0 list");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe keyword 'index' " "must be followed by the name of the query function.*", - lmp->input->one("kim query a0 index");); + command("kim query a0 index");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'list' keyword " "can not be used after 'split'.*", - lmp->input->one("kim query a0 split list");); + command("kim query a0 split list");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'index' keyword " "can not be used after 'split'.*", - lmp->input->one("kim query a0 split index");); + command("kim query a0 split index");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'split' keyword " "can not be used after 'list'.*", - lmp->input->one("kim query a0 list split");); + command("kim query a0 list split");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'index' keyword " "can not be used after 'list'.*", - lmp->input->one("kim query a0 list index");); + command("kim query a0 list index");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'list' keyword " "can not be used after 'index'.*", - lmp->input->one("kim query a0 index list");); + command("kim query a0 index list");); TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'split' keyword " "can not be used after 'index'.*", - lmp->input->one("kim query a0 index split");); + command("kim query a0 index split");); TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `crystal` " "to 'kim query' is wrong. The query format is the " "keyword=\\[value\\], where value is always an array of one " "or more comma-separated items.*", - lmp->input->one("kim query a0 get_lattice_constant_cubic " - "crystal");); + command("kim query a0 get_lattice_constant_cubic " + "crystal");); TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `" "crystal=fcc` to 'kim query' is wrong. The query format is the " "keyword=\\[value\\], where value is always an array of one " "or more comma-separated items.*", - lmp->input->one("kim query a0 get_lattice_constant_cubic " - "crystal=fcc");); + command("kim query a0 get_lattice_constant_cubic " + "crystal=fcc");); TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `" "crystal=\\[fcc` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one("kim query a0 get_lattice_constant_cubic " - "crystal=[fcc");); - TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `" + command("kim query a0 get_lattice_constant_cubic " + "crystal=[fcc");); + TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `" "crystal=fcc\\]` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one("kim query a0 get_lattice_constant_cubic " - "crystal=fcc]");); + command("kim query a0 get_lattice_constant_cubic " + "crystal=fcc]");); - std::string squery("kim query a0 get_lattice_constant_cubic "); - squery += "crystal=[\"fcc\"] species=\"Al\",\"Ni\" units=[\"angstrom\"]"; + std::string squery = "kim query a0 get_lattice_constant_cubic " + "crystal=[\"fcc\"] species=\"Al\",\"Ni\" units=[\"angstrom\"]"; TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species=" "\"Al\",\"Ni\"` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=Al,Ni units=[angstrom]"; + squery = "kim query a0 get_lattice_constant_cubic crystal=[fcc] species=Al,Ni units=[angstrom]"; TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species=" "Al,Ni` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=Al,Ni, units=[angstrom]"; + squery = + "kim query a0 get_lattice_constant_cubic crystal=[fcc] species=Al,Ni, units=[angstrom]"; TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species=" "Al,Ni,` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=[Al,Ni, units=[angstrom]"; + squery = + "kim query a0 get_lattice_constant_cubic crystal=[fcc] species=[Al,Ni, units=[angstrom]"; TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species=" "\\[Al,Ni,` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=Al,Ni], units=[angstrom]"; + squery = + "kim query a0 get_lattice_constant_cubic crystal=[fcc] species=Al,Ni], units=[angstrom]"; TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species=" "Al,Ni\\],` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=Al,\"Ni\"], units=[angstrom]"; + squery = "kim query a0 get_lattice_constant_cubic crystal=[fcc] species=Al,\"Ni\"], " + "units=[angstrom]"; TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species=" "Al,\"Ni\"\\],` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=\"Al\",Ni], units=[angstrom]"; + squery = "kim query a0 get_lattice_constant_cubic crystal=[fcc] species=\"Al\",Ni], " + "units=[angstrom]"; TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species=" "\"Al\",Ni\\],` to 'kim query' is wrong. The query format is " "the keyword=\\[value\\], where value is always an array of " "one or more comma-separated items.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic crystal=[\"fcc\"] " - "species=[\"Al\"]"; + squery = "kim query a0 get_lattice_constant_cubic crystal=[\"fcc\"] species=[\"Al\"]"; TEST_FAILURE(".*ERROR: Illegal query format.\nMust use 'kim init' before " "'kim query' or must provide the model name after query " "function with the format of 'model=\\[model_name\\]'.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic crystal=[fcc] " - "species=[Al]"; + squery = "kim query a0 get_lattice_constant_cubic crystal=[fcc] species=[Al]"; TEST_FAILURE(".*ERROR: Illegal query format.\nMust use 'kim init' before " "'kim query' or must provide the model name after query " "function with the format of 'model=\\[model_name\\]'.*", - lmp->input->one(squery);); + command(squery);); - squery = "kim query a0 get_lattice_constant_cubic crystal=[\"fcc\"] " - "species=[Al]"; + squery = "kim query a0 get_lattice_constant_cubic crystal=[\"fcc\"] species=[Al]"; TEST_FAILURE(".*ERROR: Illegal query format.\nMust use 'kim init' before " "'kim query' or must provide the model name after query " "function with the format of 'model=\\[model_name\\]'.*", - lmp->input->one(squery);); + command(squery);); #if defined(KIM_EXTRA_UNITTESTS) - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim query latconst_1 get_lattice_constant_cubic " + "crystal=[fcc] species=[Al] units=[angstrom] " + "model=[EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005]"); + END_HIDE_OUTPUT(); - squery = "kim query latconst_1 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=[Al] units=[angstrom] "; - squery += "model=[EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005]"; - lmp->input->one(squery); - if (!verbose) ::testing::internal::GetCapturedStdout(); + ASSERT_THAT(variable->retrieve("latconst_1"), StrEq("4.032082033157349")); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_1")) == - "4.032082033157349")); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal"); + command("kim query latconst_1 get_lattice_constant_cubic crystal=[fcc] species=[Al] " + "units=[angstrom]"); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal"); + command("kim query latconst_2 get_lattice_constant_cubic crystal=[fcc] species=[Al] " + "units=[angstrom] " + "model=[LennardJones612_UniversalShifted__MO_959249795837_003]"); + END_HIDE_OUTPUT(); - squery = "kim query latconst_1 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=[Al] units=[angstrom]"; - lmp->input->one(squery); + ASSERT_THAT(variable->retrieve("latconst_1"), StrEq("4.032082033157349")); + ASSERT_THAT(variable->retrieve("latconst_2"), StrEq("3.328125931322575")); - squery = "kim query latconst_2 get_lattice_constant_cubic "; - squery += "crystal=[fcc] species=[Al] units=[angstrom] "; - squery += "model=[LennardJones612_UniversalShifted__MO_959249795837_003]"; - lmp->input->one(squery); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal"); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_1")) == - "4.032082033157349")); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_2")) == - "3.328125931322575")); + command("kim query latconst split get_lattice_constant_hexagonal crystal=[hcp] species=[Zr] " + "units=[angstrom]"); + END_HIDE_OUTPUT(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal"); + ASSERT_THAT(variable->retrieve("latconst_1"), StrEq("3.234055244384789")); + ASSERT_THAT(variable->retrieve("latconst_2"), StrEq("5.167650199630013")); - squery = "kim query latconst split get_lattice_constant_hexagonal "; - squery += "crystal=[hcp] species=[Zr] units=[angstrom]"; - lmp->input->one(squery); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_1")) == - "3.234055244384789")); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_2")) == - "5.167650199630013")); + command("kim query latconst index get_lattice_constant_hexagonal " + "crystal=[hcp] species=[Zr] units=[angstrom] " + "model=[EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000]"); + END_HIDE_OUTPUT(); + ASSERT_THAT(variable->retrieve("latconst"), StrEq("3.234055244384789")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); + BEGIN_HIDE_OUTPUT(); + command("variable latconst delete"); + command("clear"); + command("kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal"); - squery = "kim query latconst index get_lattice_constant_hexagonal "; - squery += "crystal=[hcp] species=[Zr] units=[angstrom] "; - squery += "model=[EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000]"; - lmp->input->one(squery); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("kim query latconst list get_lattice_constant_hexagonal crystal=[hcp] species=[Zr] " + "units=[angstrom]"); + END_HIDE_OUTPUT(); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst")) == - "3.234055244384789")); + ASSERT_THAT(variable->retrieve("latconst"), StrEq("3.234055244384789 5.167650199630013")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("variable latconst delete"); - lmp->input->one("clear"); - lmp->input->one("kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal"); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal"); - squery = "kim query latconst list get_lattice_constant_hexagonal "; - squery += "crystal=[hcp] species=[Zr] units=[angstrom]"; - lmp->input->one(squery); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("kim query alpha get_linear_thermal_expansion_coefficient_cubic " + "crystal=[fcc] species=[Al] units=[1/K] temperature=[293.15] " + "temperature_units=[K]"); + END_HIDE_OUTPUT(); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst")) == - "3.234055244384789 5.167650199630013")); + ASSERT_THAT(variable->retrieve("alpha"), StrEq("1.654960564704273e-05")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal"); + BEGIN_HIDE_OUTPUT(); + command("clear"); - squery = "kim query alpha get_linear_thermal_expansion_coefficient_cubic "; - squery += "crystal=[fcc] species=[Al] units=[1/K] temperature=[293.15] "; - squery += "temperature_units=[K]"; - lmp->input->one(squery); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("kim query model_list list get_available_models species=[Al]"); + END_HIDE_OUTPUT(); - ASSERT_TRUE((std::string(lmp->input->variable->retrieve("alpha")) == - "1.654960564704273e-05")); - - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - - squery = "kim query model_list list get_available_models "; - squery += "species=[Al]"; - lmp->input->one(squery); - if (!verbose) ::testing::internal::GetCapturedStdout(); - - std::string model_list = lmp->input->variable->retrieve("model_list"); + std::string model_list = variable->retrieve("model_list"); auto n = model_list.find("EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005"); ASSERT_TRUE(n != std::string::npos); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); + BEGIN_HIDE_OUTPUT(); + command("clear"); - squery = "kim query model_name index get_available_models "; - squery += "species=[Al]"; - lmp->input->one(squery); - lmp->input->one("variable model_name delete"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("kim query model_name index get_available_models species=[Al]"); + command("variable model_name delete"); + END_HIDE_OUTPUT(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); + BEGIN_HIDE_OUTPUT(); + command("clear"); - squery = "kim query model_name index get_available_models "; - squery += "species=[Al] potential_type=[eam,meam]"; - lmp->input->one(squery); - lmp->input->one("variable model_name delete"); + command("kim query model_name index get_available_models " + "species=[Al] potential_type=[eam,meam]"); + command("variable model_name delete"); - squery = "kim query model_name index get_available_models "; - squery += "species=[Al] potential_type=[\"eam\",\"meam\"]"; - lmp->input->one(squery); - lmp->input->one("variable model_name delete"); + command("kim query model_name index get_available_models " + "species=[Al] potential_type=[\"eam\",\"meam\"]"); + command("variable model_name delete"); - squery = "kim query model_name index get_available_models "; - squery += "species=[Al] potential_type=[eam,\"meam\"]"; - lmp->input->one(squery); - lmp->input->one("variable model_name delete"); + command("kim query model_name index get_available_models " + "species=[Al] potential_type=[eam,\"meam\"]"); + command("variable model_name delete"); - squery = "kim query model_name index get_available_models "; - squery += "species=[Al] potential_type=[\"eam\",meam]"; - lmp->input->one(squery); - lmp->input->one("variable model_name delete"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("kim query model_name index get_available_models " + "species=[Al] potential_type=[\"eam\",meam]"); + command("variable model_name delete"); + END_HIDE_OUTPUT(); #endif } } // namespace LAMMPS_NS @@ -760,7 +685,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/commands/test_lattice_region.cpp b/unittest/commands/test_lattice_region.cpp index b359c90c75..ae38f3a7f5 100644 --- a/unittest/commands/test_lattice_region.cpp +++ b/unittest/commands/test_lattice_region.cpp @@ -22,6 +22,7 @@ #include "utils.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -32,12 +33,6 @@ // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif - using LAMMPS_NS::utils::split_words; namespace LAMMPS_NS { @@ -45,49 +40,22 @@ using ::testing::ExitedWithCode; using ::testing::MatchesRegex; using ::testing::StrEq; -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } -class LatticeRegionTest : public ::testing::Test { +class LatticeRegionTest : public LAMMPSTest { protected: - LAMMPS *lmp; - void SetUp() override { - const char *args[] = {"LatticeRegionTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - lmp->input->one("units metal"); - if (!verbose) ::testing::internal::GetCapturedStdout(); - } - - void TearDown() override - { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "LatticeRegionTest"; + LAMMPSTest::SetUp(); + command("units metal"); } }; TEST_F(LatticeRegionTest, lattice_none) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice none 2.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice none 2.0"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::NONE); ASSERT_EQ(lattice->xlattice, 2.0); @@ -96,15 +64,15 @@ TEST_F(LatticeRegionTest, lattice_none) ASSERT_EQ(lattice->nbasis, 0); ASSERT_EQ(lattice->basis, nullptr); - TEST_FAILURE(".*ERROR: Illegal lattice command.*", lmp->input->one("lattice");); - TEST_FAILURE(".*ERROR: Illegal lattice command.*", lmp->input->one("lattice xxx");); - TEST_FAILURE(".*ERROR: Illegal lattice command.*", lmp->input->one("lattice none 1.0 origin");); - TEST_FAILURE(".*ERROR: Expected floating point.*", lmp->input->one("lattice none xxx");); + TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice");); + TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice xxx");); + TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice none 1.0 origin");); + TEST_FAILURE(".*ERROR: Expected floating point.*", command("lattice none xxx");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units lj"); - lmp->input->one("lattice none 1.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units lj"); + command("lattice none 1.0"); + END_HIDE_OUTPUT(); lattice = lmp->domain->lattice; ASSERT_EQ(lattice->xlattice, 1.0); ASSERT_EQ(lattice->ylattice, 1.0); @@ -113,10 +81,9 @@ TEST_F(LatticeRegionTest, lattice_none) TEST_F(LatticeRegionTest, lattice_sc) { - ::testing::internal::CaptureStdout(); - lmp->input->one("lattice sc 1.0 spacing 1.5 2.0 3.0"); - auto output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + BEGIN_CAPTURE_OUTPUT(); + command("lattice sc 1.0 spacing 1.5 2.0 3.0"); + auto output = END_CAPTURE_OUTPUT(); ASSERT_THAT(output, MatchesRegex(".*Lattice spacing in x,y,z = 1.50* 2.0* 3.0*.*")); auto lattice = lmp->domain->lattice; @@ -124,10 +91,9 @@ TEST_F(LatticeRegionTest, lattice_sc) ASSERT_EQ(lattice->ylattice, 2.0); ASSERT_EQ(lattice->zlattice, 3.0); - ::testing::internal::CaptureStdout(); - lmp->input->one("lattice sc 2.0"); - output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + BEGIN_CAPTURE_OUTPUT(); + command("lattice sc 2.0"); + output = END_CAPTURE_OUTPUT(); ASSERT_THAT(output, MatchesRegex(".*Lattice spacing in x,y,z = 2.0* 2.0* 2.0*.*")); lattice = lmp->domain->lattice; @@ -151,43 +117,42 @@ TEST_F(LatticeRegionTest, lattice_sc) ASSERT_EQ(lattice->basis[0][2], 0.0); TEST_FAILURE(".*ERROR: Illegal lattice command.*", - lmp->input->one("lattice sc 1.0 origin 1.0 1.0 1.0");); + command("lattice sc 1.0 origin 1.0 1.0 1.0");); + TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice sc 1.0 origin 1.0");); TEST_FAILURE(".*ERROR: Illegal lattice command.*", - lmp->input->one("lattice sc 1.0 origin 1.0");); - TEST_FAILURE(".*ERROR: Illegal lattice command.*", - lmp->input->one("lattice sc 1.0 origin 0.0 0.0 0.0 xxx");); + command("lattice sc 1.0 origin 0.0 0.0 0.0 xxx");); TEST_FAILURE(".*ERROR: Expected floating point.*", - lmp->input->one("lattice sc 1.0 origin xxx 1.0 1.0");); + command("lattice sc 1.0 origin xxx 1.0 1.0");); TEST_FAILURE(".*ERROR: Lattice orient vectors are not orthogonal.*", - lmp->input->one("lattice sc 1.0 orient x 2 2 0");); + command("lattice sc 1.0 orient x 2 2 0");); TEST_FAILURE(".*ERROR: Lattice orient vectors are not right-handed.*", - lmp->input->one("lattice sc 1.0 orient y 0 -1 0");); + command("lattice sc 1.0 orient y 0 -1 0");); TEST_FAILURE(".*ERROR: Lattice spacings are invalid.*", - lmp->input->one("lattice sc 1.0 spacing 0.0 1.0 1.0");); + command("lattice sc 1.0 spacing 0.0 1.0 1.0");); TEST_FAILURE(".*ERROR: Lattice spacings are invalid.*", - lmp->input->one("lattice sc 1.0 spacing 1.0 -0.1 1.0");); + command("lattice sc 1.0 spacing 1.0 -0.1 1.0");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units lj"); - lmp->input->one("lattice sc 2.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units lj"); + command("lattice sc 2.0"); + END_HIDE_OUTPUT(); lattice = lmp->domain->lattice; ASSERT_DOUBLE_EQ(lattice->xlattice, pow(0.5, 1.0 / 3.0)); ASSERT_DOUBLE_EQ(lattice->ylattice, pow(0.5, 1.0 / 3.0)); ASSERT_DOUBLE_EQ(lattice->zlattice, pow(0.5, 1.0 / 3.0)); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice sc 1.0");); + command("lattice sc 1.0");); } TEST_F(LatticeRegionTest, lattice_bcc) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice bcc 4.2 orient x 1 1 0 orient y -1 1 0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice bcc 4.2 orient x 1 1 0 orient y -1 1 0"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::BCC); ASSERT_DOUBLE_EQ(lattice->xlattice, sqrt(2.0) * 4.2); @@ -201,18 +166,18 @@ TEST_F(LatticeRegionTest, lattice_bcc) ASSERT_EQ(lattice->basis[1][1], 0.5); ASSERT_EQ(lattice->basis[1][2], 0.5); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice bcc 1.0");); + command("lattice bcc 1.0");); } TEST_F(LatticeRegionTest, lattice_fcc) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice fcc 3.5 origin 0.5 0.5 0.5"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice fcc 3.5 origin 0.5 0.5 0.5"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::FCC); ASSERT_DOUBLE_EQ(lattice->xlattice, 3.5); @@ -233,24 +198,23 @@ TEST_F(LatticeRegionTest, lattice_fcc) ASSERT_EQ(lattice->basis[3][2], 0.5); TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*", - lmp->input->one("lattice fcc 1.0 basis 0.0 0.0 0.0");); + command("lattice fcc 1.0 basis 0.0 0.0 0.0");); TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*", - lmp->input->one("lattice fcc 1.0 a1 0.0 1.0 0.0");); - TEST_FAILURE(".*ERROR: Illegal lattice command.*", - lmp->input->one("lattice fcc 1.0 orient w 1 0 0");); + command("lattice fcc 1.0 a1 0.0 1.0 0.0");); + TEST_FAILURE(".*ERROR: Illegal lattice command.*", command("lattice fcc 1.0 orient w 1 0 0");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice fcc 1.0");); + command("lattice fcc 1.0");); } TEST_F(LatticeRegionTest, lattice_hcp) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice hcp 3.0 orient z 0 0 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice hcp 3.0 orient z 0 0 1"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::HCP); ASSERT_DOUBLE_EQ(lattice->xlattice, 3.0); @@ -280,21 +244,21 @@ TEST_F(LatticeRegionTest, lattice_hcp) ASSERT_DOUBLE_EQ(lattice->a3[2], sqrt(8.0 / 3.0)); TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*", - lmp->input->one("lattice hcp 1.0 a2 0.0 1.0 0.0");); + command("lattice hcp 1.0 a2 0.0 1.0 0.0");); TEST_FAILURE(".*ERROR: Invalid option in lattice command for non-custom style.*", - lmp->input->one("lattice hcp 1.0 a3 0.0 1.0 0.0");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("lattice hcp 1.0 a3 0.0 1.0 0.0");); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice hcp 1.0");); + command("lattice hcp 1.0");); } TEST_F(LatticeRegionTest, lattice_diamond) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice diamond 4.1 orient x 1 1 2 orient y -1 1 0 orient z -1 -1 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice diamond 4.1 orient x 1 1 2 orient y -1 1 0 orient z -1 -1 1"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::DIAMOND); ASSERT_DOUBLE_EQ(lattice->xlattice, 6.6952719636073539); @@ -335,19 +299,19 @@ TEST_F(LatticeRegionTest, lattice_diamond) ASSERT_EQ(lattice->a3[1], 0.0); ASSERT_EQ(lattice->a3[2], 1.0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice diamond 1.0");); + command("lattice diamond 1.0");); } TEST_F(LatticeRegionTest, lattice_sq) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - lmp->input->one("lattice sq 3.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + command("lattice sq 3.0"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::SQ); ASSERT_DOUBLE_EQ(lattice->xlattice, 3.0); @@ -358,23 +322,22 @@ TEST_F(LatticeRegionTest, lattice_sq) ASSERT_EQ(lattice->basis[0][1], 0.0); ASSERT_EQ(lattice->basis[0][2], 0.0); - TEST_FAILURE( - ".*ERROR: Lattice settings are not compatible with 2d simulation.*", - lmp->input->one("lattice sq 1.0 orient x 1 1 2 orient y -1 1 0 orient z -1 -1 1");); + TEST_FAILURE(".*ERROR: Lattice settings are not compatible with 2d simulation.*", + command("lattice sq 1.0 orient x 1 1 2 orient y -1 1 0 orient z -1 -1 1");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 3"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 3"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice sq 1.0");); + command("lattice sq 1.0");); } TEST_F(LatticeRegionTest, lattice_sq2) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - lmp->input->one("lattice sq2 2.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + command("lattice sq2 2.0"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::SQ2); ASSERT_DOUBLE_EQ(lattice->xlattice, 2.0); @@ -388,19 +351,19 @@ TEST_F(LatticeRegionTest, lattice_sq2) ASSERT_EQ(lattice->basis[1][1], 0.5); ASSERT_EQ(lattice->basis[1][2], 0.0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 3"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 3"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice sq2 1.0");); + command("lattice sq2 1.0");); } TEST_F(LatticeRegionTest, lattice_hex) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - lmp->input->one("lattice hex 2.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + command("lattice hex 2.0"); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::HEX); ASSERT_DOUBLE_EQ(lattice->xlattice, 2.0); @@ -423,34 +386,34 @@ TEST_F(LatticeRegionTest, lattice_hex) ASSERT_EQ(lattice->a3[1], 0.0); ASSERT_EQ(lattice->a3[2], 1.0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 3"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("dimension 3"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Lattice style incompatible with simulation dimension.*", - lmp->input->one("lattice hex 1.0");); + command("lattice hex 1.0");); } TEST_F(LatticeRegionTest, lattice_custom) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("variable a equal 4.34"); - lmp->input->one("variable b equal $a*sqrt(3.0)"); - lmp->input->one("variable c equal $a*sqrt(8.0/3.0)"); - lmp->input->one("variable t equal 1.0/3.0"); - lmp->input->one("variable f equal 5.0/6.0"); - lmp->input->one("lattice custom 1.0 " - "a1 $a 0.0 0.0 " - "a2 0.0 $b 0.0 " - "a3 0.0 0.0 $c " - "basis 0.0 0.0 0.0 " - "basis 0.5 0.5 0.0 " - "basis $t 0.0 0.5 " - "basis $f 0.5 0.5 " - "basis 0.0 0.0 0.625 " - "basis 0.5 0.5 0.625 " - "basis $t 0.0 0.125 " - "basis $f 0.5 0.125 "); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("variable a equal 4.34"); + command("variable b equal $a*sqrt(3.0)"); + command("variable c equal $a*sqrt(8.0/3.0)"); + command("variable t equal 1.0/3.0"); + command("variable f equal 5.0/6.0"); + command("lattice custom 1.0 " + "a1 $a 0.0 0.0 " + "a2 0.0 $b 0.0 " + "a3 0.0 0.0 $c " + "basis 0.0 0.0 0.0 " + "basis 0.5 0.5 0.0 " + "basis $t 0.0 0.5 " + "basis $f 0.5 0.5 " + "basis 0.0 0.0 0.625 " + "basis 0.5 0.5 0.625 " + "basis $t 0.0 0.125 " + "basis $f 0.5 0.125 "); + END_HIDE_OUTPUT(); auto lattice = lmp->domain->lattice; ASSERT_EQ(lattice->style, Lattice::CUSTOM); ASSERT_DOUBLE_EQ(lattice->xlattice, 4.34); @@ -492,48 +455,48 @@ TEST_F(LatticeRegionTest, lattice_custom) ASSERT_DOUBLE_EQ(lattice->a3[2], 4.34 * sqrt(8.0 / 3.0)); TEST_FAILURE(".*ERROR: Illegal lattice command.*", - lmp->input->one("lattice custom 1.0 basis -0.1 0 0");); + command("lattice custom 1.0 basis -0.1 0 0");); TEST_FAILURE(".*ERROR: Illegal lattice command.*", - lmp->input->one("lattice custom 1.0 basis 0.0 1.0 0");); + command("lattice custom 1.0 basis 0.0 1.0 0");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("dimension 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); - TEST_FAILURE(".*ERROR: No basis atoms in lattice.*", lmp->input->one("lattice custom 1.0");); + BEGIN_HIDE_OUTPUT(); + command("dimension 2"); + END_HIDE_OUTPUT(); + TEST_FAILURE(".*ERROR: No basis atoms in lattice.*", command("lattice custom 1.0");); TEST_FAILURE(".*ERROR: Lattice settings are not compatible with 2d simulation.*", - lmp->input->one("lattice custom 1.0 origin 0.5 0.5 0.5 basis 0.0 0.0 0.0");); + command("lattice custom 1.0 origin 0.5 0.5 0.5 basis 0.0 0.0 0.0");); TEST_FAILURE(".*ERROR: Lattice settings are not compatible with 2d simulation.*", - lmp->input->one("lattice custom 1.0 a1 1.0 1.0 1.0 basis 0.0 0.0 0.0");); + command("lattice custom 1.0 a1 1.0 1.0 1.0 basis 0.0 0.0 0.0");); TEST_FAILURE(".*ERROR: Lattice settings are not compatible with 2d simulation.*", - lmp->input->one("lattice custom 1.0 a2 1.0 1.0 1.0 basis 0.0 0.0 0.0");); + command("lattice custom 1.0 a2 1.0 1.0 1.0 basis 0.0 0.0 0.0");); TEST_FAILURE(".*ERROR: Lattice settings are not compatible with 2d simulation.*", - lmp->input->one("lattice custom 1.0 a3 1.0 1.0 1.0 basis 0.0 0.0 0.0");); + command("lattice custom 1.0 a3 1.0 1.0 1.0 basis 0.0 0.0 0.0");); } TEST_F(LatticeRegionTest, region_fail) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice none 2.0"); - lmp->input->one("region box block 0 1 0 1 0 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice none 2.0"); + command("region box block 0 1 0 1 0 1"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Create_atoms command before simulation box is defined.*", - lmp->input->one("create_atoms 1 box");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("create_box 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("create_atoms 1 box");); + BEGIN_HIDE_OUTPUT(); + command("create_box 1 box"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Cannot create atoms with undefined lattice.*", - lmp->input->one("create_atoms 1 box");); + command("create_atoms 1 box");); } TEST_F(LatticeRegionTest, region_block_lattice) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice sc 1.5"); - lmp->input->one("region box block 0 2 0 2 0 2 units lattice"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice sc 1.5"); + command("region box block 0 2 0 2 0 2 units lattice"); + command("create_box 1 box"); + command("create_atoms 1 box"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); auto x = lmp->atom->x; @@ -554,12 +517,12 @@ TEST_F(LatticeRegionTest, region_block_lattice) TEST_F(LatticeRegionTest, region_block_box) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice sc 1.5 origin 0.75 0.75 0.75"); - lmp->input->one("region box block 0 2 0 2 0 2 units box"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice sc 1.5 origin 0.75 0.75 0.75"); + command("region box block 0 2 0 2 0 2 units box"); + command("create_box 1 box"); + command("create_atoms 1 box"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); auto x = lmp->atom->x; @@ -571,93 +534,93 @@ TEST_F(LatticeRegionTest, region_block_box) TEST_F(LatticeRegionTest, region_cone) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice fcc 2.5 origin 0.5 0.5 0.5"); - lmp->input->one("region box cone x 1.0 1.0 0.5 2.1 0.0 2.0"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 region box"); - lmp->input->one("write_dump all atom init.lammpstrj"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice fcc 2.5 origin 0.5 0.5 0.5"); + command("region box cone x 1.0 1.0 0.5 2.1 0.0 2.0"); + command("create_box 1 box"); + command("create_atoms 1 region box"); + command("write_dump all atom init.lammpstrj"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); ASSERT_EQ(lmp->atom->natoms, 42); } TEST_F(LatticeRegionTest, region_cylinder) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice fcc 2.5 origin 0.5 0.5 0.5"); - lmp->input->one("region box cylinder z 1.0 1.0 2.1 0.0 2.0 "); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 region box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice fcc 2.5 origin 0.5 0.5 0.5"); + command("region box cylinder z 1.0 1.0 2.1 0.0 2.0 "); + command("create_box 1 box"); + command("create_atoms 1 region box"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); ASSERT_EQ(lmp->atom->natoms, 114); } TEST_F(LatticeRegionTest, region_prism) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice bcc 2.5 origin 0.75 0.75 0.75"); - lmp->input->one("region box prism 0 2 0 2 0 2 0.5 0.0 0.0"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice bcc 2.5 origin 0.75 0.75 0.75"); + command("region box prism 0 2 0 2 0 2 0.5 0.0 0.0"); + command("create_box 1 box"); + command("create_atoms 1 box"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 1); ASSERT_EQ(lmp->atom->natoms, 16); } TEST_F(LatticeRegionTest, region_sphere) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice fcc 2.5 origin 0.5 0.5 0.5"); - lmp->input->one("region box sphere 1.0 1.0 1.0 1.1"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 region box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice fcc 2.5 origin 0.5 0.5 0.5"); + command("region box sphere 1.0 1.0 1.0 1.1"); + command("create_box 1 box"); + command("create_atoms 1 region box"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); ASSERT_EQ(lmp->atom->natoms, 14); } TEST_F(LatticeRegionTest, region_union) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice fcc 2.5 origin 0.5 0.5 0.5"); - lmp->input->one("region part1 sphere 2.0 1.0 1.0 1.1"); - lmp->input->one("region part2 block 0.0 2.0 0.0 2.0 0.0 2.0"); - lmp->input->one("region box union 2 part1 part2"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 region box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice fcc 2.5 origin 0.5 0.5 0.5"); + command("region part1 sphere 2.0 1.0 1.0 1.1"); + command("region part2 block 0.0 2.0 0.0 2.0 0.0 2.0"); + command("region box union 2 part1 part2"); + command("create_box 1 box"); + command("create_atoms 1 region box"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); ASSERT_EQ(lmp->atom->natoms, 67); } TEST_F(LatticeRegionTest, region_intersect) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice fcc 2.5 origin 0.5 0.5 0.5"); - lmp->input->one("region part1 sphere 2.0 1.0 1.0 1.8"); - lmp->input->one("region part2 block 0.0 2.0 0.0 2.0 0.0 2.0"); - lmp->input->one("region box intersect 2 part1 part2"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 region box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice fcc 2.5 origin 0.5 0.5 0.5"); + command("region part1 sphere 2.0 1.0 1.0 1.8"); + command("region part2 block 0.0 2.0 0.0 2.0 0.0 2.0"); + command("region box intersect 2 part1 part2"); + command("create_box 1 box"); + command("create_atoms 1 region box"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); ASSERT_EQ(lmp->atom->natoms, 21); } TEST_F(LatticeRegionTest, region_plane) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("lattice fcc 2.5 origin 0.5 0.5 0.5"); - lmp->input->one("region box block 0.0 2.0 0.0 2.0 0.0 2.0"); - lmp->input->one("region part1 plane 0.5 1.0 0.0 0.75 0.0 0.0"); - lmp->input->one("region part2 plane 1.5 1.0 0.0 0.75 0.0 0.0 side out"); - lmp->input->one("region atoms intersect 2 part1 part2"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 region atoms"); - lmp->input->one("write_dump all atom init.lammpstrj"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("lattice fcc 2.5 origin 0.5 0.5 0.5"); + command("region box block 0.0 2.0 0.0 2.0 0.0 2.0"); + command("region part1 plane 0.5 1.0 0.0 0.75 0.0 0.0"); + command("region part2 plane 1.5 1.0 0.0 0.75 0.0 0.0 side out"); + command("region atoms intersect 2 part1 part2"); + command("create_box 1 box"); + command("create_atoms 1 region atoms"); + command("write_dump all atom init.lammpstrj"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->domain->triclinic, 0); ASSERT_EQ(lmp->atom->natoms, 16); } @@ -669,7 +632,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/commands/test_reset_ids.cpp b/unittest/commands/test_reset_ids.cpp index 3ea2f26cef..694fc9ac77 100644 --- a/unittest/commands/test_reset_ids.cpp +++ b/unittest/commands/test_reset_ids.cpp @@ -21,6 +21,7 @@ #include "utils.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -28,12 +29,6 @@ // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif - using LAMMPS_NS::utils::split_words; namespace LAMMPS_NS { @@ -41,49 +36,22 @@ using ::testing::MatchesRegex; #define GETIDX(i) lmp->atom->map(i) -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } #define STRINGIFY(val) XSTR(val) #define XSTR(val) #val -class ResetIDsTest : public ::testing::Test { +class ResetIDsTest : public LAMMPSTest { protected: - LAMMPS *lmp; - void SetUp() override { - const char *args[] = {"ResetIDsTest", "-log", "none", "-nocite", "-echo", "screen"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - Info *info = new Info(lmp); + testbinary = "ResetIDsTest"; + LAMMPSTest::SetUp(); if (info->has_style("atom", "full")) { - lmp->input->one("variable input_dir index " STRINGIFY(TEST_INPUT_FOLDER)); - lmp->input->one("include ${input_dir}/in.fourmol"); + BEGIN_HIDE_OUTPUT(); + command("variable input_dir index " STRINGIFY(TEST_INPUT_FOLDER)); + command("include ${input_dir}/in.fourmol"); + END_HIDE_OUTPUT(); } - delete info; - if (!verbose) ::testing::internal::GetCapturedStdout(); - } - - void TearDown() override - { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); } }; @@ -124,9 +92,9 @@ TEST_F(ResetIDsTest, MolIDAll) // the original data file has two different molecule IDs // for two residues of the same molecule/fragment. - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_mol_ids all"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_mol_ids all"); + END_HIDE_OUTPUT(); ASSERT_EQ(molid[GETIDX(1)], 1); ASSERT_EQ(molid[GETIDX(2)], 1); @@ -166,12 +134,12 @@ TEST_F(ResetIDsTest, DeletePlusAtomID) auto molid = lmp->atom->molecule; // delete two water molecules - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("group allwater molecule 3:6"); - lmp->input->one("group twowater molecule 4:6:2"); - lmp->input->one("delete_atoms group twowater compress no bond yes"); - lmp->input->one("reset_mol_ids all"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("group allwater molecule 3:6"); + command("group twowater molecule 4:6:2"); + command("delete_atoms group twowater compress no bond yes"); + command("reset_mol_ids all"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->natoms, 23); ASSERT_EQ(lmp->atom->map_tag_max, 26); @@ -228,9 +196,9 @@ TEST_F(ResetIDsTest, DeletePlusAtomID) ASSERT_GE(GETIDX(25), 0); ASSERT_GE(GETIDX(26), 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_atom_ids"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 23); for (int i = 1; i <= 23; ++i) @@ -244,11 +212,11 @@ TEST_F(ResetIDsTest, PartialOffset) auto molid = lmp->atom->molecule; // delete two water molecules - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("group allwater molecule 3:6"); - lmp->input->one("group nowater subtract all allwater"); - lmp->input->one("reset_mol_ids allwater offset 4"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("group allwater molecule 3:6"); + command("group nowater subtract all allwater"); + command("reset_mol_ids allwater offset 4"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->natoms, 29); ASSERT_EQ(lmp->atom->map_tag_max, 29); @@ -282,9 +250,9 @@ TEST_F(ResetIDsTest, PartialOffset) ASSERT_EQ(molid[GETIDX(28)], 8); ASSERT_EQ(molid[GETIDX(29)], 8); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_mol_ids nowater offset 0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_mol_ids nowater offset 0"); + END_HIDE_OUTPUT(); ASSERT_EQ(molid[GETIDX(1)], 1); ASSERT_EQ(molid[GETIDX(2)], 1); @@ -324,13 +292,13 @@ TEST_F(ResetIDsTest, DeleteAdd) auto molid = lmp->atom->molecule; // delete two water molecules - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("group allwater molecule 3:6"); - lmp->input->one("group twowater molecule 4:6:2"); - lmp->input->one("group nowater subtract all allwater"); - lmp->input->one("delete_atoms group twowater compress no bond yes mol yes"); - lmp->input->one("reset_mol_ids allwater"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("group allwater molecule 3:6"); + command("group twowater molecule 4:6:2"); + command("group nowater subtract all allwater"); + command("delete_atoms group twowater compress no bond yes mol yes"); + command("reset_mol_ids allwater"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->natoms, 23); ASSERT_EQ(lmp->atom->map_tag_max, 26); @@ -387,17 +355,17 @@ TEST_F(ResetIDsTest, DeleteAdd) ASSERT_GE(GETIDX(25), 0); ASSERT_GE(GETIDX(26), 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_atom_ids sort yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_atom_ids sort yes"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 23); for (int i = 1; i <= 23; ++i) ASSERT_GE(GETIDX(i), 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_mol_ids nowater offset 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_mol_ids nowater offset 1"); + END_HIDE_OUTPUT(); ASSERT_EQ(molid[GETIDX(1)], 2); ASSERT_EQ(molid[GETIDX(2)], 2); @@ -423,13 +391,13 @@ TEST_F(ResetIDsTest, DeleteAdd) ASSERT_EQ(molid[GETIDX(22)], 4); ASSERT_EQ(molid[GETIDX(23)], 4); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("create_atoms 1 single 0.0 0.0 0.0"); - lmp->input->one("create_atoms 2 single 1.0 0.0 0.0"); - lmp->input->one("create_atoms 3 single 2.0 0.0 0.0"); - lmp->input->one("create_atoms 4 single 3.0 0.0 0.0"); - lmp->input->one("reset_mol_ids all single yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("create_atoms 1 single 0.0 0.0 0.0"); + command("create_atoms 2 single 1.0 0.0 0.0"); + command("create_atoms 3 single 2.0 0.0 0.0"); + command("create_atoms 4 single 3.0 0.0 0.0"); + command("reset_mol_ids all single yes"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->natoms, 27); ASSERT_EQ(lmp->atom->map_tag_max, 27); @@ -441,9 +409,9 @@ TEST_F(ResetIDsTest, DeleteAdd) ASSERT_EQ(molid[GETIDX(26)], 6); ASSERT_EQ(molid[GETIDX(27)], 7); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_mol_ids all single no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_mol_ids all single no"); + END_HIDE_OUTPUT(); ASSERT_EQ(molid[GETIDX(21)], 3); ASSERT_EQ(molid[GETIDX(22)], 3); @@ -453,9 +421,9 @@ TEST_F(ResetIDsTest, DeleteAdd) ASSERT_EQ(molid[GETIDX(26)], 0); ASSERT_EQ(molid[GETIDX(27)], 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_mol_ids all compress no single yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_mol_ids all compress no single yes"); + END_HIDE_OUTPUT(); ASSERT_EQ(molid[GETIDX(21)], 21); ASSERT_EQ(molid[GETIDX(22)], 21); @@ -471,21 +439,21 @@ TEST_F(ResetIDsTest, TopologyData) if (lmp->atom->natoms == 0) GTEST_SKIP(); // delete two water molecules - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("group allwater molecule 3:6"); - lmp->input->one("group twowater molecule 4:6:2"); - lmp->input->one("group nowater subtract all allwater"); - lmp->input->one("delete_atoms group twowater compress no bond yes mol yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("group allwater molecule 3:6"); + command("group twowater molecule 4:6:2"); + command("group nowater subtract all allwater"); + command("delete_atoms group twowater compress no bond yes mol yes"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->natoms, 23); ASSERT_EQ(lmp->atom->map_tag_max, 26); - auto num_bond = lmp->atom->num_bond; - auto num_angle = lmp->atom->num_angle; - auto bond_atom = lmp->atom->bond_atom; - auto angle_atom1 = lmp->atom->angle_atom1; - auto angle_atom2 = lmp->atom->angle_atom2; - auto angle_atom3 = lmp->atom->angle_atom3; + auto num_bond = lmp->atom->num_bond; + auto num_angle = lmp->atom->num_angle; + auto bond_atom = lmp->atom->bond_atom; + auto angle_atom1 = lmp->atom->angle_atom1; + auto angle_atom2 = lmp->atom->angle_atom2; + auto angle_atom3 = lmp->atom->angle_atom3; ASSERT_EQ(num_bond[GETIDX(1)], 2); ASSERT_EQ(bond_atom[GETIDX(1)][0], 2); ASSERT_EQ(bond_atom[GETIDX(1)][1], 3); @@ -560,16 +528,16 @@ TEST_F(ResetIDsTest, TopologyData) ASSERT_EQ(angle_atom2[GETIDX(24)][0], 24); ASSERT_EQ(angle_atom3[GETIDX(24)][0], 26); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_atom_ids sort yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_atom_ids sort yes"); + END_HIDE_OUTPUT(); - num_bond = lmp->atom->num_bond; - num_angle = lmp->atom->num_angle; - bond_atom = lmp->atom->bond_atom; - angle_atom1 = lmp->atom->angle_atom1; - angle_atom2 = lmp->atom->angle_atom2; - angle_atom3 = lmp->atom->angle_atom3; + num_bond = lmp->atom->num_bond; + num_angle = lmp->atom->num_angle; + bond_atom = lmp->atom->bond_atom; + angle_atom1 = lmp->atom->angle_atom1; + angle_atom2 = lmp->atom->angle_atom2; + angle_atom3 = lmp->atom->angle_atom3; ASSERT_EQ(num_bond[GETIDX(1)], 2); ASSERT_EQ(bond_atom[GETIDX(1)][0], 3); ASSERT_EQ(bond_atom[GETIDX(1)][1], 2); @@ -658,61 +626,60 @@ TEST_F(ResetIDsTest, DeathTests) { if (lmp->atom->natoms == 0) GTEST_SKIP(); - TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", lmp->input->one("reset_mol_ids");); + TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", command("reset_mol_ids");); TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", - lmp->input->one("reset_mol_ids all offset 1 1");); + command("reset_mol_ids all offset 1 1");); TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", - lmp->input->one("reset_mol_ids all offset -2");); + command("reset_mol_ids all offset -2");); + TEST_FAILURE(".*ERROR on proc 0: Expected integer.*", command("reset_mol_ids all offset xxx");); TEST_FAILURE(".*ERROR on proc 0: Expected integer.*", - lmp->input->one("reset_mol_ids all offset xxx");); - TEST_FAILURE(".*ERROR on proc 0: Expected integer.*", - lmp->input->one("reset_mol_ids all compress yes single no offset xxx");); + command("reset_mol_ids all compress yes single no offset xxx");); + TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", command("reset_mol_ids all offset");); TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", - lmp->input->one("reset_mol_ids all offset");); - TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", - lmp->input->one("reset_mol_ids all compress");); + command("reset_mol_ids all compress");); TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", - lmp->input->one("reset_mol_ids all compress xxx");); + command("reset_mol_ids all compress xxx");); + TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", command("reset_mol_ids all single");); TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", - lmp->input->one("reset_mol_ids all single");); - TEST_FAILURE(".*ERROR: Illegal reset_mol_ids command.*", - lmp->input->one("reset_mol_ids all single xxx");); + command("reset_mol_ids all single xxx");); } -TEST(ResetMolIds, CMDFail) -{ - LAMMPS *lmp; - const char *args[] = {"ResetIDsTest", "-log", "none", "-nocite", "-echo", "screen"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); - - TEST_FAILURE(".*ERROR: Reset_mol_ids command before simulation box is.*", - lmp->input->one("reset_mol_ids all");); - - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("atom_modify id no"); - lmp->input->one("region box block 0 1 0 1 0 1"); - lmp->input->one("create_box 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); - TEST_FAILURE(".*ERROR: Cannot use reset_mol_ids unless.*", - lmp->input->one("reset_mol_ids all");); - - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("region box block 0 1 0 1 0 1"); - lmp->input->one("create_box 1 box"); - if (!verbose) ::testing::internal::GetCapturedStdout(); - TEST_FAILURE(".*ERROR: Can only use reset_mol_ids.*", lmp->input->one("reset_mol_ids all");); - - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); +class ResetMolIDsTest : public LAMMPSTest { +protected: + void SetUp() override + { + testbinary = "ResetIDsTest"; + LAMMPSTest::SetUp(); + } }; +TEST_F(ResetMolIDsTest, FailBeforeBox) +{ + TEST_FAILURE(".*ERROR: Reset_mol_ids command before simulation box is.*", + command("reset_mol_ids all");); +} + +TEST_F(ResetMolIDsTest, FailMissingId) +{ + BEGIN_HIDE_OUTPUT(); + command("atom_modify id no"); + command("region box block 0 1 0 1 0 1"); + command("create_box 1 box"); + END_HIDE_OUTPUT(); + TEST_FAILURE(".*ERROR: Cannot use reset_mol_ids unless.*", command("reset_mol_ids all");); +} + +TEST_F(ResetMolIDsTest, FailOnlyMolecular) +{ + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("region box block 0 1 0 1 0 1"); + command("create_box 1 box"); + END_HIDE_OUTPUT(); + TEST_FAILURE(".*ERROR: Can only use reset_mol_ids.*", command("reset_mol_ids all");); +} + } // namespace LAMMPS_NS int main(int argc, char **argv) @@ -720,7 +687,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/commands/test_simple_commands.cpp b/unittest/commands/test_simple_commands.cpp index d98146d4f3..9173909806 100644 --- a/unittest/commands/test_simple_commands.cpp +++ b/unittest/commands/test_simple_commands.cpp @@ -24,6 +24,7 @@ #include "fmt/format.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -34,11 +35,6 @@ // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif using LAMMPS_NS::utils::split_words; @@ -47,46 +43,12 @@ using ::testing::ExitedWithCode; using ::testing::MatchesRegex; using ::testing::StrEq; -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } - -class SimpleCommandsTest : public ::testing::Test { -protected: - LAMMPS *lmp; - - void SetUp() override - { - const char *args[] = {"SimpleCommandsTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); - } - - void TearDown() override - { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); - } +class SimpleCommandsTest : public LAMMPSTest { }; TEST_F(SimpleCommandsTest, UnknownCommand) { - TEST_FAILURE(".*ERROR: Unknown command.*", lmp->input->one("XXX one two");); + TEST_FAILURE(".*ERROR: Unknown command.*", command("XXX one two");); } TEST_F(SimpleCommandsTest, Echo) @@ -94,47 +56,47 @@ TEST_F(SimpleCommandsTest, Echo) ASSERT_EQ(lmp->input->echo_screen, 1); ASSERT_EQ(lmp->input->echo_log, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("echo none"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("echo none"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->input->echo_screen, 0); ASSERT_EQ(lmp->input->echo_log, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("echo both"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("echo both"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->input->echo_screen, 1); ASSERT_EQ(lmp->input->echo_log, 1); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("echo screen"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("echo screen"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->input->echo_screen, 1); ASSERT_EQ(lmp->input->echo_log, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("echo log"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("echo log"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->input->echo_screen, 0); ASSERT_EQ(lmp->input->echo_log, 1); - TEST_FAILURE(".*ERROR: Illegal echo command.*", lmp->input->one("echo");); - TEST_FAILURE(".*ERROR: Illegal echo command.*", lmp->input->one("echo xxx");); + TEST_FAILURE(".*ERROR: Illegal echo command.*", command("echo");); + TEST_FAILURE(".*ERROR: Illegal echo command.*", command("echo xxx");); } TEST_F(SimpleCommandsTest, Log) { ASSERT_EQ(lmp->logfile, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("log simple_command_test.log"); - lmp->input->one("print 'test1'"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("log simple_command_test.log"); + command("print 'test1'"); + END_HIDE_OUTPUT(); ASSERT_NE(lmp->logfile, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("log none"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("log none"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->logfile, nullptr); std::string text; @@ -144,14 +106,14 @@ TEST_F(SimpleCommandsTest, Log) in.close(); ASSERT_THAT(text, StrEq("test1")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("log simple_command_test.log append"); - lmp->input->one("print 'test2'"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("log simple_command_test.log append"); + command("print 'test2'"); + END_HIDE_OUTPUT(); ASSERT_NE(lmp->logfile, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("log none"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("log none"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->logfile, nullptr); in.open("simple_command_test.log"); @@ -162,7 +124,7 @@ TEST_F(SimpleCommandsTest, Log) in.close(); remove("simple_command_test.log"); - TEST_FAILURE(".*ERROR: Illegal log command.*", lmp->input->one("log");); + TEST_FAILURE(".*ERROR: Illegal log command.*", command("log");); } TEST_F(SimpleCommandsTest, Newton) @@ -170,82 +132,79 @@ TEST_F(SimpleCommandsTest, Newton) // default setting is "on" for both ASSERT_EQ(lmp->force->newton_pair, 1); ASSERT_EQ(lmp->force->newton_bond, 1); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("newton off"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("newton off"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->force->newton_pair, 0); ASSERT_EQ(lmp->force->newton_bond, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("newton on off"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("newton on off"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->force->newton_pair, 1); ASSERT_EQ(lmp->force->newton_bond, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("newton off on"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("newton off on"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->force->newton_pair, 0); ASSERT_EQ(lmp->force->newton_bond, 1); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("newton on"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("newton on"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->force->newton_pair, 1); ASSERT_EQ(lmp->force->newton_bond, 1); } TEST_F(SimpleCommandsTest, Partition) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("echo none"); - if (!verbose) ::testing::internal::GetCapturedStdout(); - TEST_FAILURE(".*ERROR: Illegal partition command .*", - lmp->input->one("partition xxx 1 echo none");); + BEGIN_HIDE_OUTPUT(); + command("echo none"); + END_HIDE_OUTPUT(); + TEST_FAILURE(".*ERROR: Illegal partition command .*", command("partition xxx 1 echo none");); TEST_FAILURE(".*ERROR: Numeric index 2 is out of bounds.*", - lmp->input->one("partition yes 2 echo none");); + command("partition yes 2 echo none");); - ::testing::internal::CaptureStdout(); - lmp->input->one("partition yes 1 print 'test'"); - auto text = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << text; + BEGIN_CAPTURE_OUTPUT(); + command("partition yes 1 print 'test'"); + auto text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, StrEq("test\n")); - ::testing::internal::CaptureStdout(); - lmp->input->one("partition no 1 print 'test'"); - text = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << text; + BEGIN_CAPTURE_OUTPUT(); + command("partition no 1 print 'test'"); + text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, StrEq("")); } TEST_F(SimpleCommandsTest, Quit) { - ::testing::internal::CaptureStdout(); - lmp->input->one("echo none"); - ::testing::internal::GetCapturedStdout(); - TEST_FAILURE(".*ERROR: Expected integer .*", lmp->input->one("quit xxx");); + BEGIN_HIDE_OUTPUT(); + command("echo none"); + END_HIDE_OUTPUT(); + TEST_FAILURE(".*ERROR: Expected integer .*", command("quit xxx");); // the following tests must be skipped with OpenMPI due to using threads - if (have_openmpi) GTEST_SKIP(); - ASSERT_EXIT(lmp->input->one("quit"), ExitedWithCode(0), ""); - ASSERT_EXIT(lmp->input->one("quit 9"), ExitedWithCode(9), ""); + if (Info::get_mpi_vendor() == "Open MPI") GTEST_SKIP(); + ASSERT_EXIT(command("quit"), ExitedWithCode(0), ""); + ASSERT_EXIT(command("quit 9"), ExitedWithCode(9), ""); } TEST_F(SimpleCommandsTest, ResetTimestep) { ASSERT_EQ(lmp->update->ntimestep, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_timestep 10"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_timestep 10"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->update->ntimestep, 10); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("reset_timestep 0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("reset_timestep 0"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->update->ntimestep, 0); - TEST_FAILURE(".*ERROR: Timestep must be >= 0.*", lmp->input->one("reset_timestep -10");); - TEST_FAILURE(".*ERROR: Illegal reset_timestep .*", lmp->input->one("reset_timestep");); - TEST_FAILURE(".*ERROR: Illegal reset_timestep .*", lmp->input->one("reset_timestep 10 10");); - TEST_FAILURE(".*ERROR: Expected integer .*", lmp->input->one("reset_timestep xxx");); + TEST_FAILURE(".*ERROR: Timestep must be >= 0.*", command("reset_timestep -10");); + TEST_FAILURE(".*ERROR: Illegal reset_timestep .*", command("reset_timestep");); + TEST_FAILURE(".*ERROR: Illegal reset_timestep .*", command("reset_timestep 10 10");); + TEST_FAILURE(".*ERROR: Expected integer .*", command("reset_timestep xxx");); } TEST_F(SimpleCommandsTest, Suffix) @@ -254,93 +213,92 @@ TEST_F(SimpleCommandsTest, Suffix) ASSERT_EQ(lmp->suffix, nullptr); ASSERT_EQ(lmp->suffix2, nullptr); - TEST_FAILURE(".*ERROR: May only enable suffixes after defining one.*", - lmp->input->one("suffix on");); + TEST_FAILURE(".*ERROR: May only enable suffixes after defining one.*", command("suffix on");); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("suffix one"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("suffix one"); + END_HIDE_OUTPUT(); ASSERT_THAT(lmp->suffix, StrEq("one")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("suffix hybrid two three"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("suffix hybrid two three"); + END_HIDE_OUTPUT(); ASSERT_THAT(lmp->suffix, StrEq("two")); ASSERT_THAT(lmp->suffix2, StrEq("three")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("suffix four"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("suffix four"); + END_HIDE_OUTPUT(); ASSERT_THAT(lmp->suffix, StrEq("four")); ASSERT_EQ(lmp->suffix2, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("suffix off"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("suffix off"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->suffix_enable, 0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("suffix on"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("suffix on"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->suffix_enable, 1); - TEST_FAILURE(".*ERROR: Illegal suffix command.*", lmp->input->one("suffix");); - TEST_FAILURE(".*ERROR: Illegal suffix command.*", lmp->input->one("suffix hybrid");); - TEST_FAILURE(".*ERROR: Illegal suffix command.*", lmp->input->one("suffix hybrid one");); + TEST_FAILURE(".*ERROR: Illegal suffix command.*", command("suffix");); + TEST_FAILURE(".*ERROR: Illegal suffix command.*", command("suffix hybrid");); + TEST_FAILURE(".*ERROR: Illegal suffix command.*", command("suffix hybrid one");); } TEST_F(SimpleCommandsTest, Thermo) { ASSERT_EQ(lmp->output->thermo_every, 0); ASSERT_EQ(lmp->output->var_thermo, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("thermo 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("thermo 2"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->output->thermo_every, 2); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("variable step equal logfreq(10,3,10)"); - lmp->input->one("thermo v_step"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("variable step equal logfreq(10,3,10)"); + command("thermo v_step"); + END_HIDE_OUTPUT(); ASSERT_THAT(lmp->output->var_thermo, StrEq("step")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("thermo 10"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("thermo 10"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->output->thermo_every, 10); ASSERT_EQ(lmp->output->var_thermo, nullptr); - TEST_FAILURE(".*ERROR: Illegal thermo command.*", lmp->input->one("thermo");); - TEST_FAILURE(".*ERROR: Illegal thermo command.*", lmp->input->one("thermo -1");); - TEST_FAILURE(".*ERROR: Expected integer.*", lmp->input->one("thermo xxx");); + TEST_FAILURE(".*ERROR: Illegal thermo command.*", command("thermo");); + TEST_FAILURE(".*ERROR: Illegal thermo command.*", command("thermo -1");); + TEST_FAILURE(".*ERROR: Expected integer.*", command("thermo xxx");); } TEST_F(SimpleCommandsTest, TimeStep) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("timestep 1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("timestep 1"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->update->dt, 1.0); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("timestep 0.1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("timestep 0.1"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->update->dt, 0.1); // zero timestep is legal and works (atoms don't move) - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("timestep 0.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("timestep 0.0"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->update->dt, 0.0); // negative timestep also creates a viable MD. - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("timestep -0.1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("timestep -0.1"); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->update->dt, -0.1); - TEST_FAILURE(".*ERROR: Illegal timestep command.*", lmp->input->one("timestep");); - TEST_FAILURE(".*ERROR: Expected floating point.*", lmp->input->one("timestep xxx");); + TEST_FAILURE(".*ERROR: Illegal timestep command.*", command("timestep");); + TEST_FAILURE(".*ERROR: Expected floating point.*", command("timestep xxx");); } TEST_F(SimpleCommandsTest, Units) @@ -352,19 +310,19 @@ TEST_F(SimpleCommandsTest, Units) ASSERT_THAT(lmp->update->unit_style, StrEq("lj")); for (std::size_t i = 0; i < num; ++i) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one(fmt::format("units {}", names[i])); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command(fmt::format("units {}", names[i])); + END_HIDE_OUTPUT(); ASSERT_THAT(lmp->update->unit_style, StrEq(names[i])); ASSERT_EQ(lmp->update->dt, dt[i]); } - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + END_HIDE_OUTPUT(); ASSERT_THAT(lmp->update->unit_style, StrEq("lj")); - TEST_FAILURE(".*ERROR: Illegal units command.*", lmp->input->one("units unknown");); + TEST_FAILURE(".*ERROR: Illegal units command.*", command("units unknown");); } #if defined(LMP_PLUGIN) @@ -442,18 +400,18 @@ TEST_F(SimpleCommandsTest, Plugin) TEST_F(SimpleCommandsTest, Shell) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("shell putenv TEST_VARIABLE=simpletest"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("shell putenv TEST_VARIABLE=simpletest"); + END_HIDE_OUTPUT(); char *test_var = getenv("TEST_VARIABLE"); ASSERT_NE(test_var, nullptr); ASSERT_THAT(test_var, StrEq("simpletest")); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("shell putenv TEST_VARIABLE=simpletest"); - lmp->input->one("shell putenv TEST_VARIABLE2=simpletest2 OTHER_VARIABLE=2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("shell putenv TEST_VARIABLE=simpletest"); + command("shell putenv TEST_VARIABLE2=simpletest2 OTHER_VARIABLE=2"); + END_HIDE_OUTPUT(); char *test_var2 = getenv("TEST_VARIABLE2"); char *other_var = getenv("OTHER_VARIABLE"); @@ -471,32 +429,30 @@ TEST_F(SimpleCommandsTest, CiteMe) lmp->citeme = new LAMMPS_NS::CiteMe(lmp, CiteMe::TERSE, CiteMe::TERSE, nullptr); - ::testing::internal::CaptureStdout(); + BEGIN_CAPTURE_OUTPUT(); lmp->citeme->add("test citation one:\n 1\n"); lmp->citeme->add("test citation two:\n 2\n"); lmp->citeme->add("test citation one:\n 1\n"); lmp->citeme->flush(); - std::string text = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << text; + std::string text = END_CAPTURE_OUTPUT(); // find the two unique citations, but not the third ASSERT_THAT(text, MatchesRegex(".*one.*two.*")); ASSERT_THAT(text, Not(MatchesRegex(".*one.*two.*one.*"))); - ::testing::internal::CaptureStdout(); + BEGIN_CAPTURE_OUTPUT(); lmp->citeme->add("test citation one:\n 0\n"); lmp->citeme->add("test citation two:\n 2\n"); lmp->citeme->add("test citation three:\n 3\n"); lmp->citeme->flush(); - text = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << text; + text = END_CAPTURE_OUTPUT(); // find the forth (only differs in long citation) and sixth added citation ASSERT_THAT(text, MatchesRegex(".*one.*three.*")); ASSERT_THAT(text, Not(MatchesRegex(".*two.*"))); - ::testing::internal::CaptureStdout(); + BEGIN_CAPTURE_OUTPUT(); lmp->citeme->add("test citation one:\n 1\n"); lmp->citeme->add("test citation two:\n 2\n"); lmp->citeme->add("test citation one:\n 0\n"); @@ -504,8 +460,7 @@ TEST_F(SimpleCommandsTest, CiteMe) lmp->citeme->add("test citation three:\n 3\n"); lmp->citeme->flush(); - text = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << text; + text = END_CAPTURE_OUTPUT(); // no new citation. no CITE-CITE-CITE- lines ASSERT_THAT(text, Not(MatchesRegex(".*CITE-CITE-CITE-CITE.*"))); @@ -517,7 +472,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/commands/test_variables.cpp b/unittest/commands/test_variables.cpp new file mode 100644 index 0000000000..97f874a856 --- /dev/null +++ b/unittest/commands/test_variables.cpp @@ -0,0 +1,528 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://lammps.sandia.gov/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "lammps.h" + +#include "atom.h" +#include "domain.h" +#include "group.h" +#include "info.h" +#include "input.h" +#include "math_const.h" +#include "region.h" +#include "variable.h" + +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "../testing/core.h" + +#include +#include + +// whether to print verbose output (i.e. not capturing LAMMPS screen output). +bool verbose = false; + +using LAMMPS_NS::MathConst::MY_PI; +using LAMMPS_NS::utils::split_words; + +namespace LAMMPS_NS { +using ::testing::ExitedWithCode; +using ::testing::MatchesRegex; +using ::testing::StrEq; + + +class VariableTest : public LAMMPSTest { +protected: + Group *group; + Domain *domain; + Variable *variable; + + void SetUp() override + { + testbinary = "VariableTest"; + args = {"-log", "none", "-echo", "screen", "-nocite", "-v", "num", "1"}; + LAMMPSTest::SetUp(); + group = lmp->group; + domain = lmp->domain; + variable = lmp->input->variable; + } + + void TearDown() override + { + LAMMPSTest::TearDown(); + unlink("test_variable.file"); + unlink("test_variable.atomfile"); + } + + void atomic_system() + { + BEGIN_HIDE_OUTPUT(); + command("units real"); + command("lattice sc 1.0 origin 0.125 0.125 0.125"); + command("region box block -2 2 -2 2 -2 2"); + command("create_box 8 box"); + command("create_atoms 1 box"); + command("mass * 1.0"); + command("region left block -2.0 -1.0 INF INF INF INF"); + command("region right block 0.5 2.0 INF INF INF INF"); + command("region top block INF INF -2.0 -1.0 INF INF"); + command("set region left type 2"); + command("set region right type 3"); + END_HIDE_OUTPUT(); + } + + void molecular_system() + { + BEGIN_HIDE_OUTPUT(); + command("fix props all property/atom mol rmass q"); + END_HIDE_OUTPUT(); + atomic_system(); + BEGIN_HIDE_OUTPUT(); + command("variable molid atom floor(id/4)+1"); + command("variable charge atom 2.0*sin(PI/32*id)"); + command("set atom * mol v_molid"); + command("set atom * charge v_charge"); + command("set type 1 mass 0.5"); + command("set type 2*4 mass 2.0"); + END_HIDE_OUTPUT(); + } + + void file_vars() + { + FILE *fp = fopen("test_variable.file", "w"); + fputs("# test file for file style variable\n\n\none\n two \n\n" + "three # with comment\nfour ! with non-comment\n" + "# comments only\n five\n#END\n", + fp); + fclose(fp); + fp = fopen("test_variable.atomfile", "w"); + + fputs("# test file for atomfile style variable\n\n" + "4 # four lines\n4 0.5 #with comment\n" + "2 -0.5 \n3 1.5\n1 -1.5\n\n" + "2\n10 1.0 # test\n13 1.0\n\n######\n" + "4\n1 4.0 # test\n2 3.0\n3 2.0\n4 1.0\n#END\n", + fp); + fclose(fp); + } +}; + +TEST_F(VariableTest, CreateDelete) +{ + file_vars(); + ASSERT_EQ(variable->nvar, 1); + BEGIN_HIDE_OUTPUT(); + command("variable one index 1 2 3 4"); + command("variable two equal 1"); + command("variable two equal 2"); + command("variable three string four"); + command("variable three string three"); + command("variable four1 loop 4"); + command("variable four2 loop 2 4"); + command("variable five1 loop 100 pad"); + command("variable five2 loop 10 200 pad"); + command("variable six world one"); + command("variable seven format two \"%5.2f\""); + command("variable eight getenv PWD"); + command("variable eight getenv XXXXX"); + command("variable nine file test_variable.file"); + command("variable ten internal 1.0"); + command("variable ten internal 10.0"); + command("variable ten1 universe 1 2 3 4"); + command("variable ten2 uloop 4"); + command("variable ten3 uloop 4 pad"); + command("variable dummy index 0"); + command("variable file equal is_file(MYFILE)"); + END_HIDE_OUTPUT(); + ASSERT_EQ(variable->nvar, 18); + BEGIN_HIDE_OUTPUT(); + command("variable dummy delete"); + END_HIDE_OUTPUT(); + ASSERT_EQ(variable->nvar, 17); + ASSERT_THAT(variable->retrieve("three"), StrEq("three")); + variable->set_string("three", "four"); + ASSERT_THAT(variable->retrieve("three"), StrEq("four")); + ASSERT_THAT(variable->retrieve("four2"), StrEq("2")); + ASSERT_THAT(variable->retrieve("five1"), StrEq("001")); + ASSERT_THAT(variable->retrieve("seven"), StrEq(" 2.00")); + ASSERT_THAT(variable->retrieve("ten"), StrEq("1")); + ASSERT_THAT(variable->retrieve("eight"), StrEq("")); + variable->internal_set(variable->find("ten"), 2.5); + ASSERT_THAT(variable->retrieve("ten"), StrEq("2.5")); + ASSERT_THAT(variable->retrieve("file"), StrEq("0")); + FILE *fp = fopen("MYFILE","w"); + fputs(" ",fp); + fclose(fp); + ASSERT_THAT(variable->retrieve("file"), StrEq("1")); + unlink("MYFILE"); + ASSERT_THAT(variable->retrieve("file"), StrEq("0")); + + ASSERT_EQ(variable->equalstyle(variable->find("one")), 0); + ASSERT_EQ(variable->equalstyle(variable->find("two")), 1); + ASSERT_EQ(variable->equalstyle(variable->find("ten")), 1); + + ASSERT_EQ(variable->internalstyle(variable->find("two")), 0); + ASSERT_EQ(variable->internalstyle(variable->find("ten")), 1); + + TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable");); + TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy index");); + TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy delete xxx");); + TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy loop -1");); + TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy loop 10 1");); + TEST_FAILURE(".*ERROR: Illegal variable command.*", command("variable dummy xxxx");); + TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*", + command("variable two string xxx");); + TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*", + command("variable two getenv xxx");); + TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*", + command("variable one equal 2");); + TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*", + command("variable one internal 2");); + TEST_FAILURE(".*ERROR: Cannot use atomfile-style variable unless an atom map exists.*", + command("variable eleven atomfile test_variable.atomfile");); + TEST_FAILURE(".*ERROR on proc 0: Cannot open file variable file test_variable.xxx.*", + command("variable nine1 file test_variable.xxx");); + TEST_FAILURE(".*ERROR: World variable count doesn't match # of partitions.*", + command("variable ten10 world xxx xxx");); + TEST_FAILURE(".*ERROR: All universe/uloop variables must have same # of values.*", + command("variable ten4 uloop 2");); + TEST_FAILURE(".*ERROR: Incorrect conversion in format string.*", + command("variable ten11 format two \"%08f\"");); + TEST_FAILURE(".*ERROR: Variable name 'ten@12' must have only alphanumeric characters or.*", + command("variable ten@12 index one two three");); + TEST_FAILURE(".*ERROR: Variable evaluation before simulation box is defined.*", + variable->compute_equal("c_thermo_press");); + TEST_FAILURE(".*ERROR: Invalid variable reference v_unknown in variable formula.*", + variable->compute_equal("v_unknown");); +} + +TEST_F(VariableTest, AtomicSystem) +{ + HIDE_OUTPUT([&] { command("atom_modify map array"); }); + atomic_system(); + file_vars(); + + BEGIN_HIDE_OUTPUT(); + command("variable one index 1 2 3 4"); + command("variable id atom type"); + command("variable id atom id"); + command("variable ten atomfile test_variable.atomfile"); + + command("compute press all pressure NULL pair"); + command("compute rg all gyration"); + command("compute vacf all vacf"); + command("fix press all ave/time 1 1 1 c_press mode vector"); + command("fix rg all ave/time 1 1 1 c_rg mode vector"); + command("fix vacf all ave/time 1 1 1 c_vacf mode vector"); + + command("variable press vector f_press"); + command("variable rg vector f_rg"); + command("variable vacf vector f_vacf"); + command("variable press vector f_press+0.0"); + command("variable self vector v_self+f_press"); + command("variable circle vector f_press+v_circle"); + command("variable sum vector v_press+v_rg"); + command("variable sum2 vector v_vacf+v_rg"); + command("variable pmax equal max(v_press)"); + command("variable psum equal sum(v_press)"); + command("variable rgmax equal max(v_rg)"); + command("variable rgsum equal sum(v_rg)"); + command("variable loop equal v_loop+1"); + command("run 0 post no"); + END_HIDE_OUTPUT(); + + ASSERT_EQ(variable->atomstyle(variable->find("one")), 0); + ASSERT_EQ(variable->atomstyle(variable->find("id")), 1); + ASSERT_EQ(variable->atomstyle(variable->find("ten")), 1); + + ASSERT_EQ(variable->vectorstyle(variable->find("one")), 0); + ASSERT_EQ(variable->vectorstyle(variable->find("press")), 1); + + ASSERT_DOUBLE_EQ(variable->compute_equal("v_pmax"), 0.0); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_psum"), 0.0); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_rgmax"), 1.25); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_rgsum"), 3.75); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_sum[1]"), 1.25); + + TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*", + command("variable one atom x");); + TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*", + command("variable one vector f_press");); + TEST_FAILURE(".*ERROR on proc 0: Cannot open file variable file test_variable.xxx.*", + command("variable ten1 atomfile test_variable.xxx");); + TEST_FAILURE(".*ERROR: Variable loop: has a circular dependency.*", + variable->compute_equal("v_loop");); + TEST_FAILURE(".*Variable self: Vector-style variable in equal-style variable formula.*", + variable->compute_equal("v_self");); + TEST_FAILURE(".*ERROR: Variable sum2: Inconsistent lengths in vector-style variable.*", + variable->compute_equal("max(v_sum2)");); +} + +TEST_F(VariableTest, Expressions) +{ + atomic_system(); + BEGIN_HIDE_OUTPUT(); + command("variable one index 1"); + command("variable two equal 2"); + command("variable three equal v_one+v_two"); + command("variable four equal PI"); + command("variable five equal version"); + command("variable six equal XXX"); + command("variable seven equal -v_one"); + command("variable eight equal v_three-0.5"); + command("variable nine equal v_two*(v_one+v_three)"); + command("variable ten equal (1.0/v_two)^2"); + command("variable eleven equal v_three%2"); + command("variable twelve equal 1==2"); + command("variable ten3 equal 1!=v_two"); + command("variable ten4 equal 1<2"); + command("variable ten5 equal 2>1"); + command("variable ten6 equal (1<=v_one)&&(v_ten>=0.2)"); + command("variable ten7 equal !(12)+(1>=2)+(1&&0)+(0||0)+(1|^1)+10^0"); + command("variable ten12 equal yes+no+on+off+true+false"); + command("variable err1 equal v_one/v_ten7"); + command("variable err2 equal v_one%v_ten7"); + command("variable err3 equal v_ten7^-v_one"); + variable->set("dummy index 1 2"); + END_HIDE_OUTPUT(); + + int ivar = variable->find("one"); + ASSERT_FALSE(variable->equalstyle(ivar)); + ivar = variable->find("two"); + ASSERT_TRUE(variable->equalstyle(ivar)); + ASSERT_DOUBLE_EQ(variable->compute_equal(ivar), 2.0); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_three"), 3.0); + ASSERT_FLOAT_EQ(variable->compute_equal("v_four"), MY_PI); + ASSERT_GE(variable->compute_equal("v_five"), 20210310); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_seven"), -1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_eight"), 2.5); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_nine"), 8); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten"), 0.25); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_eleven"), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_twelve"), 0); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten3"), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten4"), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten5"), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten6"), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten7"), 0); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten8"), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten10"), 100); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten11"), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_ten12"), 3); + + TEST_FAILURE(".*ERROR: Variable six: Invalid thermo keyword 'XXX' in variable formula.*", + command("print \"${six}\"");); + TEST_FAILURE(".*ERROR: Variable ten9: has a circular dependency.*", + command("print \"${ten9}\"");); + TEST_FAILURE(".*ERROR on proc 0: Variable err1: Divide by 0 in variable formula.*", + command("print \"${err1}\"");); + TEST_FAILURE(".*ERROR on proc 0: Variable err2: Modulo 0 in variable formula.*", + command("print \"${err2}\"");); + TEST_FAILURE(".*ERROR on proc 0: Variable err3: Invalid power expression in variable formula.*", + command("print \"${err3}\"");); +} + +TEST_F(VariableTest, Functions) +{ + atomic_system(); + file_vars(); + + BEGIN_HIDE_OUTPUT(); + command("variable seed index 643532"); + command("variable one index 1"); + command("variable two equal random(1,2,v_seed)"); + command("variable three equal atan2(v_one,1)"); + command("variable four equal atan2()"); + command("variable five equal sqrt(v_one+v_one)"); + command("variable six equal exp(ln(0.1))"); + command("variable seven equal abs(log(1.0/100.0))"); + command("variable eight equal 0.5*PI"); + command("variable nine equal round(sin(v_eight)+cos(v_eight))"); + command("variable ten equal floor(1.85)+ceil(1.85)"); + command("variable ten1 equal tan(v_eight/2.0)"); + command("variable ten2 equal asin(-1.0)+acos(0.0)"); + command("variable ten3 equal floor(100*random(0.2,0.8,v_seed)+1)"); + END_HIDE_OUTPUT(); + + ASSERT_GT(variable->compute_equal(variable->find("two")), 0.99); + ASSERT_LT(variable->compute_equal(variable->find("two")), 2.01); + ASSERT_DOUBLE_EQ(variable->compute_equal(variable->find("three")), 0.25 * MY_PI); + ASSERT_DOUBLE_EQ(variable->compute_equal(variable->find("five")), sqrt(2.0)); + ASSERT_DOUBLE_EQ(variable->compute_equal(variable->find("six")), 0.1); + ASSERT_DOUBLE_EQ(variable->compute_equal(variable->find("seven")), 2); + ASSERT_DOUBLE_EQ(variable->compute_equal(variable->find("nine")), 1); + ASSERT_DOUBLE_EQ(variable->compute_equal(variable->find("ten")), 3); + ASSERT_FLOAT_EQ(variable->compute_equal(variable->find("ten1")), 1); + ASSERT_GT(variable->compute_equal(variable->find("ten3")), 19); + ASSERT_LT(variable->compute_equal(variable->find("ten3")), 81); + + TEST_FAILURE(".*ERROR: Variable four: Invalid syntax in variable formula.*", + command("print \"${four}\"");); +} + +TEST_F(VariableTest, IfCommand) +{ + BEGIN_HIDE_OUTPUT(); + command("variable one index 1"); + END_HIDE_OUTPUT(); + + BEGIN_CAPTURE_OUTPUT(); + command("if 1>0 then 'print \"bingo!\"'"); + auto text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if 1>2 then 'print \"bingo!\"' else 'print \"nope?\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*nope\?.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if (1<=0) then 'print \"bingo!\"' else 'print \"nope?\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*nope\?.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if (-1.0e-1<0.0E+0)|^(1<0) then 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if (${one}==1.0)&&(2>=1) then 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if !((${one}!=1.0)||(2|^1)) then 'print \"missed\"' else 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if (1>=2)&&(0&&1) then 'print \"missed\"' else 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if !1 then 'print \"missed\"' else 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if !(a==b) then 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if x==x|^1==0 then 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + BEGIN_CAPTURE_OUTPUT(); + command("if x!=x|^a!=b then 'print \"bingo!\"'"); + text = END_CAPTURE_OUTPUT(); + + ASSERT_THAT(text, MatchesRegex(".*bingo!.*")); + + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if () then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if \"1 1\" then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if 1a then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if 1=<2 then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if 1!=a then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if 1&<2 then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if 1|<2 then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if (1)( then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if (1)1 then 'print \"bingo!\"'");); + TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*", + command("if (v_one==1.0)&&(2>=1) then 'print \"bingo!\"'");); +} + +TEST_F(VariableTest, NextCommand) +{ + file_vars(); + + BEGIN_HIDE_OUTPUT(); + command("variable one index 1 2"); + command("variable two equal 2"); + command("variable three file test_variable.file"); + command("variable four loop 2 4"); + command("variable five index 1 2"); + END_HIDE_OUTPUT(); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_one"), 1); + ASSERT_THAT(variable->retrieve("three"), StrEq("one")); + BEGIN_HIDE_OUTPUT(); + command("next one"); + command("next three"); + END_HIDE_OUTPUT(); + ASSERT_DOUBLE_EQ(variable->compute_equal("v_one"), 2); + ASSERT_THAT(variable->retrieve("three"), StrEq("two")); + ASSERT_GE(variable->find("one"), 0); + BEGIN_HIDE_OUTPUT(); + command("next one"); + command("next three"); + END_HIDE_OUTPUT(); + // index style variable is deleted if no more next element + ASSERT_EQ(variable->find("one"), -1); + ASSERT_GE(variable->find("three"), 0); + BEGIN_HIDE_OUTPUT(); + command("next three"); + command("next three"); + command("next three"); + END_HIDE_OUTPUT(); + // file style variable is deleted if no more next element + ASSERT_EQ(variable->find("three"), -1); + + TEST_FAILURE(".*ERROR: Illegal next command.*", command("next");); + TEST_FAILURE(".*ERROR: Invalid variable 'xxx' in next command.*", command("next xxx");); + TEST_FAILURE(".*ERROR: Invalid variable style with next command.*", command("next two");); + TEST_FAILURE(".*ERROR: All variables in next command must have same style.*", + command("next five four");); +} +} // namespace LAMMPS_NS + +int main(int argc, char **argv) +{ + MPI_Init(&argc, &argv); + ::testing::InitGoogleMock(&argc, argv); + + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) + std::cout << "Warning: using OpenMPI without exceptions. " + "Death tests will be skipped\n"; + + // handle arguments passed via environment variable + if (const char *var = getenv("TEST_ARGS")) { + std::vector env = split_words(var); + for (auto arg : env) { + if (arg == "-v") { + verbose = true; + } + } + } + + if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true; + + int rv = RUN_ALL_TESTS(); + MPI_Finalize(); + return rv; +} diff --git a/unittest/force-styles/test_angle_style.cpp b/unittest/force-styles/test_angle_style.cpp index 7f07052b3d..8cef78c6f8 100644 --- a/unittest/force-styles/test_angle_style.cpp +++ b/unittest/force-styles/test_angle_style.cpp @@ -307,7 +307,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) // init_forces block.clear(); - auto f = lmp->atom->f; + auto f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); @@ -327,7 +327,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) writer.emit_block("run_stress", block); block.clear(); - f = lmp->atom->f; + f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); diff --git a/unittest/force-styles/test_bond_style.cpp b/unittest/force-styles/test_bond_style.cpp index a4956006f5..fa9f8fbc02 100644 --- a/unittest/force-styles/test_bond_style.cpp +++ b/unittest/force-styles/test_bond_style.cpp @@ -307,7 +307,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) // init_forces block.clear(); - auto f = lmp->atom->f; + auto f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); @@ -327,7 +327,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) writer.emit_block("run_stress", block); block.clear(); - f = lmp->atom->f; + f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); diff --git a/unittest/force-styles/test_config_reader.cpp b/unittest/force-styles/test_config_reader.cpp index 4ef3692f56..d4d9d3c854 100644 --- a/unittest/force-styles/test_config_reader.cpp +++ b/unittest/force-styles/test_config_reader.cpp @@ -53,17 +53,17 @@ TestConfigReader::TestConfigReader(TestConfig &config) : YamlReader(), config(co consumers["global_scalar"] = &TestConfigReader::global_scalar; consumers["global_vector"] = &TestConfigReader::global_vector; - consumers["bond_style"] = &TestConfigReader::bond_style; - consumers["bond_coeff"] = &TestConfigReader::bond_coeff; - consumers["angle_style"] = &TestConfigReader::angle_style; - consumers["angle_coeff"] = &TestConfigReader::angle_coeff; + consumers["bond_style"] = &TestConfigReader::bond_style; + consumers["bond_coeff"] = &TestConfigReader::bond_coeff; + consumers["angle_style"] = &TestConfigReader::angle_style; + consumers["angle_coeff"] = &TestConfigReader::angle_coeff; consumers["dihedral_style"] = &TestConfigReader::dihedral_style; consumers["dihedral_coeff"] = &TestConfigReader::dihedral_coeff; consumers["improper_style"] = &TestConfigReader::improper_style; consumers["improper_coeff"] = &TestConfigReader::improper_coeff; - consumers["init_energy"] = &TestConfigReader::init_energy; - consumers["run_energy"] = &TestConfigReader::run_energy; - consumers["equilibrium"] = &TestConfigReader::equilibrium; + consumers["init_energy"] = &TestConfigReader::init_energy; + consumers["run_energy"] = &TestConfigReader::run_energy; + consumers["equilibrium"] = &TestConfigReader::equilibrium; } void TestConfigReader::prerequisites(const yaml_event_t &event) diff --git a/unittest/force-styles/test_dihedral_style.cpp b/unittest/force-styles/test_dihedral_style.cpp index 6dd6a3f205..81df454fcc 100644 --- a/unittest/force-styles/test_dihedral_style.cpp +++ b/unittest/force-styles/test_dihedral_style.cpp @@ -310,7 +310,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) // init_forces block.clear(); - auto f = lmp->atom->f; + auto f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); @@ -330,7 +330,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) writer.emit_block("run_stress", block); block.clear(); - f = lmp->atom->f; + f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); diff --git a/unittest/force-styles/test_improper_style.cpp b/unittest/force-styles/test_improper_style.cpp index 1b97f38faf..33d95820bd 100644 --- a/unittest/force-styles/test_improper_style.cpp +++ b/unittest/force-styles/test_improper_style.cpp @@ -301,7 +301,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) // init_forces block.clear(); - auto f = lmp->atom->f; + auto f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); @@ -321,7 +321,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) writer.emit_block("run_stress", block); block.clear(); - f = lmp->atom->f; + f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); diff --git a/unittest/force-styles/test_pair_style.cpp b/unittest/force-styles/test_pair_style.cpp index fd8d306538..edfad1f923 100644 --- a/unittest/force-styles/test_pair_style.cpp +++ b/unittest/force-styles/test_pair_style.cpp @@ -307,7 +307,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) // init_forces block.clear(); - auto f = lmp->atom->f; + auto f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); @@ -330,7 +330,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config) writer.emit_block("run_stress", block); block.clear(); - f = lmp->atom->f; + f = lmp->atom->f; for (int i = 1; i <= natoms; ++i) { const int j = lmp->atom->map(i); block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, f[j][0], f[j][1], f[j][2]); @@ -829,9 +829,8 @@ TEST(PairStyle, intel) GTEST_SKIP(); } - if ((test_config.pair_style == "rebo") - || utils::strmatch(test_config.pair_style, "^dpd") - || utils::strmatch(test_config.pair_style, "^tersoff.* shift ")) { + if ((test_config.pair_style == "rebo") || utils::strmatch(test_config.pair_style, "^dpd") || + utils::strmatch(test_config.pair_style, "^tersoff.* shift ")) { std::cerr << "Skipping pair style " << lmp->force->pair_style << "\n"; if (!verbose) ::testing::internal::CaptureStdout(); cleanup_lammps(lmp, test_config); diff --git a/unittest/force-styles/tests/dihedral-table_cut_linear.yaml b/unittest/force-styles/tests/dihedral-table_cut_linear.yaml new file mode 100644 index 0000000000..c34c6269de --- /dev/null +++ b/unittest/force-styles/tests/dihedral-table_cut_linear.yaml @@ -0,0 +1,86 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Tue Mar 23 08:05:02 202 +epsilon: 1e-14 +prerequisites: ! | + atom full + dihedral table/cut +pre_commands: ! "" +post_commands: ! "" +input_file: in.fourmol +dihedral_style: table/cut linear 3600 +dihedral_coeff: ! | + 1 aat 1.00 170 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_1 + 2 aat 1.00 170 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_2 + 3 aat 0.50 175 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_3 + 4 aat 1.00 170 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_4 + 5 aat 0.25 170 175 ${input_dir}/harmonic_dihedral.txt HARMONIC_5 +extract: ! "" +natoms: 29 +init_energy: 552.225725624496 +init_stress: ! |- + -7.4008882268909986e+01 1.3648518393804071e+02 -6.2476301669130748e+01 3.4620215707793108e+01 1.3017899329318067e+02 1.9706621502063012e+02 +init_forces: ! |2 + 1 -8.1198888996808620e+01 7.1073378215839497e+01 -1.1918247546822441e+02 + 2 3.8575810899979956e+01 -1.9920126773772417e+01 1.8847596663648414e+01 + 3 1.0913741754895571e+02 -7.1292512160682776e+01 7.5572753355603993e+01 + 4 -4.7848742793736733e+01 -7.5245295675494663e+00 6.4464643610526949e+01 + 5 -1.5539692023725792e+01 5.7172364237479494e+00 -1.3226941634858840e+00 + 6 -1.1355716924924745e+02 -8.6143836335725510e+01 -5.7299648623432482e+00 + 7 4.1372375526613887e+01 4.5139121695653614e+01 -7.4310043691848229e+00 + 8 2.1399043677828325e+02 1.8625470581545247e+02 -3.3675100353189755e+00 + 9 5.2653582674682809e+01 5.6583201775589529e+01 -2.5669664860295835e+01 + 10 -4.7984520275438535e+02 -5.1382692638722949e+02 -1.3749287390453020e+02 + 11 1.6539670687119863e+02 1.4091972117987351e+02 -1.2657881071783035e+02 + 12 3.4200742496423310e+01 1.2794076077133660e+02 2.3610219433759886e+02 + 13 1.8270592580559917e+00 4.1997746033241778e+00 8.8146411631557697e+00 + 14 1.8694466162959706e+01 -2.6013807510038696e+01 -9.2498849040619788e+00 + 15 -6.2869548680867373e+00 2.1284514172388507e+00 -6.4318098210331209e+00 + 16 -1.0694908795819050e+02 -5.9251517113768401e+01 1.0405679351593225e+01 + 17 1.7537714042702788e+02 1.4401690395071051e+02 2.8249184624181581e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +run_energy: 549.782031215547 +run_stress: ! |- + -7.5056949042919044e+01 1.3698944188847955e+02 -6.1932492845560127e+01 3.3581673544215263e+01 1.2888596290133776e+02 1.9565093507759894e+02 +run_forces: ! |2 + 1 -8.1850261118769851e+01 7.1565857666082792e+01 -1.1998194154132169e+02 + 2 3.8942730288029111e+01 -2.0139091742218607e+01 1.9096837462073495e+01 + 3 1.0933304895917627e+02 -7.1974713700542679e+01 7.7222647280784500e+01 + 4 -4.7578796179763913e+01 -7.4260553823873163e+00 6.4056709071407184e+01 + 5 -1.5573770424692153e+01 5.7360778752676689e+00 -1.3292716784107659e+00 + 6 -1.1205401245818740e+02 -8.3930835846975214e+01 -6.4629873083122060e+00 + 7 4.1368235883807785e+01 4.5098977123947911e+01 -7.4207495093494247e+00 + 8 2.1112963982593271e+02 1.8319846795829790e+02 -4.5077247269703236e+00 + 9 5.2596180125216748e+01 5.6303309547815658e+01 -2.5556604563933746e+01 + 10 -4.8079664429997507e+02 -5.1197713825609452e+02 -1.3418905325289452e+02 + 11 1.6804796981040414e+02 1.4157399298542791e+02 -1.2667138198231208e+02 + 12 3.3945852325507303e+01 1.2661718822016165e+02 2.3437614824953252e+02 + 13 1.8225699822433148e+00 4.1983174055270061e+00 8.8273571873798709e+00 + 14 1.8256498023781354e+01 -2.5354302062650923e+01 -8.9739201991677255e+00 + 15 -6.2761226111239754e+00 2.1261045368019413e+00 -6.4368032911012207e+00 + 16 -1.0841619930894663e+02 -6.1089982213467948e+01 9.6877249595793860e+00 + 17 1.7710308117736014e+02 1.4547382588500676e+02 2.8263013843016775e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +... diff --git a/unittest/force-styles/tests/dihedral-table_cut_spline.yaml b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml new file mode 100644 index 0000000000..9148e0a80d --- /dev/null +++ b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml @@ -0,0 +1,86 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Tue Mar 23 08:06:45 202 +epsilon: 1e-14 +prerequisites: ! | + atom full + dihedral table/cut +pre_commands: ! "" +post_commands: ! "" +input_file: in.fourmol +dihedral_style: table/cut spline 3600 +dihedral_coeff: ! | + 1 aat 1.00 170 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_1 + 2 aat 1.00 170 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_2 + 3 aat 0.50 175 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_3 + 4 aat 1.00 170 180 ${input_dir}/harmonic_dihedral.txt HARMONIC_4 + 5 aat 0.25 170 175 ${input_dir}/harmonic_dihedral.txt HARMONIC_5 +extract: ! "" +natoms: 29 +init_energy: 552.218725263499 +init_stress: ! |- + -7.4019824552159534e+01 1.3649499111894895e+02 -6.2475166566789284e+01 3.4617375151088808e+01 1.3019745657214429e+02 1.9709007795400348e+02 +init_forces: ! |2 + 1 -8.1213286444115909e+01 7.1080525227994045e+01 -1.1918872501604099e+02 + 2 3.8585732128399350e+01 -1.9925249987601369e+01 1.8852444035804549e+01 + 3 1.0914957240045973e+02 -7.1293677289031876e+01 7.5564572526931997e+01 + 4 -4.7856039321211888e+01 -7.5256880640368262e+00 6.4474469548287303e+01 + 5 -1.5540068306011690e+01 5.7173997377718440e+00 -1.3227187051350375e+00 + 6 -1.1356202282295826e+02 -8.6148464023143134e+01 -5.7287967059654719e+00 + 7 4.1373182001548223e+01 4.5140001882310173e+01 -7.4311492797065428e+00 + 8 2.1400860040790070e+02 1.8627156816363441e+02 -3.3695416437372394e+00 + 9 5.2656207239745335e+01 5.6586006420025306e+01 -2.5670940543260770e+01 + 10 -4.7989294342864497e+02 -5.1388484267202580e+02 -1.3749831844924219e+02 + 11 1.6541995228367492e+02 1.4093778373411678e+02 -1.2659553837843652e+02 + 12 3.4200230035629019e+01 1.2795430859179336e+02 2.3612094879489862e+02 + 13 1.8271828366360419e+00 4.2000586675545639e+00 8.8152373675940172e+00 + 14 1.8695088969660507e+01 -2.6014674160815950e+01 -9.2501930642549315e+00 + 15 -6.2873518284233292e+00 2.1285858083405422e+00 -6.4322159275576647e+00 + 16 -1.0696654386912348e+02 -5.9261377200437906e+01 1.0407194734343612e+01 + 17 1.7540250771683571e+02 1.4403773516355190e+02 2.8253270705477313e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +run_energy: 549.770211120194 +run_stress: ! |- + -7.5054671721636595e+01 1.3699895801893166e+02 -6.1944286297295179e+01 3.3587137063275613e+01 1.2891678447538322e+02 1.9568224888755336e+02 +run_forces: ! |2 + 1 -8.1862157367941563e+01 7.1571534225465314e+01 -1.1998648925690665e+02 + 2 3.8950856557592253e+01 -2.0143295233943885e+01 1.9100831488650599e+01 + 3 1.0934424273562679e+02 -7.1974764063434151e+01 7.7213177208305225e+01 + 4 -4.7585717040630072e+01 -7.4272048534134285e+00 6.4066017644735453e+01 + 5 -1.5574231365780285e+01 5.7363230482123928e+00 -1.3292888747698781e+00 + 6 -1.1207625383797915e+02 -8.3953260935523502e+01 -6.4560404254467478e+00 + 7 4.1369305653963607e+01 4.5100137884474947e+01 -7.4209393875477607e+00 + 8 2.1117769556228862e+02 1.8324468258252551e+02 -4.5178766251241402e+00 + 9 5.2599757474211380e+01 5.6307064747883963e+01 -2.5558323416528047e+01 + 10 -4.8085705384233728e+02 -5.1205238742034794e+02 -1.3420522978505346e+02 + 11 1.6806394787511115e+02 1.4159239612328381e+02 -1.2668631632096621e+02 + 12 3.3951439786882119e+01 1.2663190154365350e+02 2.3440594816333368e+02 + 13 1.8227069769227078e+00 4.1986314416593373e+00 8.8280212719479678e+00 + 14 1.8256647570003278e+01 -2.5354504765353397e+01 -8.9739916559242712e+00 + 15 -6.2764595167862440e+00 2.1262187967343880e+00 -6.4371500960467092e+00 + 16 -1.0842617323615015e+02 -6.1092389588080550e+01 9.6917320121684938e+00 + 17 1.7712144601500279e+02 1.4548891646620359e+02 2.8265918055172548e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +... diff --git a/unittest/force-styles/tests/dihedral-table_linear.yaml b/unittest/force-styles/tests/dihedral-table_linear.yaml new file mode 100644 index 0000000000..7e2a7d55c1 --- /dev/null +++ b/unittest/force-styles/tests/dihedral-table_linear.yaml @@ -0,0 +1,86 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Mon Mar 22 21:19:05 202 +epsilon: 1e-14 +prerequisites: ! | + atom full + dihedral table +pre_commands: ! "" +post_commands: ! "" +input_file: in.fourmol +dihedral_style: table linear 3600 +dihedral_coeff: ! | + 1 ${input_dir}/harmonic_dihedral.txt HARMONIC_1 + 2 ${input_dir}/harmonic_dihedral.txt HARMONIC_2 + 3 ${input_dir}/harmonic_dihedral.txt HARMONIC_3 + 4 ${input_dir}/harmonic_dihedral.txt HARMONIC_4 + 5 ${input_dir}/harmonic_dihedral.txt HARMONIC_5 +extract: ! "" +natoms: 29 +init_energy: 789.184256783584 +init_stress: ! |- + -1.6165501104216639e+02 -7.4114380315441565e+01 2.3576939135760787e+02 -2.3488521541598647e+02 3.4341737187983938e+02 -1.5959461001900144e+02 +init_forces: ! |2 + 1 -2.1498835469576278e+01 4.0242705861631180e+01 -9.0007821437717382e+01 + 2 -8.2018888113291979e+00 4.2353656629457461e+00 -4.0073270940910781e+00 + 3 9.1203773212580060e+01 -1.3765900530865244e+02 8.1977349479812418e+01 + 4 -4.8195100042546727e+01 -8.0451084249021534e+00 6.4747111681716376e+01 + 5 -6.2251242080533295e+01 2.2803637398534534e+01 -5.3285420895267421e+00 + 6 9.1265646559106216e+01 1.3743040689865262e+02 -3.9343488033831335e+01 + 7 -4.7432736093120091e+01 -5.1202947877496094e+01 8.4096202947719512e+00 + 8 2.2566883016909227e+02 1.6219571012359663e+02 5.7664673263129927e+01 + 9 -2.0799357954651114e+00 5.0308583175017674e+00 -7.5442843674616533e-01 + 10 -4.0472227269030174e+02 -4.7265020465440665e+02 -9.9994880868353093e+01 + 11 3.9893735247972799e+01 2.0808487532188158e+02 -1.3663466833430391e+02 + 12 6.2491147091194719e+01 7.0245646325825419e+01 1.9568453298435855e+02 + 13 2.9232948128895806e+01 6.7196393653186874e+01 1.4103425861049234e+02 + 14 7.2097046578806413e+01 -1.0032480603588586e+02 -3.5673090473056490e+01 + 15 -1.0059127788938771e+02 3.4055222675821568e+01 -1.0290895713652986e+02 + 16 -9.2256978542416007e+01 -1.2565565388894508e+02 -6.3113527034307076e+01 + 17 1.7537714042702783e+02 1.4401690395071046e+02 2.8249184624181567e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +run_energy: 786.199103735512 +run_stress: ! |- + -1.5979555001643004e+02 -7.4781079673606996e+01 2.3457662969003690e+02 -2.3349637150864024e+02 3.4159374485946643e+02 -1.5956254217954015e+02 +run_forces: ! |2 + 1 -2.2291107377203105e+01 4.0666970718627333e+01 -9.0497211256380396e+01 + 2 -7.6875363073287559e+00 3.9737486142840055e+00 -3.7620801734312614e+00 + 3 9.2103819928191996e+01 -1.3743335232167533e+02 8.2431881459386020e+01 + 4 -4.8290666517219691e+01 -8.1170776132331781e+00 6.4779991104261541e+01 + 5 -6.2246983418905813e+01 2.2813785810311227e+01 -5.3751809499241965e+00 + 6 9.1087481738151070e+01 1.3760819705271160e+02 -3.9500650484032505e+01 + 7 -4.6891554381909977e+01 -5.0621074446115216e+01 8.3775716071879351e+00 + 8 2.2268693398316259e+02 1.5891760123847899e+02 5.7199245600838793e+01 + 9 -1.3435027007714808e+00 5.5949363550589339e+00 -1.0517595721340651e+00 + 10 -4.0565110153193677e+02 -4.7084401363160805e+02 -9.7618847422734831e+01 + 11 4.2251495153612957e+01 2.0872309038043886e+02 -1.3675117078222070e+02 + 12 6.2352820175292266e+01 6.8729440749361473e+01 1.9366789701210121e+02 + 13 2.9032540154457664e+01 6.7387205615336427e+01 1.4127076790322786e+02 + 14 7.1580926568596425e+01 -9.9385928393915108e+01 -3.5110636800452511e+01 + 15 -1.0011174024358218e+02 3.3796455380232061e+01 -1.0280446675457922e+02 + 16 -9.3357186802666320e+01 -1.2692958041908989e+02 -6.3465822450651899e+01 + 17 1.7677536158005910e+02 1.4511959491079591e+02 2.8210471959538260e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +... diff --git a/unittest/force-styles/tests/dihedral-table_spline.yaml b/unittest/force-styles/tests/dihedral-table_spline.yaml new file mode 100644 index 0000000000..90aab98fba --- /dev/null +++ b/unittest/force-styles/tests/dihedral-table_spline.yaml @@ -0,0 +1,86 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Mon Mar 22 21:19:05 202 +epsilon: 1e-14 +prerequisites: ! | + atom full + dihedral table +pre_commands: ! "" +post_commands: ! "" +input_file: in.fourmol +dihedral_style: table spline 3600 +dihedral_coeff: ! | + 1 ${input_dir}/harmonic_dihedral.txt HARMONIC_1 + 2 ${input_dir}/harmonic_dihedral.txt HARMONIC_2 + 3 ${input_dir}/harmonic_dihedral.txt HARMONIC_3 + 4 ${input_dir}/harmonic_dihedral.txt HARMONIC_4 + 5 ${input_dir}/harmonic_dihedral.txt HARMONIC_5 +extract: ! "" +natoms: 29 +init_energy: 789.17395865366 +init_stress: ! |- + -1.6167160198618581e+02 -7.4120077515581954e+01 2.3579167950176785e+02 -2.3490764576822448e+02 3.4342184840668585e+02 -1.5962456212434762e+02 +init_forces: ! |2 + 1 -2.1511698354927645e+01 4.0249060385771472e+01 -9.0013321064696271e+01 + 2 -8.1931699818042816e+00 4.2308633547530370e+00 -4.0030671970615401e+00 + 3 9.1213724085941266e+01 -1.3766351443388791e+02 8.1969246814730084e+01 + 4 -4.8202572709944334e+01 -8.0465316616826055e+00 6.4757081268568328e+01 + 5 -6.2252471687916213e+01 2.2804485237535822e+01 -5.3285277358374286e+00 + 6 9.1271091175285207e+01 1.3743691094855717e+02 -3.9344000146381845e+01 + 7 -4.7435622491834799e+01 -5.1206081227011012e+01 8.4101355534202042e+00 + 8 2.2568717307036252e+02 1.6221073791401761e+02 5.7667169771245945e+01 + 9 -2.0794865262354030e+00 5.0314964866185363e+00 -7.5468527912272698e-01 + 10 -4.0476567716026062e+02 -4.7270660864081441e+02 -9.9999223852109083e+01 + 11 3.9909170153607846e+01 2.0810704891869841e+02 -1.3665197982219311e+02 + 12 6.2493704712199360e+01 7.0253447706808217e+01 1.9569964315907762e+02 + 13 2.9234925386176613e+01 6.7200938680873065e+01 1.4104379788150430e+02 + 14 7.2099736473223771e+01 -1.0032854908984555e+02 -3.5674421413108355e+01 + 15 -1.0059762925477315e+02 3.4057372933448626e+01 -1.0291545484092256e+02 + 16 -9.2273704605935819e+01 -1.2566881267739232e+02 -6.3115663802590909e+01 + 17 1.7540250771683569e+02 1.4403773516355182e+02 2.8253270705477295e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +run_energy: 786.186636054773 +run_stress: ! |- + -1.5982910389343505e+02 -7.4774149450379937e+01 2.3460325334381506e+02 -2.3353349487854388e+02 3.4161194489304893e+02 -1.5958869300328692e+02 +run_forces: ! |2 + 1 -2.2302877568136338e+01 4.0672550148970281e+01 -9.0501596555606994e+01 + 2 -7.6795596366469354e+00 3.9696255711631245e+00 -3.7581781934774909e+00 + 3 9.2113037896352481e+01 -1.3743858578373496e+02 8.2424527928857074e+01 + 4 -4.8297128431903225e+01 -8.1171172458509702e+00 6.4789088257516795e+01 + 5 -6.2249945655197145e+01 2.2813353706915890e+01 -5.3758960971523750e+00 + 6 9.1082266941280153e+01 1.3760435384789912e+02 -3.9497610389853719e+01 + 7 -4.6896901941201634e+01 -5.0626903993409201e+01 8.3785409954385486e+00 + 8 2.2272760597411565e+02 1.5895499661752211e+02 5.7194518486415930e+01 + 9 -1.3424389468966993e+00 5.5961120653727576e+00 -1.0522843110369067e+00 + 10 -4.0569661746613480e+02 -4.7090645573337184e+02 -9.7628440089732422e+01 + 11 4.2260633619776542e+01 2.0874271121537350e+02 -1.3676519708069108e+02 + 12 6.2351939732772273e+01 6.8740733319529681e+01 1.9368291661547465e+02 + 13 2.9034913906341565e+01 6.7392732862315881e+01 1.4128237934676201e+02 + 14 7.1584708176938221e+01 -9.9391162142709391e+01 -3.5112483055478720e+01 + 15 -1.0011391207749671e+02 3.3797184006896543e+01 -1.0280672266200776e+02 + 16 -9.3370883891440556e+01 -1.2693997492906119e+02 -6.3467168010540369e+01 + 17 1.7679515936747723e+02 1.4513584646617855e+02 2.8213604815112788e+01 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +... diff --git a/unittest/force-styles/tests/fix-timestep-adapt_coul.yaml b/unittest/force-styles/tests/fix-timestep-adapt_coul.yaml new file mode 100644 index 0000000000..4bf25f3b33 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-adapt_coul.yaml @@ -0,0 +1,78 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Thu Mar 25 14:07:45 202 +epsilon: 1e-14 +prerequisites: ! | + atom full + fix adapt +pre_commands: ! | + variable scale equal ramp(0.5,1.0) +post_commands: ! | + fix move all nve + pair_style coul/long 8.0 + pair_coeff * * + kspace_style pppm 1.0e-5 + fix test solute adapt 1 pair coul/long scale * * v_scale kspace v_scale scale no +input_file: in.fourmol +natoms: 29 +run_pos: ! |2 + 1 -2.7585387890471996e-01 2.4721267521182790e+00 -1.7590741140808724e-01 + 2 3.0525219871189541e-01 2.9567528136379986e+00 -8.4936576402532038e-01 + 3 -6.9505003051265457e-01 1.2527081545845018e+00 -6.1997181046584049e-01 + 4 -1.5812017862079175e+00 1.4837803436802379e+00 -1.2534501022240629e+00 + 5 -9.0698616844921520e-01 9.2696438488362154e-01 3.9881670647678125e-01 + 6 2.9475212358066677e-01 2.3090672513870800e-01 -1.2850129871041163e+00 + 7 3.3910265413162427e-01 -9.8304106880631008e-03 -2.4646152989509647e+00 + 8 1.1651505006204030e+00 -4.8743821011767707e-01 -6.7114884751728299e-01 + 9 1.3774263981599719e+00 -2.5621838794437357e-01 2.7183404529472238e-01 + 10 2.0205575722774203e+00 -1.4247755749375353e+00 -9.7170370274694495e-01 + 11 1.7878178367325690e+00 -1.9913978116155537e+00 -1.8882122011553970e+00 + 12 3.0049755926663213e+00 -4.9113386667261005e-01 -1.6222548793223990e+00 + 13 4.0509873346708982e+00 -8.9189599256758900e-01 -1.6399664169684836e+00 + 14 2.6067290768076905e+00 -4.1787776166657575e-01 -2.6628987151232200e+00 + 15 2.9696220092443193e+00 5.5371700758037623e-01 -1.2345762790291681e+00 + 16 2.6502758794398509e+00 -2.3947260224551123e+00 3.7979604817656068e-02 + 17 2.2329379457566403e+00 -2.1019011639091216e+00 1.1489747581405534e+00 + 18 2.1370039459092824e+00 3.0160650231380983e+00 -3.5182461434707273e+00 + 19 1.5358245580755947e+00 2.6253262982024990e+00 -4.2345405067543185e+00 + 20 2.7723206208610200e+00 3.6917660744997280e+00 -3.9324445897897893e+00 + 21 4.9046698830002544e+00 -4.0744208992376789e+00 -3.6231785861154941e+00 + 22 4.3619404928241057e+00 -4.2118418466324723e+00 -4.4549778550789503e+00 + 23 5.7375471428283742e+00 -3.5861419285984151e+00 -3.8743083628403299e+00 + 24 2.0685472614153846e+00 3.1534292413678289e+00 3.1539268144873454e+00 + 25 1.3099248377134609e+00 3.2652552015323466e+00 2.5158443987470833e+00 + 26 2.5769610944059931e+00 4.0046351067750248e+00 3.2209102828198946e+00 + 27 -1.9616446495134594e+00 -4.3541288139763008e+00 2.1089564303871438e+00 + 28 -2.7409194780982360e+00 -4.0232390590132754e+00 1.5874446954442702e+00 + 29 -1.3169303967683006e+00 -3.6019395338314788e+00 2.2736834157327834e+00 +run_vel: ! |2 + 1 3.2647934948866072e-03 -1.0659515509476220e-03 -3.5596416446573862e-03 + 2 6.5461183155830240e-04 5.3408204488965814e-04 3.7281153774905299e-03 + 3 5.5824606761867453e-04 6.8767077705354802e-03 2.6081254050903369e-03 + 4 -3.0104306057251481e-03 -6.3737880755571717e-03 -5.7689309472175711e-04 + 5 -1.0695603162793169e-02 -9.3124438941875488e-03 -3.5561825582117166e-03 + 6 9.7217275192988716e-04 2.4037242875343898e-03 -1.4804194461220557e-03 + 7 -9.8813125701116859e-04 7.1676860005907047e-05 -4.9726864557309155e-04 + 8 5.7695861497255153e-04 -2.8105851335220203e-03 5.2330664783477206e-03 + 9 -1.4995649604676725e-03 3.1649947790849786e-06 2.0412648677152027e-03 + 10 1.5839012837707146e-03 3.0321007338515189e-03 -4.0872484640111792e-03 + 11 -4.7758918532801661e-03 -2.6593274143911529e-03 -1.1550198582046794e-03 + 12 9.0128567357444442e-04 -1.2761751259519178e-03 -2.0871137241467094e-03 + 13 2.1567295863873783e-03 5.8607859346030983e-03 -7.1626599947017036e-04 + 14 3.5355218381749455e-03 -5.7850299516532602e-03 -3.4518030258956843e-03 + 15 -1.7110094580322296e-03 -6.3503642729395085e-03 5.8528583997245172e-03 + 16 -1.3548756014535996e-03 1.4721717701533786e-03 3.4684968840172224e-03 + 17 1.2456371869895035e-03 7.2712506650925211e-05 -1.0263875344785681e-03 + 18 -7.6671852987712384e-04 -6.2725590016584319e-04 -1.7887461816215443e-03 + 19 1.5144560879023705e-03 -2.7339688331763923e-03 8.2529894052008699e-03 + 20 3.1192665056846264e-03 3.0118796973856330e-03 3.9267694079263664e-03 + 21 -8.3441863827979606e-04 5.2127470504020413e-04 -1.3858761585700890e-03 + 22 -3.4781949993989694e-03 -3.5196597997799125e-03 6.4236038889072932e-03 + 23 -1.5073299456798523e-04 -5.2285186251896619e-03 4.8604614163606421e-03 + 24 -6.9684359242923175e-05 1.0646658518855285e-03 -9.5542384314521332e-04 + 25 5.4585615099357566e-03 -5.7013984855115978e-03 3.7920245454784174e-03 + 26 -1.8076492725572590e-03 -4.1945707008573113e-03 4.0407648570027713e-03 + 27 -3.5547747026063570e-05 1.1321728960280906e-03 -6.3187029759558986e-04 + 28 -4.2637774879869998e-05 -1.6726973615869391e-03 2.4434056859341056e-03 + 29 -3.5302833519675510e-03 -2.4353648747156768e-03 2.8116576375086392e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-adapt_pair.yaml b/unittest/force-styles/tests/fix-timestep-adapt_pair.yaml new file mode 100644 index 0000000000..167f531b8e --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-adapt_pair.yaml @@ -0,0 +1,77 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Thu Mar 25 14:01:17 202 +epsilon: 1e-14 +prerequisites: ! | + atom full + fix adapt +pre_commands: ! | + variable epsilon equal ramp(0.01,0.03) +post_commands: ! | + fix move all nve + pair_style lj/cut 8.0 + pair_coeff * * 0.02 2.5 + fix test solute adapt 1 pair lj/cut epsilon * * v_epsilon scale no +input_file: in.fourmol +natoms: 29 +run_pos: ! |2 + 1 -3.2551307172152166e-01 2.4346451341937119e+00 -1.1396829659429568e-01 + 2 4.8617926885321056e-01 3.1070882859405997e+00 -1.0606347736697450e+00 + 3 -6.4277692336189840e-01 1.2540574692558419e+00 -6.5067148095539729e-01 + 4 -1.7124546848614086e+00 1.5199062846474698e+00 -1.3466731463120185e+00 + 5 -9.4318702684092770e-01 8.7036167560098177e-01 5.8107949039715845e-01 + 6 2.8417536732521353e-01 2.4411028847076369e-01 -1.2672995916002334e+00 + 7 3.3978105928826102e-01 -1.3702127966002052e-02 -2.4842417404954271e+00 + 8 1.1448702036571965e+00 -5.1199787721085332e-01 -7.6207631323785585e-01 + 9 1.4560807143664061e+00 -1.7028374483027719e-01 6.2141359752210135e-01 + 10 2.0382797810616289e+00 -1.4042635759560305e+00 -9.2654260470655225e-01 + 11 1.7519024690839582e+00 -2.0813293238835207e+00 -2.0333284515052927e+00 + 12 2.9787289051059695e+00 -5.2434906497210465e-01 -1.5904467995849627e+00 + 13 4.1953422217253049e+00 -9.4830119722648354e-01 -1.6427468797605889e+00 + 14 2.5500081793995157e+00 -4.0614435033397922e-01 -2.8121984203395161e+00 + 15 2.9657048145111777e+00 7.0300473914796602e-01 -1.1808819862439999e+00 + 16 2.6579963051616033e+00 -2.4005456919625914e+00 2.0005383723547647e-02 + 17 2.2277056239576578e+00 -2.0984522178633980e+00 1.1635464820238732e+00 + 18 2.1302246968151799e+00 2.9885050666882940e+00 -3.4237069257450177e+00 + 19 1.3456038469693135e+00 2.5038497935542385e+00 -4.4658170467307343e+00 + 20 2.9896625556783665e+00 3.9232215029072903e+00 -4.0788037150506025e+00 + 21 4.8757906644427553e+00 -4.1085999726993636e+00 -3.5248264027627227e+00 + 22 4.1728425444281765e+00 -4.2576916791274551e+00 -4.7519930504553214e+00 + 23 6.0419888290998678e+00 -3.4039201576442903e+00 -3.9699675670526715e+00 + 24 2.0885027685082749e+00 3.0623262332232590e+00 3.2053854817911325e+00 + 25 1.0405778226848383e+00 3.3092074961772369e+00 2.2889143046855063e+00 + 26 2.7667223704388135e+00 4.3243759349108064e+00 3.2424899041692892e+00 + 27 -1.9442324574216177e+00 -4.4528190486931383e+00 2.1453601072505339e+00 + 28 -3.0374110711029547e+00 -3.8950976773182124e+00 1.3869509742028494e+00 + 29 -1.0900141540951092e+00 -3.3361017662313661e+00 2.3288506481859019e+00 +run_vel: ! |2 + 1 -2.6363966609802322e-02 -2.1121682067821074e-02 3.6083903537541533e-02 + 2 1.1439082425218627e-01 9.6059686259844332e-02 -1.2808582493334400e-01 + 3 4.1111553959541365e-02 4.8218907676123458e-03 -2.0053345127339979e-02 + 4 -1.1200342113854607e-01 2.3479218026487367e-02 -7.8322526982440521e-02 + 5 -3.8701176979056742e-02 -5.4238808461352553e-02 1.3872068929223944e-01 + 6 -1.2123879257604515e-02 1.8312769875475924e-02 1.5946869603522588e-02 + 7 -2.8033909635229349e-04 -4.1270986674540478e-03 -2.1849258860351647e-02 + 8 -1.0170253112050078e-02 -1.7528863700725254e-02 -4.2491773012772370e-02 + 9 4.5241065101710616e-02 5.1469831376004180e-02 2.0995899436627763e-01 + 10 1.8368003566726739e-02 1.4179451083200369e-02 2.9470727636806446e-02 + 11 -3.2659358322720752e-02 -7.3493919093785873e-02 -1.1457396195350034e-01 + 12 -2.1332063889491135e-02 -2.8577988202947827e-02 2.3932097053094816e-02 + 13 1.2690181040869375e-01 -4.2622009579717637e-02 -3.2122980905022864e-03 + 14 -4.3986665577866770e-02 4.1189150738941797e-03 -1.2884939606320925e-01 + 15 -5.1087806082402770e-03 1.2103885273247751e-01 5.1598463273012998e-02 + 16 7.2721700595591750e-03 -5.1107380318211630e-03 -1.6206172124102816e-02 + 17 -4.5383051620802401e-03 3.8550131312268723e-03 1.5203146179855118e-02 + 18 -3.4035600174367278e-03 -1.6724199163900926e-02 5.8534078947667954e-02 + 19 -1.2309357029421318e-01 -8.2342186011711699e-02 -1.4270564232030267e-01 + 20 1.3831939524791759e-01 1.4683346823701657e-01 -8.6190510762895065e-02 + 21 -1.8190109221215101e-02 -2.0433705925500686e-02 5.9790597332019774e-02 + 22 -1.2248854674722252e-01 -3.2562959165287515e-02 -1.7942350258565937e-01 + 23 1.8820938314857302e-01 1.0738920901878871e-01 -5.3571267428950652e-02 + 24 1.3241508666550663e-02 -5.5202622564252735e-02 3.1590984003367552e-02 + 25 -1.6538995535147813e-01 2.1577200806135906e-02 -1.3992038866639564e-01 + 26 1.1598773628387443e-01 1.9315924859017630e-01 1.7906411933036825e-02 + 27 9.5161140946472839e-03 -6.0207807869183290e-02 2.1271816291477584e-02 + 28 -1.8165131190419664e-01 7.5944941014218031e-02 -1.2012012232111549e-01 + 29 1.3987378313944554e-01 1.6482908858701009e-01 3.7930623655713772e-02 +... diff --git a/unittest/force-styles/tests/harmonic_dihedral.txt b/unittest/force-styles/tests/harmonic_dihedral.txt new file mode 100644 index 0000000000..3f99f1663c --- /dev/null +++ b/unittest/force-styles/tests/harmonic_dihedral.txt @@ -0,0 +1,3621 @@ +# UNITS: real Dihedral table + +HARMONIC_1 +N 720 RADIANS + +0 0.0 150.0 -0.0 +1 0.008726646259971648 149.98857713672933 2.6178609655925102 +2 0.017453292519943295 149.95431202643218 5.234924505375115 +3 0.02617993877991494 149.89721510659302 7.850393436441557 +4 0.03490658503988659 149.81730376948678 10.463471061618776 +5 0.04363323129985824 149.71460235688093 13.073361412148756 +6 0.05235987755982988 149.58914215262052 15.679269490147995 +7 0.061086523819801536 149.44096137309916 18.280401510772094 +8 0.06981317007977318 149.27010515561776 20.875965144009786 +9 0.07853981633974483 149.07662554463536 23.46516975603466 +10 0.08726646259971647 148.86058147591564 26.047226650039544 +11 0.09599310885968812 148.62203875857477 28.62134930648175 +12 0.10471975511965977 148.36107005503544 31.186753622663918 +13 0.11344640137963141 148.07775485889266 33.74265815157973 +14 0.12217304763960307 147.77217947069977 36.288284339950145 +15 0.1308996938995747 147.44443697168012 38.82285676537811 +16 0.13962634015954636 147.0946271953739 41.34560337254987 +17 0.148352986419518 146.72285669722766 43.85575570841053 +18 0.15707963267948966 146.32923872213652 46.35254915624214 +19 0.16580627893946132 145.91389316994875 48.83522316857347 +20 0.17453292519943295 145.47694655894313 51.3030214988503 +21 0.1832595714594046 145.01853198729015 53.755192431795045 +22 0.19198621771937624 144.53878909250906 56.19098901238682 +23 0.20071286397934787 144.03786400893304 58.60966927339109 +24 0.20943951023931953 143.51590932319507 61.01049646137005 +25 0.2181661564992912 142.97308402774874 63.392739261104914 +26 0.22689280275926282 142.40955347243755 65.75567201836158 +27 0.23561944901923448 141.82548931412762 68.09857496093201 +28 0.24434609527920614 141.2210694644195 70.42073441788365 +29 0.2530727415391778 140.5964780354547 72.7214430369506 +30 0.2617993877991494 139.95190528383287 75.0 +31 0.27052603405912107 139.2875475526584 77.25571123650813 +32 0.2792526803190927 138.60360721173197 79.48788963498072 +33 0.28797932657906433 137.9002925959068 81.69585525225406 +34 0.296705972839036 137.17781794162812 83.87893552061203 +35 0.30543261909900765 136.4364033216744 86.03646545265696 +36 0.3141592653589793 135.67627457812105 88.16778784387098 +37 0.32288591161895097 134.89766325354694 90.27225347280722 +38 0.33161255787892263 134.10080652050416 92.34922129884876 +39 0.3403392041388943 133.28594710927283 94.3980586574756 +40 0.3490658503988659 132.45333323392336 96.41814145298089 +41 0.35779249665883756 131.6032185167079 98.40885434857609 +42 0.3665191429188092 130.73586191080454 100.36959095382873 +43 0.3752457891787809 129.85152762143775 102.29975400937477 +44 0.3839724354387525 128.95048502539885 104.19875556884958 +45 0.39269908169872414 128.03300858899107 106.06601717798215 +46 0.40142572795869574 127.09937778442483 107.90097005079764 +47 0.41015237421866746 126.14987700468738 109.70305524287555 +48 0.41887902047863906 125.18479547691435 111.47172382160912 +49 0.42760566673861067 124.20442717428804 113.20643703341575 +50 0.4363323129985824 123.20907072649044 114.90666646784672 +51 0.445058959258554 122.19902932873782 116.57189421854562 +52 0.45378560551852565 121.17461064942438 118.2016130410083 +53 0.4625122517784973 120.13612673640364 119.79532650709392 +54 0.47123889803846897 119.0838939219355 121.35254915624212 +55 0.4799655442984406 118.01823272632845 122.87280664334878 +56 0.4886921905584123 116.93946776030603 124.35563588325626 +57 0.4974188368183839 115.84792762612705 125.80058519181361 +58 0.5061454830783556 114.74394481749034 127.2072144234639 +59 0.5148721293383272 113.62785561825407 128.57509510531682 +60 0.5235987755982988 112.50000000000001 129.90381056766577 +61 0.5323254218582705 111.36072151847529 131.19295607090933 +62 0.5410520681182421 110.21036720894179 132.44213892883906 +63 0.5497787143782138 109.049287480466 133.6509786282552 +64 0.5585053606381855 107.87783600918081 134.81910694487505 +65 0.5672320068981571 106.69636963055244 135.94616805549754 +66 0.5759586531581287 105.50524823068503 137.03181864639012 +67 0.5846852994181004 104.30483463669552 138.07572801786608 +68 0.593411945678072 103.09549450619338 139.07757818501813 +69 0.6021385919380438 101.8775962158975 140.0370639745803 +70 0.6108652381980153 100.65151074942517 140.95389311788625 +71 0.619591884457987 99.41761158428675 141.82778633989753 +72 0.6283185307179586 98.17627457812105 142.65847744427305 +73 0.6370451769779303 96.92787785420526 143.4457133944553 +74 0.6457718232379019 95.67280168627494 144.1892543907478 +75 0.6544984694978736 94.41142838268905 144.88887394336024 +76 0.6632251157578453 93.14414216997507 145.54435894139948 +77 0.6719517620178168 91.87132907578986 146.15550971778526 +78 0.6806784082777886 90.59337681133194 146.72214011007085 +79 0.6894050545377601 89.31067465324087 147.24407751714958 +80 0.6981317007977318 88.02361332501977 147.72116295183122 +81 0.7068583470577035 86.73258487801732 148.15325108927067 +82 0.7155849933176751 85.43798257200493 148.54021031123557 +83 0.7243116395776468 84.14020075538608 148.8819227461983 +84 0.7330382858376184 82.83963474507401 149.17828430524102 +85 0.74176493209759 81.53668070607438 149.4292047137618 +86 0.7504915783575618 80.23173553080939 149.63460753897365 +87 0.7592182246175333 78.92519671822077 149.7944302131861 +88 0.767944870877505 77.61746225268757 149.90862405286435 +89 0.7766715171374766 76.30893048279626 149.97715427345867 +90 0.7853981633974483 75.0 150.00000000000003 +91 0.7941248096574199 73.69106951720374 149.97715427345867 +92 0.8028514559173915 72.38253774731243 149.90862405286435 +93 0.8115781021773633 71.07480328177923 149.7944302131861 +94 0.8203047484373349 69.76826446919061 149.63460753897365 +95 0.8290313946973066 68.46331929392565 149.42920471376186 +96 0.8377580409572781 67.16036525492602 149.17828430524102 +97 0.8464846872172498 65.85979924461398 148.88192274619828 +98 0.8552113334772213 64.56201742799509 148.5402103112355 +99 0.8639379797371932 63.267415121982644 148.15325108927067 +100 0.8726646259971648 61.97638667498025 147.72116295183125 +101 0.8813912722571364 60.68932534675913 147.24407751714958 +102 0.890117918517108 59.40662318866806 146.72214011007085 +103 0.8988445647770796 58.128670924210134 146.15550971778535 +104 0.9075712110370513 56.85585783002493 145.54435894139948 +105 0.9162978572970231 55.58857161731093 144.8888739433602 +106 0.9250245035569946 54.327198313725084 144.1892543907479 +107 0.9337511498169663 53.07212214579476 143.44571339445528 +108 0.9424777960769379 51.82372542187894 142.65847744427305 +109 0.9512044423369095 50.58238841571326 141.8277863398975 +110 0.9599310885968813 49.34848925057483 140.95389311788625 +111 0.9686577348568529 48.12240378410246 140.03706397458024 +112 0.9773843811168246 46.90450549380659 139.07757818501813 +113 0.9861110273767961 45.69516536330446 138.07572801786603 +114 0.9948376736367678 44.49475176931499 137.03181864639015 +115 1.0035643198967394 43.30363036944755 135.94616805549754 +116 1.0122909661567112 42.122163990819196 134.81910694487505 +117 1.0210176124166828 40.95071251953399 133.6509786282552 +118 1.0297442586766543 39.78963279105821 132.44213892883906 +119 1.038470904936626 38.639278481524734 131.1929560709094 +120 1.0471975511965976 37.50000000000001 129.9038105676658 +121 1.0559241974565694 36.37214438174595 128.57509510531682 +122 1.064650843716541 35.25605518250966 127.20721442346392 +123 1.0733774899765127 34.15207237387297 125.80058519181362 +124 1.0821041362364843 33.06053223969398 124.35563588325626 +125 1.0908307824964558 31.98176727367156 122.87280664334881 +126 1.0995574287564276 30.916106078064505 121.35254915624212 +127 1.1082840750163994 29.863873263596364 119.7953265070939 +128 1.117010721276371 28.82538935057562 118.2016130410083 +129 1.1257373675363425 27.800970671262213 116.57189421854565 +130 1.1344640137963142 26.79092927350954 114.90666646784672 +131 1.1431906600562858 25.79557282571197 113.20643703341578 +132 1.1519173063162573 24.815204523085658 111.47172382160916 +133 1.160643952576229 23.850122995312606 109.70305524287556 +134 1.1693705988362009 22.900622215575172 107.90097005079764 +135 1.1780972450961724 21.96699141100894 106.06601717798215 +136 1.186823891356144 21.04951497460116 104.19875556884962 +137 1.1955505376161157 20.148472378562207 102.2997540093748 +138 1.2042771838760875 19.264138089195423 100.36959095382869 +139 1.213003830136059 18.396781483292106 98.40885434857609 +140 1.2217304763960306 17.546666766076648 96.41814145298093 +141 1.2304571226560024 16.714052890727167 94.3980586574756 +142 1.239183768915974 15.899193479495866 92.34922129884875 +143 1.2479104151759455 15.102336746453046 90.27225347280728 +144 1.2566370614359172 14.323725421878933 88.16778784387098 +145 1.265363707695889 13.563596678325606 86.03646545265688 +146 1.2740903539558606 12.82218205837187 83.87893552061203 +147 1.2828170002158321 12.099707404093204 81.69585525225413 +148 1.2915436464758039 11.396392788268045 79.48788963498072 +149 1.3002702927357754 10.712452447341583 77.25571123650812 +150 1.3089969389957472 10.048094716167096 74.99999999999999 +151 1.3177235852557188 9.40352196454532 72.72144303695057 +152 1.3264502315156905 8.778930535580475 70.4207344178836 +153 1.335176877775662 8.174510685872416 68.09857496093207 +154 1.3439035240356336 7.590446527562489 65.75567201836162 +155 1.3526301702956054 7.026915972251246 63.392739261104914 +156 1.3613568165555772 6.484090676804918 61.01049646136999 +157 1.3700834628155487 5.962135991066964 58.60966927339109 +158 1.3788101090755203 5.461210907490943 56.19098901238681 +159 1.3875367553354918 4.981468012709886 53.755192431795116 +160 1.3962634015954636 4.523053441056868 51.30302149885036 +161 1.4049900478554354 4.086106830051229 48.83522316857348 +162 1.413716694115407 3.6707612778634853 46.35254915624214 +163 1.4224433403753785 3.2771433027723424 43.85575570841059 +164 1.4311699866353502 2.9053728046260745 41.34560337254987 +165 1.4398966328953218 2.5555630283198685 38.82285676537818 +166 1.4486232791552935 2.227820529300248 36.288284339950145 +167 1.457349925415265 1.9222451411073482 33.742658151579796 +168 1.4660765716752369 1.6389299449645818 31.186753622663918 +169 1.4748032179352084 1.37796124142521 28.62134930648175 +170 1.48352986419518 1.1394185240843986 26.047226650039608 +171 1.4922565104551517 0.9233744553646506 23.46516975603466 +172 1.5009831567151235 0.7298948443822312 20.875965144009783 +173 1.509709802975095 0.5590386269008513 18.280401510772162 +174 1.5184364492350666 0.4108578473795116 15.67926949014806 +175 1.5271630954950384 0.28539764311909244 13.073361412148754 +176 1.53588974175501 0.1826962305131935 10.463471061618844 +177 1.5446163880149815 0.10278489340696251 7.8503934364416255 +178 1.5533430342749532 0.04568797356781784 5.234924505375181 +179 1.562069680534925 0.011422863270654782 2.6178609655925094 +180 1.5707963267948966 0.0 -0.0 +181 1.579522973054868 0.011422863270654782 -2.617860965592476 +182 1.5882496193148399 0.04568797356781784 -5.234924505375147 +183 1.5969762655748114 0.10278489340696251 -7.850393436441525 +184 1.605702911834783 0.1826962305131935 -10.46347106161871 +185 1.6144295580947547 0.28539764311905913 -13.073361412148694 +186 1.6231562043547265 0.4108578473795116 -15.679269490148027 +187 1.6318828506146983 0.5590386269008513 -18.280401510772162 +188 1.6406094968746698 0.7298948443822312 -20.875965144009815 +189 1.6493361431346414 0.9233744553646506 -23.465169756034594 +190 1.6580627893946132 1.1394185240843901 -26.047226650039576 +191 1.6667894356545847 1.3779612414251936 -28.621349306481722 +192 1.6755160819145563 1.6389299449645818 -31.186753622663844 +193 1.684242728174528 1.9222451411073398 -33.74265815157973 +194 1.6929693744344996 2.227820529300248 -36.28828433995011 +195 1.7016960206944711 2.55556302831986 -38.82285676537804 +196 1.7104226669544427 2.905372804626066 -41.34560337254981 +197 1.7191493132144147 3.277143302772334 -43.85575570841053 +198 1.7278759594743864 3.6707612778634853 -46.352549156242176 +199 1.736602605734358 4.086106830051237 -48.835223168573506 +200 1.7453292519943295 4.5230534410568595 -51.3030214988503 +201 1.7540558982543013 4.981468012709877 -53.75519243179504 +202 1.7627825445142729 5.461210907490943 -56.19098901238681 +203 1.7715091907742444 5.962135991066956 -58.60966927339103 +204 1.780235837034216 6.484090676804918 -61.01049646136999 +205 1.7889624832941877 7.026915972251246 -63.392739261104914 +206 1.7976891295541593 7.590446527562456 -65.75567201836158 +207 1.8064157758141308 8.174510685872374 -68.09857496093194 +208 1.8151424220741026 8.778930535580475 -70.4207344178836 +209 1.8238690683340746 9.403521964545345 -72.7214430369506 +210 1.8325957145940461 10.048094716167096 -75.00000000000003 +211 1.8413223608540177 10.712452447341583 -77.25571123650812 +212 1.8500490071139892 11.396392788268045 -79.48788963498072 +213 1.858775653373961 12.099707404093197 -81.69585525225406 +214 1.8675022996339325 12.822182058371862 -83.878935520612 +215 1.876228945893904 13.563596678325606 -86.03646545265688 +216 1.8849555921538759 14.323725421878933 -88.16778784387095 +217 1.8936822384138474 15.10233674645303 -90.2722534728072 +218 1.902408884673819 15.899193479495825 -92.3492212988487 +219 1.9111355309337907 16.714052890727167 -94.3980586574756 +220 1.9198621771937625 17.54666676607664 -96.41814145298088 +221 1.9285888234537343 18.396781483292106 -98.40885434857609 +222 1.9373154697137058 19.26413808919543 -100.36959095382875 +223 1.9460421159736774 20.1484723785622 -102.29975400937475 +224 1.9547687622336491 21.04951497460116 -104.1987555688496 +225 1.9634954084936207 21.96699141100894 -106.06601717798213 +226 1.9722220547535922 22.900622215575172 -107.90097005079764 +227 1.980948701013564 23.850122995312606 -109.70305524287556 +228 1.9896753472735356 24.815204523085633 -111.47172382160907 +229 1.9984019935335071 25.795572825711936 -113.20643703341574 +230 2.007128639793479 26.790929273509523 -114.90666646784666 +231 2.015855286053451 27.80097067126222 -116.57189421854568 +232 2.0245819323134224 28.82538935057565 -118.20161304100832 +233 2.033308578573394 29.86387326359639 -119.79532650709392 +234 2.0420352248333655 30.916106078064505 -121.35254915624212 +235 2.050761871093337 31.981767273671505 -122.87280664334871 +236 2.0594885173533086 33.06053223969395 -124.35563588325621 +237 2.0682151636132806 34.15207237387297 -125.80058519181362 +238 2.076941809873252 35.256055182509634 -127.20721442346387 +239 2.0856684561332237 36.37214438174592 -128.57509510531682 +240 2.0943951023931953 37.49999999999996 -129.90381056766577 +241 2.103121748653167 38.63927848152465 -131.1929560709093 +242 2.111848394913139 39.789632791058196 -132.44213892883903 +243 2.1205750411731104 40.95071251953399 -133.6509786282552 +244 2.129301687433082 42.122163990819175 -134.81910694487502 +245 2.138028333693054 43.30363036944755 -135.94616805549754 +246 2.1467549799530254 44.49475176931498 -137.03181864639012 +247 2.155481626212997 45.69516536330446 -138.07572801786603 +248 2.1642082724729685 46.90450549380659 -139.07757818501813 +249 2.17293491873294 48.12240378410241 -140.03706397458024 +250 2.1816615649929116 49.34848925057481 -140.95389311788622 +251 2.1903882112528836 50.58238841571323 -141.82778633989756 +252 2.199114857512855 51.82372542187893 -142.65847744427302 +253 2.2078415037728267 53.07212214579472 -143.4457133944553 +254 2.2165681500327987 54.32719831372507 -144.18925439074786 +255 2.2252947962927703 55.58857161731093 -144.8888739433602 +256 2.234021442552742 56.85585783002492 -145.54435894139948 +257 2.2427480888127134 58.12867092421011 -146.1555097177853 +258 2.251474735072685 59.40662318866803 -146.72214011007085 +259 2.260201381332657 60.68932534675916 -147.24407751714955 +260 2.2689280275926285 61.97638667498025 -147.72116295183125 +261 2.2776546738526 63.267415121982665 -148.15325108927064 +262 2.2863813201125716 64.56201742799506 -148.5402103112355 +263 2.295107966372543 65.85979924461391 -148.88192274619828 +264 2.3038346126325147 67.16036525492594 -149.17828430524096 +265 2.3125612588924866 68.46331929392564 -149.42920471376186 +266 2.321287905152458 69.76826446919057 -149.63460753897365 +267 2.33001455141243 71.07480328177923 -149.79443021318605 +268 2.3387411976724017 72.38253774731245 -149.90862405286435 +269 2.3474678439323733 73.69106951720374 -149.97715427345867 +270 2.356194490192345 75.0 -150.00000000000003 +271 2.3649211364523164 76.30893048279623 -149.9771542734587 +272 2.373647782712288 77.61746225268753 -149.90862405286435 +273 2.3823744289722595 78.92519671822072 -149.7944302131861 +274 2.3911010752322315 80.23173553080939 -149.63460753897365 +275 2.399827721492203 81.53668070607432 -149.4292047137618 +276 2.408554367752175 82.83963474507404 -149.17828430524096 +277 2.4172810140121466 84.14020075538606 -148.88192274619826 +278 2.426007660272118 85.43798257200491 -148.54021031123554 +279 2.4347343065320897 86.73258487801728 -148.15325108927067 +280 2.443460952792061 88.02361332501974 -147.72116295183122 +281 2.4521875990520328 89.31067465324081 -147.2440775171496 +282 2.4609142453120048 90.59337681133195 -146.72214011007082 +283 2.4696408915719763 91.87132907578984 -146.1555097177853 +284 2.478367537831948 93.14414216997505 -145.54435894139948 +285 2.4870941840919194 94.41142838268902 -144.88887394336027 +286 2.495820830351891 95.6728016862749 -144.18925439074783 +287 2.504547476611863 96.92787785420526 -143.4457133944553 +288 2.5132741228718345 98.17627457812102 -142.65847744427307 +289 2.522000769131806 99.41761158428673 -141.8277863398975 +290 2.530727415391778 100.65151074942517 -140.95389311788625 +291 2.5394540616517496 101.87759621589754 -140.03706397458026 +292 2.548180707911721 103.09549450619336 -139.07757818501813 +293 2.5569073541716927 104.30483463669552 -138.07572801786608 +294 2.5656340004316642 105.50524823068496 -137.03181864639018 +295 2.574360646691636 106.69636963055241 -135.94616805549754 +296 2.5830872929516078 107.87783600918081 -134.81910694487505 +297 2.5918139392115793 109.049287480466 -133.6509786282552 +298 2.600540585471551 110.21036720894179 -132.44213892883906 +299 2.609267231731523 111.36072151847529 -131.19295607090933 +300 2.6179938779914944 112.5 -129.9038105676658 +301 2.626720524251466 113.62785561825406 -128.57509510531682 +302 2.6354471705114375 114.74394481749033 -127.20721442346392 +303 2.644173816771409 115.84792762612699 -125.80058519181361 +304 2.652900463031381 116.93946776030603 -124.35563588325626 +305 2.6616271092913526 118.01823272632845 -122.87280664334877 +306 2.670353755551324 119.0838939219355 -121.35254915624212 +307 2.6790804018112957 120.13612673640358 -119.79532650709396 +308 2.6878070480712672 121.17461064942432 -118.20161304100833 +309 2.696533694331239 122.19902932873775 -116.57189421854568 +310 2.705260340591211 123.20907072649044 -114.90666646784672 +311 2.7139869868511823 124.20442717428801 -113.20643703341584 +312 2.7227136331111543 125.18479547691437 -111.47172382160912 +313 2.731440279371126 126.14987700468738 -109.70305524287555 +314 2.7401669256310974 127.09937778442479 -107.90097005079768 +315 2.748893571891069 128.03300858899107 -106.06601717798215 +316 2.7576202181510405 128.95048502539882 -104.19875556884965 +317 2.766346864411012 129.85152762143775 -102.29975400937484 +318 2.7750735106709836 130.73586191080452 -100.36959095382883 +319 2.7838001569309556 131.6032185167079 -98.40885434857609 +320 2.792526803190927 132.45333323392333 -96.41814145298096 +321 2.801253449450899 133.28594710927283 -94.39805865747559 +322 2.8099800957108707 134.10080652050416 -92.3492212988487 +323 2.8187067419708423 134.89766325354694 -90.27225347280722 +324 2.827433388230814 135.67627457812105 -88.16778784387098 +325 2.8361600344907854 136.4364033216744 -86.03646545265696 +326 2.844886680750757 137.1778179416281 -83.87893552061209 +327 2.853613327010729 137.9002925959068 -81.69585525225406 +328 2.8623399732707004 138.60360721173197 -79.48788963498072 +329 2.871066619530672 139.2875475526584 -77.25571123650819 +330 2.8797932657906435 139.95190528383287 -75.00000000000006 +331 2.888519912050615 140.59647803545465 -72.72144303695065 +332 2.897246558310587 141.22106946441951 -70.42073441788365 +333 2.9059732045705586 141.8254893141276 -68.09857496093207 +334 2.91469985083053 142.40955347243752 -65.75567201836171 +335 2.923426497090502 142.97308402774874 -63.392739261104914 +336 2.9321531433504737 143.51590932319507 -61.01049646137005 +337 2.9408797896104453 144.037864008933 -58.60966927339108 +338 2.949606435870417 144.53878909250906 -56.19098901238686 +339 2.9583330821303884 145.01853198729012 -53.755192431795116 +340 2.96705972839036 145.47694655894313 -51.30302149885043 +341 2.975786374650332 145.91389316994875 -48.83522316857347 +342 2.9845130209103035 146.3292387221365 -46.35254915624214 +343 2.993239667170275 146.72285669722766 -43.85575570841059 +344 3.001966313430247 147.0946271953739 -41.34560337254987 +345 3.0106929596902186 147.44443697168012 -38.82285676537812 +346 3.01941960595019 147.7721794706997 -36.2882843399502 +347 3.0281462522101616 148.07775485889266 -33.7426581515798 +348 3.036872898470133 148.3610700550354 -31.186753622663986 +349 3.045599544730105 148.6220387585748 -28.62134930648169 +350 3.0543261909900767 148.86058147591564 -26.047226650039544 +351 3.0630528372500483 149.07662554463533 -23.465169756034662 +352 3.07177948351002 149.27010515561776 -20.87596514400992 +353 3.0805061297699914 149.44096137309913 -18.28040151077223 +354 3.089232776029963 149.58914215262047 -15.679269490148123 +355 3.097959422289935 149.71460235688093 -13.073361412148758 +356 3.1066860685499065 149.81730376948684 -10.463471061618847 +357 3.1154127148098785 149.89721510659302 -7.8503934364414905 +358 3.12413936106985 149.95431202643218 -5.234924505375115 +359 3.1328660073298216 149.98857713672936 -2.6178609655925102 +360 3.141592653589793 150.0 -6.661338147750939e-14 +361 3.1503192998497647 149.98857713672936 2.617860965592477 +362 3.159045946109736 149.95431202643218 5.234924505375048 +363 3.1677725923697078 149.89721510659302 7.850393436441458 +364 3.1764992386296798 149.81730376948684 10.463471061618781 +365 3.1852258848896513 149.71460235688093 13.073361412148692 +366 3.193952531149623 149.58914215262047 15.679269490147922 +367 3.2026791774095944 149.44096137309916 18.280401510771995 +368 3.211405823669566 149.27010515561778 20.87596514400969 +369 3.2201324699295375 149.07662554463536 23.465169756034463 +370 3.2288591161895095 148.86058147591564 26.04722665003948 +371 3.237585762449481 148.6220387585748 28.621349306481626 +372 3.246312408709453 148.36107005503544 31.186753622663918 +373 3.255039054969425 148.07775485889266 33.74265815157987 +374 3.2637657012293966 147.7721794706997 36.28828433995024 +375 3.272492347489368 147.44443697168012 38.822856765378184 +376 3.2812189937493397 147.09462719537387 41.34560337254989 +377 3.2899456400093112 146.72285669722766 43.85575570841053 +378 3.2986722862692828 146.32923872213652 46.35254915624208 +379 3.3073989325292543 145.91389316994875 48.835223168573435 +380 3.3161255787892263 145.47694655894313 51.303021498850356 +381 3.324852225049198 145.01853198729012 53.755192431795045 +382 3.3335788713091694 144.53878909250906 56.19098901238679 +383 3.342305517569141 144.03786400893304 58.60966927339103 +384 3.3510321638291125 143.5159093231951 61.010496461369975 +385 3.359758810089084 142.9730840277488 63.392739261104815 +386 3.368485456349056 142.40955347243752 65.75567201836161 +387 3.3772121026090276 141.8254893141276 68.09857496093198 +388 3.385938748868999 141.22106946441951 70.42073441788355 +389 3.3946653951289707 140.5964780354547 72.72144303695046 +390 3.4033920413889422 139.9519052838329 74.99999999999987 +391 3.412118687648914 139.28754755265848 77.255711236508 +392 3.4208453339088853 138.603607211732 79.4878896349806 +393 3.4295719801688573 137.90029259590685 81.695855252254 +394 3.4382986264288293 137.17781794162812 83.87893552061205 +395 3.447025272688801 136.4364033216744 86.03646545265688 +396 3.455751918948773 135.67627457812102 88.16778784387103 +397 3.4644785652087444 134.89766325354697 90.27225347280731 +398 3.473205211468716 134.10080652050414 92.34922129884875 +399 3.4819318577286875 133.28594710927283 94.39805865747563 +400 3.490658503988659 132.45333323392336 96.41814145298089 +401 3.4993851502486306 131.6032185167079 98.40885434857603 +402 3.5081117965086026 130.73586191080454 100.36959095382879 +403 3.516838442768574 129.85152762143775 102.29975400937477 +404 3.5255650890285457 128.95048502539885 104.19875556884958 +405 3.5342917352885173 128.0330085889911 106.0660171779821 +406 3.543018381548489 127.09937778442482 107.90097005079764 +407 3.5517450278084604 126.1498770046874 109.70305524287551 +408 3.560471674068432 125.18479547691442 111.47172382160905 +409 3.569198320328404 124.20442717428803 113.20643703341578 +410 3.5779249665883754 123.20907072649047 114.90666646784665 +411 3.586651612848347 122.19902932873785 116.57189421854555 +412 3.5953782591083185 121.1746106494244 118.2016130410082 +413 3.60410490536829 120.13612673640367 119.79532650709385 +414 3.6128315516282616 119.08389392193554 121.352549156242 +415 3.6215581978882336 118.01823272632849 122.87280664334872 +416 3.630284844148205 116.93946776030603 124.3556358832562 +417 3.639011490408177 115.84792762612705 125.8005851918136 +418 3.647738136668149 114.74394481749033 127.20721442346394 +419 3.6564647829281207 113.62785561825403 128.57509510531688 +420 3.6651914291880923 112.49999999999999 129.90381056766583 +421 3.673918075448064 111.36072151847527 131.1929560709094 +422 3.6826447217080354 110.21036720894182 132.44213892883903 +423 3.691371367968007 109.04928748046603 133.65097862825513 +424 3.7000980142279785 107.87783600918083 134.81910694487502 +425 3.7088246604879505 106.69636963055244 135.94616805549748 +426 3.717551306747922 105.50524823068501 137.03181864639012 +427 3.7262779530078936 104.30483463669553 138.07572801786603 +428 3.735004599267865 103.09549450619343 139.07757818501807 +429 3.7437312455278366 101.87759621589755 140.0370639745802 +430 3.752457891787808 100.6515107494252 140.95389311788622 +431 3.76118453804778 99.41761158428673 141.8277863398975 +432 3.7699111843077517 98.17627457812105 142.65847744427302 +433 3.7786378305677233 96.92787785420528 143.4457133944553 +434 3.787364476827695 95.67280168627497 144.18925439074778 +435 3.7960911230876664 94.41142838268912 144.88887394336015 +436 3.804817769347638 93.14414216997514 145.5443589413994 +437 3.8135444156076095 91.87132907578996 146.15550971778526 +438 3.8222710618675815 90.593376811332 146.7221401100708 +439 3.8309977081275535 89.31067465324085 147.2440775171496 +440 3.839724354387525 88.0236133250198 147.7211629518312 +441 3.848451000647497 86.73258487801728 148.15325108927067 +442 3.8571776469074686 85.43798257200487 148.54021031123554 +443 3.86590429316744 84.14020075538605 148.88192274619828 +444 3.8746309394274117 82.83963474507401 149.17828430524102 +445 3.883357585687383 81.53668070607439 149.42920471376183 +446 3.8920842319473548 80.2317355308094 149.6346075389736 +447 3.9008108782073267 78.92519671822077 149.79443021318605 +448 3.9095375244672983 77.61746225268755 149.90862405286435 +449 3.91826417072727 76.30893048279626 149.97715427345867 +450 3.9269908169872414 75.00000000000001 150.0 +451 3.935717463247213 73.69106951720377 149.97715427345867 +452 3.9444441095071845 72.38253774731248 149.90862405286435 +453 3.953170755767156 71.07480328177928 149.7944302131861 +454 3.961897402027128 69.76826446919061 149.63460753897365 +455 3.9706240482870996 68.46331929392566 149.4292047137618 +456 3.979350694547071 67.16036525492603 149.17828430524102 +457 3.9880773408070427 65.859799244614 148.88192274619828 +458 3.9968039870670142 64.56201742799516 148.54021031123554 +459 4.005530633326986 63.267415121982765 148.15325108927067 +460 4.014257279586958 61.97638667498026 147.72116295183122 +461 4.022983925846929 60.68932534675927 147.2440775171496 +462 4.031710572106902 59.406623188667986 146.7221401100708 +463 4.040437218366873 58.128670924210155 146.1555097177853 +464 4.049163864626845 56.855857830024895 145.54435894139945 +465 4.057890510886816 55.588571617311 144.88887394336027 +466 4.066617157146788 54.32719831372507 144.1892543907478 +467 4.07534380340676 53.07212214579471 143.4457133944553 +468 4.084070449666731 51.823725421878954 142.65847744427305 +469 4.092797095926703 50.58238841571321 141.8277863398975 +470 4.101523742186674 49.348489250574886 140.95389311788625 +471 4.110250388446646 48.12240378410246 140.03706397458024 +472 4.118977034706617 46.90450549380667 139.07757818501815 +473 4.127703680966589 45.6951653633045 138.07572801786608 +474 4.136430327226561 44.49475176931497 137.03181864639012 +475 4.145156973486532 43.30363036944761 135.94616805549754 +476 4.153883619746504 42.122163990819196 134.81910694487505 +477 4.162610266006475 40.95071251953409 133.65097862825527 +478 4.171336912266447 39.789632791058246 132.44213892883909 +479 4.1800635585264185 38.63927848152484 131.19295607090947 +480 4.1887902047863905 37.50000000000006 129.90381056766583 +481 4.1975168510463625 36.372144381745954 128.57509510531685 +482 4.206243497306334 35.256055182509705 127.20721442346402 +483 4.214970143566306 34.152072373873 125.80058519181364 +484 4.223696789826278 33.06053223969398 124.35563588325626 +485 4.23242343608625 31.981767273671498 122.87280664334867 +486 4.241150082346221 30.91610607806453 121.35254915624213 +487 4.249876728606193 29.863873263596364 119.7953265070939 +488 4.258603374866164 28.82538935057567 118.20161304100833 +489 4.267330021126136 27.800970671262203 116.57189421854561 +490 4.276056667386108 26.790929273509516 114.90666646784662 +491 4.284783313646079 25.795572825711986 113.20643703341585 +492 4.293509959906051 24.81520452308564 111.47172382160912 +493 4.302236606166022 23.850122995312663 109.70305524287565 +494 4.310963252425994 22.900622215575222 107.9009700507977 +495 4.319689898685965 21.966991411008998 106.06601717798223 +496 4.328416544945937 21.04951497460117 104.19875556884968 +497 4.337143191205909 20.1484723785622 102.29975400937475 +498 4.34586983746588 19.264138089195466 100.36959095382882 +499 4.354596483725852 18.396781483292106 98.40885434857611 +500 4.363323129985823 17.546666766076697 96.41814145298106 +501 4.372049776245795 16.714052890727224 94.39805865747572 +502 4.380776422505767 15.899193479495866 92.34922129884875 +503 4.389503068765738 15.102336746453087 90.27225347280735 +504 4.39822971502571 14.32372542187894 88.16778784387103 +505 4.4069563612856815 13.56359667832569 86.03646545265705 +506 4.4156830075456535 12.822182058371911 83.87893552061213 +507 4.4244096538056255 12.099707404093197 81.69585525225406 +508 4.4331363000655974 11.39639278826802 79.48788963498065 +509 4.4418629463255686 10.712452447341592 77.25571123650819 +510 4.4505895925855405 10.048094716167089 74.99999999999997 +511 4.4593162388455125 9.40352196454527 72.72144303695045 +512 4.468042885105484 8.778930535580484 70.42073441788365 +513 4.476769531365456 8.174510685872399 68.09857496093193 +514 4.485496177625427 7.590446527562506 65.75567201836171 +515 4.494222823885399 7.026915972251246 63.392739261104914 +516 4.50294947014537 6.484090676804969 61.010496461370174 +517 4.511676116405342 5.962135991066997 58.60966927339108 +518 4.520402762665314 5.461210907490935 56.190989012386744 +519 4.529129408925285 4.981468012709886 53.755192431795116 +520 4.537856055185257 4.5230534410568595 51.3030214988503 +521 4.546582701445228 4.0861068300512615 48.83522316857363 +522 4.5553093477052 3.6707612778634853 46.35254915624218 +523 4.564035993965171 3.277143302772351 43.85575570841071 +524 4.572762640225143 2.9053728046261 41.34560337255 +525 4.581489286485115 2.5555630283198685 38.82285676537811 +526 4.590215932745086 2.2278205293002977 36.28828433995034 +527 4.598942579005058 1.9222451411073482 33.74265815157983 +528 4.607669225265029 1.638929944964615 31.18675362266411 +529 4.616395871525002 1.3779612414251852 28.621349306481587 +530 4.625122517784973 1.1394185240843901 26.047226650039576 +531 4.633849164044945 0.9233744553646506 23.465169756034562 +532 4.642575810304916 0.7298948443822395 20.875965144009914 +533 4.651302456564888 0.5590386269008513 18.280401510772094 +534 4.66002910282486 0.41085784737950326 15.679269490147892 +535 4.6687557490848315 0.28539764311909244 13.073361412148756 +536 4.6774823953448035 0.1826962305131935 10.463471061618746 +537 4.686209041604775 0.10278489340696251 7.85039343644169 +538 4.694935687864747 0.04568797356781784 5.234924505375147 +539 4.703662334124718 0.011422863270654782 2.617860965592676 +540 4.71238898038469 0.0 6.661338147750939e-14 +541 4.721115626644662 0.011422863270654782 -2.617860965592576 +542 4.729842272904633 0.04568797356781784 -5.234924505375048 +543 4.738568919164605 0.10278489340696251 -7.850393436441557 +544 4.747295565424576 0.18269623051318518 -10.463471061618645 +545 4.756022211684548 0.28539764311909244 -13.073361412148623 +546 4.764748857944519 0.41085784737950326 -15.679269490147792 +547 4.773475504204491 0.559038626900818 -18.280401510771966 +548 4.782202150464463 0.7298948443822312 -20.875965144009783 +549 4.790928796724434 0.9233744553646422 -23.465169756034463 +550 4.799655442984406 1.1394185240843901 -26.047226650039473 +551 4.808382089244377 1.3779612414251852 -28.621349306481488 +552 4.81710873550435 1.6389299449646066 -31.186753622664042 +553 4.825835381764321 1.9222451411073398 -33.74265815157973 +554 4.834562028024293 2.2278205293002893 -36.2882843399502 +555 4.843288674284264 2.55556302831986 -38.82285676537804 +556 4.852015320544236 2.9053728046260745 -41.34560337254987 +557 4.860741966804208 3.2771433027723424 -43.85575570841059 +558 4.869468613064179 3.670761277863477 -46.35254915624208 +559 4.878195259324151 4.0861068300512535 -48.835223168573535 +560 4.886921905584122 4.5230534410568515 -51.303021498850235 +561 4.895648551844094 4.981468012709886 -53.755192431795045 +562 4.9043751981040655 5.461210907490926 -56.190989012386616 +563 4.9131018443640375 5.962135991066956 -58.60966927339103 +564 4.9218284906240095 6.484090676804927 -61.01049646137005 +565 4.930555136883981 7.0269159722512295 -63.39273926110477 +566 4.939281783143953 7.590446527562489 -65.75567201836157 +567 4.948008429403924 8.174510685872367 -68.09857496093187 +568 4.956735075663896 8.778930535580468 -70.42073441788351 +569 4.965461721923867 9.403521964545252 -72.72144303695033 +570 4.974188368183839 10.04809471616708 -74.99999999999987 +571 4.982915014443811 10.712452447341583 -77.2557112365081 +572 4.991641660703782 11.396392788268003 -79.48788963498053 +573 5.000368306963754 12.099707404093172 -81.695855252254 +574 5.009094953223726 12.82218205837187 -83.87893552061203 +575 5.017821599483698 13.56359667832564 -86.03646545265698 +576 5.026548245743669 14.323725421878924 -88.16778784387093 +577 5.035274892003641 15.102336746453046 -90.27225347280728 +578 5.044001538263612 15.899193479495816 -92.34922129884863 +579 5.052728184523584 16.714052890727192 -94.39805865747559 +580 5.061454830783556 17.546666766076648 -96.41814145298093 +581 5.070181477043527 18.39678148329208 -98.40885434857604 +582 5.078908123303499 19.26413808919545 -100.36959095382879 +583 5.08763476956347 20.14847237856215 -102.2997540093747 +584 5.096361415823442 21.049514974601152 -104.19875556884958 +585 5.105088062083414 21.966991411008973 -106.06601717798219 +586 5.113814708343385 22.900622215575172 -107.90097005079764 +587 5.122541354603357 23.850122995312606 -109.70305524287556 +588 5.1312680008633285 24.815204523085566 -111.47172382160905 +589 5.1399946471233005 25.795572825711947 -113.20643703341577 +590 5.148721293383272 26.790929273509473 -114.90666646784659 +591 5.1574479396432436 27.800970671262153 -116.57189421854555 +592 5.1661745859032155 28.82538935057562 -118.2016130410083 +593 5.174901232163187 29.863873263596314 -119.79532650709385 +594 5.183627878423159 30.916106078064505 -121.3525491562421 +595 5.19235452468313 31.981767273671448 -122.87280664334864 +596 5.201081170943102 33.060532239693934 -124.35563588325614 +597 5.209807817203074 34.15207237387296 -125.8005851918136 +598 5.218534463463046 35.25605518250966 -127.20721442346392 +599 5.227261109723017 36.37214438174587 -128.5750951053168 +600 5.235987755982989 37.50000000000001 -129.9038105676658 +601 5.244714402242961 38.63927848152477 -131.19295607090945 +602 5.253441048502932 39.789632791058196 -132.44213892883903 +603 5.262167694762904 40.95071251953401 -133.65097862825525 +604 5.270894341022875 42.12216399081916 -134.819106944875 +605 5.279620987282847 43.30363036944755 -135.94616805549754 +606 5.288347633542818 44.494751769314924 -137.03181864639006 +607 5.29707427980279 45.69516536330446 -138.07572801786603 +608 5.305800926062762 46.90450549380662 -139.07757818501813 +609 5.314527572322733 48.12240378410243 -140.0370639745802 +610 5.323254218582705 49.34848925057485 -140.95389311788622 +611 5.331980864842676 50.58238841571318 -141.82778633989747 +612 5.340707511102648 51.823725421878905 -142.65847744427302 +613 5.349434157362619 53.07212214579462 -143.44571339445523 +614 5.358160803622591 54.32719831372502 -144.18925439074778 +615 5.366887449882563 55.588571617310926 -144.8888739433602 +616 5.3756140961425345 56.85585783002482 -145.5443589413994 +617 5.3843407424025065 58.128670924210084 -146.15550971778526 +618 5.393067388662478 59.40662318866794 -146.7221401100708 +619 5.4017940349224505 60.68932534675921 -147.24407751714963 +620 5.410520681182422 61.97638667498021 -147.7211629518312 +621 5.419247327442394 63.26741512198272 -148.15325108927067 +622 5.427973973702365 64.56201742799503 -148.5402103112355 +623 5.436700619962337 65.85979924461398 -148.88192274619828 +624 5.445427266222309 67.16036525492603 -149.17828430524102 +625 5.45415391248228 68.46331929392561 -149.42920471376183 +626 5.462880558742252 69.76826446919063 -149.63460753897363 +627 5.471607205002223 71.07480328177917 -149.79443021318605 +628 5.480333851262195 72.38253774731241 -149.90862405286435 +629 5.489060497522166 73.69106951720363 -149.97715427345867 +630 5.497787143782138 74.99999999999999 -150.0 +631 5.50651379004211 76.30893048279628 -149.9771542734587 +632 5.515240436302081 77.61746225268752 -149.90862405286435 +633 5.523967082562053 78.92519671822077 -149.79443021318605 +634 5.532693728822024 80.23173553080932 -149.63460753897365 +635 5.541420375081996 81.53668070607432 -149.42920471376186 +636 5.550147021341967 82.83963474507388 -149.178284305241 +637 5.558873667601939 84.14020075538599 -148.88192274619834 +638 5.567600313861911 85.43798257200487 -148.54021031123554 +639 5.576326960121882 86.73258487801724 -148.1532510892707 +640 5.585053606381854 88.02361332501974 -147.72116295183122 +641 5.593780252641825 89.31067465324075 -147.24407751714966 +642 5.602506898901798 90.593376811332 -146.7221401100708 +643 5.611233545161769 91.87132907578986 -146.15550971778526 +644 5.619960191421741 93.14414216997508 -145.54435894139945 +645 5.6286868376817125 94.41142838268901 -144.88887394336027 +646 5.6374134839416845 95.67280168627494 -144.1892543907478 +647 5.6461401302016565 96.92787785420532 -143.44571339445528 +648 5.654866776461628 98.17627457812104 -142.65847744427305 +649 5.6635934227216 99.41761158428677 -141.82778633989747 +650 5.672320068981571 100.65151074942507 -140.95389311788628 +651 5.681046715241543 101.87759621589748 -140.03706397458026 +652 5.689773361501514 103.09549450619333 -139.07757818501815 +653 5.698500007761486 104.3048346366955 -138.07572801786608 +654 5.707226654021458 105.50524823068503 -137.03181864639012 +655 5.715953300281429 106.69636963055238 -135.94616805549754 +656 5.724679946541401 107.87783600918078 -134.81910694487505 +657 5.733406592801372 109.0492874804659 -133.6509786282553 +658 5.742133239061344 110.21036720894176 -132.44213892883909 +659 5.750859885321315 111.36072151847516 -131.19295607090953 +660 5.759586531581287 112.49999999999993 -129.9038105676659 +661 5.768313177841259 113.62785561825406 -128.57509510531688 +662 5.77703982410123 114.74394481749029 -127.20721442346401 +663 5.785766470361202 115.84792762612697 -125.80058519181367 +664 5.794493116621174 116.93946776030603 -124.35563588325626 +665 5.803219762881146 118.01823272632849 -122.87280664334872 +666 5.811946409141117 119.08389392193547 -121.35254915624215 +667 5.820673055401089 120.13612673640364 -119.79532650709392 +668 5.82939970166106 121.1746106494243 -118.20161304100837 +669 5.838126347921032 122.1990293287378 -116.57189421854565 +670 5.846852994181004 123.20907072649047 -114.90666646784665 +671 5.8555796404409755 124.20442717428801 -113.20643703341587 +672 5.8643062867009474 125.18479547691437 -111.47172382160912 +673 5.8730329329609186 126.14987700468733 -109.70305524287569 +674 5.8817595792208905 127.09937778442479 -107.90097005079771 +675 5.890486225480862 128.03300858899098 -106.06601717798225 +676 5.899212871740834 128.9504850253988 -104.19875556884968 +677 5.907939518000806 129.85152762143775 -102.29975400937477 +678 5.916666164260777 130.73586191080452 -100.36959095382883 +679 5.925392810520749 131.60321851670787 -98.40885434857616 +680 5.93411945678072 132.45333323392327 -96.41814145298109 +681 5.942846103040692 133.28594710927274 -94.39805865747569 +682 5.951572749300664 134.10080652050416 -92.34922129884876 +683 5.960299395560635 134.8976632535469 -90.2722534728074 +684 5.969026041820607 135.67627457812102 -88.167787843871 +685 5.977752688080578 136.43640332167433 -86.03646545265713 +686 5.98647933434055 137.17781794162806 -83.87893552061215 +687 5.995205980600522 137.9002925959068 -81.69585525225406 +688 6.003932626860494 138.60360721173197 -79.48788963498065 +689 6.012659273120465 139.2875475526584 -77.2557112365082 +690 6.021385919380437 139.95190528383287 -75.0 +691 6.030112565640409 140.59647803545474 -72.72144303695046 +692 6.03883921190038 141.2210694644195 -70.42073441788365 +693 6.047565858160352 141.82548931412762 -68.09857496093197 +694 6.056292504420323 142.40955347243752 -65.75567201836171 +695 6.065019150680295 142.97308402774874 -63.392739261104914 +696 6.073745796940266 143.51590932319505 -61.01049646137018 +697 6.082472443200238 144.03786400893304 -58.60966927339113 +698 6.09119908946021 144.5387890925091 -56.19098901238675 +699 6.0999257357201815 145.01853198729012 -53.75519243179515 +700 6.1086523819801535 145.47694655894313 -51.303021498850335 +701 6.117379028240125 145.91389316994875 -48.83522316857368 +702 6.126105674500097 146.32923872213652 -46.35254915624221 +703 6.134832320760068 146.72285669722766 -43.85575570841071 +704 6.14355896702004 147.0946271953739 -41.34560337255001 +705 6.152285613280012 147.44443697168012 -38.82285676537814 +706 6.161012259539983 147.77217947069974 -36.288284339950344 +707 6.169738905799955 148.07775485889266 -33.74265815157983 +708 6.178465552059926 148.36107005503538 -31.186753622664142 +709 6.187192198319899 148.6220387585748 -28.621349306481626 +710 6.19591884457987 148.8605814759156 -26.04722665003961 +711 6.204645490839842 149.07662554463536 -23.465169756034562 +712 6.213372137099813 149.27010515561776 -20.87596514400992 +713 6.222098783359785 149.44096137309916 -18.280401510772126 +714 6.230825429619757 149.58914215262047 -15.679269490147922 +715 6.239552075879728 149.71460235688093 -13.07336141214879 +716 6.2482787221397 149.81730376948678 -10.463471061618744 +717 6.257005368399671 149.89721510659302 -7.85039343644169 +718 6.265732014659643 149.95431202643218 -5.234924505375147 +719 6.274458660919614 149.98857713672933 -2.61786096559271 + +HARMONIC_2 +N 720 RADIANS + +0 0.0 0.0 -0.0 +1 0.008726646259971648 0.027412784140690705 -6.2819094064501355 +2 0.017453292519943295 0.10961773830790611 -12.55616527394248 +3 0.02617993877991494 0.24651470842771694 -18.81512338817758 +4 0.03490658503988659 0.4379369066293687 -25.051158172811725 +5 0.04363323129985824 0.6836511144506341 -31.25667198004754 +6 0.05235987755982988 0.983357966978734 -37.424104347196625 +7 0.061086523819801536 1.3366923175801637 -43.54594120794012 +8 0.06981317007977318 1.7432236827756546 -49.61472404705978 +9 0.07853981633974483 2.2024567667180763 -55.62305898749062 +10 0.08726646259971647 2.713832064634096 -61.56362579862038 +11 0.09599310885968812 3.276726544494581 -67.42918681486422 +12 0.10471975511965977 3.890454406082966 -73.21259575364407 +13 0.11344640137963141 4.554267916537463 -78.90680642203391 +14 0.12217304763960307 5.267358321348265 -84.50488130146033 +15 0.1308996938995747 6.028856829700248 -90.00000000000001 +16 0.13962634015954636 6.837835672960817 -95.38546756197688 +17 0.148352986419518 7.693309235023127 -100.65472262473446 +18 0.15707963267948966 8.594235253127374 -105.80134541264522 +19 0.16580627893946132 9.539516087697514 -110.81906555861842 +20 0.17453292519943295 10.528000059645974 -115.70176974357709 +21 0.1832595714594046 11.558482853517255 -120.44350914459449 +22 0.19198621771937624 12.629708984760681 -125.03850668261958 +23 0.20071286397934787 13.740373329345113 -129.48116406095727 +24 0.20943951023931953 14.889122713851378 -133.76606858593104 +25 0.2181661564992912 16.074557564105724 -137.88799976141604 +26 0.22689280275926282 17.295233610345345 -141.84193564920994 +27 0.23561944901923448 18.549663646838678 -145.6230589874906 +28 0.24434609527920614 19.836319343816424 -149.2267630599075 +29 0.2530727415391778 21.15363310950578 -152.64865730815677 +30 0.2617993877991494 22.50000000000001 -155.88457268119893 +31 0.27052603405912107 23.87377967463492 -158.93056671460687 +32 0.2792526803190927 25.273298394491498 -161.78292833385004 +33 0.28797932657906433 26.696851061588994 -164.43818237566816 +34 0.296705972839036 28.142703296283962 -166.8930938220218 +35 0.30543261909900765 29.60909355034492 -169.14467174146358 +36 0.3141592653589793 31.094235253127366 -171.19017293312768 +37 0.32288591161895097 32.59631898823504 -173.0271052688973 +38 0.33161255787892263 34.11351469801494 -174.65323072967948 +39 0.3403392041388943 35.64397391320081 -176.06656813208505 +40 0.3490658503988659 37.185832004988114 -177.26539554219747 +41 0.35779249665883756 38.73721045679706 -178.24825237348261 +42 0.3665191429188092 40.29621915295561 -179.01394116628916 +43 0.3752457891787809 41.86095868151437 -179.56152904676833 +44 0.3839724354387525 43.42952264838744 -179.89034886343723 +45 0.39269908169872414 45.00000000000002 -180.00000000000003 +46 0.40142572795869574 46.57047735161251 -179.8903488634373 +47 0.41015237421866746 48.139041318485646 -179.56152904676833 +48 0.41887902047863906 49.70378084704442 -179.0139411662891 +49 0.42760566673861067 51.262789543202935 -178.24825237348256 +50 0.4363323129985824 52.81416799501187 -177.26539554219747 +51 0.445058959258554 54.35602608679914 -176.0665681320851 +52 0.45378560551852565 55.88648530198504 -174.6532307296794 +53 0.4625122517784973 57.40368101176496 -173.02710526889746 +54 0.47123889803846897 58.905764746872634 -171.19017293312766 +55 0.4799655442984406 60.3909064496551 -169.14467174146353 +56 0.4886921905584123 61.85729670371604 -166.89309382202177 +57 0.4974188368183839 63.303148938411006 -164.43818237566816 +58 0.5061454830783556 64.7267016055085 -161.78292833385 +59 0.5148721293383272 66.12622032536507 -158.93056671460687 +60 0.5235987755982988 67.49999999999999 -155.88457268119902 +61 0.5323254218582705 68.8463668904942 -152.64865730815671 +62 0.5410520681182421 70.16368065618362 -149.22676305990743 +63 0.5497787143782138 71.4503363531613 -145.6230589874906 +64 0.5585053606381855 72.70476638965464 -141.84193564920994 +65 0.5672320068981571 73.9254424358943 -137.887999761416 +66 0.5759586531581287 75.11087728614861 -133.76606858593098 +67 0.5846852994181004 76.2596266706549 -129.4811640609572 +68 0.593411945678072 77.37029101523932 -125.03850668261944 +69 0.6021385919380438 78.44151714648277 -120.4435091445944 +70 0.6108652381980153 79.47199994035401 -115.70176974357716 +71 0.619591884457987 80.4604839123025 -110.81906555861849 +72 0.6283185307179586 81.40576474687263 -105.80134541264516 +73 0.6370451769779303 82.30669076497688 -100.65472262473438 +74 0.6457718232379019 83.16216432703916 -95.38546756197684 +75 0.6544984694978736 83.97114317029974 -89.99999999999999 +76 0.6632251157578453 84.73264167865172 -84.50488130146033 +77 0.6719517620178168 85.4457320834625 -78.90680642203387 +78 0.6806784082777886 86.10954559391705 -73.21259575364402 +79 0.6894050545377601 86.72327345550543 -67.42918681486411 +80 0.6981317007977318 87.2861679353659 -61.56362579862036 +81 0.7068583470577035 87.79754323328191 -55.62305898749052 +82 0.7155849933176751 88.25677631722436 -49.61472404705994 +83 0.7243116395776468 88.66330768241984 -43.545941207940224 +84 0.7330382858376184 89.01664203302126 -37.42410434719666 +85 0.74176493209759 89.31634888554936 -31.256671980047535 +86 0.7504915783575618 89.56206309337068 -25.051158172811732 +87 0.7592182246175333 89.7534852915723 -18.815123388177597 +88 0.767944870877505 89.89038226169208 -12.556165273942534 +89 0.7766715171374766 89.97258721585929 -6.281909406450126 +90 0.7853981633974483 90.0 -0.0 +91 0.7941248096574199 89.97258721585929 6.281909406450126 +92 0.8028514559173915 89.89038226169208 12.556165273942534 +93 0.8115781021773633 89.7534852915723 18.815123388177597 +94 0.8203047484373349 89.56206309337068 25.051158172811732 +95 0.8290313946973066 89.31634888554937 31.256671980047386 +96 0.8377580409572781 89.01664203302127 37.42410434719654 +97 0.8464846872172498 88.66330768241984 43.54594120794002 +98 0.8552113334772213 88.25677631722434 49.61472404705979 +99 0.8639379797371932 87.79754323328191 55.62305898749072 +100 0.8726646259971648 87.2861679353659 61.56362579862031 +101 0.8813912722571364 86.72327345550542 67.42918681486421 +102 0.890117918517108 86.10954559391705 73.21259575364402 +103 0.8988445647770796 85.44573208346254 78.90680642203387 +104 0.9075712110370513 84.73264167865172 84.50488130146033 +105 0.9162978572970231 83.97114317029973 90.00000000000004 +106 0.9250245035569946 83.1621643270392 95.38546756197682 +107 0.9337511498169663 82.30669076497686 100.65472262473436 +108 0.9424777960769379 81.40576474687263 105.80134541264516 +109 0.9512044423369095 80.4604839123025 110.81906555861842 +110 0.9599310885968813 79.47199994035401 115.70176974357716 +111 0.9686577348568529 78.44151714648272 120.44350914459453 +112 0.9773843811168246 77.3702910152393 125.03850668261954 +113 0.9861110273767961 76.25962667065488 129.48116406095718 +114 0.9948376736367678 75.11087728614864 133.76606858593098 +115 1.0035643198967394 73.9254424358943 137.887999761416 +116 1.0122909661567112 72.70476638965464 141.84193564920994 +117 1.0210176124166828 71.4503363531613 145.6230589874906 +118 1.0297442586766543 70.16368065618362 149.22676305990743 +119 1.038470904936626 68.84636689049425 152.64865730815666 +120 1.0471975511965976 67.5 155.8845726811989 +121 1.0559241974565694 66.12622032536508 158.93056671460678 +122 1.064650843716541 64.72670160550852 161.78292833384995 +123 1.0733774899765127 63.30314893841102 164.43818237566816 +124 1.0821041362364843 61.85729670371604 166.89309382202177 +125 1.0908307824964558 60.39090644965513 169.14467174146347 +126 1.0995574287564276 58.905764746872634 171.19017293312766 +127 1.1082840750163994 57.40368101176494 173.02710526889743 +128 1.117010721276371 55.88648530198504 174.6532307296794 +129 1.1257373675363425 54.35602608679919 176.06656813208497 +130 1.1344640137963142 52.814167995011864 177.2653955421975 +131 1.1431906600562858 51.262789543202956 178.24825237348256 +132 1.1519173063162573 49.70378084704444 179.01394116628916 +133 1.160643952576229 48.13904131848563 179.56152904676836 +134 1.1693705988362009 46.57047735161251 179.8903488634373 +135 1.1780972450961724 45.00000000000002 180.00000000000003 +136 1.186823891356144 43.42952264838747 179.89034886343728 +137 1.1955505376161157 41.86095868151437 179.56152904676838 +138 1.2042771838760875 40.296219152955565 179.0139411662892 +139 1.213003830136059 38.73721045679706 178.24825237348261 +140 1.2217304763960306 37.18583200498815 177.26539554219755 +141 1.2304571226560024 35.64397391320081 176.06656813208505 +142 1.239183768915974 34.11351469801496 174.65323072967934 +143 1.2479104151759455 32.59631898823506 173.02710526889743 +144 1.2566370614359172 31.094235253127366 171.19017293312768 +145 1.265363707695889 29.609093550344895 169.14467174146347 +146 1.2740903539558606 28.142703296283962 166.8930938220218 +147 1.2828170002158321 26.696851061589022 164.43818237566828 +148 1.2915436464758039 25.273298394491498 161.78292833385004 +149 1.3002702927357754 23.873779674634918 158.9305667146068 +150 1.3089969389957472 22.499999999999996 155.88457268119896 +151 1.3177235852557188 21.15363310950579 152.64865730815671 +152 1.3264502315156905 19.836319343816385 149.22676305990748 +153 1.335176877775662 18.549663646838727 145.62305898749062 +154 1.3439035240356336 17.295233610345395 141.84193564920997 +155 1.3526301702956054 16.074557564105724 137.88799976141604 +156 1.3613568165555772 14.889122713851354 133.7660685859309 +157 1.3700834628155487 13.740373329345113 129.48116406095727 +158 1.3788101090755203 12.629708984760697 125.03850668261954 +159 1.3875367553354918 11.558482853517294 120.4435091445946 +160 1.3962634015954636 10.528000059645994 115.7017697435772 +161 1.4049900478554354 9.5395160876975 110.81906555861845 +162 1.413716694115407 8.594235253127374 105.80134541264522 +163 1.4224433403753785 7.693309235023142 100.6547226247346 +164 1.4311699866353502 6.837835672960817 95.38546756197688 +165 1.4398966328953218 6.028856829700258 90.00000000000016 +166 1.4486232791552935 5.267358321348265 84.50488130146033 +167 1.457349925415265 4.5542679165374835 78.90680642203405 +168 1.4660765716752369 3.890454406082966 73.21259575364407 +169 1.4748032179352084 3.276726544494581 67.42918681486422 +170 1.48352986419518 2.713832064634131 61.5636257986205 +171 1.4922565104551517 2.2024567667180763 55.62305898749062 +172 1.5009831567151235 1.7432236827756498 49.61472404705977 +173 1.509709802975095 1.3366923175801686 43.545941207940274 +174 1.5184364492350666 0.983357966978759 37.424104347196774 +175 1.5271630954950384 0.6836511144506491 31.25667198004752 +176 1.53588974175501 0.4379369066293537 25.051158172811895 +177 1.5446163880149815 0.24651470842770196 18.815123388177746 +178 1.5533430342749532 0.10961773830790611 12.55616527394264 +179 1.562069680534925 0.027412784140690705 6.281909406450135 +180 1.5707963267948966 0.0 -0.0 +181 1.579522973054868 0.027412784140690705 -6.281909406450055 +182 1.5882496193148399 0.10961773830790611 -12.55616527394256 +183 1.5969762655748114 0.24651470842769696 -18.815123388177504 +184 1.605702911834783 0.4379369066293487 -25.051158172811576 +185 1.6144295580947547 0.6836511144506091 -31.2566719800474 +186 1.6231562043547265 0.983357966978754 -37.42410434719669 +187 1.6318828506146983 1.3366923175801686 -43.545941207940274 +188 1.6406094968746698 1.7432236827756546 -49.61472404705985 +189 1.6493361431346414 2.202456766718066 -55.62305898749046 +190 1.6580627893946132 2.7138320646341207 -61.56362579862043 +191 1.6667894356545847 3.276726544494561 -67.42918681486417 +192 1.6755160819145563 3.890454406082956 -73.2125957536439 +193 1.684242728174528 4.554267916537463 -78.90680642203391 +194 1.6929693744344996 5.267358321348261 -84.50488130146024 +195 1.7016960206944711 6.028856829700228 -89.99999999999987 +196 1.7104226669544427 6.837835672960802 -95.38546756197677 +197 1.7191493132144147 7.693309235023127 -100.65472262473446 +198 1.7278759594743864 8.594235253127385 -105.8013454126453 +199 1.736602605734358 9.539516087697509 -110.81906555861852 +200 1.7453292519943295 10.528000059645974 -115.70176974357709 +201 1.7540558982543013 11.558482853517269 -120.44350914459446 +202 1.7627825445142729 12.629708984760697 -125.03850668261954 +203 1.7715091907742444 13.740373329345093 -129.48116406095713 +204 1.780235837034216 14.889122713851354 -133.7660685859309 +205 1.7889624832941877 16.074557564105724 -137.88799976141604 +206 1.7976891295541593 17.295233610345345 -141.84193564920994 +207 1.8064157758141308 18.54966364683865 -145.62305898749042 +208 1.8151424220741026 19.836319343816385 -149.22676305990748 +209 1.8238690683340746 21.15363310950582 -152.6486573081567 +210 1.8325957145940461 22.50000000000001 -155.88457268119905 +211 1.8413223608540177 23.873779674634918 -158.9305667146068 +212 1.8500490071139892 25.273298394491498 -161.78292833385004 +213 1.858775653373961 26.696851061588987 -164.43818237566813 +214 1.8675022996339325 28.14270329628394 -166.89309382202174 +215 1.876228945893904 29.609093550344895 -169.14467174146347 +216 1.8849555921538759 31.09423525312735 -171.19017293312763 +217 1.8936822384138474 32.59631898823501 -173.02710526889732 +218 1.902408884673819 34.11351469801491 -174.6532307296794 +219 1.9111355309337907 35.64397391320081 -176.06656813208505 +220 1.9198621771937625 37.185832004988114 -177.2653955421974 +221 1.9285888234537343 38.73721045679706 -178.24825237348261 +222 1.9373154697137058 40.2962191529556 -179.01394116628924 +223 1.9460421159736774 41.86095868151434 -179.56152904676836 +224 1.9547687622336491 43.42952264838746 -179.89034886343725 +225 1.9634954084936207 45.0 -180.0 +226 1.9722220547535922 46.57047735161251 -179.8903488634373 +227 1.980948701013564 48.13904131848563 -179.56152904676836 +228 1.9896753472735356 49.70378084704437 -179.0139411662891 +229 1.9984019935335071 51.262789543202906 -178.24825237348261 +230 2.007128639793479 52.814167995011836 -177.2653955421975 +231 2.015855286053451 54.35602608679921 -176.06656813208497 +232 2.0245819323134224 55.88648530198507 -174.65323072967934 +233 2.033308578573394 57.40368101176497 -173.02710526889737 +234 2.0420352248333655 58.905764746872634 -171.19017293312766 +235 2.050761871093337 60.39090644965504 -169.14467174146355 +236 2.0594885173533086 61.857296703715996 -166.89309382202183 +237 2.0682151636132806 63.30314893841102 -164.43818237566816 +238 2.076941809873252 64.72670160550847 -161.78292833385 +239 2.0856684561332237 66.12622032536507 -158.93056671460687 +240 2.0943951023931953 67.49999999999996 -155.8845726811991 +241 2.103121748653167 68.84636689049415 -152.6486573081569 +242 2.111848394913139 70.1636806561836 -149.22676305990746 +243 2.1205750411731104 71.4503363531613 -145.6230589874906 +244 2.129301687433082 72.7047663896546 -141.84193564920994 +245 2.138028333693054 73.9254424358943 -137.887999761416 +246 2.1467549799530254 75.11087728614862 -133.76606858593098 +247 2.155481626212997 76.25962667065488 -129.48116406095718 +248 2.1642082724729685 77.3702910152393 -125.03850668261954 +249 2.17293491873294 78.4415171464827 -120.44350914459473 +250 2.1816615649929116 79.47199994035397 -115.70176974357719 +251 2.1903882112528836 80.4604839123025 -110.81906555861858 +252 2.199114857512855 81.40576474687262 -105.8013454126452 +253 2.2078415037728267 82.30669076497685 -100.65472262473452 +254 2.2165681500327987 83.16216432703918 -95.38546756197684 +255 2.2252947962927703 83.97114317029973 -90.00000000000004 +256 2.234021442552742 84.73264167865172 -84.50488130146036 +257 2.2427480888127134 85.44573208346253 -78.90680642203401 +258 2.251474735072685 86.10954559391705 -73.21259575364415 +259 2.260201381332657 86.72327345550542 -67.42918681486404 +260 2.2689280275926285 87.2861679353659 -61.56362579862031 +261 2.2776546738526 87.7975432332819 -55.62305898749065 +262 2.2863813201125716 88.25677631722434 -49.61472404706005 +263 2.295107966372543 88.66330768241983 -43.545941207940366 +264 2.3038346126325147 89.01664203302124 -37.42410434719695 +265 2.3125612588924866 89.31634888554939 -31.256671980047425 +266 2.321287905152458 89.56206309337068 -25.051158172811952 +267 2.33001455141243 89.75348529157229 -18.815123388177536 +268 2.3387411976724017 89.8903822616921 -12.556165273942474 +269 2.3474678439323733 89.97258721585929 -6.281909406450126 +270 2.356194490192345 90.0 -0.0 +271 2.3649211364523164 89.97258721585932 6.281909406449996 +272 2.373647782712288 89.8903822616921 12.556165273942385 +273 2.3823744289722595 89.7534852915723 18.815123388177277 +274 2.3911010752322315 89.56206309337068 25.051158172811732 +275 2.399827721492203 89.31634888554936 31.256671980047305 +276 2.408554367752175 89.01664203302124 37.424104347196824 +277 2.4172810140121466 88.66330768241981 43.545941207940174 +278 2.426007660272118 88.25677631722435 49.61472404705985 +279 2.4347343065320897 87.79754323328193 55.62305898749038 +280 2.443460952792061 87.2861679353659 61.56362579862025 +281 2.4521875990520328 86.72327345550545 67.42918681486397 +282 2.4609142453120048 86.10954559391703 73.21259575364407 +283 2.4696408915719763 85.44573208346253 78.90680642203377 +284 2.478367537831948 84.73264167865173 84.50488130146026 +285 2.4870941840919194 83.97114317029977 89.99999999999989 +286 2.495820830351891 83.16216432703918 95.38546756197668 +287 2.504547476611863 82.30669076497688 100.65472262473438 +288 2.5132741228718345 81.40576474687268 105.80134541264506 +289 2.522000769131806 80.4604839123025 110.81906555861842 +290 2.530727415391778 79.47199994035401 115.70176974357716 +291 2.5394540616517496 78.44151714648274 120.4435091445945 +292 2.548180707911721 77.37029101523933 125.03850668261934 +293 2.5569073541716927 76.2596266706549 129.4811640609572 +294 2.5656340004316642 75.11087728614866 133.76606858593075 +295 2.574360646691636 73.92544243589431 137.88799976141587 +296 2.5830872929516078 72.70476638965462 141.84193564920997 +297 2.5918139392115793 71.4503363531613 145.6230589874906 +298 2.600540585471551 70.16368065618362 149.22676305990743 +299 2.609267231731523 68.8463668904942 152.64865730815671 +300 2.6179938779914944 67.5 155.8845726811989 +301 2.626720524251466 66.12622032536508 158.93056671460678 +302 2.6354471705114375 64.72670160550852 161.78292833384995 +303 2.644173816771409 63.303148938411034 164.43818237566802 +304 2.652900463031381 61.85729670371604 166.89309382202177 +305 2.6616271092913526 60.3909064496551 169.1446717414635 +306 2.670353755551324 58.905764746872634 171.19017293312766 +307 2.6790804018112957 57.403681011765 173.0271052688973 +308 2.6878070480712672 55.886485301985104 174.65323072967925 +309 2.696533694331239 54.35602608679924 176.06656813208485 +310 2.705260340591211 52.81416799501187 177.26539554219747 +311 2.7139869868511823 51.26278954320299 178.24825237348256 +312 2.7227136331111543 49.7037808470444 179.0139411662892 +313 2.731440279371126 48.139041318485646 179.56152904676833 +314 2.7401669256310974 46.57047735161255 179.89034886343723 +315 2.748893571891069 45.00000000000002 180.00000000000003 +316 2.7576202181510405 43.42952264838749 179.8903488634373 +317 2.766346864411012 41.860958681514404 179.56152904676838 +318 2.7750735106709836 40.29621915295568 179.01394116628921 +319 2.7838001569309556 38.73721045679706 178.24825237348261 +320 2.792526803190927 37.18583200498818 177.26539554219747 +321 2.801253449450899 35.643973913200824 176.06656813208494 +322 2.8099800957108707 34.11351469801493 174.65323072967934 +323 2.8187067419708423 32.59631898823504 173.0271052688973 +324 2.827433388230814 31.09423525312738 171.19017293312766 +325 2.8361600344907854 29.60909355034492 169.14467174146358 +326 2.844886680750757 28.14270329628401 166.89309382202177 +327 2.853613327010729 26.696851061588994 164.43818237566816 +328 2.8623399732707004 25.273298394491498 161.78292833385004 +329 2.871066619530672 23.873779674634946 158.93056671460693 +330 2.8797932657906435 22.50000000000005 155.88457268119896 +331 2.888519912050615 21.15363310950582 152.64865730815686 +332 2.897246558310587 19.836319343816406 149.22676305990757 +333 2.9059732045705586 18.549663646838713 145.62305898749065 +334 2.91469985083053 17.295233610345413 141.84193564921014 +335 2.923426497090502 16.074557564105724 137.88799976141604 +336 2.9321531433504737 14.889122713851378 133.76606858593104 +337 2.9408797896104453 13.740373329345143 129.48116406095718 +338 2.949606435870417 12.629708984760711 125.03850668261964 +339 2.9583330821303884 11.558482853517294 120.4435091445946 +340 2.96705972839036 10.528000059646029 115.70176974357733 +341 2.975786374650332 9.539516087697514 110.81906555861842 +342 2.9845130209103035 8.594235253127394 105.8013454126452 +343 2.993239667170275 7.693309235023142 100.6547226247346 +344 3.001966313430247 6.837835672960817 95.38546756197688 +345 3.0106929596902186 6.028856829700268 90.0 +346 3.01941960595019 5.2673583213483255 84.50488130146043 +347 3.0281462522101616 4.5542679165374835 78.90680642203407 +348 3.036872898470133 3.890454406082986 73.21259575364422 +349 3.045599544730105 3.276726544494551 67.4291868148641 +350 3.0543261909900767 2.713832064634096 61.56362579862038 +351 3.0630528372500483 2.202456766718096 55.62305898749061 +352 3.07177948351002 1.7432236827756697 49.614724047060086 +353 3.0805061297699914 1.3366923175801788 43.54594120794044 +354 3.089232776029963 0.983357966978784 37.42410434719691 +355 3.097959422289935 0.6836511144506341 31.256671980047546 +356 3.1066860685499065 0.4379369066293337 25.051158172811903 +357 3.1154127148098785 0.24651470842769696 18.81512338817742 +358 3.12413936106985 0.10961773830790611 12.55616527394248 +359 3.1328660073298216 0.02741278414067072 6.281909406450137 +360 3.141592653589793 0.0 1.5987211554602254e-13 +361 3.1503192998497647 0.02741278414067072 -6.281909406450057 +362 3.159045946109736 0.10961773830790611 -12.55616527394232 +363 3.1677725923697078 0.24651470842769696 -18.815123388177344 +364 3.1764992386296798 0.4379369066293287 -25.051158172811743 +365 3.1852258848896513 0.6836511144506291 -31.256671980047386 +366 3.193952531149623 0.983357966978764 -37.42410434719644 +367 3.2026791774095944 1.3366923175801537 -43.54594120793988 +368 3.211405823669566 1.7432236827755998 -49.61472404705958 +369 3.2201324699295375 2.202456766718046 -55.62305898749016 +370 3.2288591161895095 2.713832064634091 -61.563625798620215 +371 3.237585762449481 3.276726544494546 -67.42918681486394 +372 3.246312408709453 3.890454406082966 -73.21259575364407 +373 3.255039054969425 4.554267916537493 -78.90680642203421 +374 3.2637657012293966 5.2673583213483255 -84.5048813014605 +375 3.272492347489368 6.028856829700283 -90.00000000000016 +376 3.2812189937493397 6.837835672960862 -95.3854675619769 +377 3.2899456400093112 7.693309235023127 -100.65472262473446 +378 3.2986722862692828 8.594235253127355 -105.80134541264509 +379 3.3073989325292543 9.539516087697505 -110.81906555861835 +380 3.3161255787892263 10.52800005964601 -115.70176974357719 +381 3.324852225049198 11.558482853517274 -120.44350914459449 +382 3.3335788713091694 12.629708984760672 -125.0385066826195 +383 3.342305517569141 13.740373329345093 -129.48116406095713 +384 3.3510321638291125 14.889122713851329 -133.7660685859309 +385 3.359758810089084 16.074557564105664 -137.88799976141587 +386 3.368485456349056 17.295233610345388 -141.84193564920992 +387 3.3772121026090276 18.5496636468387 -145.62305898749045 +388 3.385938748868999 19.83631934381636 -149.22676305990737 +389 3.3946653951289707 21.15363310950572 -152.64865730815654 +390 3.4033920413889422 22.49999999999994 -155.88457268119873 +391 3.412118687648914 23.873779674634825 -158.93056671460673 +392 3.4208453339088853 25.273298394491427 -161.78292833384987 +393 3.4295719801688573 26.696851061588944 -164.43818237566813 +394 3.4382986264288293 28.142703296283972 -166.89309382202177 +395 3.447025272688801 29.60909355034489 -169.14467174146347 +396 3.455751918948773 31.094235253127415 -171.19017293312766 +397 3.4644785652087444 32.59631898823507 -173.02710526889751 +398 3.473205211468716 34.11351469801496 -174.65323072967934 +399 3.4819318577286875 35.64397391320084 -176.06656813208502 +400 3.490658503988659 37.185832004988114 -177.26539554219747 +401 3.4993851502486306 38.73721045679703 -178.24825237348256 +402 3.5081117965086026 40.29621915295563 -179.01394116628924 +403 3.516838442768574 41.86095868151437 -179.56152904676833 +404 3.5255650890285457 43.42952264838744 -179.89034886343723 +405 3.5342917352885173 44.99999999999997 -180.00000000000003 +406 3.543018381548489 46.570477351612524 -179.89034886343723 +407 3.5517450278084604 48.139041318485596 -179.5615290467683 +408 3.560471674068432 49.70378084704433 -179.01394116628924 +409 3.569198320328404 51.262789543202956 -178.24825237348256 +410 3.5779249665883754 52.814167995011836 -177.2653955421974 +411 3.586651612848347 54.356026086799105 -176.06656813208502 +412 3.5953782591083185 55.88648530198498 -174.65323072967934 +413 3.60410490536829 57.40368101176488 -173.02710526889746 +414 3.6128315516282616 58.90576474687254 -171.19017293312768 +415 3.6215581978882336 60.39090644965505 -169.14467174146355 +416 3.630284844148205 61.857296703715996 -166.89309382202174 +417 3.639011490408177 63.303148938411 -164.43818237566816 +418 3.647738136668149 64.72670160550854 -161.78292833384995 +419 3.6564647829281207 66.12622032536513 -158.93056671460678 +420 3.6651914291880923 67.50000000000001 -155.8845726811989 +421 3.673918075448064 68.84636689049422 -152.6486573081567 +422 3.6826447217080354 70.1636806561836 -149.22676305990754 +423 3.691371367968007 71.45033635316125 -145.6230589874906 +424 3.7000980142279785 72.7047663896546 -141.84193564920994 +425 3.7088246604879505 73.92544243589428 -137.88799976141595 +426 3.717551306747922 75.11087728614862 -133.76606858593098 +427 3.7262779530078936 76.25962667065488 -129.48116406095718 +428 3.735004599267865 77.37029101523927 -125.03850668261958 +429 3.7437312455278366 78.44151714648271 -120.44350914459456 +430 3.752457891787808 79.47199994035397 -115.70176974357719 +431 3.76118453804778 80.4604839123025 -110.81906555861842 +432 3.7699111843077517 81.40576474687262 -105.8013454126452 +433 3.7786378305677233 82.30669076497685 -100.65472262473452 +434 3.787364476827695 83.16216432703914 -95.38546756197704 +435 3.7960911230876664 83.97114317029968 -90.0000000000002 +436 3.804817769347638 84.73264167865166 -84.50488130146057 +437 3.8135444156076095 85.44573208346247 -78.90680642203438 +438 3.8222710618675815 86.109545593917 -73.21259575364421 +439 3.8309977081275535 86.72327345550543 -67.42918681486408 +440 3.839724354387525 87.28616793536585 -61.563625798620386 +441 3.848451000647497 87.79754323328193 -55.62305898749028 +442 3.8571776469074686 88.25677631722435 -49.61472404705969 +443 3.86590429316744 88.66330768241984 -43.545941207940146 +444 3.8746309394274117 89.01664203302126 -37.42410434719666 +445 3.883357585687383 89.31634888554936 -31.256671980047603 +446 3.8920842319473548 89.56206309337064 -25.051158172811835 +447 3.9008108782073267 89.75348529157229 -18.815123388177536 +448 3.9095375244672983 89.8903822616921 -12.556165273942474 +449 3.91826417072727 89.97258721585929 -6.281909406450126 +450 3.9269908169872414 90.0 -4.9960036108132044e-14 +451 3.935717463247213 89.97258721585929 6.281909406449996 +452 3.9444441095071845 89.8903822616921 12.556165273942264 +453 3.953170755767156 89.7534852915723 18.815123388177277 +454 3.961897402027128 89.56206309337068 25.051158172811732 +455 3.9706240482870996 89.31634888554936 31.256671980047305 +456 3.979350694547071 89.01664203302126 37.42410434719644 +457 3.9880773408070427 88.66330768241984 43.545941207939904 +458 3.9968039870670142 88.25677631722436 49.61472404705954 +459 4.005530633326986 87.79754323328193 55.62305898749019 +460 4.014257279586958 87.2861679353659 61.56362579862025 +461 4.022983925846929 86.72327345550546 67.42918681486357 +462 4.031710572106902 86.10954559391699 73.21259575364432 +463 4.040437218366873 85.44573208346253 78.90680642203384 +464 4.049163864626845 84.73264167865169 84.50488130146046 +465 4.057890510886816 83.97114317029977 89.99999999999977 +466 4.066617157146788 83.16216432703916 95.38546756197688 +467 4.07534380340676 82.30669076497685 100.6547226247346 +468 4.084070449666731 81.40576474687265 105.80134541264509 +469 4.092797095926703 80.46048391230246 110.81906555861863 +470 4.101523742186674 79.47199994035402 115.7017697435769 +471 4.110250388446646 78.44151714648272 120.44350914459453 +472 4.118977034706617 77.37029101523936 125.03850668261924 +473 4.127703680966589 76.25962667065491 129.48116406095713 +474 4.136430327226561 75.11087728614861 133.76606858593098 +475 4.145156973486532 73.92544243589433 137.8879997614158 +476 4.153883619746504 72.70476638965462 141.84193564920997 +477 4.162610266006475 71.45033635316139 145.6230589874902 +478 4.171336912266447 70.16368065618366 149.22676305990734 +479 4.1800635585264185 68.84636689049435 152.64865730815634 +480 4.1887902047863905 67.50000000000006 155.88457268119873 +481 4.1975168510463625 66.1262203253651 158.93056671460678 +482 4.206243497306334 64.72670160550861 161.7829283338499 +483 4.214970143566306 63.30314893841105 164.4381823756681 +484 4.223696789826278 61.85729670371604 166.89309382202177 +485 4.23242343608625 60.39090644965502 169.14467174146355 +486 4.241150082346221 58.905764746872656 171.19017293312763 +487 4.249876728606193 57.40368101176494 173.02710526889743 +488 4.258603374866164 55.886485301985104 174.65323072967925 +489 4.267330021126136 54.35602608679916 176.0665681320849 +490 4.276056667386108 52.8141679950118 177.26539554219744 +491 4.284783313646079 51.26278954320299 178.24825237348261 +492 4.293509959906051 49.7037808470444 179.0139411662892 +493 4.302236606166022 48.13904131848572 179.56152904676833 +494 4.310963252425994 46.570477351612574 179.89034886343723 +495 4.319689898685965 45.0000000000001 179.99999999999997 +496 4.328416544945937 43.4295226483875 179.89034886343734 +497 4.337143191205909 41.86095868151434 179.56152904676836 +498 4.34586983746588 40.29621915295566 179.01394116628924 +499 4.354596483725852 38.73721045679708 178.24825237348264 +500 4.363323129985823 37.18583200498824 177.26539554219758 +501 4.372049776245795 35.64397391320091 176.06656813208505 +502 4.380776422505767 34.11351469801496 174.65323072967934 +503 4.389503068765738 32.596318988235126 173.02710526889743 +504 4.39822971502571 31.094235253127383 171.19017293312774 +505 4.4069563612856815 29.60909355034503 169.14467174146358 +506 4.4156830075456535 28.142703296284033 166.89309382202183 +507 4.4244096538056255 26.696851061588987 164.43818237566813 +508 4.4331363000655974 25.273298394491455 161.78292833384998 +509 4.4418629463255686 23.873779674634946 158.93056671460693 +510 4.4505895925855405 22.49999999999998 155.8845726811989 +511 4.4593162388455125 21.153633109505705 152.64865730815654 +512 4.468042885105484 19.836319343816406 149.22676305990757 +513 4.476769531365456 18.54966364683867 145.62305898749034 +514 4.485496177625427 17.29523361034543 141.8419356492101 +515 4.494222823885399 16.074557564105724 137.88799976141604 +516 4.50294947014537 14.88912271385146 133.76606858593118 +517 4.511676116405342 13.740373329345143 129.48116406095718 +518 4.520402762665314 12.629708984760681 125.0385066826194 +519 4.529129408925285 11.558482853517294 120.4435091445946 +520 4.537856055185257 10.528000059645974 115.70176974357709 +521 4.546582701445228 9.53951608769756 110.81906555861873 +522 4.5553093477052 8.594235253127385 105.80134541264532 +523 4.564035993965171 7.693309235023177 100.65472262473489 +524 4.572762640225143 6.837835672960867 95.38546756197717 +525 4.581489286485115 6.028856829700248 90.00000000000001 +526 4.590215932745086 5.267358321348356 84.50488130146071 +527 4.598942579005058 4.5542679165374835 78.90680642203414 +528 4.607669225265029 3.890454406083026 73.2125957536445 +529 4.616395871525002 3.2767265444945357 67.42918681486387 +530 4.625122517784973 2.7138320646341207 61.56362579862043 +531 4.633849164044945 2.2024567667180612 55.62305898749039 +532 4.642575810304916 1.7432236827756697 49.61472404706008 +533 4.651302456564888 1.3366923175801637 43.54594120794012 +534 4.66002910282486 0.983357966978739 37.42410434719637 +535 4.6687557490848315 0.6836511144506541 31.256671980047525 +536 4.6774823953448035 0.4379369066293487 25.051158172811657 +537 4.686209041604775 0.24651470842770196 18.8151233881779 +538 4.694935687864747 0.10961773830790611 12.55616527394256 +539 4.703662334124718 0.0274127841406957 6.281909406450534 +540 4.71238898038469 0.0 1.5987211554602254e-13 +541 4.721115626644662 0.0274127841406957 -6.2819094064502945 +542 4.729842272904633 0.10961773830790611 -12.55616527394232 +543 4.738568919164605 0.24651470842769696 -18.81512338817758 +544 4.747295565424576 0.4379369066293437 -25.05115817281142 +545 4.756022211684548 0.6836511144506391 -31.25667198004721 +546 4.764748857944519 0.983357966978729 -37.424104347196135 +547 4.773475504204491 1.3366923175801138 -43.54594120793983 +548 4.782202150464463 1.7432236827756498 -49.61472404705977 +549 4.790928796724434 2.202456766718046 -55.62305898749016 +550 4.799655442984406 2.7138320646341105 -61.5636257986202 +551 4.808382089244377 3.276726544494521 -67.42918681486363 +552 4.81710873550435 3.890454406083011 -73.21259575364434 +553 4.825835381764321 4.554267916537463 -78.90680642203391 +554 4.834562028024293 5.2673583213483255 -84.50488130146043 +555 4.843288674284264 6.028856829700228 -89.99999999999987 +556 4.852015320544236 6.837835672960817 -95.38546756197688 +557 4.860741966804208 7.693309235023142 -100.6547226247346 +558 4.869468613064179 8.594235253127355 -105.80134541264509 +559 4.878195259324151 9.539516087697534 -110.81906555861855 +560 4.886921905584122 10.528000059645954 -115.70176974357695 +561 4.895648551844094 11.558482853517274 -120.44350914459449 +562 4.9043751981040655 12.629708984760637 -125.03850668261913 +563 4.9131018443640375 13.740373329345093 -129.48116406095713 +564 4.9218284906240095 14.889122713851384 -133.76606858593104 +565 4.930555136883981 16.074557564105667 -137.88799976141578 +566 4.939281783143953 17.29523361034537 -141.84193564920983 +567 4.948008429403924 18.549663646838617 -145.6230589874903 +568 4.956735075663896 19.83631934381635 -149.2267630599073 +569 4.965461721923867 21.153633109505655 -152.64865730815634 +570 4.974188368183839 22.49999999999994 -155.88457268119873 +571 4.982915014443811 23.87377967463491 -158.93056671460675 +572 4.991641660703782 25.273298394491402 -161.78292833384975 +573 5.000368306963754 26.696851061588944 -164.43818237566813 +574 5.009094953223726 28.142703296283962 -166.8930938220218 +575 5.017821599483698 29.60909355034495 -169.14467174146358 +576 5.026548245743669 31.094235253127334 -171.1901729331276 +577 5.035274892003641 32.59631898823506 -173.02710526889743 +578 5.044001538263612 34.11351469801487 -174.65323072967925 +579 5.052728184523584 35.643973913200824 -176.06656813208494 +580 5.061454830783556 37.18583200498815 -177.26539554219755 +581 5.070181477043527 38.737210456797015 -178.24825237348261 +582 5.078908123303499 40.29621915295563 -179.01394116628924 +583 5.08763476956347 41.860958681514276 -179.5615290467684 +584 5.096361415823442 43.42952264838744 -179.89034886343723 +585 5.105088062083414 45.00000000000006 -179.99999999999997 +586 5.113814708343385 46.57047735161251 -179.8903488634373 +587 5.122541354603357 48.13904131848563 -179.56152904676836 +588 5.1312680008633285 49.70378084704432 -179.0139411662893 +589 5.1399946471233005 51.26278954320292 -178.24825237348261 +590 5.148721293383272 52.81416799501175 -177.26539554219755 +591 5.1574479396432436 54.356026086799105 -176.06656813208502 +592 5.1661745859032155 55.88648530198504 -174.6532307296794 +593 5.174901232163187 57.40368101176488 -173.02710526889751 +594 5.183627878423159 58.90576474687263 -171.19017293312766 +595 5.19235452468313 60.39090644965496 -169.14467174146367 +596 5.201081170943102 61.85729670371596 -166.89309382202183 +597 5.209807817203074 63.303148938411 -164.43818237566816 +598 5.218534463463046 64.72670160550852 -161.78292833384995 +599 5.227261109723017 66.12622032536501 -158.930566714607 +600 5.235987755982989 67.5 -155.8845726811989 +601 5.244714402242961 68.8463668904943 -152.64865730815657 +602 5.253441048502932 70.1636806561836 -149.22676305990746 +603 5.262167694762904 71.45033635316135 -145.62305898749048 +604 5.270894341022875 72.70476638965457 -141.84193564921003 +605 5.279620987282847 73.9254424358943 -137.887999761416 +606 5.288347633542818 75.11087728614855 -133.7660685859312 +607 5.29707427980279 76.25962667065488 -129.48116406095718 +608 5.305800926062762 77.37029101523932 -125.03850668261944 +609 5.314527572322733 78.4415171464827 -120.44350914459464 +610 5.323254218582705 79.471999940354 -115.70176974357703 +611 5.331980864842676 80.46048391230242 -110.81906555861873 +612 5.340707511102648 81.4057647468726 -105.80134541264532 +613 5.349434157362619 82.30669076497678 -100.65472262473489 +614 5.358160803622591 83.16216432703912 -95.38546756197704 +615 5.366887449882563 83.97114317029971 -90.00000000000004 +616 5.3756140961425345 84.73264167865163 -84.5048813014608 +617 5.3843407424025065 85.44573208346249 -78.90680642203407 +618 5.393067388662478 86.10954559391698 -73.21259575364451 +619 5.4017940349224505 86.72327345550548 -67.42918681486384 +620 5.410520681182422 87.28616793536587 -61.56362579862045 +621 5.419247327442394 87.79754323328193 -55.62305898749038 +622 5.427973973702365 88.25677631722434 -49.61472404706012 +623 5.436700619962337 88.66330768241984 -43.54594120794002 +624 5.445427266222309 89.01664203302126 -37.42410434719644 +625 5.45415391248228 89.31634888554936 -31.256671980047603 +626 5.462880558742252 89.56206309337067 -25.051158172811675 +627 5.471607205002223 89.75348529157228 -18.815123388177824 +628 5.480333851262195 89.8903822616921 -12.556165273942614 +629 5.489060497522166 89.97258721585928 -6.281909406450685 +630 5.497787143782138 90.0 -4.9960036108132044e-14 +631 5.50651379004211 89.97258721585932 6.281909406450335 +632 5.515240436302081 89.8903822616921 12.556165273942264 +633 5.523967082562053 89.75348529157229 18.815123388177536 +634 5.532693728822024 89.56206309337068 25.051158172811373 +635 5.541420375081996 89.31634888554937 31.256671980047276 +636 5.550147021341967 89.01664203302127 37.42410434719605 +637 5.558873667601939 88.66330768241987 43.54594120793987 +638 5.567600313861911 88.25677631722435 49.61472404705969 +639 5.576326960121882 87.79754323328196 55.62305898749017 +640 5.585053606381854 87.2861679353659 61.56362579862025 +641 5.593780252641825 86.7232734555055 67.42918681486367 +642 5.602506898901798 86.10954559391699 73.21259575364432 +643 5.611233545161769 85.4457320834625 78.90680642203387 +644 5.619960191421741 84.7326416786517 84.5048813014604 +645 5.6286868376817125 83.97114317029977 89.99999999999977 +646 5.6374134839416845 83.16216432703916 95.38546756197684 +647 5.6461401302016565 82.30669076497684 100.65472262473475 +648 5.654866776461628 81.40576474687265 105.80134541264509 +649 5.6635934227216 80.46048391230246 110.81906555861855 +650 5.672320068981571 79.47199994035407 115.7017697435767 +651 5.681046715241543 78.44151714648275 120.44350914459432 +652 5.689773361501514 77.37029101523936 125.03850668261924 +653 5.698500007761486 76.25962667065491 129.48116406095713 +654 5.707226654021458 75.11087728614861 133.76606858593098 +655 5.715953300281429 73.92544243589433 137.8879997614158 +656 5.724679946541401 72.70476638965464 141.84193564920983 +657 5.733406592801372 71.45033635316142 145.6230589874902 +658 5.742133239061344 70.16368065618366 149.22676305990734 +659 5.750859885321315 68.84636689049437 152.6486573081564 +660 5.759586531581287 67.50000000000009 155.88457268119876 +661 5.768313177841259 66.12622032536511 158.93056671460684 +662 5.77703982410123 64.72670160550861 161.7829283338498 +663 5.785766470361202 63.303148938411084 164.43818237566802 +664 5.794493116621174 61.85729670371604 166.89309382202177 +665 5.803219762881146 60.39090644965505 169.14467174146355 +666 5.811946409141117 58.905764746872656 171.1901729331276 +667 5.820673055401089 57.40368101176496 173.02710526889746 +668 5.82939970166106 55.88648530198513 174.65323072967922 +669 5.838126347921032 54.35602608679919 176.06656813208497 +670 5.846852994181004 52.814167995011836 177.2653955421974 +671 5.8555796404409755 51.262789543203006 178.24825237348267 +672 5.8643062867009474 49.7037808470444 179.0139411662892 +673 5.8730329329609186 48.13904131848573 179.56152904676833 +674 5.8817595792208905 46.57047735161256 179.8903488634373 +675 5.890486225480862 45.00000000000012 179.99999999999991 +676 5.899212871740834 43.42952264838752 179.89034886343725 +677 5.907939518000806 41.86095868151437 179.56152904676833 +678 5.916666164260777 40.29621915295568 179.01394116628921 +679 5.925392810520749 38.7372104567971 178.24825237348273 +680 5.93411945678072 37.18583200498828 177.26539554219755 +681 5.942846103040692 35.64397391320092 176.066568132085 +682 5.951572749300664 34.11351469801494 174.65323072967948 +683 5.960299395560635 32.59631898823515 173.02710526889757 +684 5.969026041820607 31.094235253127408 171.19017293312766 +685 5.977752688080578 29.60909355034503 169.1446717414638 +686 5.98647933434055 28.14270329628406 166.89309382202183 +687 5.995205980600522 26.696851061588994 164.43818237566816 +688 6.003932626860494 25.273298394491466 161.78292833384992 +689 6.012659273120465 23.873779674634957 158.93056671460695 +690 6.021385919380437 22.50000000000001 155.88457268119893 +691 6.030112565640409 21.15363310950571 152.64865730815654 +692 6.03883921190038 19.836319343816424 149.2267630599075 +693 6.047565858160352 18.54966364683867 145.6230589874905 +694 6.056292504420323 17.295233610345413 141.84193564921014 +695 6.065019150680295 16.074557564105724 137.88799976141604 +696 6.073745796940266 14.889122713851425 133.7660685859313 +697 6.082472443200238 13.740373329345124 129.48116406095735 +698 6.09119908946021 12.629708984760661 125.03850668261943 +699 6.0999257357201815 11.558482853517308 120.44350914459469 +700 6.1086523819801535 10.528000059645985 115.70176974357715 +701 6.117379028240125 9.539516087697574 110.81906555861885 +702 6.126105674500097 8.594235253127385 105.80134541264536 +703 6.134832320760068 7.693309235023177 100.65472262473489 +704 6.14355896702004 6.837835672960847 95.38546756197718 +705 6.152285613280012 6.028856829700253 90.00000000000009 +706 6.161012259539983 5.267358321348316 84.50488130146077 +707 6.169738905799955 4.5542679165374835 78.90680642203414 +708 6.178465552059926 3.8904544060830357 73.21259575364456 +709 6.187192198319899 3.276726544494546 67.42918681486394 +710 6.19591884457987 2.7138320646341105 61.56362579862053 +711 6.204645490839842 2.2024567667180612 55.62305898749039 +712 6.213372137099813 1.7432236827756697 49.614724047060086 +713 6.222098783359785 1.3366923175801637 43.545941207940196 +714 6.230825429619757 0.983357966978764 37.42410434719644 +715 6.239552075879728 0.6836511144506341 31.25667198004762 +716 6.2482787221397 0.4379369066293687 25.051158172811643 +717 6.257005368399671 0.24651470842772694 18.8151233881779 +718 6.265732014659643 0.10961773830790611 12.55616527394256 +719 6.274458660919614 0.0274127841406957 6.281909406450615 + +HARMONIC_3 +N 720 RADIANS + +0 0.0 0.0 -0.0 +1 0.008726646259971648 0.008529071242088904 -1.9546695209757408 +2 0.017453292519943295 0.03411368693063732 -3.9087436306800853 +3 0.02617993877991494 0.07674605374387777 -5.861627099209696 +4 0.03490658503988659 0.13641318544986358 -7.81272505934202 +5 0.04363323129985824 0.21309690686224325 -9.761443187737738 +6 0.05235987755982988 0.30677385937668955 -11.70718788597717 +7 0.061086523819801536 0.41741550808596894 -13.649366461376497 +8 0.06981317007977318 0.544988150472066 -15.587387307527308 +9 0.07853981633974483 0.6894529266722724 -17.520660084505877 +10 0.08726646259971647 0.8507658313163322 -19.448595898696194 +11 0.09599310885968812 1.0288777269308236 -21.37060748217304 +12 0.10471975511965977 1.2237343589068876 -23.28610937158906 +13 0.11344640137963141 1.4352763720268138 -25.194518086512865 +14 0.12217304763960307 1.663439328544185 -27.095252307162777 +15 0.1308996938995747 1.9081537278121683 -28.987733051482323 +16 0.13962634015954636 2.1693450274541357 -30.8713838515039 +17 0.148352986419518 2.4469336660700094 -32.745630928946525 +18 0.15707963267948966 2.7408350874714023 -34.609903369994136 +19 0.16580627893946132 3.050959766438263 -36.463633299201526 +20 0.17453292519943295 3.377213235989122 -38.30625605247489 +21 0.1832595714594046 3.719496116156696 -40.137210349073634 +22 0.19198621771937624 4.077704144259892 -41.95593846258216 +23 0.20071286397934787 4.451728206663333 -43.76188639079868 +24 0.20943951023931953 4.841454372014345 -45.554504024489646 +25 0.2181661564992912 5.246763925947597 -47.33324531495834 +26 0.22689280275926282 5.6675334072466335 -49.09756844037665 +27 0.23561944901923448 6.103634645451379 -50.846935970829236 +28 0.24434609527920614 6.554934799900107 -52.580815032019785 +29 0.2530727415391778 7.021296400193826 -54.29867746758978 +30 0.2617993877991494 7.502577388071445 -56.0 +31 0.27052603405912107 7.9986311606817155 -57.68426438992608 +32 0.2792526803190927 8.50930661524014 -59.35095759411894 +33 0.28797932657906433 9.034448195056253 -60.999571921683035 +34 0.296705972839036 9.573895936917662 -62.62960518872365 +35 0.30543261909900765 10.12748551981646 -64.2405608713172 +36 0.3141592653589793 10.695048315002936 -65.831948256757 +37 0.32288591161895097 11.276411437351614 -67.40328259302939 +38 0.33161255787892263 11.871397798023555 -68.95408523647374 +39 0.3403392041388943 12.479826158409617 -70.48388379758178 +40 0.3490658503988659 13.101511185337225 -71.99221228489239 +41 0.35779249665883756 13.736263507524773 -73.47861124693682 +42 0.3665191429188092 14.383889773265935 -74.94262791219212 +43 0.3752457891787809 15.04419270932646 -76.38381632699983 +44 0.3839724354387525 15.716971181035527 -77.80173749140768 +45 0.39269908169872414 16.402020253553342 -79.19595949289334 +46 0.40142572795869574 17.09913125429613 -80.5660576379289 +47 0.41015237421866746 17.80809183650009 -81.91161458134708 +48 0.41887902047863906 18.528686043903953 -83.23222045346814 +49 0.42760566673861067 19.2606943765316 -84.52747298495044 +50 0.4363323129985824 20.003893857553802 -85.79697762932555 +51 0.445058959258554 20.75805810120908 -87.04034768318073 +52 0.45378560551852565 21.522957381763128 -88.25720440395287 +53 0.4625122517784973 22.29835870348529 -89.4471771252968 +54 0.47123889803846897 23.0840258716215 -90.60990336999411 +55 0.4799655442984406 23.87971956434142 -91.7450289603671 +56 0.4886921905584123 24.685197405638167 -92.85220812616467 +57 0.4974188368183839 25.50021403915848 -93.93110360988749 +58 0.5061454830783556 26.32452120294053 -94.9813867695197 +59 0.5148721293383272 27.157867805036954 -96.00273767863655 +60 0.5235987755982988 27.999999999999986 -96.99484522385711 +61 0.5323254218582705 28.85066126620511 -97.9574071996123 +62 0.5410520681182421 29.70959248399013 -98.89013040019982 +63 0.5497787143782138 30.576532014585375 -99.79273070909721 +64 0.5585053606381855 31.451215779811665 -100.66493318550671 +65 0.5672320068981571 32.33337734252084 -101.50647214810483 +66 0.5759586531581287 33.22274798775518 -102.31709125597129 +67 0.5846852994181004 34.119056804600675 -103.09654358667333 +68 0.593411945678072 35.022030768708944 -103.84459171148019 +69 0.6021385919380438 35.9313948254632 -104.5610077676866 +70 0.6108652381980153 36.84687197376254 -105.24557352802174 +71 0.619591884457987 37.76818335039923 -105.89808046712349 +72 0.6283185307179586 38.69504831500294 -106.51832982505721 +73 0.6370451769779303 39.627184535526744 -107.10613266785997 +74 0.6457718232379019 40.564308074248046 -107.66130994509169 +75 0.6544984694978736 41.50613347425884 -108.18369254437565 +76 0.6632251157578453 42.45237384641862 -108.6731213429116 +77 0.6719517620178168 43.40274095674357 -109.12944725594632 +78 0.6806784082777886 44.35694531420548 -109.55253128218624 +79 0.6894050545377601 45.31469625891349 -109.94224454613835 +80 0.6981317007977318 46.2757020506519 -110.29846833736731 +81 0.7068583470577035 47.23966995774707 -110.62109414665542 +82 0.7155849933176751 48.206306346236325 -110.9100236990559 +83 0.7243116395776468 49.175316769311735 -111.16516898382807 +84 0.7330382858376184 50.146406057011404 -111.38645228124662 +85 0.74176493209759 51.11927840613113 -111.57380618627549 +86 0.7504915783575618 52.093637470328986 -111.72717362910032 +87 0.7592182246175333 53.06918645039515 -111.84650789251228 +88 0.767944870877505 54.04562818465995 -111.93177262613871 +89 0.7766715171374766 55.02266523951213 -111.9829418575158 +90 0.7853981633974483 56.0 -112.00000000000003 +91 0.7941248096574199 56.97733476048787 -111.9829418575158 +92 0.8028514559173915 57.95437181534005 -111.93177262613871 +93 0.8115781021773633 58.93081354960485 -111.84650789251228 +94 0.8203047484373349 59.906362529671014 -111.72717362910032 +95 0.8290313946973066 60.88072159386884 -111.57380618627552 +96 0.8377580409572781 61.853593942988574 -111.38645228124662 +97 0.8464846872172498 62.82468323068823 -111.16516898382807 +98 0.8552113334772213 63.79369365376366 -110.91002369905586 +99 0.8639379797371932 64.76033004225296 -110.62109414665544 +100 0.8726646259971648 65.72429794934808 -110.29846833736732 +101 0.8813912722571364 66.68530374108651 -109.94224454613835 +102 0.890117918517108 67.64305468579451 -109.55253128218624 +103 0.8988445647770796 68.59725904325643 -109.12944725594639 +104 0.9075712110370513 69.54762615358139 -108.6731213429116 +105 0.9162978572970231 70.49386652574117 -108.18369254437563 +106 0.9250245035569946 71.43569192575194 -107.66130994509176 +107 0.9337511498169663 72.37281546447325 -107.10613266785994 +108 0.9424777960769379 73.30495168499706 -106.51832982505721 +109 0.9512044423369095 74.23181664960076 -105.89808046712348 +110 0.9599310885968813 75.15312802623745 -105.24557352802174 +111 0.9686577348568529 76.06860517453683 -104.56100776768659 +112 0.9773843811168246 76.97796923129108 -103.84459171148019 +113 0.9861110273767961 77.88094319539934 -103.0965435866733 +114 0.9948376736367678 78.77725201224482 -102.31709125597132 +115 1.0035643198967394 79.66662265747917 -101.50647214810483 +116 1.0122909661567112 80.54878422018834 -100.66493318550671 +117 1.0210176124166828 81.42346798541462 -99.79273070909721 +118 1.0297442586766543 82.29040751600986 -98.89013040019982 +119 1.038470904936626 83.14933873379486 -97.95740719961235 +120 1.0471975511965976 84.0 -96.99484522385713 +121 1.0559241974565694 84.84213219496303 -96.00273767863656 +122 1.064650843716541 85.67547879705945 -94.98138676951973 +123 1.0733774899765127 86.4997859608415 -93.9311036098875 +124 1.0821041362364843 87.31480259436184 -92.85220812616467 +125 1.0908307824964558 88.12028043565857 -91.74502896036711 +126 1.0995574287564276 88.91597412837851 -90.60990336999411 +127 1.1082840750163994 89.70164129651471 -89.44717712529679 +128 1.117010721276371 90.47704261823687 -88.25720440395287 +129 1.1257373675363425 91.24194189879088 -87.04034768318076 +130 1.1344640137963142 91.99610614244621 -85.79697762932555 +131 1.1431906600562858 92.7393056234684 -84.52747298495045 +132 1.1519173063162573 93.47131395609604 -83.23222045346817 +133 1.160643952576229 94.19190816349992 -81.9116145813471 +134 1.1693705988362009 94.90086874570387 -80.5660576379289 +135 1.1780972450961724 95.59797974644665 -79.19595949289334 +136 1.186823891356144 96.28302881896445 -77.80173749140772 +137 1.1955505376161157 96.95580729067356 -76.38381632699983 +138 1.2042771838760875 97.6161102267341 -74.94262791219208 +139 1.213003830136059 98.26373649247523 -73.47861124693682 +140 1.2217304763960306 98.89848881466276 -71.99221228489243 +141 1.2304571226560024 99.52017384159038 -70.48388379758178 +142 1.239183768915974 100.12860220197642 -68.95408523647373 +143 1.2479104151759455 100.7235885626484 -67.40328259302943 +144 1.2566370614359172 101.30495168499706 -65.831948256757 +145 1.265363707695889 101.87251448018355 -64.24056087131714 +146 1.2740903539558606 102.42610406308233 -62.62960518872365 +147 1.2828170002158321 102.96555180494374 -60.999571921683085 +148 1.2915436464758039 103.49069338475987 -59.35095759411894 +149 1.3002702927357754 104.00136883931827 -57.684264389926064 +150 1.3089969389957472 104.49742261192857 -55.99999999999999 +151 1.3177235852557188 104.97870359980617 -54.29867746758976 +152 1.3264502315156905 105.44506520009992 -52.58081503201974 +153 1.335176877775662 105.89636535454859 -50.84693597082927 +154 1.3439035240356336 106.33246659275335 -49.09756844037668 +155 1.3526301702956054 106.75323607405241 -47.33324531495834 +156 1.3613568165555772 107.15854562798566 -45.55450402448959 +157 1.3700834628155487 107.54827179333667 -43.76188639079868 +158 1.3788101090755203 107.92229585574009 -41.955938462582154 +159 1.3875367553354918 108.2805038838433 -40.13721034907368 +160 1.3962634015954636 108.62278676401087 -38.306256052474936 +161 1.4049900478554354 108.94904023356175 -36.46363329920153 +162 1.413716694115407 109.2591649125286 -34.609903369994136 +163 1.4224433403753785 109.55306633392999 -32.745630928946575 +164 1.4311699866353502 109.83065497254586 -30.8713838515039 +165 1.4398966328953218 110.09184627218784 -28.987733051482373 +166 1.4486232791552935 110.33656067145583 -27.095252307162777 +167 1.457349925415265 110.56472362797318 -25.194518086512915 +168 1.4660765716752369 110.77626564109312 -23.28610937158906 +169 1.4748032179352084 110.97112227306917 -21.37060748217304 +170 1.48352986419518 111.14923416868365 -19.44859589869624 +171 1.4922565104551517 111.31054707332773 -17.520660084505877 +172 1.5009831567151235 111.45501184952792 -15.587387307527305 +173 1.509709802975095 111.58258449191403 -13.649366461376546 +174 1.5184364492350666 111.6932261406233 -11.707187885977218 +175 1.5271630954950384 111.78690309313774 -9.761443187737736 +176 1.53588974175501 111.86358681455015 -7.812725059342069 +177 1.5446163880149815 111.92325394625612 -5.861627099209747 +178 1.5533430342749532 111.96588631306938 -3.908743630680135 +179 1.562069680534925 111.9914709287579 -1.9546695209757405 +180 1.5707963267948966 112.0 -0.0 +181 1.579522973054868 111.9914709287579 1.9546695209757157 +182 1.5882496193148399 111.96588631306938 3.90874363068011 +183 1.5969762655748114 111.92325394625612 5.861627099209672 +184 1.605702911834783 111.86358681455015 7.81272505934197 +185 1.6144295580947547 111.78690309313777 9.761443187737692 +186 1.6231562043547265 111.6932261406233 11.707187885977193 +187 1.6318828506146983 111.58258449191403 13.649366461376546 +188 1.6406094968746698 111.45501184952792 15.58738730752733 +189 1.6493361431346414 111.31054707332773 17.520660084505828 +190 1.6580627893946132 111.14923416868365 19.448595898696215 +191 1.6667894356545847 110.9711222730692 21.370607482173018 +192 1.6755160819145563 110.77626564109312 23.286109371589003 +193 1.684242728174528 110.56472362797318 25.194518086512865 +194 1.6929693744344996 110.33656067145583 27.09525230716275 +195 1.7016960206944711 110.09184627218784 28.987733051482273 +196 1.7104226669544427 109.83065497254587 30.871383851503857 +197 1.7191493132144147 109.55306633392999 32.745630928946525 +198 1.7278759594743864 109.2591649125286 34.60990336999416 +199 1.736602605734358 108.94904023356175 36.46363329920155 +200 1.7453292519943295 108.62278676401087 38.30625605247489 +201 1.7540558982543013 108.2805038838433 40.13721034907363 +202 1.7627825445142729 107.92229585574009 41.955938462582154 +203 1.7715091907742444 107.54827179333667 43.76188639079863 +204 1.780235837034216 107.15854562798566 45.55450402448959 +205 1.7889624832941877 106.75323607405241 47.33324531495834 +206 1.7976891295541593 106.33246659275336 49.09756844037665 +207 1.8064157758141308 105.89636535454862 50.84693597082918 +208 1.8151424220741026 105.44506520009992 52.58081503201974 +209 1.8238690683340746 104.97870359980615 54.29867746758978 +210 1.8325957145940461 104.49742261192857 56.00000000000003 +211 1.8413223608540177 104.00136883931827 57.684264389926064 +212 1.8500490071139892 103.49069338475987 59.35095759411894 +213 1.858775653373961 102.96555180494374 60.999571921683035 +214 1.8675022996339325 102.42610406308235 62.62960518872363 +215 1.876228945893904 101.87251448018355 64.24056087131714 +216 1.8849555921538759 101.30495168499706 65.83194825675697 +217 1.8936822384138474 100.7235885626484 67.40328259302937 +218 1.902408884673819 100.12860220197645 68.9540852364737 +219 1.9111355309337907 99.52017384159038 70.48388379758178 +220 1.9198621771937625 98.89848881466277 71.99221228489239 +221 1.9285888234537343 98.26373649247523 73.47861124693682 +222 1.9373154697137058 97.61611022673408 74.94262791219214 +223 1.9460421159736774 96.95580729067356 76.38381632699982 +224 1.9547687622336491 96.28302881896445 77.8017374914077 +225 1.9634954084936207 95.59797974644665 79.19595949289332 +226 1.9722220547535922 94.90086874570387 80.5660576379289 +227 1.980948701013564 94.19190816349992 81.9116145813471 +228 1.9896753472735356 93.47131395609605 83.2322204534681 +229 1.9984019935335071 92.73930562346843 84.52747298495042 +230 2.007128639793479 91.99610614244622 85.79697762932551 +231 2.015855286053451 91.24194189879087 87.04034768318078 +232 2.0245819323134224 90.47704261823685 88.25720440395288 +233 2.033308578573394 89.7016412965147 89.4471771252968 +234 2.0420352248333655 88.91597412837851 90.60990336999411 +235 2.050761871093337 88.1202804356586 91.74502896036704 +236 2.0594885173533086 87.31480259436185 92.85220812616464 +237 2.0682151636132806 86.4997859608415 93.9311036098875 +238 2.076941809873252 85.67547879705947 94.98138676951969 +239 2.0856684561332237 84.84213219496304 96.00273767863655 +240 2.0943951023931953 84.00000000000003 96.99484522385711 +241 2.103121748653167 83.14933873379493 97.95740719961229 +242 2.111848394913139 82.29040751600988 98.8901304001998 +243 2.1205750411731104 81.42346798541462 99.79273070909721 +244 2.129301687433082 80.54878422018835 100.66493318550667 +245 2.138028333693054 79.66662265747917 101.50647214810483 +246 2.1467549799530254 78.77725201224482 102.31709125597129 +247 2.155481626212997 77.88094319539934 103.0965435866733 +248 2.1642082724729685 76.97796923129108 103.84459171148019 +249 2.17293491873294 76.06860517453687 104.56100776768658 +250 2.1816615649929116 75.15312802623748 105.24557352802171 +251 2.1903882112528836 74.23181664960079 105.89808046712349 +252 2.199114857512855 73.30495168499706 106.51832982505718 +253 2.2078415037728267 72.37281546447328 107.10613266785995 +254 2.2165681500327987 71.43569192575195 107.66130994509173 +255 2.2252947962927703 70.49386652574117 108.18369254437563 +256 2.234021442552742 69.5476261535814 108.67312134291161 +257 2.2427480888127134 68.59725904325646 109.12944725594636 +258 2.251474735072685 67.64305468579454 109.55253128218624 +259 2.260201381332657 66.68530374108649 109.94224454613834 +260 2.2689280275926285 65.72429794934808 110.29846833736732 +261 2.2776546738526 64.76033004225295 110.62109414665542 +262 2.2863813201125716 63.7936936537637 110.91002369905586 +263 2.295107966372543 62.82468323068828 111.16516898382807 +264 2.3038346126325147 61.85359394298864 111.38645228124659 +265 2.3125612588924866 60.880721593868856 111.57380618627553 +266 2.321287905152458 59.906362529671036 111.72717362910032 +267 2.33001455141243 58.93081354960485 111.84650789251225 +268 2.3387411976724017 57.95437181534004 111.93177262613872 +269 2.3474678439323733 56.97733476048787 111.9829418575158 +270 2.356194490192345 56.0 112.00000000000003 +271 2.3649211364523164 55.02266523951215 111.98294185751584 +272 2.373647782712288 54.045628184659975 111.93177262613872 +273 2.3823744289722595 53.0691864503952 111.84650789251228 +274 2.3911010752322315 52.093637470328986 111.72717362910032 +275 2.399827721492203 51.119278406131166 111.57380618627549 +276 2.408554367752175 50.14640605701138 111.38645228124659 +277 2.4172810140121466 49.17531676931174 111.16516898382804 +278 2.426007660272118 48.20630634623634 110.91002369905588 +279 2.4347343065320897 47.2396699577471 110.62109414665544 +280 2.443460952792061 46.27570205065193 110.29846833736731 +281 2.4521875990520328 45.31469625891353 109.94224454613838 +282 2.4609142453120048 44.356945314205475 109.55253128218622 +283 2.4696408915719763 43.40274095674358 109.12944725594636 +284 2.478367537831948 42.452373846418624 108.67312134291161 +285 2.4870941840919194 41.50613347425886 108.18369254437567 +286 2.495820830351891 40.56430807424808 107.66130994509172 +287 2.504547476611863 39.627184535526744 107.10613266785997 +288 2.5132741228718345 38.695048315002964 106.51832982505724 +289 2.522000769131806 37.76818335039924 105.89808046712348 +290 2.530727415391778 36.84687197376254 105.24557352802174 +291 2.5394540616517496 35.93139482546318 104.56100776768659 +292 2.548180707911721 35.02203076870896 103.8445917114802 +293 2.5569073541716927 34.119056804600675 103.09654358667333 +294 2.5656340004316642 33.22274798775523 102.31709125597133 +295 2.574360646691636 32.33337734252086 101.50647214810482 +296 2.5830872929516078 31.451215779811665 100.6649331855067 +297 2.5918139392115793 30.576532014585375 99.79273070909721 +298 2.600540585471551 29.70959248399013 98.89013040019982 +299 2.609267231731523 28.85066126620511 97.9574071996123 +300 2.6179938779914944 28.000000000000007 96.99484522385713 +301 2.626720524251466 27.15786780503697 96.00273767863656 +302 2.6354471705114375 26.324521202940552 94.98138676951973 +303 2.644173816771409 25.500214039158514 93.93110360988749 +304 2.652900463031381 24.685197405638167 92.85220812616467 +305 2.6616271092913526 23.87971956434142 91.74502896036708 +306 2.670353755551324 23.0840258716215 90.60990336999411 +307 2.6790804018112957 22.29835870348532 89.44717712529682 +308 2.6878070480712672 21.522957381763167 88.2572044039529 +309 2.696533694331239 20.75805810120915 87.04034768318078 +310 2.705260340591211 20.003893857553802 85.79697762932555 +311 2.7139869868511823 19.260694376531625 84.52747298495049 +312 2.7227136331111543 18.528686043903946 83.23222045346814 +313 2.731440279371126 17.80809183650009 81.91161458134708 +314 2.7401669256310974 17.09913125429616 80.56605763792894 +315 2.748893571891069 16.402020253553342 79.19595949289334 +316 2.7576202181510405 15.71697118103554 77.80173749140775 +317 2.766346864411012 15.044192709326467 76.38381632699988 +318 2.7750735106709836 14.383889773265967 74.9426279121922 +319 2.7838001569309556 13.736263507524773 73.47861124693682 +320 2.792526803190927 13.10151118533725 71.99221228489245 +321 2.801253449450899 12.479826158409637 70.48388379758177 +322 2.8099800957108707 11.871397798023567 68.9540852364737 +323 2.8187067419708423 11.276411437351614 67.40328259302939 +324 2.827433388230814 10.695048315002955 65.831948256757 +325 2.8361600344907854 10.12748551981646 64.2405608713172 +326 2.844886680750757 9.573895936917687 62.62960518872369 +327 2.853613327010729 9.034448195056253 60.999571921683035 +328 2.8623399732707004 8.50930661524014 59.35095759411894 +329 2.871066619530672 7.998631160681722 57.68426438992611 +330 2.8797932657906435 7.5025773880714635 56.000000000000036 +331 2.888519912050615 7.021296400193845 54.29867746758981 +332 2.897246558310587 6.554934799900095 52.580815032019785 +333 2.9059732045705586 6.103634645451398 50.84693597082927 +334 2.91469985083053 5.667533407246658 49.09756844037675 +335 2.923426497090502 5.246763925947597 47.33324531495834 +336 2.9321531433504737 4.841454372014345 45.554504024489646 +337 2.9408797896104453 4.451728206663358 43.761886390798665 +338 2.949606435870417 4.0777041442599105 41.95593846258219 +339 2.9583330821303884 3.719496116156715 40.13721034907368 +340 2.96705972839036 3.3772132359891405 38.306256052474986 +341 2.975786374650332 3.050959766438263 36.463633299201526 +342 2.9845130209103035 2.7408350874714147 34.609903369994136 +343 2.993239667170275 2.4469336660700156 32.745630928946575 +344 3.001966313430247 2.1693450274541357 30.8713838515039 +345 3.0106929596902186 1.9081537278121807 28.98773305148233 +346 3.01941960595019 1.6634393285442162 27.09525230716282 +347 3.0281462522101616 1.43527637202682 25.194518086512918 +348 3.036872898470133 1.2237343589068939 23.28610937158911 +349 3.045599544730105 1.0288777269308111 21.370607482172996 +350 3.0543261909900767 0.8507658313163322 19.448595898696194 +351 3.0630528372500483 0.6894529266722849 17.52066008450588 +352 3.07177948351002 0.5449881504720722 15.587387307527408 +353 3.0805061297699914 0.41741550808597516 13.649366461376596 +354 3.089232776029963 0.3067738593767144 11.707187885977264 +355 3.097959422289935 0.21309690686224325 9.76144318773774 +356 3.1066860685499065 0.13641318544983871 7.812725059342073 +357 3.1154127148098785 0.07674605374386534 5.861627099209646 +358 3.12413936106985 0.03411368693063732 3.9087436306800853 +359 3.1328660073298216 0.00852907124207647 1.9546695209757408 +360 3.141592653589793 0.0 4.973799150320701e-14 +361 3.1503192998497647 0.00852907124207647 -1.954669520975716 +362 3.159045946109736 0.03411368693063732 -3.9087436306800356 +363 3.1677725923697078 0.07674605374386534 -5.861627099209621 +364 3.1764992386296798 0.13641318544983871 -7.812725059342023 +365 3.1852258848896513 0.21309690686224325 -9.76144318773769 +366 3.193952531149623 0.3067738593767082 -11.707187885977115 +367 3.2026791774095944 0.41741550808596894 -13.649366461376422 +368 3.211405823669566 0.5449881504720411 -15.587387307527235 +369 3.2201324699295375 0.6894529266722662 -17.52066008450573 +370 3.2288591161895095 0.8507658313163322 -19.448595898696144 +371 3.237585762449481 1.0288777269308111 -21.370607482172947 +372 3.246312408709453 1.2237343589068876 -23.28610937158906 +373 3.255039054969425 1.43527637202682 -25.194518086512968 +374 3.2637657012293966 1.6634393285442162 -27.095252307162845 +375 3.272492347489368 1.9081537278121807 -28.98773305148238 +376 3.2812189937493397 2.1693450274541606 -30.871383851503918 +377 3.2899456400093112 2.4469336660700094 -32.745630928946525 +378 3.2986722862692828 2.740835087471396 -34.609903369994086 +379 3.3073989325292543 3.050959766438263 -36.463633299201504 +380 3.3161255787892263 3.3772132359891405 -38.306256052474936 +381 3.324852225049198 3.719496116156715 -40.137210349073634 +382 3.3335788713091694 4.077704144259892 -41.95593846258213 +383 3.342305517569141 4.451728206663327 -43.76188639079863 +384 3.3510321638291125 4.841454372014327 -45.55450402448958 +385 3.359758810089084 5.246763925947579 -47.33324531495826 +386 3.368485456349056 5.667533407246658 -49.09756844037666 +387 3.3772121026090276 6.103634645451398 -50.846935970829215 +388 3.385938748868999 6.554934799900082 -52.580815032019714 +389 3.3946653951289707 7.021296400193814 -54.298677467589684 +390 3.4033920413889422 7.50257738807142 -55.9999999999999 +391 3.412118687648914 7.998631160681678 -57.68426438992598 +392 3.4208453339088853 8.509306615240115 -59.35095759411885 +393 3.4295719801688573 9.034448195056235 -60.999571921683 +394 3.4382986264288293 9.573895936917669 -62.629605188723666 +395 3.447025272688801 10.127485519816453 -64.24056087131714 +396 3.455751918948773 10.695048315002968 -65.83194825675703 +397 3.4644785652087444 11.276411437351609 -67.40328259302946 +398 3.473205211468716 11.87139779802358 -68.95408523647373 +399 3.4819318577286875 12.479826158409637 -70.4838837975818 +400 3.490658503988659 13.101511185337225 -71.99221228489239 +401 3.4993851502486306 13.736263507524761 -73.47861124693677 +402 3.5081117965086026 14.383889773265935 -74.94262791219217 +403 3.516838442768574 15.04419270932646 -76.38381632699983 +404 3.5255650890285457 15.716971181035527 -77.80173749140768 +405 3.5342917352885173 16.402020253553324 -79.19595949289331 +406 3.543018381548489 17.09913125429614 -80.5660576379289 +407 3.5517450278084604 17.808091836500072 -81.91161458134704 +408 3.560471674068432 18.528686043903903 -83.23222045346809 +409 3.569198320328404 19.260694376531603 -84.52747298495045 +410 3.5779249665883754 20.00389385755379 -85.7969776293255 +411 3.586651612848347 20.758058101209073 -87.04034768318068 +412 3.5953782591083185 21.522957381763117 -88.25720440395278 +413 3.60410490536829 22.29835870348526 -89.44717712529673 +414 3.6128315516282616 23.084025871621467 -90.60990336999403 +415 3.6215581978882336 23.879719564341396 -91.74502896036705 +416 3.630284844148205 24.68519740563816 -92.85220812616463 +417 3.639011490408177 25.50021403915848 -93.93110360988749 +418 3.647738136668149 26.324521202940552 -94.98138676951974 +419 3.6564647829281207 27.157867805036986 -96.0027376786366 +420 3.6651914291880923 28.000000000000014 -96.99484522385714 +421 3.673918075448064 28.85066126620513 -97.95740719961233 +422 3.6826447217080354 29.709592483990107 -98.89013040019981 +423 3.691371367968007 30.576532014585357 -99.79273070909716 +424 3.7000980142279785 31.451215779811655 -100.66493318550667 +425 3.7088246604879505 32.33337734252085 -101.50647214810479 +426 3.717551306747922 33.222747987755184 -102.31709125597129 +427 3.7262779530078936 34.11905680460067 -103.0965435866733 +428 3.735004599267865 35.02203076870891 -103.84459171148016 +429 3.7437312455278366 35.93139482546316 -104.56100776768656 +430 3.752457891787808 36.846871973762525 -105.24557352802171 +431 3.76118453804778 37.76818335039924 -105.89808046712348 +432 3.7699111843077517 38.695048315002936 -106.51832982505718 +433 3.7786378305677233 39.62718453552673 -107.10613266785995 +434 3.787364476827695 40.56430807424802 -107.66130994509167 +435 3.7960911230876664 41.506133474258796 -108.18369254437559 +436 3.804817769347638 42.45237384641857 -108.67312134291156 +437 3.8135444156076095 43.402740956743486 -109.12944725594632 +438 3.8222710618675815 44.35694531420544 -109.5525312821862 +439 3.8309977081275535 45.3146962589135 -109.94224454613837 +440 3.839724354387525 46.275702050651894 -110.29846833736728 +441 3.848451000647497 47.23966995774711 -110.62109414665542 +442 3.8571776469074686 48.20630634623636 -110.91002369905587 +443 3.86590429316744 49.17531676931175 -111.16516898382807 +444 3.8746309394274117 50.146406057011404 -111.38645228124662 +445 3.883357585687383 51.119278406131116 -111.5738061862755 +446 3.8920842319473548 52.09363747032898 -111.72717362910029 +447 3.9008108782073267 53.06918645039516 -111.84650789251225 +448 3.9095375244672983 54.04562818465996 -111.93177262613872 +449 3.91826417072727 55.02266523951213 -111.9829418575158 +450 3.9269908169872414 55.999999999999986 -112.0 +451 3.935717463247213 56.97733476048785 -111.9829418575158 +452 3.9444441095071845 57.95437181534001 -111.93177262613872 +453 3.953170755767156 58.9308135496048 -111.84650789251228 +454 3.961897402027128 59.906362529671014 -111.72717362910032 +455 3.9706240482870996 60.88072159386883 -111.57380618627549 +456 3.979350694547071 61.85359394298856 -111.38645228124662 +457 3.9880773408070427 62.82468323068822 -111.16516898382807 +458 3.9968039870670142 63.79369365376361 -110.91002369905588 +459 4.005530633326986 64.76033004225287 -110.62109414665542 +460 4.014257279586958 65.72429794934807 -110.29846833736731 +461 4.022983925846929 66.68530374108641 -109.94224454613837 +462 4.031710572106902 67.64305468579457 -109.5525312821862 +463 4.040437218366873 68.59725904325641 -109.12944725594635 +464 4.049163864626845 69.5476261535814 -108.67312134291159 +465 4.057890510886816 70.49386652574113 -108.18369254437566 +466 4.066617157146788 71.43569192575195 -107.6613099450917 +467 4.07534380340676 72.37281546447329 -107.10613266785995 +468 4.084070449666731 73.30495168499705 -106.51832982505721 +469 4.092797095926703 74.2318166496008 -105.89808046712346 +470 4.101523742186674 75.15312802623743 -105.24557352802174 +471 4.110250388446646 76.06860517453683 -104.56100776768659 +472 4.118977034706617 76.97796923129101 -103.84459171148023 +473 4.127703680966589 77.88094319539931 -103.09654358667335 +474 4.136430327226561 78.77725201224482 -102.31709125597129 +475 4.145156973486532 79.66662265747911 -101.50647214810483 +476 4.153883619746504 80.54878422018834 -100.6649331855067 +477 4.162610266006475 81.42346798541455 -99.79273070909727 +478 4.171336912266447 82.29040751600985 -98.89013040019985 +479 4.1800635585264185 83.14933873379479 -97.9574071996124 +480 4.1887902047863905 83.99999999999994 -96.99484522385715 +481 4.1975168510463625 84.84213219496301 -96.00273767863658 +482 4.206243497306334 85.67547879705941 -94.9813867695198 +483 4.214970143566306 86.49978596084149 -93.93110360988751 +484 4.223696789826278 87.31480259436184 -92.85220812616467 +485 4.23242343608625 88.12028043565861 -91.74502896036701 +486 4.241150082346221 88.91597412837848 -90.60990336999413 +487 4.249876728606193 89.70164129651471 -89.44717712529679 +488 4.258603374866164 90.47704261823684 -88.2572044039529 +489 4.267330021126136 91.24194189879088 -87.04034768318071 +490 4.276056667386108 91.99610614244622 -85.79697762932548 +491 4.284783313646079 92.73930562346838 -84.5274729849505 +492 4.293509959906051 93.47131395609605 -83.23222045346814 +493 4.302236606166022 94.19190816349987 -81.91161458134715 +494 4.310963252425994 94.90086874570383 -80.56605763792895 +495 4.319689898685965 95.59797974644661 -79.19595949289341 +496 4.328416544945937 96.28302881896445 -77.80173749140775 +497 4.337143191205909 96.95580729067356 -76.38381632699982 +498 4.34586983746588 97.61611022673405 -74.94262791219218 +499 4.354596483725852 98.26373649247523 -73.47861124693682 +500 4.363323129985823 98.89848881466274 -71.99221228489252 +501 4.372049776245795 99.52017384159035 -70.48388379758187 +502 4.380776422505767 100.12860220197642 -68.95408523647373 +503 4.389503068765738 100.72358856264836 -67.40328259302949 +504 4.39822971502571 101.30495168499706 -65.83194825675703 +505 4.4069563612856815 101.87251448018348 -64.24056087131727 +506 4.4156830075456535 102.4261040630823 -62.62960518872373 +507 4.4244096538056255 102.96555180494374 -60.999571921683035 +508 4.4331363000655974 103.49069338475988 -59.35095759411889 +509 4.4418629463255686 104.00136883931827 -57.68426438992611 +510 4.4505895925855405 104.49742261192857 -55.99999999999997 +511 4.4593162388455125 104.9787035998062 -54.29867746758967 +512 4.468042885105484 105.44506520009992 -52.580815032019785 +513 4.476769531365456 105.8963653545486 -50.846935970829165 +514 4.485496177625427 106.33246659275333 -49.09756844037674 +515 4.494222823885399 106.75323607405241 -47.33324531495834 +516 4.50294947014537 107.15854562798562 -45.55450402448973 +517 4.511676116405342 107.54827179333664 -43.761886390798665 +518 4.520402762665314 107.92229585574009 -41.955938462582104 +519 4.529129408925285 108.2805038838433 -40.13721034907368 +520 4.537856055185257 108.62278676401087 -38.30625605247489 +521 4.546582701445228 108.94904023356173 -36.463633299201646 +522 4.5553093477052 109.2591649125286 -34.609903369994164 +523 4.564035993965171 109.55306633392998 -32.74563092894667 +524 4.572762640225143 109.83065497254584 -30.871383851504 +525 4.581489286485115 110.09184627218784 -28.987733051482323 +526 4.590215932745086 110.33656067145577 -27.09525230716292 +527 4.598942579005058 110.56472362797318 -25.19451808651294 +528 4.607669225265029 110.77626564109309 -23.286109371589202 +529 4.616395871525002 110.9711222730692 -21.370607482172918 +530 4.625122517784973 111.14923416868365 -19.448595898696215 +531 4.633849164044945 111.31054707332773 -17.520660084505806 +532 4.642575810304916 111.45501184952792 -15.587387307527404 +533 4.651302456564888 111.58258449191403 -13.649366461376497 +534 4.66002910282486 111.69322614062331 -11.707187885977092 +535 4.6687557490848315 111.78690309313774 -9.761443187737738 +536 4.6774823953448035 111.86358681455015 -7.812725059341997 +537 4.686209041604775 111.92325394625612 -5.861627099209795 +538 4.694935687864747 111.96588631306938 -3.90874363068011 +539 4.703662334124718 111.9914709287579 -1.9546695209758649 +540 4.71238898038469 112.0 -4.973799150320701e-14 +541 4.721115626644662 111.9914709287579 1.9546695209757903 +542 4.729842272904633 111.96588631306938 3.9087436306800356 +543 4.738568919164605 111.92325394625612 5.861627099209696 +544 4.747295565424576 111.86358681455016 7.812725059341922 +545 4.756022211684548 111.78690309313774 9.761443187737639 +546 4.764748857944519 111.69322614062331 11.707187885977017 +547 4.773475504204491 111.58258449191406 13.649366461376403 +548 4.782202150464463 111.45501184952792 15.587387307527305 +549 4.790928796724434 111.31054707332774 17.52066008450573 +550 4.799655442984406 111.14923416868365 19.44859589869614 +551 4.808382089244377 110.9711222730692 21.370607482172844 +552 4.81710873550435 110.77626564109309 23.286109371589152 +553 4.825835381764321 110.56472362797318 25.194518086512865 +554 4.834562028024293 110.33656067145579 27.09525230716282 +555 4.843288674284264 110.09184627218784 28.987733051482273 +556 4.852015320544236 109.83065497254586 30.8713838515039 +557 4.860741966804208 109.55306633392999 32.745630928946575 +558 4.869468613064179 109.2591649125286 34.609903369994086 +559 4.878195259324151 108.94904023356173 36.463633299201575 +560 4.886921905584122 108.62278676401088 38.306256052474836 +561 4.895648551844094 108.2805038838433 40.137210349073634 +562 4.9043751981040655 107.9222958557401 41.95593846258201 +563 4.9131018443640375 107.54827179333667 43.76188639079863 +564 4.9218284906240095 107.15854562798566 45.554504024489646 +565 4.930555136883981 106.75323607405241 47.33324531495823 +566 4.939281783143953 106.33246659275335 49.09756844037664 +567 4.948008429403924 105.89636535454864 50.84693597082913 +568 4.956735075663896 105.44506520009992 52.580815032019686 +569 4.965461721923867 104.97870359980621 54.298677467589584 +570 4.974188368183839 104.49742261192857 55.9999999999999 +571 4.982915014443811 104.00136883931827 57.68426438992606 +572 4.991641660703782 103.4906933847599 59.350957594118796 +573 5.000368306963754 102.96555180494377 60.999571921683 +574 5.009094953223726 102.42610406308233 62.62960518872365 +575 5.017821599483698 101.87251448018353 64.24056087131721 +576 5.026548245743669 101.30495168499706 65.83194825675696 +577 5.035274892003641 100.7235885626484 67.40328259302943 +578 5.044001538263612 100.12860220197646 68.95408523647365 +579 5.052728184523584 99.52017384159038 70.48388379758177 +580 5.061454830783556 98.89848881466276 71.99221228489243 +581 5.070181477043527 98.26373649247523 73.47861124693678 +582 5.078908123303499 97.61611022673407 74.94262791219217 +583 5.08763476956347 96.95580729067359 76.38381632699976 +584 5.096361415823442 96.28302881896447 77.80173749140768 +585 5.105088062083414 95.59797974644664 79.19595949289337 +586 5.113814708343385 94.90086874570387 80.5660576379289 +587 5.122541354603357 94.19190816349992 81.9116145813471 +588 5.1312680008633285 93.47131395609611 83.23222045346809 +589 5.1399946471233005 92.73930562346841 84.52747298495044 +590 5.148721293383272 91.99610614244627 85.79697762932545 +591 5.1574479396432436 91.24194189879093 87.04034768318068 +592 5.1661745859032155 90.47704261823687 88.25720440395287 +593 5.174901232163187 89.70164129651475 89.44717712529673 +594 5.183627878423159 88.91597412837851 90.6099033699941 +595 5.19235452468313 88.12028043565866 91.74502896036698 +596 5.201081170943102 87.31480259436185 92.85220812616458 +597 5.209807817203074 86.49978596084152 93.93110360988749 +598 5.218534463463046 85.67547879705945 94.98138676951973 +599 5.227261109723017 84.84213219496309 96.00273767863654 +600 5.235987755982989 84.0 96.99484522385713 +601 5.244714402242961 83.14933873379483 97.95740719961239 +602 5.253441048502932 82.29040751600988 98.8901304001998 +603 5.262167694762904 81.4234679854146 99.79273070909724 +604 5.270894341022875 80.54878422018837 100.66493318550665 +605 5.279620987282847 79.66662265747917 101.50647214810483 +606 5.288347633542818 78.77725201224486 102.31709125597125 +607 5.29707427980279 77.88094319539934 103.0965435866733 +608 5.305800926062762 76.97796923129106 103.84459171148019 +609 5.314527572322733 76.06860517453686 104.56100776768656 +610 5.323254218582705 75.15312802623744 105.24557352802172 +611 5.331980864842676 74.23181664960083 105.89808046712344 +612 5.340707511102648 73.30495168499708 106.51832982505718 +613 5.349434157362619 72.37281546447335 107.10613266785991 +614 5.358160803622591 71.43569192575198 107.66130994509166 +615 5.366887449882563 70.49386652574117 108.18369254437562 +616 5.3756140961425345 69.54762615358148 108.67312134291154 +617 5.3843407424025065 68.59725904325647 109.12944725594632 +618 5.393067388662478 67.6430546857946 109.55253128218618 +619 5.4017940349224505 66.68530374108646 109.9422445461384 +620 5.410520681182422 65.72429794934811 110.2984683373673 +621 5.419247327442394 64.76033004225289 110.62109414665544 +622 5.427973973702365 63.7936936537637 110.91002369905586 +623 5.436700619962337 62.82468323068823 111.16516898382807 +624 5.445427266222309 61.85359394298856 111.38645228124662 +625 5.45415391248228 60.880721593868884 111.5738061862755 +626 5.462880558742252 59.906362529671 111.7271736291003 +627 5.471607205002223 58.930813549604885 111.84650789251225 +628 5.480333851262195 57.95437181534007 111.93177262613872 +629 5.489060497522166 56.977334760487956 111.9829418575158 +630 5.497787143782138 56.000000000000014 112.0 +631 5.50651379004211 55.0226652395121 111.98294185751584 +632 5.515240436302081 54.04562818465999 111.93177262613872 +633 5.523967082562053 53.06918645039516 111.84650789251225 +634 5.532693728822024 52.09363747032904 111.72717362910034 +635 5.541420375081996 51.11927840613117 111.57380618627552 +636 5.550147021341967 50.146406057011504 111.3864522812466 +637 5.558873667601939 49.17531676931179 111.16516898382808 +638 5.567600313861911 48.20630634623636 110.91002369905587 +639 5.576326960121882 47.239669957747125 110.62109414665545 +640 5.585053606381854 46.27570205065193 110.29846833736731 +641 5.593780252641825 45.31469625891358 109.94224454613841 +642 5.602506898901798 44.35694531420543 109.5525312821862 +643 5.611233545161769 43.40274095674357 109.12944725594632 +644 5.619960191421741 42.4523738464186 108.6731213429116 +645 5.6286868376817125 41.506133474258874 108.18369254437566 +646 5.6374134839416845 40.564308074248046 107.66130994509169 +647 5.6461401302016565 39.627184535526695 107.10613266785994 +648 5.654866776461628 38.69504831500296 106.51832982505721 +649 5.6635934227216 37.76818335039921 105.89808046712345 +650 5.672320068981571 36.84687197376262 105.24557352802175 +651 5.681046715241543 35.93139482546321 104.56100776768659 +652 5.689773361501514 35.02203076870898 103.84459171148023 +653 5.698500007761486 34.11905680460069 103.09654358667335 +654 5.707226654021458 33.22274798775518 102.31709125597129 +655 5.715953300281429 32.33337734252088 101.50647214810483 +656 5.724679946541401 31.451215779811676 100.6649331855067 +657 5.733406592801372 30.576532014585457 99.7927307090973 +658 5.742133239061344 29.709592483990157 98.89013040019985 +659 5.750859885321315 28.850661266205215 97.95740719961245 +660 5.759586531581287 28.00000000000005 96.99484522385718 +661 5.768313177841259 27.15786780503697 96.0027376786366 +662 5.77703982410123 26.324521202940595 94.98138676951979 +663 5.785766470361202 25.50021403915853 93.93110360988754 +664 5.794493116621174 24.685197405638167 92.85220812616467 +665 5.803219762881146 23.879719564341396 91.74502896036705 +666 5.811946409141117 23.084025871621517 90.60990336999414 +667 5.820673055401089 22.29835870348529 89.4471771252968 +668 5.82939970166106 21.522957381763185 88.25720440395291 +669 5.838126347921032 20.75805810120912 87.04034768318076 +670 5.846852994181004 20.00389385755379 85.7969776293255 +671 5.8555796404409755 19.260694376531617 84.52747298495052 +672 5.8643062867009474 18.528686043903946 83.23222045346814 +673 5.8730329329609186 17.80809183650013 81.91161458134718 +674 5.8817595792208905 17.099131254296154 80.56605763792896 +675 5.890486225480862 16.402020253553403 79.19595949289342 +676 5.899212871740834 15.716971181035557 77.80173749140775 +677 5.907939518000806 15.04419270932646 76.38381632699983 +678 5.916666164260777 14.383889773265967 74.9426279121922 +679 5.925392810520749 13.736263507524779 73.47861124693686 +680 5.93411945678072 13.101511185337287 71.99221228489255 +681 5.942846103040692 12.479826158409672 70.48388379758185 +682 5.951572749300664 11.871397798023555 68.95408523647374 +683 5.960299395560635 11.276411437351639 67.40328259302953 +684 5.969026041820607 10.695048315002968 65.83194825675702 +685 5.977752688080578 10.127485519816496 64.24056087131731 +686 5.98647933434055 9.573895936917706 62.629605188723744 +687 5.995205980600522 9.034448195056253 60.999571921683035 +688 6.003932626860494 8.509306615240135 59.35095759411889 +689 6.012659273120465 7.998631160681722 57.68426438992613 +690 6.021385919380437 7.502577388071445 56.0 +691 6.030112565640409 7.021296400193801 54.29867746758968 +692 6.03883921190038 6.554934799900107 52.580815032019785 +693 6.047565858160352 6.103634645451379 50.84693597082921 +694 6.056292504420323 5.667533407246658 49.09756844037675 +695 6.065019150680295 5.246763925947597 47.33324531495834 +696 6.073745796940266 4.8414543720143515 45.55450402448974 +697 6.082472443200238 4.451728206663333 43.76188639079871 +698 6.09119908946021 4.077704144259886 41.95593846258211 +699 6.0999257357201815 3.719496116156721 40.13721034907371 +700 6.1086523819801535 3.377213235989122 38.306256052474914 +701 6.117379028240125 3.0509597664382753 36.46363329920168 +702 6.126105674500097 2.7408350874714023 34.609903369994186 +703 6.134832320760068 2.446933666070022 32.74563092894667 +704 6.14355896702004 2.169345027454142 30.871383851504007 +705 6.152285613280012 1.9081537278121683 28.987733051482348 +706 6.161012259539983 1.6634393285441975 27.095252307162927 +707 6.169738905799955 1.43527637202682 25.19451808651294 +708 6.178465552059926 1.2237343589069125 23.286109371589227 +709 6.187192198319899 1.0288777269308111 21.370607482172947 +710 6.19591884457987 0.8507658313163384 19.448595898696244 +711 6.204645490839842 0.6894529266722724 17.520660084505806 +712 6.213372137099813 0.5449881504720722 15.587387307527408 +713 6.222098783359785 0.41741550808596894 13.649366461376522 +714 6.230825429619757 0.3067738593767082 11.707187885977115 +715 6.239552075879728 0.21309690686224325 9.761443187737763 +716 6.2482787221397 0.13641318544986358 7.812725059341995 +717 6.257005368399671 0.07674605374388399 5.861627099209795 +718 6.265732014659643 0.03411368693063732 3.90874363068011 +719 6.274458660919614 0.008529071242088904 1.95466952097589 + +HARMONIC_4 +N 720 RADIANS + +0 0.0 46.0 -0.0 +1 0.008726646259971648 45.999124230475935 0.2007103164625992 +2 0.017453292519943295 45.996496988597 0.4014053480575184 +3 0.02617993877991494 45.99211847443782 0.6020698110810813 +4 0.03490658503988659 45.985989021439195 0.8026884241575211 +5 0.04363323129985824 45.97810909638273 1.0032459094027302 +6 0.05235987755982988 45.9684792993552 1.2037269935877062 +7 0.061086523819801536 45.95710036370294 1.404116409301706 +8 0.06981317007977318 45.943973155975954 1.6043988961148796 +9 0.07853981633974483 45.929098675861944 1.804559201740436 +10 0.08726646259971647 45.91247805611015 2.004582083196137 +11 0.09599310885968812 45.89411256244511 2.204452307965154 +12 0.10471975511965977 45.874003593470285 2.4041546551560313 +13 0.11344640137963141 45.85215268056152 2.6036739166618528 +14 0.12217304763960307 45.828561487750406 2.802994898318391 +15 0.1308996938995747 45.80323181159764 3.002102421061186 +16 0.13962634015954636 45.77616558105612 3.200981322081504 +17 0.148352986419518 45.74736485732409 3.399616455981045 +18 0.15707963267948966 45.71683183368817 3.5979926959253117 +19 0.16580627893946132 45.684568835356316 3.796094934795584 +20 0.17453292519943295 45.65057831928079 3.993908086339397 +21 0.1832595714594046 45.61486287397096 4.191417086319392 +22 0.19198621771937624 45.57742521929627 4.388606893660532 +23 0.20071286397934787 45.538268206279085 4.585462491595536 +24 0.20943951023931953 45.49739481687753 4.781968888808466 +25 0.2181661564992912 45.454808163758464 4.978111120576366 +26 0.22689280275926282 45.410511490060415 5.173874249908891 +27 0.23561944901923448 45.36450816914657 5.369243368685822 +28 0.24434609527920614 45.31680170434792 5.564203598792361 +29 0.2530727415391778 45.267395728696485 5.758740093252156 +30 0.2617993877991494 45.21629400464857 5.952838037357978 +31 0.27052603405912107 45.163500423798325 6.146482649799909 +32 0.2792526803190927 45.109019006581335 6.33965918379098 +33 0.28797932657906433 45.05285390196844 6.532352928190221 +34 0.296705972839036 44.99500938714982 6.724549208622946 +35 0.30543261909900765 44.93548986720921 6.916233388598285 +36 0.3141592653589793 44.874299874788534 7.107390870623791 +37 0.32288591161895097 44.811444069742585 7.298007097317118 +38 0.33161255787892263 44.74692723878429 7.488067552514604 +39 0.3403392041388943 44.68075429512011 7.677557762376729 +40 0.3490658503988659 44.61293027807589 7.866463296490379 +41 0.35779249665883756 44.54346035271315 8.054769768967752 +42 0.3665191429188092 44.472349809435634 8.242462839541908 +43 0.3752457891787809 44.39960406358656 8.429528214658838 +44 0.3839724354387525 44.32522865503611 8.615951648565975 +45 0.39269908169872414 44.249229247759594 8.801718944397068 +46 0.40142572795869574 44.17161162940613 8.986815955253293 +47 0.41015237421866746 44.09238171085785 9.171228585280662 +48 0.41887902047863906 44.011545525779816 9.354942790743404 +49 0.42760566673861067 43.92910923016049 9.537944581093495 +50 0.4363323129985824 43.84507910184295 9.720220020036088 +51 0.445058959258554 43.7594615400468 9.901755226590785 +52 0.45378560551852565 43.672263064880845 10.08253637614878 +53 0.4625122517784973 43.58349031684658 10.262549701525602 +54 0.47123889803846897 43.49315005633246 10.441781494009577 +55 0.4799655442984406 43.401249163099095 10.620218104405781 +56 0.4886921905584123 43.30779463575532 10.797845944075487 +57 0.4974188368183839 43.2127935912252 10.974651485970993 +58 0.5061454830783556 43.1162532642061 11.150621265665752 +59 0.5148721293383272 43.018181006617695 11.325741882379742 +60 0.5235987755982988 42.918584287042094 11.499999999999998 +61 0.5323254218582705 42.81747069015509 11.673382348096192 +62 0.5410520681182421 42.71484791614858 11.845875722931249 +63 0.5497787143782138 42.61072378014412 12.017466988466825 +64 0.5585053606381855 42.50510621159779 12.188143077363716 +65 0.5672320068981571 42.39800325369637 12.357890991976952 +66 0.5759586531581287 42.28942306274475 12.52669780534562 +67 0.5846852994181004 42.179373907544864 12.69455066217734 +68 0.593411945678072 42.06786416876596 12.861436779827178 +69 0.6021385919380438 41.954902338306354 13.027343449271157 +70 0.6108652381980153 41.840497018646815 13.192258036074058 +71 0.619591884457987 41.724656922195344 13.356167981351614 +72 0.6283185307179586 41.60739087062379 13.519060802726882 +73 0.6370451769779303 41.488707794195996 13.680924095280849 +74 0.6457718232379019 41.368616731087734 13.84174553249711 +75 0.6544984694978736 41.247126826698405 14.001512867200574 +76 0.6632251157578453 41.1242473329546 14.16021393249014 +77 0.6719517620178168 40.99998760760552 14.317836642665249 +78 0.6806784082777886 40.87435711351033 14.474368994146262 +79 0.6894050545377601 40.74736541791756 14.629799066388571 +80 0.6981317007977318 40.61902219173649 14.784115022790406 +81 0.7068583470577035 40.48933720880071 14.937305111594224 +82 0.7155849933176751 40.35832034512376 15.089357666781668 +83 0.7243116395776468 40.225981578147056 15.240261108961963 +84 0.7330382858376184 40.09233098598007 15.390003946253739 +85 0.74176493209759 39.95737874663285 15.538574775160184 +86 0.7504915783575618 39.82113513724092 15.685962281437467 +87 0.7592182246175333 39.68361053328261 15.832155240956343 +88 0.767944870877505 39.544815407788974 15.977142520556937 +89 0.7766715171374766 39.40476033054617 16.12091307889657 +90 0.7853981633974483 39.26345596729059 16.263455967290593 +91 0.7941248096574199 39.12091307889657 16.404760330546175 +92 0.8028514559173915 38.97714252055694 16.544815407788974 +93 0.8115781021773633 38.83215524095634 16.683610533282614 +94 0.8203047484373349 38.68596228143747 16.82113513724092 +95 0.8290313946973066 38.538574775160185 16.957378746632852 +96 0.8377580409572781 38.39000394625374 17.092330985980066 +97 0.8464846872172498 38.24026110896197 17.225981578147046 +98 0.8552113334772213 38.089357666781666 17.358320345123754 +99 0.8639379797371932 37.93730511159422 17.489337208800716 +100 0.8726646259971648 37.78411502279041 17.619022191736494 +101 0.8813912722571364 37.62979906638857 17.74736541791756 +102 0.890117918517108 37.47436899414626 17.87435711351033 +103 0.8988445647770796 37.317836642665256 17.99998760760552 +104 0.9075712110370513 37.16021393249014 18.124247332954603 +105 0.9162978572970231 37.00151286720057 18.24712682669841 +106 0.9250245035569946 36.841745532497114 18.368616731087734 +107 0.9337511498169663 36.680924095280844 18.488707794195996 +108 0.9424777960769379 36.519060802726884 18.607390870623792 +109 0.9512044423369095 36.35616798135162 18.72465692219534 +110 0.9599310885968813 36.19225803607406 18.840497018646815 +111 0.9686577348568529 36.02734344927116 18.95490233830636 +112 0.9773843811168246 35.86143677982717 19.06786416876596 +113 0.9861110273767961 35.694550662177335 19.179373907544868 +114 0.9948376736367678 35.52669780534563 19.289423062744753 +115 1.0035643198967394 35.35789099197695 19.398003253696373 +116 1.0122909661567112 35.18814307736372 19.5051062115978 +117 1.0210176124166828 35.01746698846682 19.610723780144124 +118 1.0297442586766543 34.84587572293125 19.71484791614858 +119 1.038470904936626 34.673382348096204 19.81747069015509 +120 1.0471975511965976 34.5 19.918584287042087 +121 1.0559241974565694 34.325741882379745 20.01818100661769 +122 1.064650843716541 34.150621265665755 20.1162532642061 +123 1.0733774899765127 33.974651485970995 20.212793591225203 +124 1.0821041362364843 33.79784594407549 20.30779463575532 +125 1.0908307824964558 33.62021810440579 20.401249163099095 +126 1.0995574287564276 33.441781494009575 20.49315005633246 +127 1.1082840750163994 33.2625497015256 20.58349031684658 +128 1.117010721276371 33.08253637614878 20.67226306488084 +129 1.1257373675363425 32.901755226590794 20.759461540046793 +130 1.1344640137963142 32.72022002003609 20.845079101842952 +131 1.1431906600562858 32.5379445810935 20.929109230160492 +132 1.1519173063162573 32.35494279074341 21.011545525779816 +133 1.160643952576229 32.171228585280666 21.092381710857854 +134 1.1693705988362009 31.98681595525329 21.17161162940613 +135 1.1780972450961724 31.801718944397066 21.249229247759594 +136 1.186823891356144 31.61595164856598 21.32522865503611 +137 1.1955505376161157 31.429528214658838 21.399604063586565 +138 1.2042771838760875 31.2424628395419 21.47234980943564 +139 1.213003830136059 31.054769768967752 21.543460352713144 +140 1.2217304763960306 30.866463296490384 21.612930278075893 +141 1.2304571226560024 30.67755776237673 21.680754295120106 +142 1.239183768915974 30.488067552514604 21.746927238784284 +143 1.2479104151759455 30.29800709731712 21.811444069742585 +144 1.2566370614359172 30.107390870623792 21.874299874788534 +145 1.265363707695889 29.91623338859828 21.93548986720922 +146 1.2740903539558606 29.724549208622946 21.995009387149818 +147 1.2828170002158321 29.532352928190225 22.05285390196844 +148 1.2915436464758039 29.339659183790978 22.109019006581335 +149 1.3002702927357754 29.146482649799907 22.16350042379833 +150 1.3089969389957472 28.952838037357978 22.21629400464857 +151 1.3177235852557188 28.758740093252154 22.267395728696478 +152 1.3264502315156905 28.564203598792353 22.31680170434792 +153 1.335176877775662 28.369243368685826 22.36450816914656 +154 1.3439035240356336 28.1738742499089 22.410511490060408 +155 1.3526301702956054 27.978111120576365 22.454808163758468 +156 1.3613568165555772 27.78196888880846 22.49739481687753 +157 1.3700834628155487 27.585462491595536 22.538268206279085 +158 1.3788101090755203 27.38860689366053 22.57742521929627 +159 1.3875367553354918 27.191417086319397 22.614862873970953 +160 1.3962634015954636 26.993908086339403 22.650578319280786 +161 1.4049900478554354 26.796094934795583 22.684568835356323 +162 1.413716694115407 26.597992695925313 22.71683183368817 +163 1.4224433403753785 26.39961645598105 22.747364857324087 +164 1.4311699866353502 26.200981322081503 22.77616558105612 +165 1.4398966328953218 26.002102421061192 22.80323181159764 +166 1.4486232791552935 25.802994898318392 22.82856148775041 +167 1.457349925415265 25.603673916661858 22.852152680561513 +168 1.4660765716752369 25.40415465515603 22.874003593470285 +169 1.4748032179352084 25.204452307965155 22.894112562445113 +170 1.48352986419518 25.00458208319614 22.912478056110146 +171 1.4922565104551517 24.804559201740435 22.929098675861944 +172 1.5009831567151235 24.60439889611488 22.943973155975957 +173 1.509709802975095 24.40411640930171 22.95710036370294 +174 1.5184364492350666 24.20372699358771 22.9684792993552 +175 1.5271630954950384 24.00324590940273 22.978109096382727 +176 1.53588974175501 23.802688424157527 22.9859890214392 +177 1.5446163880149815 23.602069811081087 22.992118474437817 +178 1.5533430342749532 23.401405348057523 22.996496988597 +179 1.562069680534925 23.200710316462597 22.99912423047594 +180 1.5707963267948966 23.0 23.0 +181 1.579522973054868 22.799289683537403 22.99912423047594 +182 1.5882496193148399 22.59859465194248 22.996496988597 +183 1.5969762655748114 22.39793018891892 22.992118474437817 +184 1.605702911834783 22.197311575842484 22.9859890214392 +185 1.6144295580947547 21.996754090597275 22.97810909638273 +186 1.6231562043547265 21.796273006412292 22.9684792993552 +187 1.6318828506146983 21.59588359069829 22.95710036370294 +188 1.6406094968746698 21.395601103885117 22.943973155975957 +189 1.6493361431346414 21.19544079825957 22.929098675861944 +190 1.6580627893946132 20.99541791680386 22.912478056110146 +191 1.6667894356545847 20.795547692034848 22.894112562445113 +192 1.6755160819145563 20.595845344843973 22.874003593470285 +193 1.684242728174528 20.396326083338145 22.852152680561513 +194 1.6929693744344996 20.19700510168161 22.82856148775041 +195 1.7016960206944711 19.99789757893882 22.80323181159764 +196 1.7104226669544427 19.7990186779185 22.77616558105612 +197 1.7191493132144147 19.600383544018953 22.747364857324087 +198 1.7278759594743864 19.402007304074687 22.71683183368817 +199 1.736602605734358 19.203905065204413 22.684568835356323 +200 1.7453292519943295 19.006091913660605 22.650578319280786 +201 1.7540558982543013 18.808582913680606 22.614862873970953 +202 1.7627825445142729 18.61139310633947 22.57742521929627 +203 1.7715091907742444 18.414537508404468 22.538268206279085 +204 1.780235837034216 18.21803111119154 22.49739481687753 +205 1.7889624832941877 18.021888879423635 22.454808163758468 +206 1.7976891295541593 17.82612575009111 22.410511490060415 +207 1.8064157758141308 17.630756631314185 22.364508169146568 +208 1.8151424220741026 17.435796401207647 22.31680170434792 +209 1.8238690683340746 17.241259906747842 22.267395728696474 +210 1.8325957145940461 17.047161962642022 22.21629400464857 +211 1.8413223608540177 16.853517350200093 22.16350042379833 +212 1.8500490071139892 16.660340816209022 22.109019006581335 +213 1.858775653373961 16.46764707180978 22.05285390196844 +214 1.8675022996339325 16.275450791377057 21.995009387149818 +215 1.876228945893904 16.08376661140172 21.93548986720922 +216 1.8849555921538759 15.892609129376211 21.874299874788534 +217 1.8936822384138474 15.701992902682884 21.811444069742585 +218 1.902408884673819 15.511932447485401 21.74692723878429 +219 1.9111355309337907 15.322442237623271 21.680754295120106 +220 1.9198621771937625 15.133536703509622 21.612930278075893 +221 1.9285888234537343 14.945230231032248 21.543460352713144 +222 1.9373154697137058 14.757537160458094 21.47234980943564 +223 1.9460421159736774 14.570471785341164 21.399604063586565 +224 1.9547687622336491 14.384048351434023 21.32522865503611 +225 1.9634954084936207 14.198281055602934 21.249229247759594 +226 1.9722220547535922 14.013184044746707 21.17161162940613 +227 1.980948701013564 13.828771414719338 21.092381710857854 +228 1.9896753472735356 13.645057209256601 21.01154552577982 +229 1.9984019935335071 13.462055418906505 20.929109230160496 +230 2.007128639793479 13.279779979963916 20.845079101842952 +231 2.015855286053451 13.098244773409206 20.759461540046793 +232 2.0245819323134224 12.917463623851214 20.672263064880838 +233 2.033308578573394 12.737450298474398 20.583490316846575 +234 2.0420352248333655 12.558218505990425 20.49315005633246 +235 2.050761871093337 12.379781895594226 20.401249163099102 +236 2.0594885173533086 12.202154055924519 20.30779463575532 +237 2.0682151636132806 12.025348514029005 20.212793591225203 +238 2.076941809873252 11.849378734334248 20.1162532642061 +239 2.0856684561332237 11.674258117620258 20.01818100661769 +240 2.0943951023931953 11.500000000000005 19.918584287042094 +241 2.103121748653167 11.326617651903813 19.817470690155098 +242 2.111848394913139 11.154124277068755 19.71484791614858 +243 2.1205750411731104 10.982533011533175 19.610723780144124 +244 2.129301687433082 10.81185692263629 19.5051062115978 +245 2.138028333693054 10.642109008023048 19.398003253696373 +246 2.1467549799530254 10.473302194654377 19.289423062744753 +247 2.155481626212997 10.305449337822662 19.179373907544868 +248 2.1642082724729685 10.138563220172824 19.06786416876596 +249 2.17293491873294 9.972656550728853 18.954902338306365 +250 2.1816615649929116 9.807741963925945 18.840497018646815 +251 2.1903882112528836 9.643832018648386 18.724656922195344 +252 2.199114857512855 9.48093919727312 18.607390870623792 +253 2.2078415037728267 9.319075904719153 18.488707794196 +254 2.2165681500327987 9.158254467502887 18.368616731087734 +255 2.2252947962927703 8.998487132799427 18.24712682669841 +256 2.234021442552742 8.83978606750986 18.124247332954607 +257 2.2427480888127134 8.682163357334751 17.999987607605522 +258 2.251474735072685 8.52563100585374 17.87435711351033 +259 2.260201381332657 8.370200933611429 17.747365417917553 +260 2.2689280275926285 8.215884977209592 17.619022191736494 +261 2.2776546738526 8.062694888405778 17.489337208800713 +262 2.2863813201125716 7.9106423332183375 17.358320345123758 +263 2.295107966372543 7.759738891038043 17.225981578147053 +264 2.3038346126325147 7.6099960537462685 17.092330985980073 +265 2.3125612588924866 7.461425224839812 16.957378746632855 +266 2.321287905152458 7.314037718562537 16.821135137240926 +267 2.33001455141243 7.167844759043658 16.683610533282614 +268 2.3387411976724017 7.0228574794430605 16.544815407788974 +269 2.3474678439323733 6.879086921103429 16.404760330546175 +270 2.356194490192345 6.736544032709406 16.263455967290593 +271 2.3649211364523164 6.595239669453827 16.120913078896574 +272 2.373647782712288 6.455184592211028 15.977142520556942 +273 2.3823744289722595 6.316389466717392 15.83215524095635 +274 2.3911010752322315 6.178864862759079 15.685962281437467 +275 2.399827721492203 6.042621253367151 15.538574775160189 +276 2.408554367752175 5.9076690140199295 15.390003946253735 +277 2.4172810140121466 5.774018421852952 15.24026110896196 +278 2.426007660272118 5.641679654876244 15.089357666781668 +279 2.4347343065320897 5.510662791199291 14.93730511159423 +280 2.443460952792061 5.380977808263508 14.784115022790408 +281 2.4521875990520328 5.252634582082445 14.629799066388577 +282 2.4609142453120048 5.125642886489669 14.47436899414626 +283 2.4696408915719763 5.000012392394482 14.317836642665254 +284 2.478367537831948 4.875752667045396 14.160213932490143 +285 2.4870941840919194 4.752873173301594 14.00151286720058 +286 2.495820830351891 4.63138326891227 13.841745532497114 +287 2.504547476611863 4.511292205804002 13.680924095280849 +288 2.5132741228718345 4.392609129376211 13.519060802726887 +289 2.522000769131806 4.27534307780466 13.356167981351614 +290 2.530727415391778 4.159502981353186 13.192258036074058 +291 2.5394540616517496 4.045097661693639 13.027343449271156 +292 2.548180707911721 3.9321358312340453 12.861436779827182 +293 2.5569073541716927 3.820626092455131 12.69455066217734 +294 2.5656340004316642 3.7105769372552517 12.52669780534563 +295 2.574360646691636 3.6019967463036338 12.357890991976955 +296 2.5830872929516078 3.494893788402203 12.188143077363712 +297 2.5918139392115793 3.3892762198558772 12.017466988466825 +298 2.600540585471551 3.2851520838514188 11.845875722931249 +299 2.609267231731523 3.182529309844906 11.673382348096192 +300 2.6179938779914944 3.081415712957912 11.5 +301 2.626720524251466 2.9818189933823094 11.325741882379743 +302 2.6354471705114375 2.8837467357939004 11.150621265665755 +303 2.644173816771409 2.7872064087748014 10.974651485970996 +304 2.652900463031381 2.6922053642446793 10.797845944075487 +305 2.6616271092913526 2.5987508369009005 10.62021810440578 +306 2.670353755551324 2.506849943667538 10.441781494009577 +307 2.6790804018112957 2.4165096831534276 10.262549701525607 +308 2.6878070480712672 2.3277369351191632 10.082536376148786 +309 2.696533694331239 2.240538459953213 9.901755226590796 +310 2.705260340591211 2.1549208981570516 9.720220020036088 +311 2.7139869868511823 2.070890769839511 9.537944581093504 +312 2.7227136331111543 1.98845447422018 9.354942790743404 +313 2.731440279371126 1.9076182891421496 9.171228585280662 +314 2.7401669256310974 1.828388370593874 8.986815955253299 +315 2.748893571891069 1.750770752240405 8.801718944397068 +316 2.7576202181510405 1.6747713449638892 8.615951648565982 +317 2.766346864411012 1.6003959364134372 8.429528214658843 +318 2.7750735106709836 1.5276501905643651 8.242462839541917 +319 2.7838001569309556 1.456539647286856 8.054769768967752 +320 2.792526803190927 1.3870697219241088 7.866463296490386 +321 2.801253449450899 1.3192457048798987 7.677557762376729 +322 2.8099800957108707 1.2530727612157126 7.4880675525146 +323 2.8187067419708423 1.1885559302574182 7.298007097317118 +324 2.827433388230814 1.125700125211469 7.107390870623792 +325 2.8361600344907854 1.0645101327907804 6.916233388598285 +326 2.844886680750757 1.0049906128501875 6.724549208622951 +327 2.853613327010729 0.9471460980315598 6.532352928190221 +328 2.8623399732707004 0.8909809934186654 6.33965918379098 +329 2.871066619530672 0.8364995762016721 6.146482649799912 +330 2.8797932657906435 0.7837059953514339 5.952838037357982 +331 2.888519912050615 0.7326042713035219 5.758740093252159 +332 2.897246558310587 0.6831982956520811 5.56420359879236 +333 2.9059732045705586 0.6354918308534366 5.369243368685828 +334 2.91469985083053 0.5894885099395893 5.173874249908903 +335 2.923426497090502 0.5451918362415327 4.978111120576366 +336 2.9321531433504737 0.5026051831224692 4.781968888808466 +337 2.9408797896104453 0.461731793720922 4.585462491595536 +338 2.949606435870417 0.42257478070372856 4.388606893660535 +339 2.9583330821303884 0.3851371260290464 4.191417086319397 +340 2.96705972839036 0.34942168071921553 3.993908086339407 +341 2.975786374650332 0.3154311646436795 3.796094934795584 +342 2.9845130209103035 0.28316816631183384 3.5979926959253126 +343 2.993239667170275 0.252635142675913 3.3996164559810502 +344 3.001966313430247 0.22383441894388167 3.200981322081504 +345 3.0106929596902186 0.1967681884023612 3.0021024210611866 +346 3.01941960595019 0.17143851224959694 2.802994898318396 +347 3.0281462522101616 0.14784731943848595 2.6036739166618585 +348 3.036872898470133 0.12599640652971433 2.4041546551560367 +349 3.045599544730105 0.10588743755488639 2.2044523079651492 +350 3.0543261909900767 0.0875219438898499 2.004582083196137 +351 3.0630528372500483 0.07090132413805683 1.8045592017404362 +352 3.07177948351002 0.056026844024043454 1.6043988961148898 +353 3.0805061297699914 0.04289963629706084 1.4041164093017162 +354 3.089232776029963 0.03152070064480439 1.2037269935877162 +355 3.097959422289935 0.02189090361727064 1.0032459094027304 +356 3.1066860685499065 0.014010978560797471 0.8026884241575263 +357 3.1154127148098785 0.007881525562183023 0.602069811081076 +358 3.12413936106985 0.0035030114030007997 0.4014053480575184 +359 3.1328660073298216 0.0008757695240573238 0.20071031646259918 +360 3.141592653589793 0.0 5.10702591327572e-15 +361 3.1503192998497647 0.0008757695240573238 -0.20071031646259663 +362 3.159045946109736 0.0035030114030007997 -0.40140534805751327 +363 3.1677725923697078 0.007881525562183023 -0.6020698110810735 +364 3.1764992386296798 0.014010978560797471 -0.8026884241575212 +365 3.1852258848896513 0.02189090361727064 -1.0032459094027253 +366 3.193952531149623 0.03152070064480439 -1.2037269935877009 +367 3.2026791774095944 0.04289963629706084 -1.4041164093016985 +368 3.211405823669566 0.05602684402403835 -1.604398896114872 +369 3.2201324699295375 0.07090132413805428 -1.8045592017404206 +370 3.2288591161895095 0.0875219438898499 -2.004582083196132 +371 3.237585762449481 0.10588743755488639 -2.2044523079651444 +372 3.246312408709453 0.12599640652971433 -2.4041546551560313 +373 3.255039054969425 0.14784731943848595 -2.6036739166618634 +374 3.2637657012293966 0.17143851224959694 -2.8029948983183988 +375 3.272492347489368 0.1967681884023612 -3.002102421061192 +376 3.2812189937493397 0.22383441894388678 -3.200981322081507 +377 3.2899456400093112 0.252635142675913 -3.399616455981045 +378 3.2986722862692828 0.2831681663118313 -3.597992695925307 +379 3.3073989325292543 0.3154311646436795 -3.7960949347955815 +380 3.3161255787892263 0.34942168071921553 -3.993908086339402 +381 3.324852225049198 0.3851371260290464 -4.191417086319392 +382 3.3335788713091694 0.422574780703726 -4.388606893660529 +383 3.342305517569141 0.4617317937209169 -4.585462491595532 +384 3.3510321638291125 0.5026051831224666 -4.781968888808459 +385 3.359758810089084 0.5451918362415301 -4.978111120576358 +386 3.368485456349056 0.5894885099395919 -5.173874249908894 +387 3.3772121026090276 0.6354918308534392 -5.369243368685822 +388 3.385938748868999 0.6831982956520811 -5.564203598792352 +389 3.3946653951289707 0.7326042713035193 -5.758740093252145 +390 3.4033920413889422 0.7837059953514288 -5.952838037357967 +391 3.412118687648914 0.836499576201667 -6.146482649799897 +392 3.4208453339088853 0.8909809934186629 -6.339659183790969 +393 3.4295719801688573 0.9471460980315572 -6.532352928190216 +394 3.4382986264288293 1.004990612850185 -6.724549208622947 +395 3.447025272688801 1.0645101327907804 -6.916233388598279 +396 3.455751918948773 1.1257001252114713 -7.107390870623797 +397 3.4644785652087444 1.1885559302574156 -7.298007097317124 +398 3.473205211468716 1.253072761215715 -7.488067552514604 +399 3.4819318577286875 1.3192457048798987 -7.677557762376732 +400 3.490658503988659 1.3870697219241062 -7.866463296490379 +401 3.4993851502486306 1.456539647286856 -8.054769768967747 +402 3.5081117965086026 1.5276501905643598 -8.242462839541911 +403 3.516838442768574 1.6003959364134372 -8.429528214658838 +404 3.5255650890285457 1.6747713449638892 -8.615951648565975 +405 3.5342917352885173 1.7507707522404026 -8.801718944397061 +406 3.543018381548489 1.8283883705938715 -8.986815955253293 +407 3.5517450278084604 1.907618289142147 -9.171228585280657 +408 3.560471674068432 1.988454474220175 -9.354942790743396 +409 3.569198320328404 2.0708907698395085 -9.537944581093498 +410 3.5779249665883754 2.1549208981570516 -9.720220020036084 +411 3.586651612848347 2.240538459953203 -9.90175522659078 +412 3.5953782591083185 2.327736935119158 -10.082536376148772 +413 3.60410490536829 2.41650968315342 -10.262549701525593 +414 3.6128315516282616 2.506849943667536 -10.441781494009565 +415 3.6215581978882336 2.598750836900898 -10.620218104405774 +416 3.630284844148205 2.6922053642446793 -10.797845944075481 +417 3.639011490408177 2.787206408774796 -10.974651485970991 +418 3.647738136668149 2.8837467357939004 -11.150621265665759 +419 3.6564647829281207 2.9818189933823094 -11.325741882379749 +420 3.6651914291880923 3.081415712957912 -11.500000000000002 +421 3.673918075448064 3.1825293098449086 -11.673382348096197 +422 3.6826447217080354 3.2851520838514165 -11.845875722931245 +423 3.691371367968007 3.3892762198558772 -12.017466988466817 +424 3.7000980142279785 3.494893788402203 -12.18814307736371 +425 3.7088246604879505 3.601996746303631 -12.35789099197695 +426 3.717551306747922 3.710576937255247 -12.526697805345623 +427 3.7262779530078936 3.820626092455131 -12.694550662177338 +428 3.735004599267865 3.93213583123404 -12.861436779827173 +429 3.7437312455278366 4.045097661693639 -13.02734344927115 +430 3.752457891787808 4.159502981353186 -13.192258036074055 +431 3.76118453804778 4.27534307780466 -13.356167981351614 +432 3.7699111843077517 4.392609129376209 -13.51906080272688 +433 3.7786378305677233 4.511292205804 -13.680924095280847 +434 3.787364476827695 4.631383268912263 -13.841745532497105 +435 3.7960911230876664 4.752873173301588 -14.001512867200566 +436 3.804817769347638 4.875752667045391 -14.16021393249013 +437 3.8135444156076095 5.00001239239447 -14.317836642665238 +438 3.8222710618675815 5.125642886489667 -14.474368994146255 +439 3.8309977081275535 5.252634582082442 -14.629799066388573 +440 3.839724354387525 5.380977808263506 -14.784115022790402 +441 3.848451000647497 5.510662791199294 -14.93730511159423 +442 3.8571776469074686 5.641679654876249 -15.08935766678167 +443 3.86590429316744 5.774018421852952 -15.240261108961963 +444 3.8746309394274117 5.907669014019932 -15.390003946253739 +445 3.883357585687383 6.042621253367144 -15.538574775160184 +446 3.8920842319473548 6.178864862759079 -15.685962281437462 +447 3.9008108782073267 6.316389466717387 -15.832155240956343 +448 3.9095375244672983 6.455184592211025 -15.977142520556939 +449 3.91826417072727 6.595239669453827 -16.12091307889657 +450 3.9269908169872414 6.736544032709406 -16.263455967290593 +451 3.935717463247213 6.8790869211034265 -16.40476033054617 +452 3.9444441095071845 7.022857479443055 -16.54481540778897 +453 3.953170755767156 7.16784475904365 -16.683610533282607 +454 3.961897402027128 7.314037718562533 -16.82113513724092 +455 3.9706240482870996 7.461425224839812 -16.95737874663285 +456 3.979350694547071 7.609996053746255 -17.092330985980063 +457 3.9880773408070427 7.759738891038032 -17.225981578147042 +458 3.9968039870670142 7.910642333218325 -17.358320345123747 +459 4.005530633326986 8.062694888405769 -17.489337208800706 +460 4.014257279586958 8.215884977209592 -17.61902219173649 +461 4.022983925846929 8.370200933611416 -17.747365417917546 +462 4.031710572106902 8.525631005853748 -17.874357113510335 +463 4.040437218366873 8.682163357334748 -17.99998760760552 +464 4.049163864626845 8.839786067509865 -18.124247332954607 +465 4.057890510886816 8.99848713279942 -18.247126826698405 +466 4.066617157146788 9.15825446750289 -18.368616731087734 +467 4.07534380340676 9.319075904719156 -18.488707794196003 +468 4.084070449666731 9.480939197273115 -18.60739087062379 +469 4.092797095926703 9.643832018648391 -18.724656922195344 +470 4.101523742186674 9.807741963925936 -18.840497018646808 +471 4.110250388446646 9.972656550728848 -18.95490233830636 +472 4.118977034706617 10.138563220172813 -19.06786416876595 +473 4.127703680966589 10.305449337822658 -19.179373907544868 +474 4.136430327226561 10.47330219465438 -19.289423062744753 +475 4.145156973486532 10.642109008023043 -19.398003253696363 +476 4.153883619746504 10.811856922636288 -19.5051062115978 +477 4.162610266006475 10.982533011533162 -19.610723780144113 +478 4.171336912266447 11.154124277068746 -19.714847916148578 +479 4.1800635585264185 11.326617651903788 -19.81747069015508 +480 4.1887902047863905 11.499999999999993 -19.918584287042084 +481 4.1975168510463625 11.674258117620255 -20.01818100661769 +482 4.206243497306334 11.849378734334234 -20.116253264206097 +483 4.214970143566306 12.025348514029004 -20.2127935912252 +484 4.223696789826278 12.202154055924513 -20.30779463575532 +485 4.23242343608625 12.379781895594231 -20.401249163099102 +486 4.241150082346221 12.55821850599042 -20.49315005633246 +487 4.249876728606193 12.737450298474398 -20.58349031684658 +488 4.258603374866164 12.917463623851214 -20.672263064880838 +489 4.267330021126136 13.098244773409215 -20.759461540046793 +490 4.276056667386108 13.279779979963921 -20.845079101842952 +491 4.284783313646079 13.462055418906496 -20.929109230160492 +492 4.293509959906051 13.645057209256596 -21.01154552577982 +493 4.302236606166022 13.828771414719327 -21.092381710857847 +494 4.310963252425994 14.013184044746701 -21.171611629406126 +495 4.319689898685965 14.198281055602923 -21.24922924775959 +496 4.328416544945937 14.384048351434018 -21.32522865503611 +497 4.337143191205909 14.570471785341164 -21.399604063586565 +498 4.34586983746588 14.757537160458083 -21.472349809435638 +499 4.354596483725852 14.945230231032248 -21.543460352713144 +500 4.363323129985823 15.133536703509606 -21.61293027807589 +501 4.372049776245795 15.32244223762326 -21.6807542951201 +502 4.380776422505767 15.511932447485396 -21.746927238784284 +503 4.389503068765738 15.701992902682871 -21.811444069742578 +504 4.39822971502571 15.892609129376206 -21.874299874788534 +505 4.4069563612856815 16.083766611401707 -21.935489867209213 +506 4.4156830075456535 16.275450791377043 -21.995009387149814 +507 4.4244096538056255 16.46764707180978 -22.05285390196844 +508 4.4331363000655974 16.660340816209025 -22.109019006581338 +509 4.4418629463255686 16.853517350200086 -22.16350042379833 +510 4.4505895925855405 17.047161962642026 -22.21629400464857 +511 4.4593162388455125 17.241259906747857 -22.267395728696485 +512 4.468042885105484 17.43579640120764 -22.31680170434792 +513 4.476769531365456 17.630756631314185 -22.36450816914656 +514 4.485496177625427 17.826125750091098 -22.410511490060408 +515 4.494222823885399 18.021888879423635 -22.454808163758468 +516 4.50294947014537 18.218031111191525 -22.497394816877527 +517 4.511676116405342 18.414537508404464 -22.538268206279078 +518 4.520402762665314 18.611393106339474 -22.57742521929627 +519 4.529129408925285 18.808582913680603 -22.614862873970953 +520 4.537856055185257 19.006091913660605 -22.650578319280786 +521 4.546582701445228 19.203905065204403 -22.68456883535632 +522 4.5553093477052 19.402007304074687 -22.71683183368817 +523 4.564035993965171 19.60038354401894 -22.747364857324087 +524 4.572762640225143 19.799018677918486 -22.776165581056116 +525 4.581489286485115 19.997897578938815 -22.80323181159764 +526 4.590215932745086 20.197005101681594 -22.828561487750402 +527 4.598942579005058 20.39632608333814 -22.852152680561513 +528 4.607669225265029 20.595845344843955 -22.874003593470285 +529 4.616395871525002 20.79554769203486 -22.894112562445113 +530 4.625122517784973 20.99541791680386 -22.912478056110146 +531 4.633849164044945 21.195440798259572 -22.929098675861944 +532 4.642575810304916 21.39560110388511 -22.943973155975957 +533 4.651302456564888 21.595883590698293 -22.95710036370294 +534 4.66002910282486 21.796273006412303 -22.9684792993552 +535 4.6687557490848315 21.99675409059727 -22.978109096382727 +536 4.6774823953448035 22.19731157584248 -22.9859890214392 +537 4.686209041604775 22.39793018891891 -22.992118474437817 +538 4.694935687864747 22.59859465194248 -22.996496988597 +539 4.703662334124718 22.79928968353739 -22.99912423047594 +540 4.71238898038469 22.999999999999996 -23.0 +541 4.721115626644662 23.200710316462605 -22.99912423047594 +542 4.729842272904633 23.401405348057512 -22.996496988597 +543 4.738568919164605 23.60206981108108 -22.992118474437817 +544 4.747295565424576 23.802688424157513 -22.9859890214392 +545 4.756022211684548 24.00324590940272 -22.978109096382727 +546 4.764748857944519 24.20372699358769 -22.9684792993552 +547 4.773475504204491 24.404116409301697 -22.957100363702946 +548 4.782202150464463 24.60439889611488 -22.943973155975957 +549 4.790928796724434 24.80455920174042 -22.929098675861944 +550 4.799655442984406 25.004582083196134 -22.912478056110146 +551 4.808382089244377 25.204452307965134 -22.894112562445113 +552 4.81710873550435 25.40415465515604 -22.874003593470285 +553 4.825835381764321 25.603673916661855 -22.852152680561513 +554 4.834562028024293 25.802994898318396 -22.828561487750402 +555 4.843288674284264 26.00210242106118 -22.80323181159764 +556 4.852015320544236 26.200981322081503 -22.77616558105612 +557 4.860741966804208 26.39961645598105 -22.747364857324087 +558 4.869468613064179 26.597992695925306 -22.71683183368817 +559 4.878195259324151 26.79609493479559 -22.68456883535632 +560 4.886921905584122 26.993908086339392 -22.650578319280786 +561 4.895648551844094 27.191417086319394 -22.614862873970953 +562 4.9043751981040655 27.388606893660516 -22.57742521929627 +563 4.9131018443640375 27.585462491595532 -22.538268206279085 +564 4.9218284906240095 27.781968888808468 -22.49739481687753 +565 4.930555136883981 27.978111120576354 -22.454808163758468 +566 4.939281783143953 28.17387424990889 -22.410511490060408 +567 4.948008429403924 28.36924336868581 -22.364508169146568 +568 4.956735075663896 28.56420359879235 -22.31680170434792 +569 4.965461721923867 28.758740093252133 -22.267395728696485 +570 4.974188368183839 28.952838037357967 -22.21629400464857 +571 4.982915014443811 29.146482649799907 -22.16350042379833 +572 4.991641660703782 29.339659183790964 -22.109019006581338 +573 5.000368306963754 29.532352928190214 -22.052853901968444 +574 5.009094953223726 29.724549208622946 -21.995009387149818 +575 5.017821599483698 29.91623338859829 -21.935489867209217 +576 5.026548245743669 30.107390870623785 -21.874299874788534 +577 5.035274892003641 30.29800709731712 -21.811444069742585 +578 5.044001538263612 30.488067552514593 -21.74692723878429 +579 5.052728184523584 30.67755776237673 -21.680754295120103 +580 5.061454830783556 30.866463296490384 -21.612930278075893 +581 5.070181477043527 31.05476976896775 -21.543460352713147 +582 5.078908123303499 31.24246283954191 -21.47234980943564 +583 5.08763476956347 31.429528214658827 -21.39960406358657 +584 5.096361415823442 31.615951648565975 -21.32522865503611 +585 5.105088062083414 31.80171894439707 -21.249229247759594 +586 5.113814708343385 31.98681595525329 -21.17161162940613 +587 5.122541354603357 32.171228585280666 -21.092381710857854 +588 5.1312680008633285 32.354942790743394 -21.011545525779827 +589 5.1399946471233005 32.53794458109349 -20.929109230160496 +590 5.148721293383272 32.72022002003607 -20.845079101842956 +591 5.1574479396432436 32.90175522659078 -20.759461540046797 +592 5.1661745859032155 33.08253637614878 -20.67226306488084 +593 5.174901232163187 33.26254970152559 -20.583490316846582 +594 5.183627878423159 33.441781494009575 -20.49315005633246 +595 5.19235452468313 33.620218104405765 -20.401249163099106 +596 5.201081170943102 33.797845944075476 -20.30779463575532 +597 5.209807817203074 33.974651485970995 -20.212793591225203 +598 5.218534463463046 34.150621265665755 -20.1162532642061 +599 5.227261109723017 34.32574188237974 -20.0181810066177 +600 5.235987755982989 34.5 -19.918584287042087 +601 5.244714402242961 34.673382348096204 -19.81747069015509 +602 5.253441048502932 34.84587572293125 -19.71484791614858 +603 5.262167694762904 35.017466988466836 -19.61072378014412 +604 5.270894341022875 35.188143077363705 -19.5051062115978 +605 5.279620987282847 35.35789099197695 -19.398003253696373 +606 5.288347633542818 35.52669780534561 -19.28942306274476 +607 5.29707427980279 35.694550662177335 -19.179373907544868 +608 5.305800926062762 35.86143677982718 -19.067864168765958 +609 5.314527572322733 36.02734344927114 -18.954902338306365 +610 5.323254218582705 36.19225803607406 -18.840497018646808 +611 5.331980864842676 36.356167981351604 -18.724656922195347 +612 5.340707511102648 36.51906080272688 -18.607390870623792 +613 5.349434157362619 36.68092409528084 -18.488707794196007 +614 5.358160803622591 36.84174553249711 -18.368616731087737 +615 5.366887449882563 37.00151286720057 -18.24712682669841 +616 5.3756140961425345 37.16021393249013 -18.124247332954614 +617 5.3843407424025065 37.31783664266524 -17.999987607605522 +618 5.393067388662478 37.474368994146246 -17.874357113510342 +619 5.4017940349224505 37.62979906638858 -17.747365417917553 +620 5.410520681182422 37.7841150227904 -17.619022191736498 +621 5.419247327442394 37.93730511159423 -17.48933720880071 +622 5.427973973702365 38.08935766678166 -17.35832034512376 +623 5.436700619962337 38.24026110896197 -17.225981578147046 +624 5.445427266222309 38.39000394625374 -17.092330985980063 +625 5.45415391248228 38.538574775160185 -16.957378746632855 +626 5.462880558742252 38.68596228143747 -16.82113513724092 +627 5.471607205002223 38.83215524095633 -16.683610533282618 +628 5.480333851262195 38.97714252055694 -16.544815407788978 +629 5.489060497522166 39.12091307889656 -16.404760330546186 +630 5.497787143782138 39.26345596729059 -16.263455967290593 +631 5.50651379004211 39.40476033054618 -16.120913078896567 +632 5.515240436302081 39.54481540778897 -15.977142520556944 +633 5.523967082562053 39.68361053328261 -15.832155240956343 +634 5.532693728822024 39.821135137240915 -15.685962281437476 +635 5.541420375081996 39.95737874663285 -15.53857477516019 +636 5.550147021341967 40.092330985980055 -15.390003946253753 +637 5.558873667601939 40.22598157814704 -15.24026110896197 +638 5.567600313861911 40.35832034512375 -15.08935766678167 +639 5.576326960121882 40.489337208800706 -14.937305111594235 +640 5.585053606381854 40.61902219173649 -14.784115022790408 +641 5.593780252641825 40.74736541791755 -14.629799066388586 +642 5.602506898901798 40.874357113510335 -14.474368994146252 +643 5.611233545161769 40.99998760760552 -14.317836642665249 +644 5.619960191421741 41.1242473329546 -14.160213932490137 +645 5.6286868376817125 41.247126826698405 -14.00151286720058 +646 5.6374134839416845 41.368616731087734 -13.84174553249711 +647 5.6461401302016565 41.488707794196 -13.680924095280842 +648 5.654866776461628 41.60739087062379 -13.519060802726885 +649 5.6635934227216 41.724656922195344 -13.356167981351609 +650 5.672320068981571 41.8404970186468 -13.192258036074069 +651 5.681046715241543 41.954902338306354 -13.027343449271157 +652 5.689773361501514 42.06786416876595 -12.861436779827187 +653 5.698500007761486 42.179373907544864 -12.694550662177342 +654 5.707226654021458 42.28942306274475 -12.52669780534562 +655 5.715953300281429 42.39800325369636 -12.357890991976957 +656 5.724679946541401 42.50510621159779 -12.188143077363716 +657 5.733406592801372 42.61072378014411 -12.01746698846684 +658 5.742133239061344 42.71484791614858 -11.845875722931254 +659 5.750859885321315 42.81747069015508 -11.673382348096215 +660 5.759586531581287 42.91858428704208 -11.50000000000001 +661 5.768313177841259 43.018181006617695 -11.325741882379747 +662 5.77703982410123 43.116253264206094 -11.150621265665766 +663 5.785766470361202 43.2127935912252 -10.974651485971002 +664 5.794493116621174 43.30779463575532 -10.797845944075487 +665 5.803219762881146 43.4012491630991 -10.620218104405774 +666 5.811946409141117 43.49315005633246 -10.44178149400958 +667 5.820673055401089 43.58349031684658 -10.262549701525602 +668 5.82939970166106 43.67226306488084 -10.082536376148791 +669 5.838126347921032 43.75946154004679 -9.90175522659079 +670 5.846852994181004 43.84507910184295 -9.720220020036084 +671 5.8555796404409755 43.92910923016049 -9.537944581093505 +672 5.8643062867009474 44.011545525779816 -9.354942790743404 +673 5.8730329329609186 44.09238171085785 -9.171228585280675 +674 5.8817595792208905 44.17161162940613 -8.986815955253299 +675 5.890486225480862 44.24922924775959 -8.801718944397077 +676 5.899212871740834 44.32522865503611 -8.615951648565984 +677 5.907939518000806 44.39960406358656 -8.429528214658838 +678 5.916666164260777 44.472349809435634 -8.242462839541917 +679 5.925392810520749 44.54346035271315 -8.054769768967757 +680 5.93411945678072 44.612930278075886 -7.866463296490398 +681 5.942846103040692 44.680754295120096 -7.67755776237674 +682 5.951572749300664 44.74692723878429 -7.488067552514604 +683 5.960299395560635 44.811444069742585 -7.298007097317133 +684 5.969026041820607 44.87429987478853 -7.107390870623795 +685 5.977752688080578 44.93548986720921 -6.916233388598299 +686 5.98647933434055 44.99500938714981 -6.724549208622957 +687 5.995205980600522 45.05285390196844 -6.532352928190221 +688 6.003932626860494 45.109019006581335 -6.339659183790975 +689 6.012659273120465 45.163500423798325 -6.146482649799914 +690 6.021385919380437 45.21629400464857 -5.952838037357978 +691 6.030112565640409 45.267395728696485 -5.758740093252144 +692 6.03883921190038 45.31680170434792 -5.564203598792361 +693 6.047565858160352 45.36450816914657 -5.36924336868582 +694 6.056292504420323 45.410511490060415 -5.173874249908903 +695 6.065019150680295 45.454808163758464 -4.978111120576366 +696 6.073745796940266 45.49739481687753 -4.781968888808477 +697 6.082472443200238 45.538268206279085 -4.585462491595539 +698 6.09119908946021 45.57742521929627 -4.388606893660526 +699 6.0999257357201815 45.61486287397096 -4.1914170863194 +700 6.1086523819801535 45.65057831928079 -3.9939080863393994 +701 6.117379028240125 45.684568835356316 -3.7960949347956 +702 6.126105674500097 45.71683183368817 -3.597992695925317 +703 6.134832320760068 45.74736485732409 -3.3996164559810604 +704 6.14355896702004 45.77616558105612 -3.2009813220815153 +705 6.152285613280012 45.80323181159764 -3.002102421061189 +706 6.161012259539983 45.828561487750406 -2.8029948983184063 +707 6.169738905799955 45.85215268056152 -2.6036739166618608 +708 6.178465552059926 45.87400359347028 -2.404154655156049 +709 6.187192198319899 45.894112562445116 -2.2044523079651444 +710 6.19591884457987 45.91247805611015 -2.0045820831961425 +711 6.204645490839842 45.929098675861944 -1.8045592017404282 +712 6.213372137099813 45.943973155975954 -1.6043988961148898 +713 6.222098783359785 45.95710036370294 -1.4041164093017087 +714 6.230825429619757 45.968479299355195 -1.2037269935877009 +715 6.239552075879728 45.97810909638273 -1.0032459094027328 +716 6.2482787221397 45.985989021439195 -0.8026884241575185 +717 6.257005368399671 45.99211847443782 -0.6020698110810915 +718 6.265732014659643 45.996496988597 -0.4014053480575209 +719 6.274458660919614 45.999124230475935 -0.20071031646261453 + +HARMONIC_5 +N 720 RADIANS + +0 0.0 0.0 -0.0 +1 0.008726646259971648 0.006510825464412062 -1.4920860535487603 +2 0.017453292519943295 0.02603883966309506 -2.9831495058477806 +3 0.02617993877991494 0.058570659070575015 -4.472168456487151 +4 0.03490658503988659 0.10408398800281804 -5.958122406256236 +5 0.04363323129985824 0.16254763389760063 -7.439992956542959 +6 0.05235987755982988 0.23392152869238025 -8.916764507293145 +7 0.061086523819801536 0.3181567562848644 -10.387424953052388 +8 0.06981317007977318 0.415195586057694 -11.850966376612265 +9 0.07853981633974483 0.5249715124441391 -13.306385739786627 +10 0.08726646259971647 0.6474093005076936 -14.752685570843681 +11 0.09599310885968812 0.7824250375043362 -16.188874648123605 +12 0.10471975511965977 0.929926190392085 -17.61396867937201 +13 0.11344640137963141 1.0898116692486035 -19.026990976324935 +14 0.12217304763960307 1.2619718965531606 -20.42697312408211 +15 0.1308996938995747 1.4462888822855477 -21.81295564481012 +16 0.13962634015954636 1.6426363047905794 -23.183988655320608 +17 0.148352986419518 1.8508795973526482 -24.53913251807283 +18 0.15707963267948966 2.070876040421012 -25.877458485154182 +19 0.16580627893946132 2.30247485942266 -27.198049334797663 +20 0.17453292519943295 2.5455173280956602 -28.5 +21 0.1832595714594046 2.799836877272244 -29.78241818880909 +22 0.19198621771937624 3.065259209036937 -31.044424995856556 +23 0.20071286397934787 3.3416024161816975 -32.28515550471548 +24 0.20943951023931953 3.628677106875996 -33.503759380670985 +25 0.2181661564992912 3.92628653446653 -34.699401453497074 +26 0.22689280275926282 4.234226732317545 -35.87126228984072 +27 0.23561944901923448 4.552286653599402 -37.018538754820476 +28 0.24434609527920614 4.880248315929518 -38.14044456245493 +29 0.2530727415391778 5.217886950766533 -39.23621081454401 +30 0.2617993877991494 5.5649711574556004 -40.30508652763321 +31 0.27052603405912107 5.921263061818676 -41.3463391477004 +32 0.2792526803190927 6.286518479181689 -42.35925505221146 +33 0.28797932657906433 6.660487081726511 -43.343140039201764 +34 0.296705972839036 7.042912570053088 -44.29731980304736 +35 0.30543261909900765 7.43353284883431 -45.221140396600426 +36 0.3141592653589793 7.832080206443008 -46.11396867937202 +37 0.32288591161895097 8.238281498428181 -46.97519275145486 +38 0.33161255787892263 8.651858334714479 -47.804222372889186 +39 0.3403392041388943 9.072527270396964 -48.60048936818326 +40 0.3490658503988659 9.499999999999996 -49.363448015713004 +41 0.35779249665883756 9.933983555067444 -50.09257542173202 +42 0.3665191429188092 10.374180504948619 -50.78737187873696 +43 0.3752457891787809 10.820289160642394 -51.44736120794205 +44 0.3839724354387525 11.272003781559789 -52.072091085628244 +45 0.39269908169872414 11.729014785063297 -52.661133353143356 +46 0.40142572795869574 12.191008958639282 -53.2140843103405 +47 0.41015237421866746 12.657669674558354 -53.73056499225416 +48 0.41887902047863906 13.128677106876003 -54.21022142882373 +49 0.42760566673861067 13.60370845062547 -54.652724887486976 +50 0.4363323129985824 14.08243814305211 -55.057772098476896 +51 0.445058959258554 14.564538086737787 -55.425085462667575 +52 0.45378560551852565 15.049677874462569 -55.75441324182693 +53 0.4625122517784973 15.537525015649193 -56.04552973114542 +54 0.47123889803846897 16.02774516423561 -56.29823541392285 +55 0.4799655442984406 16.520002347819023 -56.5123570983072 +56 0.4886921905584123 17.01395919791458 -56.68774803599159 +57 0.4974188368183839 17.509277181170944 -56.8242880227883 +58 0.5061454830783556 18.00561683138407 -56.9218834810107 +59 0.5148721293383272 18.502637982150404 -56.980467523606755 +60 0.5235987755982988 18.999999999999993 -57.0 +61 0.5323254218582705 19.497362017849582 -56.980467523606755 +62 0.5410520681182421 19.99438316861594 -56.9218834810107 +63 0.5497787143782138 20.490722818829056 -56.824288022788316 +64 0.5585053606381855 20.98604080208542 -56.68774803599158 +65 0.5672320068981571 21.479997652180987 -56.512357098307206 +66 0.5759586531581287 21.972254835764378 -56.298235413922846 +67 0.5846852994181004 22.462474984350806 -56.04552973114542 +68 0.593411945678072 22.950322125537433 -55.75441324182692 +69 0.6021385919380438 23.43546191326221 -55.42508546266756 +70 0.6108652381980153 23.91756185694789 -55.0577720984769 +71 0.619591884457987 24.39629154937453 -54.652724887487004 +72 0.6283185307179586 24.871322893124002 -54.21022142882376 +73 0.6370451769779303 25.342330325441647 -53.73056499225416 +74 0.6457718232379019 25.808991041360706 -53.21408431034048 +75 0.6544984694978736 26.270985214936708 -52.66113335314334 +76 0.6632251157578453 26.727996218440204 -52.07209108562825 +77 0.6719517620178168 27.17971083935761 -51.44736120794204 +78 0.6806784082777886 27.625819495051392 -50.78737187873697 +79 0.6894050545377601 28.066016444932558 -50.092575421732015 +80 0.6981317007977318 28.5 -49.363448015713004 +81 0.7068583470577035 28.92747272960303 -48.600489368183254 +82 0.7155849933176751 29.348141665285514 -47.804222372889186 +83 0.7243116395776468 29.761718501571824 -46.9751927514549 +84 0.7330382858376184 30.167919793556994 -46.11396867937201 +85 0.74176493209759 30.56646715116569 -45.22114039660041 +86 0.7504915783575618 30.957087429946917 -44.29731980304733 +87 0.7592182246175333 31.339512918273492 -43.343140039201764 +88 0.767944870877505 31.713481520818306 -42.35925505221146 +89 0.7766715171374766 32.07873693818132 -41.34633914770038 +90 0.7853981633974483 32.435028842544405 -40.305086527633215 +91 0.7941248096574199 32.78211304923346 -39.23621081454397 +92 0.8028514559173915 33.119751684070486 -38.14044456245491 +93 0.8115781021773633 33.44771334640059 -37.018538754820476 +94 0.8203047484373349 33.76577326768245 -35.87126228984075 +95 0.8290313946973066 34.073713465533466 -34.699401453497096 +96 0.8377580409572781 34.371322893123995 -33.503759380671 +97 0.8464846872172498 34.658397583818285 -32.2851555047155 +98 0.8552113334772213 34.93474079096305 -31.044424995856545 +99 0.8639379797371932 35.200163122727766 -29.782418188809064 +100 0.8726646259971648 35.45448267190434 -28.500000000000025 +101 0.8813912722571364 35.69752514057734 -27.198049334797666 +102 0.890117918517108 35.92912395957899 -25.877458485154172 +103 0.8988445647770796 36.149120402647355 -24.539132518072854 +104 0.9075712110370513 36.357363695209415 -23.18398865532062 +105 0.9162978572970231 36.55371111771445 -21.8129556448101 +106 0.9250245035569946 36.73802810344684 -20.426973124082153 +107 0.9337511498169663 36.91018833075138 -19.026990976324942 +108 0.9424777960769379 37.07007380960792 -17.613968679372 +109 0.9512044423369095 37.21757496249566 -16.188874648123598 +110 0.9599310885968813 37.3525906994923 -14.752685570843665 +111 0.9686577348568529 37.47502848755586 -13.30638573978659 +112 0.9773843811168246 37.58480441394231 -11.850966376612277 +113 0.9861110273767961 37.681843243715136 -10.3874249530524 +114 0.9948376736367678 37.76607847130762 -8.916764507293173 +115 1.0035643198967394 37.8374523661024 -7.4399929565429685 +116 1.0122909661567112 37.895916011997194 -5.958122406256257 +117 1.0210176124166828 37.94142934092944 -4.472168456487164 +118 1.0297442586766543 37.9739611603369 -2.9831495058478152 +119 1.038470904936626 37.99348917453559 -1.4920860535487916 +120 1.0471975511965976 37.99999999999999 -6.328271240363392e-15 +121 1.0559241974565694 37.99348917453558 1.4920860535487601 +122 1.064650843716541 37.9739611603369 2.983149505847755 +123 1.0733774899765127 37.94142934092943 4.472168456487155 +124 1.0821041362364843 37.895916011997194 5.95812240625626 +125 1.0908307824964558 37.8374523661024 7.439992956542908 +126 1.0995574287564276 37.766078471307615 8.916764507293164 +127 1.1082840750163994 37.681843243715136 10.387424953052426 +128 1.117010721276371 37.58480441394231 11.850966376612291 +129 1.1257373675363425 37.47502848755585 13.306385739786583 +130 1.1344640137963142 37.3525906994923 14.752685570843688 +131 1.1431906600562858 37.21757496249566 16.188874648123573 +132 1.1519173063162573 37.07007380960792 17.613968679371972 +133 1.160643952576229 36.91018833075139 19.026990976324946 +134 1.1693705988362009 36.73802810344684 20.426973124082156 +135 1.1780972450961724 36.55371111771445 21.812955644810103 +136 1.186823891356144 36.35736369520942 23.183988655320608 +137 1.1955505376161157 36.149120402647355 24.53913251807282 +138 1.2042771838760875 35.92912395957898 25.87745848515419 +139 1.213003830136059 35.69752514057734 27.198049334797666 +140 1.2217304763960306 35.454482671904344 28.499999999999993 +141 1.2304571226560024 35.20016312272775 29.782418188809107 +142 1.239183768915974 34.934740790963055 31.04442499585653 +143 1.2479104151759455 34.6583975838183 32.28515550471546 +144 1.2566370614359172 34.371322893124 33.50375938067097 +145 1.265363707695889 34.073713465533466 34.69940145349708 +146 1.2740903539558606 33.76577326768245 35.871262289840736 +147 1.2828170002158321 33.4477133464006 37.01853875482045 +148 1.2915436464758039 33.119751684070486 38.14044456245494 +149 1.3002702927357754 32.782113049233466 39.23621081454397 +150 1.3089969389957472 32.435028842544405 40.305086527633215 +151 1.3177235852557188 32.07873693818133 41.34633914770039 +152 1.3264502315156905 31.713481520818302 42.35925505221147 +153 1.335176877775662 31.3395129182735 43.34314003920175 +154 1.3439035240356336 30.957087429946913 44.29731980304732 +155 1.3526301702956054 30.566467151165693 45.22114039660041 +156 1.3613568165555772 30.167919793556987 46.11396867937202 +157 1.3700834628155487 29.761718501571828 46.975192751454905 +158 1.3788101090755203 29.348141665285517 47.80422237288917 +159 1.3875367553354918 28.92747272960304 48.600489368183226 +160 1.3962634015954636 28.500000000000007 49.363448015713004 +161 1.4049900478554354 28.066016444932558 50.092575421732036 +162 1.413716694115407 27.625819495051395 50.78737187873696 +163 1.4224433403753785 27.17971083935762 51.447361207942045 +164 1.4311699866353502 26.727996218440204 52.07209108562826 +165 1.4398966328953218 26.27098521493672 52.661133353143356 +166 1.4486232791552935 25.808991041360706 53.21408431034052 +167 1.457349925415265 25.342330325441655 53.73056499225417 +168 1.4660765716752369 24.871322893124002 54.21022142882374 +169 1.4748032179352084 24.396291549374535 54.65272488748699 +170 1.48352986419518 23.917561856947902 55.05777209847689 +171 1.4922565104551517 23.43546191326221 55.42508546266758 +172 1.5009831567151235 22.95032212553742 55.75441324182692 +173 1.509709802975095 22.462474984350813 56.04552973114541 +174 1.5184364492350666 21.972254835764392 56.298235413922846 +175 1.5271630954950384 21.479997652180984 56.512357098307184 +176 1.53588974175501 20.986040802085427 56.68774803599157 +177 1.5446163880149815 20.490722818829063 56.824288022788295 +178 1.5533430342749532 19.99438316861594 56.92188348101071 +179 1.562069680534925 19.49736201784959 56.98046752360676 +180 1.5707963267948966 19.0 57.0 +181 1.579522973054868 18.502637982150418 56.98046752360676 +182 1.5882496193148399 18.005616831384067 56.92188348101071 +183 1.5969762655748114 17.509277181170955 56.824288022788295 +184 1.605702911834783 17.0139591979146 56.68774803599157 +185 1.6144295580947547 16.520002347819023 56.51235709830721 +186 1.6231562043547265 16.02774516423561 56.298235413922846 +187 1.6318828506146983 15.53752501564919 56.04552973114541 +188 1.6406094968746698 15.049677874462574 55.75441324182692 +189 1.6493361431346414 14.564538086737803 55.425085462667596 +190 1.6580627893946132 14.082438143052102 55.057772098476896 +191 1.6667894356545847 13.60370845062547 54.65272488748701 +192 1.6755160819145563 13.128677106876012 54.21022142882375 +193 1.684242728174528 12.657669674558354 53.730564992254195 +194 1.6929693744344996 12.191008958639303 53.214084310340525 +195 1.7016960206944711 11.729014785063306 52.66113335314337 +196 1.7104226669544427 11.272003781559807 52.07209108562828 +197 1.7191493132144147 10.82028916064239 51.44736120794205 +198 1.7278759594743864 10.3741805049486 50.787371878736955 +199 1.736602605734358 9.933983555067439 50.09257542173203 +200 1.7453292519943295 9.5 49.36344801571302 +201 1.7540558982543013 9.072527270396973 48.60048936818325 +202 1.7627825445142729 8.651858334714483 47.80422237288917 +203 1.7715091907742444 8.238281498428183 46.97519275145491 +204 1.780235837034216 7.832080206443017 46.11396867937202 +205 1.7889624832941877 7.433532848834307 45.22114039660041 +206 1.7976891295541593 7.042912570053092 44.297319803047365 +207 1.8064157758141308 6.660487081726523 43.34314003920181 +208 1.8151424220741026 6.286518479181698 42.35925505221147 +209 1.8238690683340746 5.921263061818669 41.346339147700355 +210 1.8325957145940461 5.56497115745559 40.30508652763321 +211 1.8413223608540177 5.2178869507665375 39.23621081454397 +212 1.8500490071139892 4.880248315929514 38.14044456245494 +213 1.858775653373961 4.552286653599414 37.01853875482047 +214 1.8675022996339325 4.234226732317555 35.87126228984075 +215 1.876228945893904 3.926286534466536 34.69940145349708 +216 1.8849555921538759 3.6286771068760006 33.503759380670985 +217 1.8936822384138474 3.3416024161817104 32.28515550471549 +218 1.902408884673819 3.0652592090369453 31.04442499585658 +219 1.9111355309337907 2.7998368772722464 29.782418188809107 +220 1.9198621771937625 2.545517328095671 28.500000000000014 +221 1.9285888234537343 2.30247485942266 27.198049334797666 +222 1.9373154697137058 2.070876040421008 25.877458485154165 +223 1.9460421159736774 1.8508795973526502 24.53913251807284 +224 1.9547687622336491 1.6426363047905814 23.18398865532062 +225 1.9634954084936207 1.446288882285552 21.812955644810113 +226 1.9722220547535922 1.2619718965531648 20.426973124082156 +227 1.980948701013564 1.089811669248612 19.026990976324946 +228 1.9896753472735356 0.9299261903920935 17.613968679372025 +229 1.9984019935335071 0.7824250375043404 16.188874648123623 +230 2.007128639793479 0.6474093005077042 14.752685570843717 +231 2.015855286053451 0.5249715124441412 13.306385739786565 +232 2.0245819323134224 0.4151955860576919 11.850966376612254 +233 2.033308578573394 0.3181567562848644 10.387424953052395 +234 2.0420352248333655 0.23392152869238236 8.916764507293164 +235 2.050761871093337 0.16254763389760696 7.439992956542993 +236 2.0594885173533086 0.10408398800280749 5.958122406256298 +237 2.0682151636132806 0.05857065907056658 4.472168456487155 +238 2.076941809873252 0.026038839663103497 2.9831495058478055 +239 2.0856684561332237 0.006510825464414172 1.4920860535487885 +240 2.0943951023931953 -4.218847493575595e-15 4.746203430272544e-14 +241 2.103121748653167 0.006510825464405734 -1.4920860535486842 +242 2.111848394913139 0.026038839663101387 -2.983149505847796 +243 2.1205750411731104 0.05857065907056236 -4.472168456487164 +244 2.129301687433082 0.10408398800281171 -5.958122406256223 +245 2.138028333693054 0.16254763389759852 -7.4399929565429685 +246 2.1467549799530254 0.23392152869238236 -8.916764507293156 +247 2.155481626212997 0.3181567562848644 -10.3874249530524 +248 2.1642082724729685 0.4151955860576919 -11.850966376612277 +249 2.17293491873294 0.524971512444137 -13.306385739786535 +250 2.1816615649929116 0.6474093005077021 -14.752685570843635 +251 2.1903882112528836 0.7824250375043257 -16.188874648123583 +252 2.199114857512855 0.9299261903920829 -17.613968679371986 +253 2.2078415037728267 1.08981166924861 -19.026990976324914 +254 2.2165681500327987 1.2619718965531668 -20.426973124082135 +255 2.2252947962927703 1.446288882285552 -21.8129556448101 +256 2.234021442552742 1.6426363047905814 -23.18398865532062 +257 2.2427480888127134 1.8508795973526437 -24.539132518072815 +258 2.251474735072685 2.0708760404210036 -25.87745848515415 +259 2.260201381332657 2.3024748594226683 -27.198049334797687 +260 2.2689280275926285 2.5455173280956647 -28.500000000000025 +261 2.2776546738526 2.7998368772722424 -29.782418188809057 +262 2.2863813201125716 3.065259209036937 -31.0444249958565 +263 2.295107966372543 3.3416024161816953 -32.28515550471543 +264 2.3038346126325147 3.6286771068759878 -33.503759380670914 +265 2.3125612588924866 3.92628653446653 -34.699401453497096 +266 2.321287905152458 4.234226732317542 -35.871262289840715 +267 2.33001455141243 4.552286653599419 -37.018538754820476 +268 2.3387411976724017 4.880248315929514 -38.14044456245494 +269 2.3474678439323733 5.217886950766541 -39.23621081454397 +270 2.356194490192345 5.564971157455594 -40.305086527633215 +271 2.3649211364523164 5.921263061818663 -41.34633914770037 +272 2.373647782712288 6.286518479181683 -42.359255052211445 +273 2.3823744289722595 6.660487081726489 -43.343140039201714 +274 2.3911010752322315 7.042912570053083 -44.29731980304733 +275 2.399827721492203 7.433532848834301 -45.221140396600376 +276 2.408554367752175 7.832080206443023 -46.11396867937202 +277 2.4172810140121466 8.238281498428181 -46.97519275145488 +278 2.426007660272118 8.651858334714486 -47.80422237288917 +279 2.4347343065320897 9.072527270396957 -48.60048936818324 +280 2.443460952792061 9.499999999999991 -49.36344801571299 +281 2.4521875990520328 9.933983555067424 -50.092575421732015 +282 2.4609142453120048 10.374180504948615 -50.78737187873697 +283 2.4696408915719763 10.82028916064238 -51.44736120794204 +284 2.478367537831948 11.272003781559789 -52.072091085628244 +285 2.4870941840919194 11.729014785063281 -52.66113335314334 +286 2.495820830351891 12.19100895863928 -53.21408431034047 +287 2.504547476611863 12.657669674558353 -53.73056499225416 +288 2.5132741228718345 13.128677106875985 -54.21022142882376 +289 2.522000769131806 13.603708450625465 -54.65272488748699 +290 2.530727415391778 14.08243814305211 -55.0577720984769 +291 2.5394540616517496 14.5645380867378 -55.42508546266757 +292 2.548180707911721 15.049677874462558 -55.75441324182691 +293 2.5569073541716927 15.537525015649193 -56.04552973114542 +294 2.5656340004316642 16.02774516423559 -56.298235413922846 +295 2.574360646691636 16.520002347819002 -56.51235709830719 +296 2.5830872929516078 17.013959197914588 -56.687748035991575 +297 2.5918139392115793 17.509277181170944 -56.824288022788316 +298 2.600540585471551 18.00561683138406 -56.9218834810107 +299 2.609267231731523 18.50263798215042 -56.980467523606755 +300 2.6179938779914944 18.999999999999996 -56.999999999999986 +301 2.626720524251466 19.49736201784959 -56.98046752360675 +302 2.6354471705114375 19.99438316861592 -56.9218834810107 +303 2.644173816771409 20.49072281882904 -56.824288022788274 +304 2.652900463031381 20.98604080208542 -56.68774803599159 +305 2.6616271092913526 21.47999765218098 -56.51235709830719 +306 2.670353755551324 21.97225483576439 -56.29823541392285 +307 2.6790804018112957 22.462474984350784 -56.04552973114541 +308 2.6878070480712672 22.950322125537408 -55.754413241826924 +309 2.696533694331239 23.435461913262177 -55.42508546266756 +310 2.705260340591211 23.91756185694789 -55.057772098476896 +311 2.7139869868511823 24.396291549374514 -54.652724887487004 +312 2.7227136331111543 24.871322893124002 -54.21022142882374 +313 2.731440279371126 25.342330325441647 -53.73056499225416 +314 2.7401669256310974 25.808991041360702 -53.2140843103405 +315 2.748893571891069 26.2709852149367 -52.661133353143356 +316 2.7576202181510405 26.7279962184402 -52.07209108562829 +317 2.766346864411012 27.179710839357597 -51.44736120794207 +318 2.7750735106709836 27.625819495051363 -50.787371878737005 +319 2.7838001569309556 28.066016444932558 -50.09257542173202 +320 2.792526803190927 28.499999999999986 -49.36344801571302 +321 2.801253449450899 28.92747272960303 -48.60048936818324 +322 2.8099800957108707 29.34814166528552 -47.804222372889164 +323 2.8187067419708423 29.76171850157182 -46.97519275145486 +324 2.827433388230814 30.167919793556987 -46.113968679372014 +325 2.8361600344907854 30.56646715116569 -45.221140396600426 +326 2.844886680750757 30.9570874299469 -44.29731980304736 +327 2.853613327010729 31.33951291827349 -43.343140039201764 +328 2.8623399732707004 31.71348152081831 -42.35925505221146 +329 2.871066619530672 32.078736938181315 -41.346339147700434 +330 2.8797932657906435 32.435028842544384 -40.30508652763322 +331 2.888519912050615 32.78211304923345 -39.23621081454402 +332 2.897246558310587 33.119751684070486 -38.14044456245494 +333 2.9059732045705586 33.44771334640059 -37.0185387548205 +334 2.91469985083053 33.76577326768244 -35.871262289840786 +335 2.923426497090502 34.07371346553347 -34.699401453497074 +336 2.9321531433504737 34.371322893124 -33.503759380670985 +337 2.9408797896104453 34.65839758381829 -32.28515550471547 +338 2.949606435870417 34.934740790963055 -31.044424995856577 +339 2.9583330821303884 35.200163122727744 -29.78241818880912 +340 2.96705972839036 35.45448267190432 -28.500000000000064 +341 2.975786374650332 35.69752514057734 -27.198049334797663 +342 2.9845130209103035 35.92912395957898 -25.877458485154182 +343 2.993239667170275 36.14912040264735 -24.53913251807287 +344 3.001966313430247 36.35736369520942 -23.183988655320608 +345 3.0106929596902186 36.55371111771444 -21.812955644810117 +346 3.01941960595019 36.73802810344682 -20.426973124082142 +347 3.0281462522101616 36.910188330751396 -19.02699097632497 +348 3.036872898470133 37.07007380960791 -17.61396867937205 +349 3.045599544730105 37.217574962495675 -16.188874648123573 +350 3.0543261909900767 37.3525906994923 -14.752685570843681 +351 3.0630528372500483 37.47502848755585 -13.306385739786627 +352 3.07177948351002 37.5848044139423 -11.850966376612341 +353 3.0805061297699914 37.68184324371513 -10.387424953052465 +354 3.089232776029963 37.76607847130761 -8.916764507293214 +355 3.097959422289935 37.8374523661024 -7.439992956542961 +356 3.1066860685499065 37.895916011997194 -5.958122406256279 +357 3.1154127148098785 37.94142934092943 -4.472168456487114 +358 3.12413936106985 37.973961160336906 -2.9831495058477806 +359 3.1328660073298216 37.9934891745356 -1.4920860535487606 +360 3.141592653589793 38.0 -3.7969627442180354e-14 +361 3.1503192998497647 37.9934891745356 1.4920860535487415 +362 3.159045946109736 37.973961160336906 2.9831495058477424 +363 3.1677725923697078 37.94142934092943 4.472168456487095 +364 3.1764992386296798 37.895916011997194 5.958122406256241 +365 3.1852258848896513 37.8374523661024 7.439992956542923 +366 3.193952531149623 37.76607847130761 8.916764507293102 +367 3.2026791774095944 37.68184324371514 10.387424953052331 +368 3.211405823669566 37.58480441394232 11.850966376612213 +369 3.2201324699295375 37.47502848755587 13.306385739786519 +370 3.2288591161895095 37.3525906994923 14.752685570843644 +371 3.237585762449481 37.217574962495675 16.188874648123534 +372 3.246312408709453 37.07007380960791 17.61396867937201 +373 3.255039054969425 36.910188330751396 19.02699097632501 +374 3.2637657012293966 36.73802810344682 20.42697312408216 +375 3.272492347489368 36.55371111771444 21.812955644810156 +376 3.2812189937493397 36.35736369520941 23.18398865532062 +377 3.2899456400093112 36.149120402647355 24.53913251807283 +378 3.2986722862692828 35.929123959578995 25.877458485154147 +379 3.3073989325292543 35.69752514057734 27.19804933479764 +380 3.3161255787892263 35.45448267190433 28.500000000000025 +381 3.324852225049198 35.200163122727744 29.78241818880909 +382 3.3335788713091694 34.93474079096306 31.044424995856538 +383 3.342305517569141 34.65839758381831 32.285155504715455 +384 3.3510321638291125 34.37132289312402 33.50375938067094 +385 3.359758810089084 34.07371346553349 34.699401453497025 +386 3.368485456349056 33.76577326768244 35.87126228984072 +387 3.3772121026090276 33.44771334640059 37.01853875482045 +388 3.385938748868999 33.1197516840705 38.14044456245489 +389 3.3946653951289707 32.78211304923348 39.23621081454393 +390 3.4033920413889422 32.43502884254442 40.305086527633144 +391 3.412118687648914 32.07873693818135 41.34633914770035 +392 3.4208453339088853 31.71348152081833 42.35925505221141 +393 3.4295719801688573 31.339512918273503 43.34314003920174 +394 3.4382986264288293 30.95708742994691 44.29731980304736 +395 3.447025272688801 30.566467151165696 45.22114039660039 +396 3.455751918948773 30.167919793556976 46.11396867937202 +397 3.4644785652087444 29.761718501571814 46.97519275145493 +398 3.473205211468716 29.348141665285514 47.804222372889164 +399 3.4819318577286875 28.92747272960303 48.60048936818326 +400 3.490658503988659 28.500000000000004 49.363448015713004 +401 3.4993851502486306 28.06601644493257 50.09257542173199 +402 3.5081117965086026 27.62581949505138 50.78737187873699 +403 3.516838442768574 27.179710839357604 51.44736120794205 +404 3.5255650890285457 26.72799621844021 52.072091085628244 +405 3.5342917352885173 26.270985214936715 52.66113335314334 +406 3.543018381548489 25.80899104136071 53.214084310340496 +407 3.5517450278084604 25.342330325441658 53.730564992254145 +408 3.560471674068432 24.871322893124027 54.21022142882373 +409 3.569198320328404 24.396291549374524 54.65272488748699 +410 3.5779249665883754 23.917561856947902 55.05777209847688 +411 3.586651612848347 23.435461913262223 55.42508546266754 +412 3.5953782591083185 22.950322125537447 55.75441324182689 +413 3.60410490536829 22.462474984350827 56.04552973114539 +414 3.6128315516282616 21.972254835764414 56.29823541392282 +415 3.6215581978882336 21.479997652180998 56.51235709830719 +416 3.630284844148205 20.98604080208543 56.687748035991554 +417 3.639011490408177 20.49072281882906 56.82428802278828 +418 3.647738136668149 19.994383168615915 56.92188348101071 +419 3.6564647829281207 19.497362017849575 56.98046752360676 +420 3.6651914291880923 18.999999999999993 57.0 +421 3.673918075448064 18.502637982150407 56.98046752360676 +422 3.6826447217080354 18.00561683138407 56.92188348101071 +423 3.691371367968007 17.50927718117096 56.82428802278828 +424 3.7000980142279785 17.01395919791459 56.68774803599157 +425 3.7088246604879505 16.520002347819013 56.512357098307184 +426 3.717551306747922 16.027745164235615 56.29823541392285 +427 3.7262779530078936 15.5375250156492 56.04552973114541 +428 3.735004599267865 15.04967787446258 55.754413241826924 +429 3.7437312455278366 14.564538086737812 55.42508546266756 +430 3.752457891787808 14.082438143052123 55.057772098476896 +431 3.76118453804778 13.603708450625465 54.65272488748699 +432 3.7699111843077517 13.128677106876005 54.21022142882375 +433 3.7786378305677233 12.657669674558363 53.730564992254166 +434 3.787364476827695 12.191008958639312 53.2140843103405 +435 3.7960911230876664 11.72901478506332 52.66113335314334 +436 3.804817769347638 11.272003781559823 52.07209108562826 +437 3.8135444156076095 10.820289160642425 51.447361207942116 +438 3.8222710618675815 10.37418050494863 50.78737187873697 +439 3.8309977081275535 9.933983555067435 50.092575421732015 +440 3.839724354387525 9.500000000000004 49.363448015713 +441 3.848451000647497 9.072527270396956 48.60048936818322 +442 3.8571776469074686 8.651858334714477 47.804222372889136 +443 3.86590429316744 8.238281498428174 46.975192751454884 +444 3.8746309394274117 7.832080206443008 46.11396867937201 +445 3.883357585687383 7.433532848834316 45.221140396600426 +446 3.8920842319473548 7.042912570053096 44.29731980304733 +447 3.9008108782073267 6.660487081726508 43.34314003920174 +448 3.9095375244672983 6.286518479181689 42.35925505221146 +449 3.91826417072727 5.921263061818676 41.34633914770038 +450 3.9269908169872414 5.5649711574556004 40.305086527633215 +451 3.935717463247213 5.21788695076655 39.236210814543995 +452 3.9444441095071845 4.880248315929524 38.140444562454974 +453 3.953170755767156 4.552286653599431 37.01853875482053 +454 3.961897402027128 4.234226732317555 35.87126228984075 +455 3.9706240482870996 3.9262865344665423 34.699401453497096 +456 3.979350694547071 3.628677106876011 33.50375938067101 +457 3.9880773408070427 3.3416024161817184 32.28515550471551 +458 3.9968039870670142 3.06525920903696 31.044424995856602 +459 4.005530633326986 2.7998368772722655 29.78241818880915 +460 4.014257279586958 2.545517328095671 28.500000000000025 +461 4.022983925846929 2.3024748594226874 27.19804933479779 +462 4.031710572106902 2.0708760404210036 25.877458485154097 +463 4.040437218366873 1.8508795973526522 24.53913251807284 +464 4.049163864626845 1.6426363047905814 23.183988655320576 +465 4.057890510886816 1.4462888822855604 21.81295564481017 +466 4.066617157146788 1.261971896553169 20.426973124082114 +467 4.07534380340676 1.0898116692486055 19.026990976324896 +468 4.084070449666731 0.929926190392085 17.613968679372025 +469 4.092797095926703 0.7824250375043278 16.188874648123548 +470 4.101523742186674 0.6474093005077105 14.752685570843724 +471 4.110250388446646 0.5249715124441433 13.30638573978659 +472 4.118977034706617 0.41519558605770035 11.850966376612366 +473 4.127703680966589 0.3181567562848623 10.387424953052445 +474 4.136430327226561 0.23392152869238447 8.91676450729314 +475 4.145156973486532 0.16254763389760907 7.439992956543022 +476 4.153883619746504 0.10408398800280749 5.9581224062562415 +477 4.162610266006475 0.058570659070575015 4.472168456487284 +478 4.171336912266447 0.026038839663099278 2.983149505847856 +479 4.1800635585264185 0.006510825464416281 1.492086053548912 +480 4.1887902047863905 4.218847493575595e-15 6.961098364399732e-14 +481 4.1975168510463625 0.006510825464414172 -1.4920860535487472 +482 4.206243497306334 0.02603883966308873 -2.9831495058476825 +483 4.214970143566306 0.05857065907056658 -4.472168456487126 +484 4.223696789826278 0.10408398800280327 -5.95812240625626 +485 4.23242343608625 0.16254763389761118 -7.439992956543012 +486 4.241150082346221 0.23392152869238236 -8.91676450729314 +487 4.249876728606193 0.3181567562848644 -10.387424953052426 +488 4.258603374866164 0.4151955860576919 -11.850966376612229 +489 4.267330021126136 0.5249715124441539 -13.306385739786606 +490 4.276056667386108 0.6474093005077126 -14.75268557084374 +491 4.284783313646079 0.7824250375043278 -16.188874648123548 +492 4.293509959906051 0.929926190392085 -17.613968679372004 +493 4.302236606166022 1.0898116692486055 -19.02699097632487 +494 4.310963252425994 1.2619718965531648 -20.426973124082096 +495 4.319689898685965 1.4462888822855435 -21.812955644810025 +496 4.328416544945937 1.642636304790571 -23.18398865532059 +497 4.337143191205909 1.8508795973526502 -24.53913251807284 +498 4.34586983746588 2.070876040420999 -25.87745848515411 +499 4.354596483725852 2.302474859422656 -27.198049334797663 +500 4.363323129985823 2.5455173280956456 -28.499999999999915 +501 4.372049776245795 2.799836877272236 -29.78241818880902 +502 4.380776422505767 3.0652592090369453 -31.04442499585653 +503 4.389503068765738 3.341602416181689 -32.2851555047154 +504 4.39822971502571 3.62867710687599 -33.50375938067096 +505 4.4069563612856815 3.9262865344665148 -34.699401453496975 +506 4.4156830075456535 4.234226732317538 -35.87126228984067 +507 4.4244096538056255 4.552286653599414 -37.01853875482047 +508 4.4331363000655974 4.8802483159295225 -38.140444562454974 +509 4.4418629463255686 5.217886950766524 -39.23621081454396 +510 4.4505895925855405 5.564971157455602 -40.30508652763322 +511 4.4593162388455125 5.9212630618186886 -41.346339147700455 +512 4.468042885105484 6.286518479181689 -42.359255052211466 +513 4.476769531365456 6.660487081726528 -43.343140039201785 +514 4.485496177625427 7.042912570053074 -44.2973198030473 +515 4.494222823885399 7.433532848834307 -45.22114039660041 +516 4.50294947014537 7.8320802064429875 -46.113968679371936 +517 4.511676116405342 8.238281498428176 -46.97519275145486 +518 4.520402762665314 8.651858334714497 -47.80422237288918 +519 4.529129408925285 9.07252727039696 -48.600489368183226 +520 4.537856055185257 9.5 -49.36344801571302 +521 4.546582701445228 9.933983555067417 -50.092575421731986 +522 4.5553093477052 10.3741805049486 -50.787371878736955 +523 4.564035993965171 10.820289160642355 -51.44736120794202 +524 4.572762640225143 11.272003781559773 -52.07209108562822 +525 4.581489286485115 11.729014785063294 -52.661133353143356 +526 4.590215932745086 12.191008958639264 -53.21408431034045 +527 4.598942579005058 12.657669674558337 -53.73056499225417 +528 4.607669225265029 13.12867710687596 -54.2102214288237 +529 4.616395871525002 13.603708450625495 -54.65272488748703 +530 4.625122517784973 14.082438143052102 -55.057772098476896 +531 4.633849164044945 14.56453808673781 -55.425085462667596 +532 4.642575810304916 15.049677874462555 -55.75441324182691 +533 4.651302456564888 15.537525015649203 -56.04552973114541 +534 4.66002910282486 16.027745164235636 -56.29823541392285 +535 4.6687557490848315 16.520002347819013 -56.512357098307184 +536 4.6774823953448035 17.013959197914595 -56.68774803599157 +537 4.686209041604775 17.509277181170923 -56.824288022788295 +538 4.694935687864747 18.005616831384067 -56.92188348101071 +539 4.703662334124718 18.502637982150382 -56.98046752360676 +540 4.71238898038469 18.999999999999986 -57.0 +541 4.721115626644662 19.497362017849596 -56.98046752360676 +542 4.729842272904633 19.994383168615915 -56.92188348101071 +543 4.738568919164605 20.490722818829052 -56.824288022788295 +544 4.747295565424576 20.986040802085387 -56.687748035991575 +545 4.756022211684548 21.47999765218096 -56.51235709830719 +546 4.764748857944519 21.972254835764343 -56.29823541392286 +547 4.773475504204491 22.462474984350774 -56.04552973114545 +548 4.782202150464463 22.95032212553742 -55.75441324182692 +549 4.790928796724434 23.43546191326217 -55.4250854626676 +550 4.799655442984406 23.91756185694788 -55.057772098476896 +551 4.808382089244377 24.396291549374485 -54.65272488748704 +552 4.81710873550435 24.871322893124027 -54.210221428823715 +553 4.825835381764321 25.342330325441647 -53.730564992254195 +554 4.834562028024293 25.808991041360713 -53.21408431034047 +555 4.843288674284264 26.270985214936694 -52.66113335314337 +556 4.852015320544236 26.727996218440204 -52.07209108562826 +557 4.860741966804208 27.17971083935762 -51.447361207942045 +558 4.869468613064179 27.62581949505138 -50.78737187873697 +559 4.878195259324151 28.06601644493257 -50.092575421732015 +560 4.886921905584122 28.499999999999986 -49.36344801571303 +561 4.895648551844094 28.92747272960303 -48.60048936818324 +562 4.9043751981040655 29.34814166528548 -47.804222372889214 +563 4.9131018443640375 29.761718501571814 -46.97519275145491 +564 4.9218284906240095 30.167919793556994 -46.11396867937201 +565 4.930555136883981 30.566467151165668 -45.221140396600454 +566 4.939281783143953 30.9570874299469 -44.29731980304733 +567 4.948008429403924 31.339512918273467 -43.34314003920183 +568 4.956735075663896 31.71348152081829 -42.359255052211495 +569 4.965461721923867 32.078736938181294 -41.34633914770049 +570 4.974188368183839 32.435028842544384 -40.30508652763325 +571 4.982915014443811 32.78211304923346 -39.23621081454397 +572 4.991641660703782 33.11975168407046 -38.140444562455 +573 5.000368306963754 33.44771334640058 -37.018538754820504 +574 5.009094953223726 33.76577326768245 -35.871262289840736 +575 5.017821599483698 34.07371346553348 -34.69940145349704 +576 5.026548245743669 34.371322893123995 -33.50375938067099 +577 5.035274892003641 34.6583975838183 -32.28515550471546 +578 5.044001538263612 34.93474079096304 -31.044424995856605 +579 5.052728184523584 35.200163122727744 -29.782418188809082 +580 5.061454830783556 35.454482671904344 -28.499999999999993 +581 5.070181477043527 35.69752514057733 -27.19804933479771 +582 5.078908123303499 35.929123959578995 -25.87745848515414 +583 5.08763476956347 36.14912040264735 -24.539132518072904 +584 5.096361415823442 36.357363695209415 -23.18398865532063 +585 5.105088062083414 36.55371111771445 -21.812955644810067 +586 5.113814708343385 36.73802810344684 -20.426973124082156 +587 5.122541354603357 36.91018833075139 -19.026990976324946 +588 5.1312680008633285 37.07007380960791 -17.613968679372093 +589 5.1399946471233005 37.21757496249566 -16.18887464812361 +590 5.148721293383272 37.35259069949229 -14.752685570843791 +591 5.1574479396432436 37.475028487555846 -13.30638573978667 +592 5.1661745859032155 37.58480441394231 -11.850966376612291 +593 5.174901232163187 37.68184324371513 -10.387424953052491 +594 5.183627878423159 37.766078471307615 -8.91676450729317 +595 5.19235452468313 37.83745236610239 -7.439992956543076 +596 5.201081170943102 37.89591601199719 -5.95812240625633 +597 5.209807817203074 37.94142934092943 -4.472168456487173 +598 5.218534463463046 37.9739611603369 -2.983149505847755 +599 5.227261109723017 37.99348917453559 -1.4920860535488485 +600 5.235987755982989 37.99999999999999 6.328271240363392e-15 +601 5.244714402242961 37.9934891745356 1.492086053548836 +602 5.253441048502932 37.9739611603369 2.983149505847796 +603 5.262167694762904 37.94142934092943 4.472168456487202 +604 5.270894341022875 37.89591601199719 5.958122406256194 +605 5.279620987282847 37.8374523661024 7.4399929565429685 +606 5.288347633542818 37.766078471307615 8.916764507293072 +607 5.29707427980279 37.681843243715136 10.3874249530524 +608 5.305800926062762 37.58480441394231 11.850966376612302 +609 5.314527572322733 37.47502848755586 13.306385739786547 +610 5.323254218582705 37.35259069949229 14.752685570843678 +611 5.331980864842676 37.217574962495675 16.188874648123505 +612 5.340707511102648 37.070073809607926 17.61396867937196 +613 5.349434157362619 36.9101883307514 19.026990976324807 +614 5.358160803622591 36.73802810344683 20.426973124082057 +615 5.366887449882563 36.55371111771444 21.81295564481008 +616 5.3756140961425345 36.35736369520943 23.183988655320487 +617 5.3843407424025065 36.149120402647355 24.53913251807278 +618 5.393067388662478 35.929123959579 25.877458485154047 +619 5.4017940349224505 35.69752514057733 27.198049334797766 +620 5.410520681182422 35.45448267190434 28.499999999999986 +621 5.419247327442394 35.200163122727744 29.782418188809125 +622 5.427973973702365 34.93474079096306 31.044424995856488 +623 5.436700619962337 34.658397583818285 32.2851555047155 +624 5.445427266222309 34.37132289312399 33.50375938067101 +625 5.45415391248228 34.07371346553348 34.69940145349705 +626 5.462880558742252 33.76577326768244 35.87126228984075 +627 5.471607205002223 33.4477133464006 37.01853875482042 +628 5.480333851262195 33.11975168407049 38.14044456245491 +629 5.489060497522166 32.78211304923349 39.23621081454388 +630 5.497787143782138 32.435028842544405 40.30508652763319 +631 5.50651379004211 32.078736938181315 41.346339147700434 +632 5.515240436302081 31.713481520818323 42.359255052211424 +633 5.523967082562053 31.339512918273492 43.34314003920174 +634 5.532693728822024 30.957087429946938 44.29731980304728 +635 5.541420375081996 30.566467151165703 45.221140396600376 +636 5.550147021341967 30.167919793557026 46.1139686793719 +637 5.558873667601939 29.76171850157185 46.97519275145485 +638 5.567600313861911 29.34814166528552 47.804222372889136 +639 5.576326960121882 28.927472729603057 48.60048936818322 +640 5.585053606381854 28.500000000000007 49.36344801571299 +641 5.593780252641825 28.0660164449326 50.09257542173198 +642 5.602506898901798 27.625819495051363 50.78737187873699 +643 5.611233545161769 27.17971083935761 51.44736120794204 +644 5.619960191421741 26.7279962184402 52.07209108562825 +645 5.6286868376817125 26.270985214936722 52.66113335314332 +646 5.6374134839416845 25.808991041360706 53.21408431034048 +647 5.6461401302016565 25.342330325441623 53.7305649922542 +648 5.654866776461628 24.87132289312401 54.21022142882374 +649 5.6635934227216 24.396291549374517 54.652724887487 +650 5.672320068981571 23.917561856947923 55.057772098476846 +651 5.681046715241543 23.435461913262213 55.42508546266754 +652 5.689773361501514 22.950322125537454 55.754413241826896 +653 5.698500007761486 22.462474984350816 56.04552973114541 +654 5.707226654021458 21.972254835764378 56.298235413922846 +655 5.715953300281429 21.479997652181005 56.51235709830717 +656 5.724679946541401 20.98604080208542 56.68774803599157 +657 5.733406592801372 20.490722818829102 56.82428802278828 +658 5.742133239061344 19.99438316861595 56.9218834810107 +659 5.750859885321315 19.49736201784964 56.98046752360678 +660 5.759586531581287 19.00000000000003 57.0 +661 5.768313177841259 18.502637982150418 56.98046752360678 +662 5.77703982410123 18.00561683138411 56.92188348101071 +663 5.785766470361202 17.509277181170972 56.8242880227883 +664 5.794493116621174 17.01395919791458 56.68774803599159 +665 5.803219762881146 16.520002347819005 56.51235709830719 +666 5.811946409141117 16.027745164235622 56.29823541392285 +667 5.820673055401089 15.537525015649193 56.04552973114542 +668 5.82939970166106 15.049677874462601 55.754413241826924 +669 5.838126347921032 14.564538086737805 55.42508546266756 +670 5.846852994181004 14.082438143052098 55.05777209847688 +671 5.8555796404409755 13.603708450625486 54.65272488748703 +672 5.8643062867009474 13.128677106875998 54.21022142882374 +673 5.8730329329609186 12.657669674558383 53.7305649922542 +674 5.8817595792208905 12.1910089586393 53.21408431034052 +675 5.890486225480862 11.729014785063333 52.66113335314337 +676 5.899212871740834 11.272003781559814 52.07209108562829 +677 5.907939518000806 10.820289160642394 51.44736120794205 +678 5.916666164260777 10.374180504948637 50.787371878737005 +679 5.925392810520749 9.933983555067451 50.092575421732064 +680 5.93411945678072 9.50000000000004 49.363448015713075 +681 5.942846103040692 9.072527270396998 48.60048936818327 +682 5.951572749300664 8.651858334714479 47.804222372889186 +683 5.960299395560635 8.238281498428206 46.97519275145497 +684 5.969026041820607 7.832080206443023 46.11396867937202 +685 5.977752688080578 7.4335328488343375 45.22114039660051 +686 5.98647933434055 7.042912570053117 44.297319803047394 +687 5.995205980600522 6.660487081726511 43.343140039201764 +688 6.003932626860494 6.286518479181683 42.359255052211424 +689 6.012659273120465 5.921263061818684 41.346339147700434 +690 6.021385919380437 5.5649711574556004 40.30508652763321 +691 6.030112565640409 5.217886950766516 39.23621081454393 +692 6.03883921190038 4.880248315929518 38.14044456245493 +693 6.047565858160352 4.5522866535994 37.01853875482045 +694 6.056292504420323 4.234226732317561 35.871262289840786 +695 6.065019150680295 3.92628653446653 34.699401453497074 +696 6.073745796940266 3.628677106876007 33.50375938067105 +697 6.082472443200238 3.3416024161816997 32.28515550471551 +698 6.09119908946021 3.0652592090369324 31.04442499585652 +699 6.0999257357201815 2.799836877272261 29.78241818880914 +700 6.1086523819801535 2.5455173280956624 28.500000000000014 +701 6.117379028240125 2.3024748594226727 27.198049334797776 +702 6.126105674500097 2.0708760404210143 25.877458485154218 +703 6.134832320760068 1.8508795973526586 24.53913251807294 +704 6.14355896702004 1.6426363047905856 23.183988655320686 +705 6.152285613280012 1.4462888822855477 21.81295564481014 +706 6.161012259539983 1.2619718965531712 20.42697312408222 +707 6.169738905799955 1.0898116692486077 19.02699097632499 +708 6.178465552059926 0.9299261903921019 17.61396867937214 +709 6.187192198319899 0.7824250375043278 16.188874648123534 +710 6.19591884457987 0.6474093005076978 14.75268557084372 +711 6.204645490839842 0.524971512444137 13.306385739786574 +712 6.213372137099813 0.41519558605769824 11.850966376612341 +713 6.222098783359785 0.3181567562848644 10.387424953052408 +714 6.230825429619757 0.2339215286923887 8.916764507293102 +715 6.239552075879728 0.16254763389760063 7.439992956542977 +716 6.2482787221397 0.10408398800281804 5.9581224062562175 +717 6.257005368399671 0.058570659070577125 4.4721684564872275 +718 6.265732014659643 0.02603883966309506 2.9831495058477993 +719 6.274458660919614 0.006510825464412062 1.4920860535488742 diff --git a/unittest/force-styles/tests/manybody-pair-mliap_nn.yaml b/unittest/force-styles/tests/manybody-pair-mliap_nn.yaml new file mode 100644 index 0000000000..5270c9571f --- /dev/null +++ b/unittest/force-styles/tests/manybody-pair-mliap_nn.yaml @@ -0,0 +1,158 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Wed Mar 24 12:18:23 202 +epsilon: 5e-13 +prerequisites: ! | + pair mliap + pair zbl +pre_commands: ! | + variable newton_pair delete + variable newton_pair index on +post_commands: ! "" +input_file: in.manybody +pair_style: hybrid/overlay zbl 4.0 4.8 mliap model nn Ta06A.nn.mliap.model descriptor + sna Ta06A.mliap.descriptor +pair_coeff: ! | + 1*8 1*8 zbl 73 73 + * * mliap Ta Ta Ta Ta Ta Ta Ta Ta +extract: ! "" +natoms: 64 +init_vdwl: -473.569864629026 +init_coul: 0 +init_stress: ! |2- + 3.9989504688551500e+02 4.0778136516736993e+02 4.3596322435184823e+02 -2.5242497284339720e+01 1.2811620806363655e+02 2.8644673361821793e+00 +init_forces: ! |2 + 1 -3.7538180163781538e+00 8.8612947043788708e+00 6.7712977816732263e+00 + 2 -7.6696525239232596e+00 -3.7674335682223203e-01 -5.7958054718422760e+00 + 3 -2.9221261341045079e-01 -1.2984917885683813e+00 2.2320440844884399e+00 + 4 -4.7103509354198474e+00 9.2783458784125941e+00 4.3108702582741429e+00 + 5 -2.0331946400488916e+00 -2.9593716047756180e+00 -1.6136351145373196e+00 + 6 1.8086748683348572e+00 4.6479727629048675e+00 3.0425695895915184e-01 + 7 -3.0573043543220644e+00 -4.0575899915120264e+00 1.5283788878527900e+00 + 8 2.7148403621334427e-01 1.3063473238306007e+00 -1.1268098385676173e+00 + 9 5.2043326273129953e-01 -2.9340446386399996e+00 -7.6461969078455834e+00 + 10 -6.2786875145099508e-01 5.6606570005199308e-02 -5.3746300485699576e+00 + 11 8.1946917251451818e+00 -6.7267140406524675e+00 2.5930013855034630e+00 + 12 -1.4328402235895087e+01 -8.0774309292156197e+00 -7.6980199570965677e+00 + 13 -3.2260600618006614e+00 1.3854745225224621e+01 -1.8038061855949390e+00 + 14 -2.9498732270039856e+00 8.5589611530655674e+00 2.0530716609447816e-01 + 15 -8.6349846297038031e+00 9.1996942753987270e+00 -9.5905201240123024e+00 + 16 3.7310502876344778e+00 1.9788328492752776e+00 1.5687925430243098e+01 + 17 5.0755393464331471e+00 6.1278868384113423e+00 -1.0750955741273682e+01 + 18 1.7371660543384140e+00 3.0620693584379239e+00 7.2701166654624991e+00 + 19 -2.9132243097469201e+00 -1.1018213008189437e+00 -2.8349170179881567e+00 + 20 -1.6464048708371479e+01 2.4791517492525559e+00 3.4072780064525732e-01 + 21 3.9250706073854098e+00 -1.0562396695052145e+00 -9.1632104209006702e+00 + 22 -1.5634125465245701e+01 8.9090677007239911e+00 -1.2750204519006148e+01 + 23 2.8936071278420723e+00 5.3816164530412767e+00 7.4597216732837071e+00 + 24 3.1860163425620680e+00 4.7170150104555253e+00 6.3461114127051133e+00 + 25 8.8078411119652245e-01 -1.4554648001614754e+00 1.6812657581308246e+00 + 26 -1.8170871697803546e+00 -3.7700946621067644e-01 6.2457161242680581e-01 + 27 4.3406014531279231e+00 -2.9009678649007267e+00 5.2435008444617139e+00 + 28 -7.0542478046177770e-01 1.0981989037209707e+00 1.3116499712117630e+01 + 29 -6.6151960592236154e+00 1.6410275382967996e+00 -1.0570398181017497e+00 + 30 -3.6949627314218070e+00 2.0505225752289262e+00 -1.5676706969561256e+00 + 31 -3.1645464836586603e+00 3.4678442856969571e-01 -3.0903933004746946e+00 + 32 -7.8831496558114571e+00 4.7917666582558249e-01 8.5821461480119510e-01 + 33 1.0742815926879523e+01 -5.8142728701457189e+00 9.7282423280124952e+00 + 34 -1.3523086688998047e+00 -1.1117518205645105e-01 1.6057041203339644e+00 + 35 2.5212001799950716e+00 -2.2938190564661185e+00 5.7029334689777986e+00 + 36 1.7666626040313700e+00 -4.4698105712986091e+00 2.0563602888032650e-01 + 37 -3.8714388913204467e+00 5.6357721515897250e+00 -6.6078854304621775e+00 + 38 1.4632813171776671e+00 -3.3182377007830244e-01 -8.4412322782161375e-01 + 39 4.1718406489245972e+00 -6.3270387696640586e+00 -1.1208012916569135e+01 + 40 9.5193696695210637e+00 -7.0213638399035432e+00 -1.5692669012530696e+00 + 41 2.4000089474497699e-01 1.0045144396502914e+00 -2.3032449685213630e+00 + 42 -9.4741999244791426e+00 -6.3134658287662750e+00 -3.6928028439517893e+00 + 43 2.7218639962411728e-01 -1.3813634477251096e+01 5.5147832931992291e-01 + 44 8.0196107396135208e+00 -8.1793730426384545e+00 3.5131695854462590e+00 + 45 -1.8910274064701343e-01 3.9137627573846219e+00 -7.4450993876429399e+00 + 46 -3.5282857552811575e+00 -5.1713579630178099e+00 1.2477491203990510e+01 + 47 5.1131478665605341e+00 2.3800985688973459e+00 5.1348001359881970e+00 + 48 2.1755560727357057e+00 2.9996491762493216e+00 -9.9575511910097214e-01 + 49 -2.3978299788760209e+00 -1.2283692236805253e+01 -8.3755937565454435e+00 + 50 3.6161933080447888e+00 5.6291551969069182e+00 -6.9709721613230968e-01 + 51 -3.0166275666360352e+00 1.1037977712957442e+01 8.8691052932904171e+00 + 52 1.2943573147098917e+01 -1.1745909799528654e+01 1.6522312348562508e+01 + 53 5.8389424736085775e+00 7.5295796786576226e+00 5.5403096028203525e+00 + 54 4.6678942858445893e+00 -5.7948610984030058e+00 -4.7138910958393971e+00 + 55 4.9846400582125163e+00 -8.4400769236810902e+00 -6.5776931744173313e+00 + 56 -3.5699586538966939e-02 1.5545384984529795e+00 -5.2139902048630429e+00 + 57 2.1375440189892982e+00 -1.3001299791681296e+00 -8.9740026386466654e-01 + 58 5.2652486142639416e+00 -2.5529130533710997e+00 2.0016357749193905e-01 + 59 9.0343971306644377e+00 4.2302611807585224e+00 -1.8088550980511922e+00 + 60 -5.1586404521695464e+00 -1.5178664164309549e+01 -9.8559725391424795e+00 + 61 9.6892046530364073e-01 3.6493959386458350e+00 -8.3809793809505195e-01 + 62 -6.2693637951458694e+00 5.5593866650560679e+00 -4.0417158962655781e+00 + 63 5.8570431431678962e+00 -6.2896068000076317e+00 -3.8788666930728688e+00 + 64 7.5837965251215369e+00 7.5954689486766096e+00 1.6804021764142011e+01 +run_vdwl: -473.666568306022 +run_coul: 0 +run_stress: ! |2- + 3.9951053758431499e+02 4.0757094669497650e+02 4.3599209936956868e+02 -2.5012844114476398e+01 1.2751742945242590e+02 3.9821818278564844e+00 +run_forces: ! |2 + 1 -3.7832595710893155e+00 8.8212124103655292e+00 6.7792549500694745e+00 + 2 -7.6693903913873163e+00 -4.4331479267505980e-01 -5.8319844453604492e+00 + 3 -3.5652510811236748e-01 -1.2843261396638010e+00 2.3164336943032460e+00 + 4 -4.6688281400123417e+00 9.2569804046918627e+00 4.2532553525093961e+00 + 5 -2.0698377683688305e+00 -3.0068940885360655e+00 -1.5557558367041349e+00 + 6 1.9121936983089021e+00 4.6485144224151016e+00 3.8302570899366983e-01 + 7 -3.0000564919294019e+00 -3.9598169423628935e+00 1.4730795882443171e+00 + 8 2.2616298546615310e-01 1.3160780554993146e+00 -1.1365737437456360e+00 + 9 4.5475496885290934e-01 -3.0115904820513633e+00 -7.6802788934953448e+00 + 10 -6.5754023848348220e-01 4.3910855294922169e-02 -5.2814927356947416e+00 + 11 8.0870811363765238e+00 -6.6478157150338770e+00 2.5239196033647513e+00 + 12 -1.4266979871278297e+01 -7.9890391049193692e+00 -7.6506348180232058e+00 + 13 -3.0605842642063994e+00 1.3809674690005217e+01 -1.6731082107132822e+00 + 14 -3.0058694850615257e+00 8.5169039650285132e+00 1.8498544937038552e-01 + 15 -8.6057398167379340e+00 9.1431278151038597e+00 -9.5164336499508586e+00 + 16 3.7105123804670184e+00 1.9684880085511294e+00 1.5628485674431591e+01 + 17 5.0446625217738115e+00 6.1086935560886335e+00 -1.0684670022014132e+01 + 18 1.6342572076662352e+00 3.0978003138559700e+00 7.3023410755539730e+00 + 19 -2.9853538081785418e+00 -1.1736228416330263e+00 -2.8772549755196275e+00 + 20 -1.6354717680325663e+01 2.4069036913441169e+00 2.5852528541413577e-01 + 21 3.9596059647558470e+00 -1.1309140461374385e+00 -9.2411865520092746e+00 + 22 -1.5578599385494211e+01 8.8837889458923414e+00 -1.2717012806950681e+01 + 23 2.9286474436436607e+00 5.4115499463398438e+00 7.4875237575502283e+00 + 24 3.2309052666659346e+00 4.6724691716691664e+00 6.3076914533727404e+00 + 25 8.7447853599857761e-01 -1.4447800235404800e+00 1.6369348219913344e+00 + 26 -1.8229284577405889e+00 -3.3721763232208768e-01 6.1531223202321172e-01 + 27 4.3482945496099807e+00 -2.9274873379719288e+00 5.2404893120488989e+00 + 28 -7.6160360457911214e-01 1.1530752576673735e+00 1.3094542130299224e+01 + 29 -6.6257114998810200e+00 1.6523572981586176e+00 -1.0670925651816274e+00 + 30 -3.6586042068050459e+00 2.0111737944853250e+00 -1.5501355511382873e+00 + 31 -3.1601602861552482e+00 3.3256891161094693e-01 -3.0724685917071382e+00 + 32 -7.8275016718590731e+00 4.4236506496773642e-01 8.3868054333668041e-01 + 33 1.0688722918141039e+01 -5.7920158261872583e+00 9.6923706747923646e+00 + 34 -1.3525464452783258e+00 -1.0575652830645854e-01 1.6380965403350563e+00 + 35 2.5193832475087721e+00 -2.2598987796878789e+00 5.6810280412635601e+00 + 36 1.7111787089042565e+00 -4.4473718671663391e+00 9.6398513850121076e-02 + 37 -3.8563809307986823e+00 5.6131073606614059e+00 -6.6177968130852260e+00 + 38 1.5064516388374909e+00 -3.1694753678232956e-01 -8.3526359314898979e-01 + 39 4.1314418694153812e+00 -6.2751004763663678e+00 -1.1210904504268449e+01 + 40 9.5830290785144836e+00 -7.0395435048262769e+00 -1.6267459470122683e+00 + 41 3.1375436243120802e-01 1.0622164383329200e+00 -2.2467935230672076e+00 + 42 -9.4881290346220375e+00 -6.3542967900678029e+00 -3.7436081761319060e+00 + 43 2.2855728522521823e-01 -1.3797673758210431e+01 5.1169123226999269e-01 + 44 8.0135824689800454e+00 -8.1618220152116709e+00 3.4767795780208774e+00 + 45 -2.2793629160624870e-01 3.8533578964252726e+00 -7.3720918772105994e+00 + 46 -3.5217473183911405e+00 -5.1375353430494126e+00 1.2535347493777751e+01 + 47 5.1244898311428937e+00 2.3801653011346930e+00 5.1114297013297003e+00 + 48 2.1906793040748171e+00 3.0345200169741182e+00 -1.0179863236095192e+00 + 49 -2.4788694934316329e+00 -1.2411071815396923e+01 -8.4971983039341392e+00 + 50 3.6569038614206466e+00 5.6055766933888798e+00 -7.2525721879624516e-01 + 51 -3.1071936932427051e+00 1.1143003955179145e+01 8.9003301745210983e+00 + 52 1.2953816665492676e+01 -1.1681525536724189e+01 1.6495289315845085e+01 + 53 5.8923317047264643e+00 7.6559750818830006e+00 5.7413363341910788e+00 + 54 4.6456819257039355e+00 -5.7613868673147293e+00 -4.6785882460677595e+00 + 55 4.9036275837635479e+00 -8.4131355466563491e+00 -6.4652425471547437e+00 + 56 -2.5919766291264371e-02 1.4942725648609447e+00 -5.1846171304946838e+00 + 57 2.1354464802186661e+00 -1.3197172317543322e+00 -8.9084444403811647e-01 + 58 5.2496503717062382e+00 -2.5023030575014631e+00 1.2534239362101771e-01 + 59 9.1088663289515797e+00 4.2501608997098561e+00 -1.8293706034164023e+00 + 60 -5.2377119984886820e+00 -1.5252944642880552e+01 -9.9884309435445626e+00 + 61 9.8418569822230928e-01 3.6718229831397404e+00 -7.9620939417097958e-01 + 62 -6.2529671270584286e+00 5.5348777429740972e+00 -3.9890515783571203e+00 + 63 5.8510809377900035e+00 -6.3420520892802621e+00 -3.9437203585924383e+00 + 64 7.6647749161376320e+00 7.7322248465188412e+00 1.6865884297614787e+01 +... diff --git a/unittest/force-styles/tests/manybody-pair-mliap_snap.yaml b/unittest/force-styles/tests/manybody-pair-mliap_snap_linear.yaml similarity index 100% rename from unittest/force-styles/tests/manybody-pair-mliap_snap.yaml rename to unittest/force-styles/tests/manybody-pair-mliap_snap_linear.yaml diff --git a/unittest/force-styles/tests/manybody-pair-mliap_snap_quadratic.yaml b/unittest/force-styles/tests/manybody-pair-mliap_snap_quadratic.yaml new file mode 100644 index 0000000000..475fc1caac --- /dev/null +++ b/unittest/force-styles/tests/manybody-pair-mliap_snap_quadratic.yaml @@ -0,0 +1,158 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Wed Mar 24 12:24:38 202 +epsilon: 5e-13 +prerequisites: ! | + pair mliap + pair zbl +pre_commands: ! | + variable newton_pair delete + variable newton_pair index on +post_commands: ! "" +input_file: in.manybody +pair_style: hybrid/overlay zbl 4.0 4.8 mliap model quadratic W.quadratic.mliap.model + descriptor sna W.quadratic.mliap.descriptor +pair_coeff: ! | + 1*8 1*8 zbl 74 74 + * * mliap W W W W W W W W +extract: ! "" +natoms: 64 +init_vdwl: 310.670038860846 +init_coul: 0 +init_stress: ! |2- + 5.6259528842196187e+02 5.7316629871796738e+02 5.8790591480137323e+02 -1.8189500835315549e+01 1.3614672500307736e+02 5.6212035897053383e+00 +init_forces: ! |2 + 1 -1.7332406552612252e+00 9.6965139437668633e+00 5.8109280039223741e+00 + 2 -8.4506855506966403e+00 1.7517630868906400e+00 -5.8585143024763751e+00 + 3 1.3067558540335114e+00 2.4533443839399922e+00 -5.3832194918864029e-01 + 4 -5.4997504048583030e+00 8.6507394288895618e+00 3.5210921442144869e+00 + 5 -5.4578004799253836e+00 -3.8166835957403560e+00 -1.9324965001410375e+00 + 6 1.8068295611859355e+00 7.7167110612740411e+00 2.2464754671860354e+00 + 7 -1.4615233556948404e+00 -4.5523205969121312e+00 5.2307165009286525e+00 + 8 1.3470528830761590e+00 1.1150099302890997e+00 -2.4124956929134638e+00 + 9 1.8536678547304528e+00 -5.9192817641183115e+00 -8.9231779770120117e+00 + 10 -1.6830129533144051e+00 -2.0004948002622096e+00 -6.7940188134883588e+00 + 11 9.3899899055663916e+00 -9.6096061996623181e+00 5.4294046031393410e+00 + 12 -1.8440182258152287e+01 -9.1578611598783599e+00 -6.9019373206621033e+00 + 13 -1.4789077352315048e+00 1.6126223605834220e+01 -2.3399418562200816e+00 + 14 -5.1192810384232743e+00 7.8887975887856649e+00 2.7987351355628833e+00 + 15 -1.1432288954023196e+01 1.2052925891647078e+01 -7.6561230955500186e+00 + 16 4.9875199325917112e+00 -7.9756500980837031e-01 1.5348327626794408e+01 + 17 3.0326448198662455e+00 1.0247763080256838e+01 -1.3162357502394531e+01 + 18 1.1912120343158321e+00 3.8795028741303881e+00 9.7535980505837134e+00 + 19 -4.1904376957856400e+00 -3.2045372808825174e+00 -1.1178952155997879e+00 + 20 -2.0524722840954009e+01 1.3584987641399842e+00 1.2643890965526294e+00 + 21 7.8962692301193274e+00 3.0756220916596053e+00 -1.0060035052224105e+01 + 22 -1.6638865872488534e+01 7.3242501928548176e+00 -1.1470088145525292e+01 + 23 3.1098873977160020e+00 8.9978923066815906e+00 7.3796685128197010e+00 + 24 3.7623303590129575e+00 3.9470381598445985e+00 8.3456006313463575e+00 + 25 2.7135762879995773e+00 1.2688233449033359e-01 2.7652325878214103e+00 + 26 -2.5567333671028858e+00 -1.5012729784955012e+00 3.8180756571583805e+00 + 27 5.4933629833598179e+00 -3.5852699914334007e-01 5.6772577899252621e+00 + 28 2.1583223591405485e+00 2.5602854563986126e+00 1.2987493211097293e+01 + 29 -9.3928065614100227e+00 8.1231719788253520e-01 -3.4139694444606663e+00 + 30 -6.5111025810175223e+00 3.9239227943865140e+00 -1.9909323666256402e+00 + 31 -4.5532920832558466e+00 2.9334735012590949e+00 -2.2603005294374805e+00 + 32 -1.1131319171235056e+01 4.0773060096293179e-01 2.3495354245782185e-01 + 33 1.1946312975015427e+01 -4.8997346173109610e+00 8.5135451343035555e+00 + 34 2.2567306848110924e-01 -9.7924723339198039e-01 1.7583322195512454e+00 + 35 2.8580692192724184e+00 -9.9224668537616911e-01 8.1615215594264985e+00 + 36 -9.5804648131257442e-02 -6.2355391184959963e+00 -1.1533359083409473e+00 + 37 -5.1866584177272408e+00 5.2276382338316552e+00 -9.4551207183301855e+00 + 38 -1.1543907922565189e+00 -1.2217116705851163e+00 7.8535042419588308e-01 + 39 7.5764294215464227e+00 -4.6563914581780939e+00 -1.4559998851452969e+01 + 40 1.1962426631242364e+01 -6.5095442931054395e+00 -3.2593809840204688e+00 + 41 4.2161422225881529e-01 -1.4729246940628351e+00 -4.8653082075157528e+00 + 42 -1.2872945210845128e+01 -6.7834573750437004e+00 -6.3019087398505946e-01 + 43 2.5785048972790117e+00 -1.6923099420445759e+01 -1.3360019377139212e+00 + 44 1.2291023950270986e+01 -1.2191603864766963e+01 2.7304006094143318e+00 + 45 -1.2398099447130371e+00 5.0658390044921555e+00 -9.2322482748129762e+00 + 46 -1.4311260929166141e+00 -5.6910264552445193e+00 1.3277999978308035e+01 + 47 6.2057343183031417e+00 3.7310981833648289e+00 4.8205098133270914e+00 + 48 3.3963650236743295e+00 2.0831245825926228e+00 -1.2673031459768591e+00 + 49 -1.8543360773247199e+00 -1.3380317233196116e+01 -8.4112300152561250e+00 + 50 -1.9920275269520710e-01 7.0107508582593869e+00 -2.6708325452002271e+00 + 51 -9.3660629689657249e-01 1.1809167034995344e+01 9.8986119959157612e+00 + 52 1.2220659999225337e+01 -1.2024509026677922e+01 1.4962970527017067e+01 + 53 7.4348387428600198e+00 7.7548706874243649e+00 4.1933368746931752e+00 + 54 7.0105713161150085e+00 -7.7007180274608169e+00 -6.5961935960226112e+00 + 55 3.2473798770902653e+00 -9.0385173613511878e+00 -8.5508326243716120e+00 + 56 4.2348804882267466e-01 4.3169490550492495e-01 -5.3478203134943731e+00 + 57 3.5009508489349979e+00 -3.3027079935021968e+00 -2.1184761311459956e+00 + 58 9.2468424036384231e+00 -4.5181490794556876e+00 2.4559890235342761e+00 + 59 9.9448793924013952e+00 4.5973129034833260e+00 -2.2322113512955504e+00 + 60 -3.6986806985028280e+00 -1.7543528229443428e+01 -1.0133821358926038e+01 + 61 -2.2233420196353229e+00 6.0781304306653574e+00 -1.8495331839082056e+00 + 62 -1.2719363808848012e+01 8.6073749589883608e+00 -4.9797073704539283e+00 + 63 7.9457470990016770e+00 -9.7673000016796276e+00 -4.3317841246475552e-01 + 64 9.3812874011747454e+00 7.3062141638106093e+00 2.1744814847410481e+01 +run_vdwl: 310.495392494539 +run_coul: 0 +run_stress: ! |2- + 5.6245390685235475e+02 5.7310155923142815e+02 5.8811705982147669e+02 -1.8382792415481248e+01 1.3530908723557451e+02 6.7996805811527254e+00 +run_forces: ! |2 + 1 -1.7474911328125362e+00 9.6453508706584969e+00 5.8264070485591564e+00 + 2 -8.4157283593600489e+00 1.6574874271599898e+00 -5.8310589262897814e+00 + 3 1.2088949261773574e+00 2.4669650164003505e+00 -4.1375090165872641e-01 + 4 -5.4649039359012761e+00 8.6435152499830856e+00 3.4462094837625115e+00 + 5 -5.4958328716797862e+00 -3.8484174335646353e+00 -1.8816778997456991e+00 + 6 1.9551787223560284e+00 7.7494231202147503e+00 2.2973472684776728e+00 + 7 -1.4123397167898091e+00 -4.4576559389423105e+00 5.1606908467828738e+00 + 8 1.3003903361118314e+00 1.1090418970773539e+00 -2.4122402377787160e+00 + 9 1.7752795626830657e+00 -5.9789440759859360e+00 -8.9434548975396595e+00 + 10 -1.7012447055310522e+00 -1.9935230569531357e+00 -6.6673307006625988e+00 + 11 9.2689566064779427e+00 -9.5287746372607316e+00 5.4104731087638704e+00 + 12 -1.8405278855921495e+01 -9.0991584859228194e+00 -6.8488708319775853e+00 + 13 -1.2996763830273808e+00 1.6069530823653931e+01 -2.2707313142490793e+00 + 14 -5.1882033738262070e+00 7.8832636277485548e+00 2.7916487158318102e+00 + 15 -1.1433449800945827e+01 1.2015094164432849e+01 -7.5825275115016781e+00 + 16 4.9454676036434462e+00 -7.8102971145205025e-01 1.5266194219606220e+01 + 17 3.0052148409052588e+00 1.0222703724442866e+01 -1.3093555057589381e+01 + 18 1.0836570454713836e+00 3.9100837051064552e+00 9.7948718675854156e+00 + 19 -4.2707464401127355e+00 -3.2934173316232527e+00 -1.1211010156027728e+00 + 20 -2.0392897715847305e+01 1.3054265260795233e+00 1.1968830911637141e+00 + 21 7.9027972563135283e+00 2.9933448022464120e+00 -1.0141811195436880e+01 + 22 -1.6575655480795024e+01 7.3026015885081472e+00 -1.1453084247555879e+01 + 23 3.1438035132341287e+00 9.0208182590437627e+00 7.4001520562013852e+00 + 24 3.8345333002034385e+00 3.8688922268567087e+00 8.2635479168723016e+00 + 25 2.6893003750410522e+00 1.3495734265712933e-01 2.6770556576379549e+00 + 26 -2.5895248886874898e+00 -1.4293305889359713e+00 3.8291245405081260e+00 + 27 5.5060054332311656e+00 -4.1092061919393136e-01 5.6759895801356688e+00 + 28 2.1307408306936098e+00 2.6175526554889608e+00 1.2958660769748445e+01 + 29 -9.3633952447569087e+00 8.2665579439215930e-01 -3.4012747321257448e+00 + 30 -6.4533544693943297e+00 3.8387646522939547e+00 -2.0200114390690862e+00 + 31 -4.5312579127038672e+00 2.9434281499085380e+00 -2.2589125870011584e+00 + 32 -1.1081437585586908e+01 3.5221507626974347e-01 1.7034641632139044e-01 + 33 1.1876109082707279e+01 -4.8655564590595244e+00 8.4901635945810785e+00 + 34 1.9834861495951994e-01 -9.7867922827610787e-01 1.7689988369185765e+00 + 35 2.8755972285806117e+00 -9.4201232104253185e-01 8.1427329437299605e+00 + 36 -1.7696676342095063e-01 -6.2050030582426956e+00 -1.2610314329006926e+00 + 37 -5.1523185432926066e+00 5.1647495629610471e+00 -9.4596116018450456e+00 + 38 -1.0982182558331921e+00 -1.1973914898033993e+00 8.2357032136004271e-01 + 39 7.5153819798537249e+00 -4.6353686206926801e+00 -1.4561478300809743e+01 + 40 1.2018485301986439e+01 -6.4889114819969862e+00 -3.3179507002516861e+00 + 41 5.3906537639254815e-01 -1.3597164515464635e+00 -4.7572664553057376e+00 + 42 -1.2853367469523606e+01 -6.8243263403454719e+00 -7.0954222980753212e-01 + 43 2.5285681786651231e+00 -1.6882295131334587e+01 -1.3986624925913076e+00 + 44 1.2309710907856807e+01 -1.2175400941985238e+01 2.6677164515852514e+00 + 45 -1.3287685848983446e+00 4.9721749381786715e+00 -9.1534484515246355e+00 + 46 -1.4302864380872948e+00 -5.6407929749476793e+00 1.3337675572559966e+01 + 47 6.2320161927247124e+00 3.7264499027617033e+00 4.8100453121557578e+00 + 48 3.4140183611989756e+00 2.1640838168269934e+00 -1.2936781336070275e+00 + 49 -1.9593115645555264e+00 -1.3493991739193522e+01 -8.5023532432195843e+00 + 50 -1.6811489988289596e-01 6.9681072464297396e+00 -2.7188888125967106e+00 + 51 -1.0469270161190001e+00 1.1884430462587432e+01 9.9090099481589125e+00 + 52 1.2258922313552624e+01 -1.1933013587721307e+01 1.4931067313457525e+01 + 53 7.4707442724281288e+00 7.8432472024360917e+00 4.3940747538426654e+00 + 54 6.9725677862692397e+00 -7.6678940689959383e+00 -6.5509217426800008e+00 + 55 3.1754349262716173e+00 -9.0126325358351416e+00 -8.4265432974728931e+00 + 56 4.0310136221619780e-01 3.3628916654912500e-01 -5.3158911291318605e+00 + 57 3.5009222797756716e+00 -3.3989600099867601e+00 -2.1369392158489036e+00 + 58 9.2532114410873234e+00 -4.4437952950838877e+00 2.3641140155667579e+00 + 59 1.0015845748025313e+01 4.6123938091542342e+00 -2.2569748666852796e+00 + 60 -3.7800808893756161e+00 -1.7584651166860183e+01 -1.0234679510276377e+01 + 61 -2.1980530287652753e+00 6.1071583911470810e+00 -1.7912415049492632e+00 + 62 -1.2705161798029133e+01 8.5765301471185520e+00 -4.9056271749898661e+00 + 63 7.9321561763633355e+00 -9.8033451737328594e+00 -4.9729640856821433e-01 + 64 9.4795662420049851e+00 7.4221786097433808e+00 2.1786648548971794e+01 +... diff --git a/unittest/force-styles/tests/mol-pair-born.yaml b/unittest/force-styles/tests/mol-pair-born.yaml index 05e77a49b5..f411505f74 100644 --- a/unittest/force-styles/tests/mol-pair-born.yaml +++ b/unittest/force-styles/tests/mol-pair-born.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:10 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:14:43 202 epsilon: 5e-14 prerequisites: ! | atom full @@ -9,22 +9,22 @@ pre_commands: ! "" post_commands: ! "" input_file: in.fourmol pair_style: born 8.0 -pair_coeff: ! "1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 - 141.547923828784 \n1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 - 4.09225030876458 \n1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 - 403.51858739517 \n1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 - 0.177172207445923 \n2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 - 17.5662073921955 \n2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 - 0.000703093129207124 \n2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 - 12.548008396489 \n3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 - 1019.38354056979 \n3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722\n" +pair_coeff: ! | + 1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 141.547923828784 + 1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 4.09225030876458 + 1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 403.51858739517 + 1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 0.177172207445923 + 2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 17.5662073921955 + 2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 0.000703093129207124 + 2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 12.548008396489 + 3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 1019.38354056979 + 3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 extract: ! | a 2 c 2 diff --git a/unittest/force-styles/tests/mol-pair-born_coul_dsf.yaml b/unittest/force-styles/tests/mol-pair-born_coul_dsf.yaml index c139bd0bc2..a3bacb3f7c 100644 --- a/unittest/force-styles/tests/mol-pair-born_coul_dsf.yaml +++ b/unittest/force-styles/tests/mol-pair-born_coul_dsf.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:10 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:14:43 202 epsilon: 5e-14 prerequisites: ! | atom full @@ -9,22 +9,22 @@ pre_commands: ! "" post_commands: ! "" input_file: in.fourmol pair_style: born/coul/dsf 0.25 8.0 -pair_coeff: ! "1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 - 141.547923828784 \n1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 - 4.09225030876458 \n1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 - 403.51858739517 \n1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 - 0.177172207445923 \n2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 - 17.5662073921955 \n2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 - 0.000703093129207124 \n2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 - 12.548008396489 \n3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 - 1019.38354056979 \n3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722\n" +pair_coeff: ! | + 1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 141.547923828784 + 1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 4.09225030876458 + 1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 403.51858739517 + 1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 0.177172207445923 + 2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 17.5662073921955 + 2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 0.000703093129207124 + 2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 12.548008396489 + 3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 1019.38354056979 + 3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 extract: ! "" natoms: 29 init_vdwl: 225.01325775005 diff --git a/unittest/force-styles/tests/mol-pair-born_coul_long.yaml b/unittest/force-styles/tests/mol-pair-born_coul_long.yaml index e831e0da9c..7f99ac0b15 100644 --- a/unittest/force-styles/tests/mol-pair-born_coul_long.yaml +++ b/unittest/force-styles/tests/mol-pair-born_coul_long.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:10 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:14:43 202 epsilon: 7.5e-14 prerequisites: ! | atom full @@ -14,22 +14,22 @@ post_commands: ! | kspace_modify compute no input_file: in.fourmol pair_style: born/coul/long 8.0 -pair_coeff: ! "1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 - 141.547923828784 \n1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 - 4.09225030876458 \n1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 - 403.51858739517 \n1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 - 0.177172207445923 \n2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 - 17.5662073921955 \n2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 - 0.000703093129207124 \n2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 - 12.548008396489 \n3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 - 1019.38354056979 \n3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n" +pair_coeff: ! | + 1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 141.547923828784 + 1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 4.09225030876458 + 1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 403.51858739517 + 1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 0.177172207445923 + 2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 17.5662073921955 + 2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 0.000703093129207124 + 2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 12.548008396489 + 3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 1019.38354056979 + 3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 extract: ! | cut_coul 0 natoms: 29 diff --git a/unittest/force-styles/tests/mol-pair-born_coul_msm.yaml b/unittest/force-styles/tests/mol-pair-born_coul_msm.yaml index e0def1f392..e805c24b28 100644 --- a/unittest/force-styles/tests/mol-pair-born_coul_msm.yaml +++ b/unittest/force-styles/tests/mol-pair-born_coul_msm.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:10 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:14:43 202 epsilon: 5e-14 prerequisites: ! | atom full @@ -15,22 +15,22 @@ post_commands: ! | kspace_modify pressure/scalar no # required for USER-OMP with msm input_file: in.fourmol pair_style: born/coul/msm 12.0 -pair_coeff: ! "1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 - 141.547923828784 \n1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 - 4.09225030876458 \n1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 - 403.51858739517 \n1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 - 0.177172207445923 \n2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 - 17.5662073921955 \n2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 - 0.000703093129207124 \n2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 - 12.548008396489 \n3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 - 1019.38354056979 \n3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n" +pair_coeff: ! | + 1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 141.547923828784 + 1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 4.09225030876458 + 1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 403.51858739517 + 1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 0.177172207445923 + 2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 17.5662073921955 + 2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 0.000703093129207124 + 2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 12.548008396489 + 3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 1019.38354056979 + 3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 extract: ! | cut_coul 0 natoms: 29 diff --git a/unittest/force-styles/tests/mol-pair-born_coul_msm_table.yaml b/unittest/force-styles/tests/mol-pair-born_coul_msm_table.yaml index fe6a0faf84..75f0f76a44 100644 --- a/unittest/force-styles/tests/mol-pair-born_coul_msm_table.yaml +++ b/unittest/force-styles/tests/mol-pair-born_coul_msm_table.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:10 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:14:43 202 epsilon: 5e-14 prerequisites: ! | atom full @@ -15,22 +15,22 @@ post_commands: ! | kspace_modify pressure/scalar no # required for USER-OMP with msm input_file: in.fourmol pair_style: born/coul/msm 12.0 -pair_coeff: ! "1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 - 141.547923828784 \n1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 - 4.09225030876458 \n1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 - 403.51858739517 \n1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 - 0.177172207445923 \n2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 - 17.5662073921955 \n2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 - 0.000703093129207124 \n2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 - 12.548008396489 \n3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 - 1019.38354056979 \n3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n" +pair_coeff: ! | + 1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 141.547923828784 + 1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 4.09225030876458 + 1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 403.51858739517 + 1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 0.177172207445923 + 2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 17.5662073921955 + 2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 0.000703093129207124 + 2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 12.548008396489 + 3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 1019.38354056979 + 3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 extract: ! | cut_coul 0 natoms: 29 diff --git a/unittest/force-styles/tests/mol-pair-born_coul_wolf.yaml b/unittest/force-styles/tests/mol-pair-born_coul_wolf.yaml index f3c37e100a..db4ad73e30 100644 --- a/unittest/force-styles/tests/mol-pair-born_coul_wolf.yaml +++ b/unittest/force-styles/tests/mol-pair-born_coul_wolf.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:11 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:14:44 202 epsilon: 5e-14 prerequisites: ! | atom full @@ -9,22 +9,22 @@ pre_commands: ! "" post_commands: ! "" input_file: in.fourmol pair_style: born/coul/wolf 0.25 8.0 -pair_coeff: ! "1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 - 141.547923828784 \n1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 - 4.09225030876458 \n1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 - 403.51858739517 \n1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 - 303.336540547726 \n2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 - 0.177172207445923 \n2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 - 17.5662073921955 \n2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 - 0.000703093129207124 \n2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 - 12.548008396489 \n3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 - 1019.38354056979 \n3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 - 778.254162800904 \n4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722 \n5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 - 592.979935420722\n" +pair_coeff: ! | + 1 1 2.51937098847838 0.148356076521964 1.82166848001002 29.0375806150613 141.547923828784 + 1 2 2.87560097202631 0.103769845319212 1.18949647259382 1.7106306969663 4.09225030876458 + 1 3 2.73333746288062 0.169158133709025 2.06291417638668 63.7180294456725 403.51858739517 + 1 4 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 1 5 2.51591531388789 0.166186965980131 2.01659390849669 49.622913109061 303.336540547726 + 2 2 1.0594557710255 0.281261664467988 0.314884389172266 0.271080184997071 0.177172207445923 + 2 3 2.12127488295383 0.124576922646243 1.46526793359105 5.10367785279284 17.5662073921955 + 2 4 0.523836115049206 0.140093804714855 0.262040872137659 0.00432916334694855 0.000703093129207124 + 2 5 2.36887234111228 0.121604450909563 1.39946581861656 3.82529730669145 12.548008396489 + 3 3 2.81831917530019 0.189944649028137 2.31041576143228 127.684271782117 1019.38354056979 + 3 4 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 3 5 2.5316180773506 0.186976803503293 2.26748506873271 100.602835334624 778.254162800904 + 4 4 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 4 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 + 5 5 2.63841820292211 0.184008285863681 2.19742633928911 79.1465822481912 592.979935420722 extract: ! "" natoms: 29 init_vdwl: 225.01325775005 diff --git a/unittest/force-styles/tests/mol-pair-lj_switch3_coulgauss_long.yaml b/unittest/force-styles/tests/mol-pair-lj_switch3_coulgauss_long.yaml new file mode 100644 index 0000000000..e14044f9a0 --- /dev/null +++ b/unittest/force-styles/tests/mol-pair-lj_switch3_coulgauss_long.yaml @@ -0,0 +1,99 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Thu Apr 1 12:05:31 202 +epsilon: 7.5e-14 +prerequisites: ! | + atom full + pair lj/switch3/coulgauss/long + kspace ewald +pre_commands: ! "" +post_commands: ! | + pair_modify mix arithmetic + pair_modify table 0 + kspace_style ewald 1.0e-6 + kspace_modify gewald 0.3 + kspace_modify compute no +input_file: in.fourmol +pair_style: lj/switch3/coulgauss/long 8.0 2.0 +pair_coeff: ! | + 1 1 0.02 2.5 1.0 + 2 2 0.005 1.0 0.7 + 2 4 0.005 0.5 0.7 + 3 3 0.02 3.2 1.3 + 4 4 0.015 3.1 1.2 + 5 5 0.015 3.1 1.2 +extract: ! | + epsilon 2 + sigma 2 + gamma 2 + cut_coul 0 +natoms: 29 +init_vdwl: 749.239201392283 +init_coul: 262.63137433058 +init_stress: ! |2- + 2.1905445805730942e+03 2.1830788072793757e+03 4.6581902800701146e+03 -7.4288115309776367e+02 2.6990012828168151e+01 6.7591505796334252e+02 +init_forces: ! |2 + 1 -2.2440985285095003e+01 2.6839510386427128e+02 3.3548778459373403e+02 + 2 1.6014525975608947e+02 1.2916401608538342e+02 -1.9007855889522560e+02 + 3 -1.3523588460187835e+02 -3.8701969631758487e+02 -1.4563951593124975e+02 + 4 -8.1626375608064503e+00 2.0129840978934559e+00 -5.9838237090267477e+00 + 5 -3.2509810426586694e+00 -3.8006496952690405e+00 1.2238094761779506e+01 + 6 -8.3272100467340556e+02 9.6240884847023358e+02 1.1512799880160530e+03 + 7 5.9109223946129624e+01 -3.3613343492781996e+02 -1.7166010182633938e+03 + 8 1.4374025374023395e+02 -1.0687979059788748e+02 3.9897084761513247e+02 + 9 8.0822098286061347e+01 8.1693084015402164e+01 3.5446319638063176e+02 + 10 5.3122611725677234e+02 -6.1057993090036803e+02 -1.8379536842135653e+02 + 11 -3.0599394771020791e+00 -5.2185583295434022e+00 -1.0179624348800495e+01 + 12 1.9237456341967800e+01 1.0181865500248987e+01 -6.1597937746835436e+00 + 13 8.3909903723672699e+00 -3.3718280449484173e+00 -3.3038121588715319e-01 + 14 -4.1292661630995928e+00 9.9336707464018092e-01 -9.3350058002796388e+00 + 15 4.2168785095757555e-01 8.7977955328786113e+00 2.0699990715180956e+00 + 16 4.6411046171725997e+02 -3.3264571918035432e+02 -1.1912223271773271e+03 + 17 -4.5697820722395699e+02 3.2194358869766086e+02 1.2030903913181610e+03 + 18 -2.9720972086277636e-01 1.7565528490258597e+00 2.4294604263813859e+00 + 19 -2.6658339749427125e+00 -3.5543359860963246e+00 -7.0028176604540848e-01 + 20 2.3030703223874878e+00 1.6788085961460804e+00 8.8715814688464914e-02 + 21 -7.2491063430524989e+01 -8.0704358691908013e+01 2.2713112476019884e+02 + 22 -1.1047017798074540e+02 -2.7622195109041627e+01 -1.7106972908159221e+02 + 23 1.8254515612066885e+02 1.0874225091685935e+02 -5.5558584096022528e+01 + 24 3.7139490938880684e+01 -2.1182968679989389e+02 1.1239472278345924e+02 + 25 -1.5173442669154963e+02 2.2482896227152501e+01 -1.2683235954885029e+02 + 26 1.1404997762743471e+02 1.8910942097520967e+02 1.3865307057956501e+01 + 27 5.1263700969024825e+01 -2.2708329767472884e+02 9.0733209359745530e+01 + 28 -1.8280634435959598e+02 7.6676771027308675e+01 -1.2320543486529729e+02 + 29 1.3193901693998819e+02 1.5040612832512986e+02 3.2448964935598738e+01 +run_vdwl: 719.395943067584 +run_coul: 262.577357625246 +run_stress: ! |2- + 2.1439469903049130e+03 2.1388099416476502e+03 4.3901771762143671e+03 -7.2215136136852652e+02 4.3981220891989977e+01 6.3726346095247902e+02 +run_forces: ! |2 + 1 -1.9342111296614632e+01 2.6536048036936916e+02 3.2628113020689460e+02 + 2 1.5478381002242270e+02 1.2483653341336152e+02 -1.8332859341112297e+02 + 3 -1.3348486669886435e+02 -3.7921582819403795e+02 -1.4287155661999228e+02 + 4 -8.1288301070929982e+00 2.0080316198654273e+00 -5.9722562656827858e+00 + 5 -3.2351829753164845e+00 -3.7719427860922665e+00 1.2190138978995325e+01 + 6 -8.0768848311420356e+02 9.2016491680294996e+02 1.0274658369925041e+03 + 7 5.6698550383493917e+01 -3.1122940570534678e+02 -1.5733988978986536e+03 + 8 1.3387241605110836e+02 -9.8275697925936129e+01 3.8773060932891792e+02 + 9 7.8389121495727082e+01 7.8858365413426057e+01 3.4347185476758511e+02 + 10 5.2128680605857573e+02 -5.9933944295277558e+02 -1.8148565911030960e+02 + 11 -3.0663895518130402e+00 -5.1690166614639725e+00 -1.0127704831021171e+01 + 12 1.9218490979542565e+01 1.0175625089829989e+01 -6.2912885237383334e+00 + 13 8.3443094714464650e+00 -3.3361880724739623e+00 -3.2980152351128239e-01 + 14 -4.0925411684752673e+00 9.7261482089301243e-01 -9.2160488176079518e+00 + 15 4.0396689631175081e-01 8.8125643989717197e+00 2.0895512608739368e+00 + 16 4.3558458306026108e+02 -3.1347365130054965e+02 -1.1153604445579856e+03 + 17 -4.2831293616595980e+02 3.0256033131579363e+02 1.1274168049543377e+03 + 18 -3.0240289244505925e-01 1.7692205043557692e+00 2.4421829464376694e+00 + 19 -2.6549690010635465e+00 -3.5598277436632562e+00 -6.9536112330149602e-01 + 20 2.2933819335528716e+00 1.6713255394851048e+00 7.9301163390346582e-02 + 21 -7.1399138479900728e+01 -7.8808617837125738e+01 2.2288288096726535e+02 + 22 -1.0872540509179575e+02 -2.7364445523270156e+01 -1.6789056923341974e+02 + 23 1.7970587875020576e+02 1.0659054948727307e+02 -5.4485902397030543e+01 + 24 3.8719492068991073e+01 -2.1018768384060851e+02 1.1276643199107306e+02 + 25 -1.5234502496218383e+02 2.2328379592897981e+01 -1.2741458364942766e+02 + 26 1.1307896673604499e+02 1.8762340967163530e+02 1.4075792400442774e+01 + 27 5.0253213702344411e+01 -2.2292638222448988e+02 8.8474597952361989e+01 + 28 -1.7928804250876811e+02 7.5155358290636585e+01 -1.2061205300179266e+02 + 29 1.2943333640446872e+02 1.4777042443708973e+02 3.2113607053518280e+01 +... diff --git a/unittest/force-styles/tests/mol-pair-lj_switch3_coulgauss_table.yaml b/unittest/force-styles/tests/mol-pair-lj_switch3_coulgauss_table.yaml new file mode 100644 index 0000000000..973ed7051e --- /dev/null +++ b/unittest/force-styles/tests/mol-pair-lj_switch3_coulgauss_table.yaml @@ -0,0 +1,99 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Thu Apr 1 12:05:32 202 +epsilon: 5e-13 +prerequisites: ! | + atom full + pair lj/switch3/coulgauss/long + kspace ewald +pre_commands: ! "" +post_commands: ! | + pair_modify mix arithmetic + pair_modify table 16 + kspace_style ewald 1.0e-6 + kspace_modify gewald 0.3 + kspace_modify compute no +input_file: in.fourmol +pair_style: lj/switch3/coulgauss/long 8.0 2.0 +pair_coeff: ! | + 1 1 0.02 2.5 1.0 + 2 2 0.005 1.0 0.7 + 2 4 0.005 0.5 0.7 + 3 3 0.02 3.2 1.3 + 4 4 0.015 3.1 1.2 + 5 5 0.015 3.1 1.2 +extract: ! | + epsilon 2 + sigma 2 + gamma 2 + cut_coul 0 +natoms: 29 +init_vdwl: 749.239201392283 +init_coul: 262.631410551483 +init_stress: ! |2- + 2.1905446008358158e+03 2.1830788130354440e+03 4.6581902934947393e+03 -7.4288114980317005e+02 2.6990022323315568e+01 6.7591506205400140e+02 +init_forces: ! |2 + 1 -2.2440986789065228e+01 2.6839510344190973e+02 3.3548778280211798e+02 + 2 1.6014525925595575e+02 1.2916401535280644e+02 -1.9007855755707530e+02 + 3 -1.3523588449321372e+02 -3.8701969643290909e+02 -1.4563951605577458e+02 + 4 -8.1626375642225835e+00 2.0129845605828729e+00 -5.9838235187927911e+00 + 5 -3.2509808748500135e+00 -3.8006487477814463e+00 1.2238094996907998e+01 + 6 -8.3272100512926681e+02 9.6240884941333036e+02 1.1512799862203640e+03 + 7 5.9109223148516158e+01 -3.3613343497406407e+02 -1.7166010203250210e+03 + 8 1.4374025301066052e+02 -1.0687979086260394e+02 3.9897084965667705e+02 + 9 8.0822100084645626e+01 8.1693083424499093e+01 3.5446319827945621e+02 + 10 5.3122611737361080e+02 -6.1057993046376589e+02 -1.8379536902952145e+02 + 11 -3.0599395914956227e+00 -5.2185576282473036e+00 -1.0179624244755713e+01 + 12 1.9237456510724858e+01 1.0181865558167726e+01 -6.1597946782797850e+00 + 13 8.3909904522091470e+00 -3.3718281778746344e+00 -3.3038108557256562e-01 + 14 -4.1292663075103953e+00 9.9336695410995779e-01 -9.3350056582436061e+00 + 15 4.2168780003223016e-01 8.7977952410479840e+00 2.0699996667940117e+00 + 16 4.6411046291217519e+02 -3.3264572037764498e+02 -1.1912223268528312e+03 + 17 -4.5697820745668372e+02 3.2194358895792664e+02 1.2030903912557251e+03 + 18 -2.9720916995537250e-01 1.7565528041526848e+00 2.4294595600637425e+00 + 19 -2.6658359770891962e+00 -3.5543374045750902e+00 -7.0028189781643846e-01 + 20 2.3030721439983917e+00 1.6788097920639553e+00 8.8716903513438167e-02 + 21 -7.2491063802446362e+01 -8.0704358127081790e+01 2.2713112533044830e+02 + 22 -1.1047018068190837e+02 -2.7622196765220032e+01 -1.7106973071745716e+02 + 23 1.8254515931328083e+02 1.0874225209184637e+02 -5.5558583211276250e+01 + 24 3.7139491235265282e+01 -2.1182968640787311e+02 1.1239472233677957e+02 + 25 -1.5173442866720330e+02 2.2482894929853938e+01 -1.2683236039424271e+02 + 26 1.1404997991795076e+02 1.8910942242955088e+02 1.3865308691923977e+01 + 27 5.1263700853661504e+01 -2.2708329750901160e+02 9.0733209165823396e+01 + 28 -1.8280634707113845e+02 7.6676770092406045e+01 -1.2320543608135794e+02 + 29 1.3193901956336219e+02 1.5040612883439849e+02 3.2448966441423750e+01 +run_vdwl: 719.3959430344 +run_coul: 262.577390407319 +run_stress: ! |2- + 2.1439470065972137e+03 2.1388099427650550e+03 4.3901771876285757e+03 -7.2215135528838152e+02 4.3981227731157169e+01 6.3726346514781233e+02 +run_forces: ! |2 + 1 -1.9342112777764044e+01 2.6536047986408227e+02 3.2628112882188066e+02 + 2 1.5478380987853197e+02 1.2483653254176838e+02 -1.8332859191802055e+02 + 3 -1.3348486656752218e+02 -3.7921582829992821e+02 -1.4287155674732023e+02 + 4 -8.1288300595478145e+00 2.0080320707984289e+00 -5.9722560784187575e+00 + 5 -3.2351826602132863e+00 -3.7719418655198664e+00 1.2190139134122882e+01 + 6 -8.0768848338103430e+02 9.2016491733383600e+02 1.0274658351618857e+03 + 7 5.6698550307468736e+01 -3.1122940556308856e+02 -1.5733989002062301e+03 + 8 1.3387241574644310e+02 -9.8275698627583083e+01 3.8773061254696188e+02 + 9 7.8389123166777367e+01 7.8858364582844956e+01 3.4347185682031875e+02 + 10 5.2128680625044581e+02 -5.9933944258147972e+02 -1.8148565985727146e+02 + 11 -3.0663897393660062e+00 -5.1690158790311020e+00 -1.0127704822035417e+01 + 12 1.9218491178640956e+01 1.0175625315025894e+01 -6.2912900026938683e+00 + 13 8.3443096072761875e+00 -3.3361882591914980e+00 -3.2980142478029900e-01 + 14 -4.0925412507338894e+00 9.7261457606495283e-01 -9.2160486509597419e+00 + 15 4.0396659601733209e-01 8.8125640821770475e+00 2.0895518255992327e+00 + 16 4.3558458334132916e+02 -3.1347365174745744e+02 -1.1153604446371062e+03 + 17 -4.2831293628122177e+02 3.0256033223226825e+02 1.1274168046352991e+03 + 18 -3.0240272912362937e-01 1.7692204105371876e+00 2.4421821828695935e+00 + 19 -2.6549708608109603e+00 -3.5598291696654596e+00 -6.9536106786938656e-01 + 20 2.2933837220124476e+00 1.6713266856927325e+00 7.9302040608548133e-02 + 21 -7.1399139014949796e+01 -7.8808617040884513e+01 2.2288288163778361e+02 + 22 -1.0872540740988465e+02 -2.7364447046562592e+01 -1.6789057060588300e+02 + 23 1.7970588157677136e+02 1.0659055047797085e+02 -5.4485901626092641e+01 + 24 3.8719492028250940e+01 -2.1018768371930031e+02 1.1276643093423978e+02 + 25 -1.5234502685835807e+02 2.2328378412375191e+01 -1.2741458439419397e+02 + 26 1.1307896905891306e+02 1.8762341114219453e+02 1.4075794088855011e+01 + 27 5.0253213439313768e+01 -2.2292638208302930e+02 8.8474597770747309e+01 + 28 -1.7928804514846018e+02 7.5155357340410589e+01 -1.2061205423392185e+02 + 29 1.2943333884079848e+02 1.4777042481467481e+02 3.2113608671625300e+01 +... diff --git a/unittest/force-styles/tests/mol-pair-mm3_switch3_coulgauss_long.yaml b/unittest/force-styles/tests/mol-pair-mm3_switch3_coulgauss_long.yaml new file mode 100644 index 0000000000..d74aba7143 --- /dev/null +++ b/unittest/force-styles/tests/mol-pair-mm3_switch3_coulgauss_long.yaml @@ -0,0 +1,99 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Thu Apr 1 12:40:49 202 +epsilon: 7.5e-14 +prerequisites: ! | + atom full + pair mm3/switch3/coulgauss/long + kspace ewald +pre_commands: ! "" +post_commands: ! | + pair_modify mix arithmetic + pair_modify table 0 + kspace_style ewald 1.0e-6 + kspace_modify gewald 0.3 + kspace_modify compute no +input_file: in.fourmol +pair_style: mm3/switch3/coulgauss/long 8.0 2.0 +pair_coeff: ! | + 1 1 0.02 2.5 1.0 + 2 2 0.005 1.0 0.7 + 2 4 0.005 0.5 0.7 + 3 3 0.02 3.2 1.3 + 4 4 0.015 3.1 1.2 + 5 5 0.015 3.1 1.2 +extract: ! | + epsilon 2 + sigma 2 + gamma 2 + cut_coul 0 +natoms: 29 +init_vdwl: 38.1287498820824 +init_coul: 262.63137433058 +init_stress: ! |- + -9.1891442318066098e+01 -1.3287972066289731e+02 -3.2601698046780012e+02 3.0074181349476991e+01 -4.6650805915669622e+00 -8.2199038214680613e+01 +init_forces: ! |2 + 1 2.0409906927303840e+00 -1.8543276343677643e+01 -3.5869856577020748e+01 + 2 -1.8468129335667530e+01 -1.7027855689261912e+01 2.0713359151753043e+01 + 3 1.0001881298085964e+01 5.9235891506906007e+01 2.4372336208613245e+01 + 4 -4.5761624241138597e+00 -9.8945397153998949e-01 -3.3785801701857485e+00 + 5 -3.6934402656902114e+00 -4.0696606560869748e+00 3.8826787260480975e+00 + 6 7.6754814037515942e+01 -9.5808744511121716e+01 -9.3227045949147495e+01 + 7 -2.1177649780159676e+01 2.8793163914062454e+01 1.2529350681895039e+02 + 8 -2.1450096176689623e+01 1.0356391751725083e+01 -2.8955420955058667e+01 + 9 -8.2497939748793154e+00 -1.3077027567751550e+01 -3.6173491871315754e+01 + 10 -5.3511691146997535e+01 6.0900974965221437e+01 1.8391821307129032e+01 + 11 -1.3170240621133327e+00 -3.2364695484525727e+00 -4.4029422841407655e+00 + 12 2.5797191091185894e+01 -7.5496414014335278e-01 -2.6346161145571760e+00 + 13 3.3781782842360095e+00 -7.7635850626588521e-01 -6.1835215466770443e-01 + 14 -2.5357285341105120e-02 9.3547318559063564e-01 -4.9468893910982210e+00 + 15 4.2707742121454375e+00 4.7941154645598454e+00 -1.2015244265327498e+00 + 16 -3.6573746563916743e+01 1.8565541369425805e+01 1.1446966549457964e+02 + 17 4.3913383545862132e+01 -3.3849656320211224e+01 -9.5337593733730870e+01 + 18 2.6570097579579910e+00 6.2826343323709564e+00 -1.0356872257658154e+00 + 19 -2.6993382209993975e+00 -3.5969189205658059e+00 -6.8072388138355555e-01 + 20 2.3243788182239480e+00 1.6918048474772680e+00 1.0886178998340870e-01 + 21 8.8572294982176594e+00 1.1602893199785523e+01 -3.0057630309158139e+01 + 22 1.2429506519553414e+01 2.1605554971279792e+00 2.1808499086967526e+01 + 23 -2.1432721217228789e+01 -1.3678275101206289e+01 8.4081109687741140e+00 + 24 -3.9016922943010681e+00 2.9074424568745080e+01 -1.3996421656066522e+01 + 25 1.7462841196067998e+01 -4.6818042132561875e+00 1.5548837958928004e+01 + 26 -1.2984517260341663e+01 -2.4211628682033979e+01 -4.8885242451183231e-01 + 27 -7.1989693245110757e+00 3.0862600015720503e+01 -1.2113492397573609e+01 + 28 2.1728885747832702e+01 -1.1241487657358419e+01 1.5185683466068600e+01 + 29 -1.4356735366664552e+01 -1.9712882789785066e+01 -3.0642394558798047e+00 +run_vdwl: 37.7351028273436 +run_coul: 262.634961661768 +run_stress: ! |- + -9.3272108018189712e+01 -1.3382217126586661e+02 -3.2672293936615591e+02 2.9759545957029179e+01 -4.9209094100413031e+00 -8.2642487904188499e+01 +run_forces: ! |2 + 1 2.0020649788635687e+00 -1.8597539511786593e+01 -3.5898845980394640e+01 + 2 -1.8527112215088330e+01 -1.7111766426267462e+01 2.0691354848190322e+01 + 3 1.0099460867786970e+01 5.9365750003142132e+01 2.4423492212473526e+01 + 4 -4.5756546931309785e+00 -9.8171265309239830e-01 -3.3833947541955820e+00 + 5 -3.6935770918861186e+00 -4.0701905608402482e+00 3.8892344342573999e+00 + 6 7.6571694717448139e+01 -9.5745009991872053e+01 -9.3149401161723290e+01 + 7 -2.1146519945476555e+01 2.8805358955193604e+01 1.2508940744689353e+02 + 8 -2.1038405837727929e+01 9.9856756739362105e+00 -2.8916679506818486e+01 + 9 -8.2725059756602182e+00 -1.3032514603603040e+01 -3.6169609418536254e+01 + 10 -5.3760826931047106e+01 6.1170224214358463e+01 1.8495907821099792e+01 + 11 -1.3253792323264064e+00 -3.2541587509559888e+00 -4.4355038136226383e+00 + 12 2.5785718250683153e+01 -7.4878886859791716e-01 -2.6134474044331246e+00 + 13 3.3829109925579108e+00 -7.7854283145617098e-01 -6.1471416338880658e-01 + 14 -4.1269999117458912e-02 9.3253553809356449e-01 -4.9663548861610076e+00 + 15 4.2930245502032669e+00 4.8016878244809185e+00 -1.2067988554549580e+00 + 16 -3.6783956118288792e+01 1.8760442771705005e+01 1.1514035612976591e+02 + 17 4.4141165055486525e+01 -3.4054760176447999e+01 -9.5996384977569576e+01 + 18 2.6593312590300169e+00 6.2866044197349034e+00 -1.0406390620860617e+00 + 19 -2.6868912576483734e+00 -3.5919428389901107e+00 -6.7199629496476021e-01 + 20 2.3122559534773646e+00 1.6848231900639974e+00 1.0223174367536356e-01 + 21 9.0047861017105912e+00 1.1657532054221129e+01 -3.0300252008113389e+01 + 22 1.2602723597354565e+01 2.2333302149108087e+00 2.1993415039821400e+01 + 23 -2.1752703090839589e+01 -1.3807398281546009e+01 8.4647717981317978e+00 + 24 -4.1597044706741348e+00 2.9600068810024190e+01 -1.4377966609809059e+01 + 25 1.8008123772533907e+01 -4.7255601865067156e+00 1.6011744232774660e+01 + 26 -1.3270414090792938e+01 -2.4692000422804888e+01 -5.6774111520305048e-01 + 27 -7.3472295182173077e+00 3.1133794558171346e+01 -1.2191686027733443e+01 + 28 2.2002916813161221e+01 -1.1345147346836630e+01 1.5336216642368582e+01 + 29 -1.4484026442375008e+01 -1.9880794776432037e+01 -3.1367163092441239e+00 +... diff --git a/unittest/force-styles/tests/mol-pair-mm3_switch3_coulgauss_table.yaml b/unittest/force-styles/tests/mol-pair-mm3_switch3_coulgauss_table.yaml new file mode 100644 index 0000000000..e1b11baa5d --- /dev/null +++ b/unittest/force-styles/tests/mol-pair-mm3_switch3_coulgauss_table.yaml @@ -0,0 +1,99 @@ +--- +lammps_version: 10 Mar 2021 +date_generated: Thu Apr 1 12:40:49 202 +epsilon: 5e-13 +prerequisites: ! | + atom full + pair mm3/switch3/coulgauss/long + kspace ewald +pre_commands: ! "" +post_commands: ! | + pair_modify mix arithmetic + pair_modify table 16 + kspace_style ewald 1.0e-6 + kspace_modify gewald 0.3 + kspace_modify compute no +input_file: in.fourmol +pair_style: mm3/switch3/coulgauss/long 8.0 2.0 +pair_coeff: ! | + 1 1 0.02 2.5 1.0 + 2 2 0.005 1.0 0.7 + 2 4 0.005 0.5 0.7 + 3 3 0.02 3.2 1.3 + 4 4 0.015 3.1 1.2 + 5 5 0.015 3.1 1.2 +extract: ! | + epsilon 2 + sigma 2 + gamma 2 + cut_coul 0 +natoms: 29 +init_vdwl: 38.1287498820824 +init_coul: 262.631410551483 +init_stress: ! |- + -9.1891422055344222e+01 -1.3287971490682878e+02 -3.2601696704317601e+02 3.0074184644070325e+01 -4.6650710964193243e+00 -8.2199034124021594e+01 +init_forces: ! |2 + 1 2.0409891887601410e+00 -1.8543276766039128e+01 -3.5869858368636784e+01 + 2 -1.8468129835801221e+01 -1.7027856421838862e+01 2.0713360489903284e+01 + 3 1.0001881406750512e+01 5.9235891391581845e+01 2.4372336084088403e+01 + 4 -4.5761624275299884e+00 -9.8945350885057237e-01 -3.3785799799517919e+00 + 5 -3.6934400978815565e+00 -4.0696597085993824e+00 3.8826789611765924e+00 + 6 7.6754813581654659e+01 -9.5808743568025008e+01 -9.3227047744836440e+01 + 7 -2.1177650577773125e+01 2.8793163867818368e+01 1.2529350475732382e+02 + 8 -2.1450096906263081e+01 1.0356391487008732e+01 -2.8955418913514073e+01 + 9 -8.2497921762950064e+00 -1.3077028158654645e+01 -3.6173489972491325e+01 + 10 -5.3511691030159355e+01 6.0900975401823587e+01 1.8391820698964121e+01 + 11 -1.3170241765068751e+00 -3.2364688471564778e+00 -4.4029421800959856e+00 + 12 2.5797191259942942e+01 -7.5496408222462352e-01 -2.6346170181534139e+00 + 13 3.3781783640778875e+00 -7.7635863919210357e-01 -6.1835202435311720e-01 + 14 -2.5357429751907436e-02 9.3547306506041328e-01 -4.9468892490621892e+00 + 15 4.2707741612200945e+00 4.7941151727292111e+00 -1.2015238312568339e+00 + 16 -3.6573745369001358e+01 1.8565540172135101e+01 1.1446966581907569e+02 + 17 4.3913383313135455e+01 -3.3849656059945403e+01 -9.5337593796166914e+01 + 18 2.6570103088653938e+00 6.2826342874977836e+00 -1.0356880920834588e+00 + 19 -2.6993402231458812e+00 -3.5969203390445723e+00 -6.8072401315458542e-01 + 20 2.3243806398348510e+00 1.6918060433951427e+00 1.0886287880838207e-01 + 21 8.8572291262962786e+00 1.1602893764611768e+01 -3.0057629738908702e+01 + 22 1.2429503818390431e+01 2.1605538409495715e+00 2.1808497451102578e+01 + 23 -2.1432718024616804e+01 -1.3678273926219282e+01 8.4081118535203938e+00 + 24 -3.9016919979164766e+00 2.9074424960765882e+01 -1.3996422102746218e+01 + 25 1.7462839220414320e+01 -4.6818055105547502e+00 1.5548837113535589e+01 + 26 -1.2984514969825625e+01 -2.4211627227692777e+01 -4.8885079054435532e-01 + 27 -7.1989694398744213e+00 3.0862600181437756e+01 -1.2113492591495778e+01 + 28 2.1728883036290242e+01 -1.1241488592261051e+01 1.5185682250007966e+01 + 29 -1.4356732743290538e+01 -1.9712882280516450e+01 -3.0642379500547996e+00 +run_vdwl: 37.735102831577 +run_coul: 262.634996567417 +run_stress: ! |- + -9.3272087816450096e+01 -1.3382216892660497e+02 -3.2672292496064199e+02 2.9759550012391575e+01 -4.9209020012813669e+00 -8.2642482482441096e+01 +run_forces: ! |2 + 1 2.0020633315697571e+00 -1.8597540312576371e+01 -3.5898847150887825e+01 + 2 -1.8527112685977595e+01 -1.7111767435468980e+01 2.0691356245503808e+01 + 3 1.0099461000123771e+01 5.9365749899001820e+01 2.4423492074447349e+01 + 4 -4.5756545930134305e+00 -9.8171217238369679e-01 -3.3833945796207656e+00 + 5 -3.6935769629718820e+00 -4.0701894718259650e+00 3.8892346120926988e+00 + 6 7.6571693742405060e+01 -9.5745009619986718e+01 -9.3149402824851791e+01 + 7 -2.1146520723115522e+01 2.8805359357005347e+01 1.2508940510400312e+02 + 8 -2.1038406658511651e+01 9.9856753020536395e+00 -2.8916677199745425e+01 + 9 -8.2725040661224440e+00 -1.3032515389877304e+01 -3.6169607187530971e+01 + 10 -5.3760826866916233e+01 6.1170224662661617e+01 1.8495907188455345e+01 + 11 -1.3253793686585611e+00 -3.2541579724226799e+00 -4.4355037885599886e+00 + 12 2.5785718921609639e+01 -7.4878876652861359e-01 -2.6134482478760357e+00 + 13 3.3829110641517599e+00 -7.7854300168776425e-01 -6.1471395974905052e-01 + 14 -4.1270221660368221e-02 9.3253524130353482e-01 -4.9663546372704301e+00 + 15 4.2930244204525003e+00 4.8016875903370053e+00 -1.2067983339497499e+00 + 16 -3.6783955303667234e+01 1.8760441796324653e+01 1.1514035663250905e+02 + 17 4.4141164796979076e+01 -3.4054759175778408e+01 -9.5996385613193283e+01 + 18 2.6593320216432965e+00 6.2866046080770897e+00 -1.0406402388907743e+00 + 19 -2.6868932719674365e+00 -3.5919446222505456e+00 -6.7199643833073341e-01 + 20 2.3122579672731871e+00 1.6848245740968735e+00 1.0223265461108680e-01 + 21 9.0047857933168434e+00 1.1657532538116142e+01 -3.0300251561127794e+01 + 22 1.2602721079420199e+01 2.2333285795234898e+00 2.1993413545558095e+01 + 23 -2.1752700027690018e+01 -1.3807397168507773e+01 8.4647725463156984e+00 + 24 -4.1597043845955195e+00 2.9600069115788433e+01 -1.4377967328816560e+01 + 25 1.8008122136440438e+01 -4.7255613901672264e+00 1.6011743726111732e+01 + 26 -1.3270411937489305e+01 -2.4691999045812377e+01 -5.6773953378636655e-01 + 27 -7.3472299042491755e+00 3.1133794605717583e+01 -1.2191686159483819e+01 + 28 2.2002914561082278e+01 -1.1345148097691201e+01 1.5336215539418586e+01 + 29 -1.4484023859861420e+01 -1.9880794227041598e+01 -3.1367150853552728e+00 +... diff --git a/unittest/force-styles/tests/mol-pair-morse.yaml b/unittest/force-styles/tests/mol-pair-morse.yaml index cf75cd6dbd..61a66d8ac5 100644 --- a/unittest/force-styles/tests/mol-pair-morse.yaml +++ b/unittest/force-styles/tests/mol-pair-morse.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:19 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:27:01 202 epsilon: 5e-14 prerequisites: ! | atom full @@ -9,17 +9,22 @@ pre_commands: ! "" post_commands: ! "" input_file: in.fourmol pair_style: morse 8.0 -pair_coeff: ! "1 1 0.0202798941614106 2.78203488021395 2.725417159299 \n1 2 0.0101167811264648 - 3.9793050302425 1.90749569018897 \n1 3 0.0202934330695928 2.43948720203264 3.10711749999622 - \n1 4 0.0175731334238374 2.48316585521317 3.05258880102438 \n1 5 0.0175731334238374 - 2.48316585521317 3.05258880102438 \n2 2 0.00503064360487288 6.98433077606902 1.08960295117864 - \n2 3 0.0101296013842819 3.31380153807866 2.28919067558352 \n2 4 0.00497405122588691 - 14.0508902925745 0.544416409093563 \n2 5 0.00877114211614446 3.39491256196178 2.23466262511073 - \n3 3 0.0203039874239943 2.17204344301477 3.48881895084762 \n3 4 0.0175825321440736 - 2.20660439192238 3.43428999287994 \n3 5 0.0175825321440736 2.20660439192238 3.43428999287994 - \n4 4 0.0152259201379927 2.24227873774009 3.37976131582396 \n4 5 0.0152259201379927 - 2.24227873774009 3.37976131582396 \n5 5 0.0152259201379927 2.24227873774009 3.37976131582396 - \n" +pair_coeff: ! | + 1 1 0.0202798941614106 2.78203488021395 2.725417159299 + 1 2 0.0101167811264648 3.9793050302425 1.90749569018897 + 1 3 0.0202934330695928 2.43948720203264 3.10711749999622 + 1 4 0.0175731334238374 2.48316585521317 3.05258880102438 + 1 5 0.0175731334238374 2.48316585521317 3.05258880102438 + 2 2 0.00503064360487288 6.98433077606902 1.08960295117864 + 2 3 0.0101296013842819 3.31380153807866 2.28919067558352 + 2 4 0.00497405122588691 14.0508902925745 0.544416409093563 + 2 5 0.00877114211614446 3.39491256196178 2.23466262511073 + 3 3 0.0203039874239943 2.17204344301477 3.48881895084762 + 3 4 0.0175825321440736 2.20660439192238 3.43428999287994 + 3 5 0.0175825321440736 2.20660439192238 3.43428999287994 + 4 4 0.0152259201379927 2.24227873774009 3.37976131582396 + 4 5 0.0152259201379927 2.24227873774009 3.37976131582396 + 5 5 0.0152259201379927 2.24227873774009 3.37976131582396 extract: ! | d0 2 r0 2 diff --git a/unittest/force-styles/tests/mol-pair-morse_smooth_linear.yaml b/unittest/force-styles/tests/mol-pair-morse_smooth_linear.yaml index e933b47a0b..86d749ba25 100644 --- a/unittest/force-styles/tests/mol-pair-morse_smooth_linear.yaml +++ b/unittest/force-styles/tests/mol-pair-morse_smooth_linear.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 24 Aug 2020 -date_generated: Tue Sep 15 09:44:19 202 +lammps_version: 10 Mar 2021 +date_generated: Fri Apr 2 15:27:01 202 epsilon: 5e-14 prerequisites: ! | atom full @@ -9,17 +9,22 @@ pre_commands: ! "" post_commands: ! "" input_file: in.fourmol pair_style: morse/smooth/linear 8.0 -pair_coeff: ! "1 1 0.0202798941614106 2.78203488021395 2.725417159299 \n1 2 0.0101167811264648 - 3.9793050302425 1.90749569018897 \n1 3 0.0202934330695928 2.43948720203264 3.10711749999622 - \n1 4 0.0175731334238374 2.48316585521317 3.05258880102438 \n1 5 0.0175731334238374 - 2.48316585521317 3.05258880102438 \n2 2 0.00503064360487288 6.98433077606902 1.08960295117864 - \n2 3 0.0101296013842819 3.31380153807866 2.28919067558352 \n2 4 0.00497405122588691 - 14.0508902925745 0.544416409093563 \n2 5 0.00877114211614446 3.39491256196178 2.23466262511073 - \n3 3 0.0203039874239943 2.17204344301477 3.48881895084762 \n3 4 0.0175825321440736 - 2.20660439192238 3.43428999287994 \n3 5 0.0175825321440736 2.20660439192238 3.43428999287994 - \n4 4 0.0152259201379927 2.24227873774009 3.37976131582396 \n4 5 0.0152259201379927 - 2.24227873774009 3.37976131582396 \n5 5 0.0152259201379927 2.24227873774009 3.37976131582396 - \n" +pair_coeff: ! | + 1 1 0.0202798941614106 2.78203488021395 2.725417159299 + 1 2 0.0101167811264648 3.9793050302425 1.90749569018897 + 1 3 0.0202934330695928 2.43948720203264 3.10711749999622 + 1 4 0.0175731334238374 2.48316585521317 3.05258880102438 + 1 5 0.0175731334238374 2.48316585521317 3.05258880102438 + 2 2 0.00503064360487288 6.98433077606902 1.08960295117864 + 2 3 0.0101296013842819 3.31380153807866 2.28919067558352 + 2 4 0.00497405122588691 14.0508902925745 0.544416409093563 + 2 5 0.00877114211614446 3.39491256196178 2.23466262511073 + 3 3 0.0203039874239943 2.17204344301477 3.48881895084762 + 3 4 0.0175825321440736 2.20660439192238 3.43428999287994 + 3 5 0.0175825321440736 2.20660439192238 3.43428999287994 + 4 4 0.0152259201379927 2.24227873774009 3.37976131582396 + 4 5 0.0152259201379927 2.24227873774009 3.37976131582396 + 5 5 0.0152259201379927 2.24227873774009 3.37976131582396 extract: ! | d0 2 r0 2 diff --git a/unittest/formats/compressed_dump_test.h b/unittest/formats/compressed_dump_test.h index c8afb2aac3..6bc26e123d 100644 --- a/unittest/formats/compressed_dump_test.h +++ b/unittest/formats/compressed_dump_test.h @@ -45,14 +45,14 @@ public: void enable_triclinic() { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("change_box all triclinic"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void generate_dump(std::string dump_file, std::string dump_modify_options, int ntimesteps) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id all {} 1 {}", dump_style, dump_file)); if (!dump_modify_options.empty()) { @@ -60,7 +60,7 @@ public: } command(fmt::format("run {}", ntimesteps)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void generate_text_and_compressed_dump(std::string text_file, std::string compressed_file, @@ -76,7 +76,7 @@ public: std::string text_modify_options, std::string compressed_modify_options, int ntimesteps) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id0 all {} 1 {} {}", dump_style, text_file, text_options)); command(fmt::format("dump id1 all {} 1 {} {}", compression_style, compressed_file, compressed_options)); @@ -89,17 +89,17 @@ public: } command(fmt::format("run {}", ntimesteps)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } std::string convert_compressed_to_text(std::string compressed_file) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); std::string converted_file = compressed_file.substr(0, compressed_file.find_last_of('.')); std::string cmdline = fmt::format("{} -d -c {} > {}", COMPRESS_BINARY, compressed_file, converted_file); system(cmdline.c_str()); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); return converted_file; } }; diff --git a/unittest/formats/test_atom_styles.cpp b/unittest/formats/test_atom_styles.cpp index 37d436a7a2..67ee9742e5 100644 --- a/unittest/formats/test_atom_styles.cpp +++ b/unittest/formats/test_atom_styles.cpp @@ -24,6 +24,7 @@ #include "utils.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -98,35 +99,24 @@ const double EPSILON = 5.0e-14; namespace LAMMPS_NS { using ::testing::Eq; -class AtomStyleTest : public ::testing::Test { +class AtomStyleTest : public LAMMPSTest { protected: - LAMMPS *lmp; - - // convenience... - void command(const std::string cmd) { lmp->input->one(cmd); } - void SetUp() override { - const char *args[] = {"SimpleCommandsTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "AtomStyleTest"; + LAMMPSTest::SetUp(); ASSERT_NE(lmp, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("units real"); command("dimension 3"); command("pair_style zero 4.0"); command("region box block -4 4 -4 4 -4 4"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void TearDown() override { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + LAMMPSTest::TearDown(); remove("test_atom_styles.data"); remove("input_atom_styles.data"); remove("test_atom_styles.restart"); @@ -504,17 +494,17 @@ TEST_F(AtomStyleTest, atomic_after_charge) expected.has_v = true; expected.has_f = true; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style charge"); command("atom_style atomic"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_ATOM_STATE_EQ(lmp->atom, expected); } TEST_F(AtomStyleTest, atomic) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_modify map hash"); command("create_box 2 box"); command("create_atoms 1 single -2.0 2.0 0.1"); @@ -524,7 +514,7 @@ TEST_F(AtomStyleTest, atomic) command("mass 1 4.0"); command("mass 2 2.4"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -542,7 +532,7 @@ TEST_F(AtomStyleTest, atomic) ASSERT_EQ(lmp->atom->map_style, Atom::MAP_HASH); ASSERT_EQ(lmp->atom->map_user, 2); ASSERT_EQ(lmp->atom->map_tag_max, 4); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("write_data test_atom_styles.data nocoeff"); command("clear"); @@ -551,7 +541,7 @@ TEST_F(AtomStyleTest, atomic) command("atom_modify map array"); command("units real"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 4); @@ -599,14 +589,14 @@ TEST_F(AtomStyleTest, atomic) ASSERT_EQ(lmp->atom->map_tag_max, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); command("write_restart test_atom_styles.restart"); command("clear"); command("read_restart test_atom_styles.restart"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 2); @@ -640,16 +630,16 @@ TEST_F(AtomStyleTest, atomic) ASSERT_EQ(lmp->atom->map_style, Atom::MAP_ARRAY); ASSERT_EQ(lmp->atom->map_user, 1); ASSERT_EQ(lmp->atom->map_tag_max, 3); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 2); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("comm_style tiled"); command("change_box all triclinic"); command("replicate 2 2 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 16); x = lmp->atom->x; tag = lmp->atom->tag; @@ -705,9 +695,9 @@ TEST_F(AtomStyleTest, atomic) TEST_F(AtomStyleTest, charge) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style charge"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "charge"; @@ -722,7 +712,7 @@ TEST_F(AtomStyleTest, charge) expected.q_flag = 1; ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 2 box"); command("create_atoms 1 single -2.0 2.0 0.1"); command("create_atoms 1 single -2.0 -2.0 -0.1"); @@ -735,7 +725,7 @@ TEST_F(AtomStyleTest, charge) command("set atom 3 charge -1.0"); command("set atom 4 charge 1.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("charge")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 4); @@ -748,7 +738,7 @@ TEST_F(AtomStyleTest, charge) ASSERT_NE(lmp->atom->mass, nullptr); ASSERT_NE(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("write_data test_atom_styles.data nocoeff"); command("clear"); @@ -757,7 +747,7 @@ TEST_F(AtomStyleTest, charge) command("units real"); command("atom_modify map array"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("charge")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 4); @@ -811,7 +801,7 @@ TEST_F(AtomStyleTest, charge) ASSERT_EQ(lmp->atom->mass_setflag[1], 1); ASSERT_EQ(lmp->atom->mass_setflag[2], 1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); @@ -819,7 +809,7 @@ TEST_F(AtomStyleTest, charge) command("clear"); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); command("read_restart test_atom_styles.restart"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("charge")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 2); @@ -855,11 +845,11 @@ TEST_F(AtomStyleTest, charge) ASSERT_EQ(lmp->atom->mass_setflag[1], 1); ASSERT_EQ(lmp->atom->mass_setflag[2], 1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); command("change_box all triclinic"); command("replicate 2 2 2 bbox"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 16); q = lmp->atom->q; EXPECT_NEAR(q[GETIDX(1)], -0.5, EPSILON); @@ -882,9 +872,9 @@ TEST_F(AtomStyleTest, charge) TEST_F(AtomStyleTest, sphere) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style sphere"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "sphere"; @@ -904,7 +894,7 @@ TEST_F(AtomStyleTest, sphere) ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 2 box"); command("create_atoms 1 single -2.0 2.0 0.1"); command("create_atoms 1 single -2.0 -2.0 -0.1"); @@ -919,7 +909,7 @@ TEST_F(AtomStyleTest, sphere) command("set atom 3 omega -1.0 0.0 0.0"); command("set atom 4 omega 0.0 1.0 0.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("sphere")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 4); @@ -933,7 +923,7 @@ TEST_F(AtomStyleTest, sphere) ASSERT_EQ(lmp->atom->mass, nullptr); ASSERT_EQ(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("write_data test_atom_styles.data nocoeff"); command("clear"); @@ -942,7 +932,7 @@ TEST_F(AtomStyleTest, sphere) command("units real"); command("atom_modify map array"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("sphere")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 4); @@ -1006,7 +996,7 @@ TEST_F(AtomStyleTest, sphere) EXPECT_NEAR(omega[GETIDX(4)][1], 1.0, EPSILON); EXPECT_NEAR(omega[GETIDX(4)][2], 0.0, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); @@ -1016,7 +1006,7 @@ TEST_F(AtomStyleTest, sphere) command("read_restart test_atom_styles.restart"); command("replicate 1 1 2"); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("sphere")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 4); @@ -1053,9 +1043,9 @@ TEST_F(AtomStyleTest, ellipsoid) { if (!LAMMPS::is_installed_pkg("ASPHERE")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style ellipsoid"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "ellipsoid"; @@ -1074,7 +1064,7 @@ TEST_F(AtomStyleTest, ellipsoid) ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 3 box"); command("create_atoms 1 single -2.0 2.0 0.1"); command("create_atoms 1 single -2.0 -2.0 -0.1"); @@ -1092,7 +1082,7 @@ TEST_F(AtomStyleTest, ellipsoid) command("set atom 3 quat 1.0 0.0 1.0 30.0"); command("set atom 4 quat 1.0 1.0 1.0 60.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("ellipsoid")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -1120,7 +1110,7 @@ TEST_F(AtomStyleTest, ellipsoid) ASSERT_NE(lmp->atom->ellipsoid, nullptr); ASSERT_EQ(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data nocoeff"); command("clear"); command("atom_style ellipsoid"); @@ -1129,7 +1119,7 @@ TEST_F(AtomStyleTest, ellipsoid) command("atom_modify map array"); command("read_data test_atom_styles.data"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("ellipsoid")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -1239,7 +1229,7 @@ TEST_F(AtomStyleTest, ellipsoid) EXPECT_NEAR(bonus[3].quat[2], sqrt(5.0 / 30.0), EPSILON); EXPECT_NEAR(bonus[3].quat[3], sqrt(5.0 / 30.0), EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group two id 2:4:2"); command("delete_atoms group two compress no"); command("write_restart test_atom_styles.restart"); @@ -1247,7 +1237,7 @@ TEST_F(AtomStyleTest, ellipsoid) command("read_restart test_atom_styles.restart"); command("comm_style tiled"); command("replicate 1 1 2 bbox"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("ellipsoid")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 8); @@ -1320,9 +1310,9 @@ TEST_F(AtomStyleTest, ellipsoid) EXPECT_NEAR(bonus[3].quat[2], 0.0, EPSILON); EXPECT_NEAR(bonus[3].quat[3], 0.25056280708573159, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nellipsoids, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -1390,10 +1380,10 @@ TEST_F(AtomStyleTest, line) { if (!LAMMPS::is_installed_pkg("ASPHERE")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("dimension 2"); command("atom_style line"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "line"; @@ -1415,7 +1405,7 @@ TEST_F(AtomStyleTest, line) ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 3 box"); command("create_atoms 1 single -2.0 2.0 0.0"); command("create_atoms 1 single -2.0 -2.0 0.0"); @@ -1433,7 +1423,7 @@ TEST_F(AtomStyleTest, line) command("set atom 3 theta 30.0"); command("set atom 4 theta 60.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("line")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -1449,7 +1439,7 @@ TEST_F(AtomStyleTest, line) ASSERT_NE(lmp->atom->rmass, nullptr); ASSERT_EQ(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data nocoeff"); command("clear"); command("dimension 2"); @@ -1458,7 +1448,7 @@ TEST_F(AtomStyleTest, line) command("units real"); command("atom_modify map array"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("line")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -1548,7 +1538,7 @@ TEST_F(AtomStyleTest, line) EXPECT_NEAR(bonus[3].length, 3.0, EPSILON); EXPECT_NEAR(bonus[3].theta, MathConst::MY_PI / 3.0, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); @@ -1558,7 +1548,7 @@ TEST_F(AtomStyleTest, line) command("comm_style tiled"); command("change_box all triclinic"); command("replicate 1 2 1 bbox"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("line")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 8); @@ -1611,9 +1601,9 @@ TEST_F(AtomStyleTest, line) EXPECT_NEAR(bonus[3].length, 3.0, EPSILON); EXPECT_NEAR(bonus[3].theta, MathConst::MY_PI / 6.0, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nlines, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -1661,9 +1651,9 @@ TEST_F(AtomStyleTest, tri) { if (!LAMMPS::is_installed_pkg("ASPHERE")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style tri"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "tri"; @@ -1686,7 +1676,7 @@ TEST_F(AtomStyleTest, tri) ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 3 box"); command("create_atoms 1 single -2.0 2.0 0.1"); command("create_atoms 1 single -2.0 -2.0 -0.1"); @@ -1704,7 +1694,7 @@ TEST_F(AtomStyleTest, tri) command("set atom 3 quat 1.0 0.0 1.0 30.0"); command("set atom 4 quat 1.0 1.0 1.0 60.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("tri")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -1732,7 +1722,7 @@ TEST_F(AtomStyleTest, tri) ASSERT_NE(lmp->atom->tri, nullptr); ASSERT_EQ(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data nocoeff"); command("clear"); command("atom_style tri"); @@ -1741,7 +1731,7 @@ TEST_F(AtomStyleTest, tri) command("atom_modify map array"); command("read_data test_atom_styles.data"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("tri")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -1894,7 +1884,7 @@ TEST_F(AtomStyleTest, tri) EXPECT_NEAR(bonus[3].c3[1], 0.64304946932374796, EPSILON); EXPECT_NEAR(bonus[3].c3[2], -0.32808266428854477, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group two id 2:4:2"); command("delete_atoms group two compress no"); command("write_restart test_atom_styles.restart"); @@ -1902,7 +1892,7 @@ TEST_F(AtomStyleTest, tri) command("read_restart test_atom_styles.restart"); command("change_box all triclinic"); command("replicate 1 1 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("tri")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 8); @@ -2020,9 +2010,9 @@ TEST_F(AtomStyleTest, tri) EXPECT_NEAR(bonus[3].c3[1], 0.85047049833171351, EPSILON); EXPECT_NEAR(bonus[3].c3[2], -0.15731490073748589, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->ntris, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -2065,9 +2055,9 @@ TEST_F(AtomStyleTest, body_nparticle) { if (!LAMMPS::is_installed_pkg("BODY")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style body nparticle 2 4"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "body"; @@ -2130,7 +2120,7 @@ TEST_F(AtomStyleTest, body_nparticle) FILE *fp = fopen("input_atom_styles.data", "w"); fputs(data_file, fp); fclose(fp); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_modify map array"); command("read_data input_atom_styles.data"); command("create_atoms 3 single 2.0 2.0 -2.1"); @@ -2141,7 +2131,7 @@ TEST_F(AtomStyleTest, body_nparticle) command("set atom 3 quat 1.0 0.0 1.0 30.0"); command("set atom 4 quat 1.0 1.0 1.0 60.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("body")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -2307,7 +2297,7 @@ TEST_F(AtomStyleTest, body_nparticle) ASSERT_NE(bonus[2].dvalue, nullptr); ASSERT_NE(bonus[3].dvalue, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data nocoeff"); command("clear"); command("atom_style body nparticle 2 4"); @@ -2316,7 +2306,7 @@ TEST_F(AtomStyleTest, body_nparticle) command("atom_modify map array"); command("read_data test_atom_styles.data"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("body")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -2480,7 +2470,7 @@ TEST_F(AtomStyleTest, body_nparticle) ASSERT_NE(bonus[2].dvalue, nullptr); ASSERT_NE(bonus[3].dvalue, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group two id 2:4:2"); command("delete_atoms group two compress no"); command("write_restart test_atom_styles.restart"); @@ -2488,7 +2478,7 @@ TEST_F(AtomStyleTest, body_nparticle) command("read_restart test_atom_styles.restart"); command("comm_style tiled"); command("replicate 1 1 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("body")); avec = (AtomVecBody *)lmp->atom->avec; ASSERT_THAT(std::string(avec->bptr->style), Eq("nparticle")); @@ -2595,9 +2585,9 @@ TEST_F(AtomStyleTest, body_nparticle) ASSERT_NE(bonus[2].dvalue, nullptr); ASSERT_NE(bonus[3].dvalue, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nbodies, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -2633,11 +2623,11 @@ TEST_F(AtomStyleTest, template) { if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP(); create_molecule_files(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); command("atom_style template twomols"); command("newton on"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "template"; @@ -2659,7 +2649,7 @@ TEST_F(AtomStyleTest, template) ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 4 box bond/types 2 angle/types 2 "); command("create_atoms 0 single -2.0 2.0 0.1 mol twomols 65234"); command("create_atoms 0 single -2.0 -2.0 -0.1 mol twomols 62346"); @@ -2677,7 +2667,7 @@ TEST_F(AtomStyleTest, template) command("angle_style zero"); command("angle_coeff * 109.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("template")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 12); @@ -2707,7 +2697,7 @@ TEST_F(AtomStyleTest, template) ASSERT_NE(lmp->atom->mass, nullptr); ASSERT_NE(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data"); command("clear"); command("units real"); @@ -2719,7 +2709,7 @@ TEST_F(AtomStyleTest, template) command("angle_style zero"); command("atom_modify map array"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("template")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -2781,7 +2771,7 @@ TEST_F(AtomStyleTest, template) ASSERT_EQ(molatom[GETIDX(11)], -1); ASSERT_EQ(molatom[GETIDX(12)], -1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("clear"); command("units real"); command("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); @@ -2791,7 +2781,7 @@ TEST_F(AtomStyleTest, template) command("angle_style zero"); command("atom_modify map array"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("template")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -2903,7 +2893,7 @@ TEST_F(AtomStyleTest, template) ASSERT_EQ(type[GETIDX(11)], 3); ASSERT_EQ(type[GETIDX(12)], 4); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group two id 7:10"); command("delete_atoms group two compress no"); command("write_restart test_atom_styles.restart"); @@ -2911,7 +2901,7 @@ TEST_F(AtomStyleTest, template) command("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); command("read_restart test_atom_styles.restart"); command("replicate 1 1 2 bbox"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("template")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 16); @@ -2981,9 +2971,9 @@ TEST_F(AtomStyleTest, template) ASSERT_EQ(molatom[GETIDX(23)], -1); ASSERT_EQ(molatom[GETIDX(24)], -1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 16); @@ -3029,11 +3019,11 @@ TEST_F(AtomStyleTest, template_charge) { if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP(); create_molecule_files(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); command("atom_style hybrid template twomols charge"); command("newton on"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "hybrid"; @@ -3064,7 +3054,7 @@ TEST_F(AtomStyleTest, template_charge) ASSERT_NE(hybrid->styles[0], nullptr); ASSERT_NE(hybrid->styles[1], nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 4 box bond/types 2 angle/types 2 "); command("create_atoms 0 single -2.0 2.0 0.1 mol twomols 65234"); command("create_atoms 0 single -2.0 -2.0 -0.1 mol twomols 62346"); @@ -3085,7 +3075,7 @@ TEST_F(AtomStyleTest, template_charge) command("angle_style zero"); command("angle_coeff * 109.0"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_NE(lmp->atom->avec, nullptr); hybrid = (AtomVecHybrid *)lmp->atom->avec; ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid")); @@ -3123,7 +3113,7 @@ TEST_F(AtomStyleTest, template_charge) ASSERT_NE(lmp->atom->mass, nullptr); ASSERT_NE(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data"); command("clear"); command("units real"); @@ -3135,7 +3125,7 @@ TEST_F(AtomStyleTest, template_charge) command("angle_style zero"); command("atom_modify map array"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -3197,7 +3187,7 @@ TEST_F(AtomStyleTest, template_charge) ASSERT_EQ(molatom[GETIDX(11)], -1); ASSERT_EQ(molatom[GETIDX(12)], -1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("clear"); command("units real"); command("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); @@ -3207,7 +3197,7 @@ TEST_F(AtomStyleTest, template_charge) command("angle_style zero"); command("atom_modify map array"); command("read_data test_atom_styles.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -3332,7 +3322,7 @@ TEST_F(AtomStyleTest, template_charge) ASSERT_EQ(type[GETIDX(11)], 3); ASSERT_EQ(type[GETIDX(12)], 4); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("group two id 7:10"); command("delete_atoms group two compress no"); command("write_restart test_atom_styles.restart"); @@ -3340,7 +3330,7 @@ TEST_F(AtomStyleTest, template_charge) command("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); command("read_restart test_atom_styles.restart"); command("replicate 1 1 2 bbox"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 16); @@ -3410,9 +3400,9 @@ TEST_F(AtomStyleTest, template_charge) ASSERT_EQ(molatom[GETIDX(23)], -1); ASSERT_EQ(molatom[GETIDX(24)], -1); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 16); @@ -3458,10 +3448,10 @@ TEST_F(AtomStyleTest, bond) { if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style bond"); command("newton on"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "bond"; @@ -3481,7 +3471,7 @@ TEST_F(AtomStyleTest, bond) ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 3 box bond/types 2 " "extra/bond/per/atom 2 extra/special/per/atom 4"); command("create_atoms 1 single -2.0 2.0 0.1"); @@ -3501,7 +3491,7 @@ TEST_F(AtomStyleTest, bond) command("create_bonds single/bond 2 3 5"); command("create_bonds single/bond 2 3 6"); command("create_bonds single/bond 2 5 6"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("bond")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -3534,7 +3524,7 @@ TEST_F(AtomStyleTest, bond) lmp->atom->bond_type[GETIDX(1)][0] *= -1; lmp->atom->bond_type[GETIDX(5)][0] *= -1; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data nocoeff"); command("clear"); command("units real"); @@ -3546,7 +3536,7 @@ TEST_F(AtomStyleTest, bond) command("read_data test_atom_styles.data"); command("pair_coeff * *"); command("bond_coeff * 4.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("bond")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -3595,7 +3585,7 @@ TEST_F(AtomStyleTest, bond) ASSERT_EQ(bond_atom[GETIDX(6)][0], 3); ASSERT_EQ(bond_atom[GETIDX(6)][1], 5); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("clear"); command("units real"); command("atom_style bond"); @@ -3605,7 +3595,7 @@ TEST_F(AtomStyleTest, bond) command("read_data test_atom_styles.data"); command("pair_coeff * *"); command("bond_coeff * 4.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("bond")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -3693,7 +3683,7 @@ TEST_F(AtomStyleTest, bond) lmp->atom->bond_type[GETIDX(1)][0] *= -1; lmp->atom->bond_type[GETIDX(5)][0] *= -1; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); @@ -3701,7 +3691,7 @@ TEST_F(AtomStyleTest, bond) command("clear"); command("read_restart test_atom_styles.restart"); command("replicate 1 1 2 bbox"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("bond")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 8); @@ -3755,10 +3745,10 @@ TEST_F(AtomStyleTest, bond) ASSERT_EQ(bond_type[GETIDX(9)][1], 2); ASSERT_EQ(bond_type[GETIDX(11)][0], 2); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("delete_bonds all bond 2"); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -3806,10 +3796,10 @@ TEST_F(AtomStyleTest, angle) { if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style angle"); command("newton on"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "angle"; @@ -3830,7 +3820,7 @@ TEST_F(AtomStyleTest, angle) ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 3 box bond/types 2 angle/types 2 " "extra/bond/per/atom 2 extra/angle/per/atom 1 " "extra/special/per/atom 4"); @@ -3855,7 +3845,7 @@ TEST_F(AtomStyleTest, angle) command("create_bonds single/bond 2 5 6"); command("create_bonds single/angle 1 1 3 5"); command("create_bonds single/angle 2 3 5 6"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("angle")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -3890,7 +3880,7 @@ TEST_F(AtomStyleTest, angle) lmp->atom->angle_type[GETIDX(3)][0] *= -1; lmp->atom->angle_type[GETIDX(5)][0] *= -1; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data nocoeff"); command("clear"); command("units real"); @@ -3904,7 +3894,7 @@ TEST_F(AtomStyleTest, angle) command("pair_coeff * *"); command("bond_coeff * 4.0"); command("angle_coeff * 90.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("angle")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -3988,7 +3978,7 @@ TEST_F(AtomStyleTest, angle) ASSERT_EQ(angle_atom2[GETIDX(6)][0], 5); ASSERT_EQ(angle_atom3[GETIDX(6)][0], 6); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("clear"); command("units real"); command("atom_style angle"); @@ -3998,7 +3988,7 @@ TEST_F(AtomStyleTest, angle) command("read_data test_atom_styles.data"); command("pair_coeff * *"); command("bond_coeff * 4.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("angle")); ASSERT_NE(lmp->atom->avec, nullptr); @@ -4087,7 +4077,7 @@ TEST_F(AtomStyleTest, angle) ASSERT_EQ(angle_type[GETIDX(3)][0], 1); ASSERT_EQ(angle_type[GETIDX(5)][0], 2); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); @@ -4095,7 +4085,7 @@ TEST_F(AtomStyleTest, angle) command("clear"); command("read_restart test_atom_styles.restart"); command("replicate 1 1 2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("angle")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 8); @@ -4132,10 +4122,10 @@ TEST_F(AtomStyleTest, angle) ASSERT_EQ(angle_type[GETIDX(9)][0], 1); ASSERT_EQ(angle_type[GETIDX(11)][0], 2); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("delete_bonds all angle 2"); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -4167,9 +4157,9 @@ TEST_F(AtomStyleTest, full_ellipsoid) if (!LAMMPS::is_installed_pkg("ASPHERE")) GTEST_SKIP(); if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_style hybrid full ellipsoid"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "hybrid"; @@ -4205,7 +4195,7 @@ TEST_F(AtomStyleTest, full_ellipsoid) ASSERT_NE(hybrid->styles[0], nullptr); ASSERT_NE(hybrid->styles[1], nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 3 box bond/types 2 " "extra/bond/per/atom 2 extra/special/per/atom 4"); command("create_atoms 1 single -2.0 2.0 0.1"); @@ -4240,7 +4230,7 @@ TEST_F(AtomStyleTest, full_ellipsoid) command("create_bonds single/bond 2 3 5"); command("create_bonds single/bond 2 3 6"); command("create_bonds single/bond 2 5 6"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 6); @@ -4270,7 +4260,7 @@ TEST_F(AtomStyleTest, full_ellipsoid) ASSERT_NE(lmp->atom->ellipsoid, nullptr); ASSERT_NE(lmp->atom->mass_setflag, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("write_data test_atom_styles.data nocoeff"); command("clear"); command("units real"); @@ -4281,7 +4271,7 @@ TEST_F(AtomStyleTest, full_ellipsoid) command("read_data test_atom_styles.data"); command("pair_coeff * *"); command("bond_coeff * 4.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid")); ASSERT_NE(lmp->atom->avec, nullptr); hybrid = (AtomVecHybrid *)lmp->atom->avec; @@ -4406,7 +4396,7 @@ TEST_F(AtomStyleTest, full_ellipsoid) EXPECT_NEAR(bonus[3].quat[2], sqrt(5.0 / 30.0), EPSILON); EXPECT_NEAR(bonus[3].quat[3], sqrt(5.0 / 30.0), EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); @@ -4414,7 +4404,7 @@ TEST_F(AtomStyleTest, full_ellipsoid) command("clear"); command("read_restart test_atom_styles.restart"); command("replicate 1 1 2 bbox"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("hybrid")); hybrid = (AtomVecHybrid *)lmp->atom->avec; ASSERT_EQ(hybrid->nstyles, 2); @@ -4493,9 +4483,9 @@ TEST_F(AtomStyleTest, full_ellipsoid) EXPECT_NEAR(bonus[3].quat[2], 0.0, EPSILON); EXPECT_NEAR(bonus[3].quat[3], 0.25056280708573159, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->nellipsoids, 4); ASSERT_EQ(lmp->atom->tag_consecutive(), 1); ASSERT_EQ(lmp->atom->map_tag_max, 8); @@ -4562,10 +4552,10 @@ TEST_F(AtomStyleTest, full_ellipsoid) TEST_F(AtomStyleTest, property_atom) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("atom_modify map array"); command("fix Properties all property/atom i_one d_two mol d_three q rmass ghost yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); AtomState expected; expected.atom_style = "atomic"; @@ -4597,7 +4587,7 @@ TEST_F(AtomStyleTest, property_atom) expected.nextra_border_max = 1; ASSERT_ATOM_STATE_EQ(lmp->atom, expected); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("create_box 2 box"); command("create_atoms 1 single -2.0 2.0 0.1"); command("create_atoms 1 single -2.0 -2.0 -0.1"); @@ -4624,7 +4614,7 @@ TEST_F(AtomStyleTest, property_atom) command("set atom 3 d_three 0.5"); command("set atom 4 d_three 2.0"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); expected.natoms = 4; expected.nlocal = 4; expected.map_tag_max = 4; @@ -4638,7 +4628,7 @@ TEST_F(AtomStyleTest, property_atom) ASSERT_NE(lmp->atom->nmax, -1); ASSERT_NE(lmp->atom->rmass, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("write_data test_atom_styles.data nocoeff"); command("clear"); @@ -4649,7 +4639,7 @@ TEST_F(AtomStyleTest, property_atom) command("fix props all property/atom i_one d_two mol d_three q rmass ghost yes"); command("read_data test_atom_styles.data fix props NULL Properties"); command("pair_coeff * *"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); ASSERT_NE(lmp->atom->avec, nullptr); ASSERT_EQ(lmp->atom->natoms, 4); @@ -4727,7 +4717,7 @@ TEST_F(AtomStyleTest, property_atom) EXPECT_NEAR(three[GETIDX(3)], 0.5, EPSILON); EXPECT_NEAR(three[GETIDX(4)], 2.0, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("pair_coeff * *"); command("group two id 2:4:2"); command("delete_atoms group two compress no"); @@ -4736,7 +4726,7 @@ TEST_F(AtomStyleTest, property_atom) ASSERT_THAT(std::string(lmp->atom->atom_style), Eq("atomic")); command("read_restart test_atom_styles.restart"); command("fix props all property/atom i_one d_two mol d_three q rmass ghost yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); expected.natoms = 2; expected.nlocal = 2; expected.nghost = 0; @@ -4774,10 +4764,10 @@ TEST_F(AtomStyleTest, property_atom) EXPECT_NEAR(three[GETIDX(1)], -2.5, EPSILON); EXPECT_NEAR(three[GETIDX(3)], 0.5, EPSILON); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("reset_atom_ids"); command("change_box all triclinic"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_EQ(lmp->atom->map_tag_max, 2); q = lmp->atom->q; EXPECT_NEAR(q[GETIDX(1)], -0.5, EPSILON); diff --git a/unittest/formats/test_dump_atom.cpp b/unittest/formats/test_dump_atom.cpp index 39cefdccea..46c6b7dfa7 100644 --- a/unittest/formats/test_dump_atom.cpp +++ b/unittest/formats/test_dump_atom.cpp @@ -32,14 +32,14 @@ class DumpAtomTest : public MeltTest { public: void enable_triclinic() { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("change_box all triclinic"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void generate_dump(std::string dump_file, std::string dump_modify_options, int ntimesteps) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id all {} 1 {}", dump_style, dump_file)); if (!dump_modify_options.empty()) { @@ -47,13 +47,13 @@ public: } command(fmt::format("run {}", ntimesteps)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void generate_text_and_binary_dump(std::string text_file, std::string binary_file, std::string dump_modify_options, int ntimesteps) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id0 all {} 1 {}", dump_style, text_file)); command(fmt::format("dump id1 all {} 1 {}", dump_style, binary_file)); @@ -63,15 +63,15 @@ public: } command(fmt::format("run {}", ntimesteps)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } std::string convert_binary_to_text(std::string binary_file) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); std::string cmdline = fmt::format("{} {}", BINARY2TXT_BINARY, binary_file); system(cmdline.c_str()); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); return fmt::format("{}.txt", binary_file); } }; @@ -504,27 +504,27 @@ TEST_F(DumpAtomTest, per_processor_multi_file_run1) TEST_F(DumpAtomTest, dump_modify_scale_invalid) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("dump id all atom 1 dump.txt"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*Illegal dump_modify command.*", command("dump_modify id scale true");); } TEST_F(DumpAtomTest, dump_modify_image_invalid) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("dump id all atom 1 dump.txt"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*Illegal dump_modify command.*", command("dump_modify id image true");); } TEST_F(DumpAtomTest, dump_modify_invalid) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("dump id all atom 1 dump.txt"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*Illegal dump_modify command.*", command("dump_modify id true");); } @@ -534,12 +534,12 @@ TEST_F(DumpAtomTest, write_dump) auto reference = "dump_ref_run0.melt"; auto dump_file = "write_dump_atom_run0.melt"; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id all atom 1 {}", reference)); command("dump_modify id scale no units yes"); command("run 0"); command("write_dump all atom write_dump_atom_run*.melt modify scale no units yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_FILE_EXISTS(reference); ASSERT_FILE_EXISTS(dump_file); @@ -556,12 +556,12 @@ TEST_F(DumpAtomTest, binary_write_dump) auto reference = "dump_run0.melt.bin"; auto dump_file = "write_dump_atom_run0_p0.melt.bin"; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id all atom 1 {}", reference)); command("dump_modify id scale no units yes"); command("run 0"); command("write_dump all atom write_dump_atom_run*_p%.melt.bin modify scale no units yes"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); ASSERT_FILE_EXISTS(reference); ASSERT_FILE_EXISTS(dump_file); diff --git a/unittest/formats/test_dump_atom_compressed.cpp b/unittest/formats/test_dump_atom_compressed.cpp index ed591184c3..5a519e06a1 100644 --- a/unittest/formats/test_dump_atom_compressed.cpp +++ b/unittest/formats/test_dump_atom_compressed.cpp @@ -340,9 +340,9 @@ TEST_F(DumpAtomCompressTest, compressed_modify_bad_param) { if (compression_style != "atom/gz") GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {}", compression_style, compressed_dump_filename("modify_bad_param_run0_*.melt"))); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 compression_level 12"); @@ -353,9 +353,9 @@ TEST_F(DumpAtomCompressTest, compressed_modify_multi_bad_param) { if (compression_style != "atom/gz") GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {}", compression_style, compressed_dump_filename("modify_multi_bad_param_run0_*.melt"))); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 pad 3 compression_level 12"); diff --git a/unittest/formats/test_dump_cfg.cpp b/unittest/formats/test_dump_cfg.cpp index 327a9caca7..b8f879de6f 100644 --- a/unittest/formats/test_dump_cfg.cpp +++ b/unittest/formats/test_dump_cfg.cpp @@ -30,7 +30,7 @@ public: void generate_dump(std::string dump_file, std::string fields, std::string dump_modify_options, int ntimesteps) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id all {} 1 {} {}", dump_style, dump_file, fields)); if (!dump_modify_options.empty()) { @@ -38,7 +38,7 @@ public: } command(fmt::format("run {}", ntimesteps)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } }; @@ -54,9 +54,9 @@ TEST_F(DumpCfgTest, require_multifile) auto fields = "mass type xs ys zs id proc procp1 x y z ix iy iz xu yu zu xsu ysu zsu vx vy vz fx fy fz"; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id all cfg 1 {} {}", dump_file, fields)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*Dump cfg requires one snapshot per file.*", command("run 0");); } diff --git a/unittest/formats/test_dump_cfg_compressed.cpp b/unittest/formats/test_dump_cfg_compressed.cpp index 834a71db70..20f902091b 100644 --- a/unittest/formats/test_dump_cfg_compressed.cpp +++ b/unittest/formats/test_dump_cfg_compressed.cpp @@ -230,9 +230,9 @@ TEST_F(DumpCfgCompressTest, compressed_modify_bad_param) if (compression_style != "cfg/gz") GTEST_SKIP(); auto fields = "mass type xs ys zs id proc procp1 x y z ix iy iz vx vy vz fx fy fz"; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {} {}", compression_style, compressed_dump_filename("modify_bad_param_run0_*.melt.cfg"), fields)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 compression_level 12"); @@ -244,9 +244,9 @@ TEST_F(DumpCfgCompressTest, compressed_modify_multi_bad_param) if (compression_style != "cfg/gz") GTEST_SKIP(); auto fields = "mass type xs ys zs id proc procp1 x y z ix iy iz vx vy vz fx fy fz"; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {} {}", compression_style, compressed_dump_filename("modify_multi_bad_param_run0_*.melt.cfg"), fields)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 pad 3 compression_level 12"); diff --git a/unittest/formats/test_dump_custom.cpp b/unittest/formats/test_dump_custom.cpp index f2d7935426..b90d77e966 100644 --- a/unittest/formats/test_dump_custom.cpp +++ b/unittest/formats/test_dump_custom.cpp @@ -30,15 +30,15 @@ class DumpCustomTest : public MeltTest { public: void enable_triclinic() { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("change_box all triclinic"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void generate_dump(std::string dump_file, std::string fields, std::string dump_modify_options, int ntimesteps) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id all {} 1 {} {}", dump_style, dump_file, fields)); if (!dump_modify_options.empty()) { @@ -46,14 +46,14 @@ public: } command(fmt::format("run {}", ntimesteps)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } void generate_text_and_binary_dump(std::string text_file, std::string binary_file, std::string fields, std::string dump_modify_options, int ntimesteps) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id0 all {} 1 {} {}", dump_style, text_file, fields)); command(fmt::format("dump id1 all {} 1 {} {}", dump_style, binary_file, fields)); @@ -63,15 +63,15 @@ public: } command(fmt::format("run {}", ntimesteps)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } std::string convert_binary_to_text(std::string binary_file) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); std::string cmdline = fmt::format("{} {}", BINARY2TXT_BINARY, binary_file); system(cmdline.c_str()); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); return fmt::format("{}.txt", binary_file); } }; @@ -113,9 +113,9 @@ TEST_F(DumpCustomTest, thresh_run0) TEST_F(DumpCustomTest, compute_run0) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("compute comp all property/atom x y z"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto dump_file = "dump_custom_compute_run0.melt"; auto fields = "id type x y z c_comp[1] c_comp[2] c_comp[3]"; @@ -134,9 +134,9 @@ TEST_F(DumpCustomTest, compute_run0) TEST_F(DumpCustomTest, fix_run0) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("fix numdiff all numdiff 1 0.0001"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto dump_file = "dump_custom_compute_run0.melt"; auto fields = "id x y z f_numdiff[1] f_numdiff[2] f_numdiff[3]"; @@ -155,10 +155,10 @@ TEST_F(DumpCustomTest, fix_run0) TEST_F(DumpCustomTest, custom_run0) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("fix prop all property/atom i_flag1 d_flag2"); command("compute 1 all property/atom i_flag1 d_flag2"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto dump_file = "dump_custom_custom_run0.melt"; auto fields = "id x y z i_flag1 d_flag2"; @@ -242,10 +242,10 @@ TEST_F(DumpCustomTest, binary_triclinic_run1) TEST_F(DumpCustomTest, with_variable_run1) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("compute 1 all property/atom proc"); command("variable p atom (c_1%10)+1"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto dump_file = "dump_custom_with_variable_run1.melt"; auto fields = "id type x y z v_p"; diff --git a/unittest/formats/test_dump_local_compressed.cpp b/unittest/formats/test_dump_local_compressed.cpp index 20f90984a1..95656071fc 100644 --- a/unittest/formats/test_dump_local_compressed.cpp +++ b/unittest/formats/test_dump_local_compressed.cpp @@ -31,9 +31,9 @@ public: void SetUp() override { CompressedDumpTest::SetUp(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command("compute comp all pair/local dist eng"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); } }; @@ -205,9 +205,9 @@ TEST_F(DumpLocalCompressTest, compressed_modify_bad_param) auto fields = "index c_comp[1]"; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {} {}", compression_style, compressed_dump_filename("modify_bad_param_run0_*.melt.local"), fields)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 compression_level 12"); @@ -220,9 +220,9 @@ TEST_F(DumpLocalCompressTest, compressed_modify_multi_bad_param) auto fields = "index c_comp[1]"; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {} {}", compression_style, compressed_dump_filename("modify_multi_bad_param_run0_*.melt.local"), fields)); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 pad 3 compression_level 12"); diff --git a/unittest/formats/test_dump_xyz_compressed.cpp b/unittest/formats/test_dump_xyz_compressed.cpp index f80201872c..dad7911b4c 100644 --- a/unittest/formats/test_dump_xyz_compressed.cpp +++ b/unittest/formats/test_dump_xyz_compressed.cpp @@ -191,9 +191,9 @@ TEST_F(DumpXYZCompressTest, compressed_modify_bad_param) { if (compression_style != "xyz/gz") GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {}", compression_style, compressed_dump_filename("modify_bad_param_run0_*.melt.xyz"))); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 compression_level 12"); @@ -204,9 +204,9 @@ TEST_F(DumpXYZCompressTest, compressed_modify_multi_bad_param) { if (compression_style != "xyz/gz") GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); command(fmt::format("dump id1 all {} 1 {}", compression_style, compressed_dump_filename("modify_multi_bad_param_run0_*.melt.xyz"))); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR: Illegal dump_modify command: compression level must in the range of.*", command("dump_modify id1 pad 3 compression_level 12"); diff --git a/unittest/formats/test_eim_potential_file_reader.cpp b/unittest/formats/test_eim_potential_file_reader.cpp index 9992fb8662..26f2795a85 100644 --- a/unittest/formats/test_eim_potential_file_reader.cpp +++ b/unittest/formats/test_eim_potential_file_reader.cpp @@ -18,6 +18,7 @@ #include "utils.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -28,28 +29,23 @@ using utils::split_words; // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -class EIMPotentialFileReaderTest : public ::testing::Test { +class EIMPotentialFileReaderTest : public LAMMPSTest { protected: - LAMMPS *lmp; PairEIM::Setfl setfl; static const int nelements = 9; void SetUp() override { - const char *args[] = { - "PotentialFileReaderTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - lmp->input->one("units metal"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "EIMPotentialFileReaderTest"; + LAMMPSTest::SetUp(); ASSERT_NE(lmp, nullptr); + + BEGIN_HIDE_OUTPUT(); + command("units metal"); + END_HIDE_OUTPUT(); // check if the prerequisite eim pair style is available - Info *info = new Info(lmp); ASSERT_TRUE(info->has_style("pair", "eim")); - delete info; int npair = nelements * (nelements + 1) / 2; setfl.ielement = new int[nelements]; @@ -99,17 +95,15 @@ protected: delete[] setfl.rs; delete[] setfl.tp; - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + LAMMPSTest::TearDown(); } }; TEST_F(EIMPotentialFileReaderTest, global_line) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); EIMPotentialFileReader reader(lmp, "ffield.eim"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); reader.get_global(&setfl); ASSERT_DOUBLE_EQ(setfl.division, 2.0); @@ -119,9 +113,9 @@ TEST_F(EIMPotentialFileReaderTest, global_line) TEST_F(EIMPotentialFileReaderTest, element_line_sequential) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); EIMPotentialFileReader reader(lmp, "ffield.eim"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); reader.get_element(&setfl, 0, "Li"); ASSERT_EQ(setfl.ielement[0], 3); @@ -144,9 +138,9 @@ TEST_F(EIMPotentialFileReaderTest, element_line_sequential) TEST_F(EIMPotentialFileReaderTest, element_line_random) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); EIMPotentialFileReader reader(lmp, "ffield.eim"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); reader.get_element(&setfl, 0, "Id"); ASSERT_EQ(setfl.ielement[0], 53); @@ -160,9 +154,9 @@ TEST_F(EIMPotentialFileReaderTest, element_line_random) TEST_F(EIMPotentialFileReaderTest, pair_line) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); EIMPotentialFileReader reader(lmp, "ffield.eim"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); reader.get_pair(&setfl, 0, "Li", "Li"); ASSERT_DOUBLE_EQ(setfl.rcutphiA[0], 6.0490e+00); @@ -183,9 +177,9 @@ TEST_F(EIMPotentialFileReaderTest, pair_line) TEST_F(EIMPotentialFileReaderTest, pair_identical) { - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); EIMPotentialFileReader reader(lmp, "ffield.eim"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); reader.get_pair(&setfl, 0, "Li", "Na"); reader.get_pair(&setfl, 1, "Na", "Li"); diff --git a/unittest/formats/test_file_operations.cpp b/unittest/formats/test_file_operations.cpp index 8c4c8bce89..700990fb72 100644 --- a/unittest/formats/test_file_operations.cpp +++ b/unittest/formats/test_file_operations.cpp @@ -17,6 +17,7 @@ #include "utils.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -31,43 +32,17 @@ using utils::sfgets; using utils::sfread; using utils::split_words; -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif - -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } - // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -class FileOperationsTest : public ::testing::Test { +class FileOperationsTest : public LAMMPSTest { protected: - LAMMPS *lmp; - void SetUp() override { - const char *args[] = {"FileOperationsTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "FileOperationsTest"; + LAMMPSTest::SetUp(); ASSERT_NE(lmp, nullptr); + FILE *fp = fopen("safe_file_read_test.txt", "wb"); ASSERT_NE(fp, nullptr); fputs("one line\n", fp); @@ -79,9 +54,7 @@ protected: void TearDown() override { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + LAMMPSTest::TearDown(); remove("safe_file_read_test.txt"); } }; @@ -154,15 +127,15 @@ TEST_F(FileOperationsTest, safe_fread) TEST_F(FileOperationsTest, logmesg) { char buf[8]; - ::testing::internal::CaptureStdout(); - lmp->input->one("echo none"); - ::testing::internal::GetCapturedStdout(); - ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); + command("echo none"); + END_HIDE_OUTPUT(); + BEGIN_CAPTURE_OUTPUT(); utils::logmesg(lmp, "one\n"); - lmp->input->one("log test_logmesg.log"); + command("log test_logmesg.log"); utils::logmesg(lmp, "two\n"); - lmp->input->one("log none"); - std::string out = ::testing::internal::GetCapturedStdout(); + command("log none"); + std::string out = END_CAPTURE_OUTPUT(); memset(buf, 0, 8); FILE *fp = fopen("test_logmesg.log", "r"); fread(buf, 1, 8, fp); @@ -177,7 +150,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/formats/test_image_flags.cpp b/unittest/formats/test_image_flags.cpp index 6d4ae08111..63d85789e6 100644 --- a/unittest/formats/test_image_flags.cpp +++ b/unittest/formats/test_image_flags.cpp @@ -15,6 +15,7 @@ #include "input.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -28,41 +29,32 @@ using LAMMPS_NS::utils::split_words; namespace LAMMPS_NS { using ::testing::Eq; - -class ImageFlagsTest : public ::testing::Test { +class ImageFlagsTest : public LAMMPSTest { protected: - LAMMPS *lmp; - void SetUp() override { - const char *args[] = {"ImageFlagsTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "ImageFlagsTest"; + LAMMPSTest::SetUp(); ASSERT_NE(lmp, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units real"); - lmp->input->one("dimension 3"); - lmp->input->one("region box block -2 2 -2 2 -2 2"); - lmp->input->one("create_box 1 box"); - lmp->input->one("create_atoms 1 single 0.0 0.0 0.0 units box"); - lmp->input->one("create_atoms 1 single 1.9 -1.9 1.9999 units box"); - lmp->input->one("pair_style zero 2.0"); - lmp->input->one("pair_coeff * *"); - lmp->input->one("mass * 1.0"); - lmp->input->one("set atom 1 image -1 2 3"); - lmp->input->one("set atom 2 image -2 1 -1"); - lmp->input->one("write_data test_image_flags.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units real"); + command("dimension 3"); + command("region box block -2 2 -2 2 -2 2"); + command("create_box 1 box"); + command("create_atoms 1 single 0.0 0.0 0.0 units box"); + command("create_atoms 1 single 1.9 -1.9 1.9999 units box"); + command("pair_style zero 2.0"); + command("pair_coeff * *"); + command("mass * 1.0"); + command("set atom 1 image -1 2 3"); + command("set atom 2 image -2 1 -1"); + command("write_data test_image_flags.data"); + END_HIDE_OUTPUT(); } void TearDown() override { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + LAMMPSTest::TearDown(); remove("test_image_flags.data"); } }; @@ -70,191 +62,191 @@ protected: TEST_F(ImageFlagsTest, change_box) { auto image = lmp->atom->image; - int imx = (image[0] & IMGMASK) - IMGMAX; - int imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - int imz = (image[0] >> IMG2BITS) - IMGMAX; + int imx = (image[0] & IMGMASK) - IMGMAX; + int imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + int imz = (image[0] >> IMG2BITS) - IMGMAX; + + ASSERT_EQ(imx, -1); + ASSERT_EQ(imy, 2); + ASSERT_EQ(imz, 3); - ASSERT_EQ(imx,-1); - ASSERT_EQ(imy,2); - ASSERT_EQ(imz,3); - imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,-2); - ASSERT_EQ(imy,1); - ASSERT_EQ(imz,-1); - - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("change_box all boundary f p p"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + ASSERT_EQ(imx, -2); + ASSERT_EQ(imy, 1); + ASSERT_EQ(imz, -1); + + BEGIN_HIDE_OUTPUT(); + command("change_box all boundary f p p"); + END_HIDE_OUTPUT(); image = lmp->atom->image; - imx = (image[0] & IMGMASK) - IMGMAX; - imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - imz = (image[0] >> IMG2BITS) - IMGMAX; + imx = (image[0] & IMGMASK) - IMGMAX; + imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + imz = (image[0] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,2); - ASSERT_EQ(imz,3); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 2); + ASSERT_EQ(imz, 3); imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,1); - ASSERT_EQ(imz,-1); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 1); + ASSERT_EQ(imz, -1); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("change_box all boundary f s p"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("change_box all boundary f s p"); + END_HIDE_OUTPUT(); image = lmp->atom->image; - imx = (image[0] & IMGMASK) - IMGMAX; - imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - imz = (image[0] >> IMG2BITS) - IMGMAX; + imx = (image[0] & IMGMASK) - IMGMAX; + imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + imz = (image[0] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,0); - ASSERT_EQ(imz,3); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 0); + ASSERT_EQ(imz, 3); imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,0); - ASSERT_EQ(imz,-1); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 0); + ASSERT_EQ(imz, -1); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("change_box all boundary p p m"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("change_box all boundary p p m"); + END_HIDE_OUTPUT(); image = lmp->atom->image; - imx = (image[0] & IMGMASK) - IMGMAX; - imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - imz = (image[0] >> IMG2BITS) - IMGMAX; + imx = (image[0] & IMGMASK) - IMGMAX; + imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + imz = (image[0] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,0); - ASSERT_EQ(imz,0); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 0); + ASSERT_EQ(imz, 0); imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,0); - ASSERT_EQ(imz,0); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 0); + ASSERT_EQ(imz, 0); } TEST_F(ImageFlagsTest, read_data) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("dimension 3"); - lmp->input->one("boundary p p p"); - lmp->input->one("pair_style zero 2.0"); - lmp->input->one("read_data test_image_flags.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); - + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("dimension 3"); + command("boundary p p p"); + command("pair_style zero 2.0"); + command("read_data test_image_flags.data"); + END_HIDE_OUTPUT(); + auto image = lmp->atom->image; - int imx = (image[0] & IMGMASK) - IMGMAX; - int imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - int imz = (image[0] >> IMG2BITS) - IMGMAX; + int imx = (image[0] & IMGMASK) - IMGMAX; + int imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + int imz = (image[0] >> IMG2BITS) - IMGMAX; + + ASSERT_EQ(imx, -1); + ASSERT_EQ(imy, 2); + ASSERT_EQ(imz, 3); - ASSERT_EQ(imx,-1); - ASSERT_EQ(imy,2); - ASSERT_EQ(imz,3); - imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,-2); - ASSERT_EQ(imy,1); - ASSERT_EQ(imz,-1); - - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("dimension 3"); - lmp->input->one("boundary f p p"); - lmp->input->one("pair_style zero 2.0"); - lmp->input->one("read_data test_image_flags.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + ASSERT_EQ(imx, -2); + ASSERT_EQ(imy, 1); + ASSERT_EQ(imz, -1); + + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("dimension 3"); + command("boundary f p p"); + command("pair_style zero 2.0"); + command("read_data test_image_flags.data"); + END_HIDE_OUTPUT(); image = lmp->atom->image; - imx = (image[0] & IMGMASK) - IMGMAX; - imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - imz = (image[0] >> IMG2BITS) - IMGMAX; + imx = (image[0] & IMGMASK) - IMGMAX; + imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + imz = (image[0] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,2); - ASSERT_EQ(imz,3); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 2); + ASSERT_EQ(imz, 3); imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,0); - ASSERT_EQ(imy,1); - ASSERT_EQ(imz,-1); + ASSERT_EQ(imx, 0); + ASSERT_EQ(imy, 1); + ASSERT_EQ(imz, -1); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("dimension 3"); - lmp->input->one("boundary p s p"); - lmp->input->one("pair_style zero 2.0"); - lmp->input->one("read_data test_image_flags.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("dimension 3"); + command("boundary p s p"); + command("pair_style zero 2.0"); + command("read_data test_image_flags.data"); + END_HIDE_OUTPUT(); image = lmp->atom->image; - imx = (image[0] & IMGMASK) - IMGMAX; - imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - imz = (image[0] >> IMG2BITS) - IMGMAX; + imx = (image[0] & IMGMASK) - IMGMAX; + imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + imz = (image[0] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,-1); - ASSERT_EQ(imy,0); - ASSERT_EQ(imz,3); + ASSERT_EQ(imx, -1); + ASSERT_EQ(imy, 0); + ASSERT_EQ(imz, 3); imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,-2); - ASSERT_EQ(imy,0); - ASSERT_EQ(imz,-1); + ASSERT_EQ(imx, -2); + ASSERT_EQ(imy, 0); + ASSERT_EQ(imz, -1); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("dimension 3"); - lmp->input->one("boundary p p m"); - lmp->input->one("pair_style zero 2.0"); - lmp->input->one("read_data test_image_flags.data"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("dimension 3"); + command("boundary p p m"); + command("pair_style zero 2.0"); + command("read_data test_image_flags.data"); + END_HIDE_OUTPUT(); image = lmp->atom->image; - imx = (image[0] & IMGMASK) - IMGMAX; - imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; - imz = (image[0] >> IMG2BITS) - IMGMAX; + imx = (image[0] & IMGMASK) - IMGMAX; + imy = (image[0] >> IMGBITS & IMGMASK) - IMGMAX; + imz = (image[0] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,-1); - ASSERT_EQ(imy,2); - ASSERT_EQ(imz,0); + ASSERT_EQ(imx, -1); + ASSERT_EQ(imy, 2); + ASSERT_EQ(imz, 0); imx = (image[1] & IMGMASK) - IMGMAX; imy = (image[1] >> IMGBITS & IMGMASK) - IMGMAX; imz = (image[1] >> IMG2BITS) - IMGMAX; - ASSERT_EQ(imx,-2); - ASSERT_EQ(imy,1); - ASSERT_EQ(imz,0); + ASSERT_EQ(imx, -2); + ASSERT_EQ(imy, 1); + ASSERT_EQ(imz, 0); } } // namespace LAMMPS_NS diff --git a/unittest/formats/test_molecule_file.cpp b/unittest/formats/test_molecule_file.cpp index 3bfc0dc4fa..9928ec4b7c 100644 --- a/unittest/formats/test_molecule_file.cpp +++ b/unittest/formats/test_molecule_file.cpp @@ -19,6 +19,7 @@ #include "utils.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -33,26 +34,6 @@ using utils::split_words; #define test_name test_info_->name() -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif - -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } static void create_molecule_files() { @@ -96,27 +77,21 @@ static void create_molecule_files() // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; -class MoleculeFileTest : public ::testing::Test { +class MoleculeFileTest : public LAMMPSTest { protected: - LAMMPS *lmp; - void SetUp() override { - const char *args[] = {"MoleculeFileTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - create_molecule_files(); - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "MoleculeFileTest"; + LAMMPSTest::SetUp(); ASSERT_NE(lmp, nullptr); + BEGIN_HIDE_OUTPUT(); + create_molecule_files(); + END_HIDE_OUTPUT(); } void TearDown() override { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + LAMMPSTest::TearDown(); remove("h2o.mol"); remove("co2.mol"); } @@ -128,22 +103,21 @@ protected: fputs(content.c_str(), fp); fclose(fp); - lmp->input->one(fmt::format("molecule {} {} {}", name, file, args)); + command(fmt::format("molecule {} {} {}", name, file, args)); remove(file.c_str()); } }; TEST_F(MoleculeFileTest, nofile) { - TEST_FAILURE(".*Cannot open molecule file nofile.mol.*", - lmp->input->one("molecule 1 nofile.mol");); + TEST_FAILURE(".*Cannot open molecule file nofile.mol.*", command("molecule 1 nofile.mol");); } TEST_F(MoleculeFileTest, badid) { TEST_FAILURE(".*Molecule template ID must have only " "alphanumeric or underscore characters.*", - lmp->input->one("molecule @mol nofile.mol");); + command("molecule @mol nofile.mol");); } TEST_F(MoleculeFileTest, badargs) @@ -200,32 +174,29 @@ TEST_F(MoleculeFileTest, nospecial) TEST_F(MoleculeFileTest, minimal) { - ::testing::internal::CaptureStdout(); + BEGIN_CAPTURE_OUTPUT(); run_mol_cmd(test_name, "", "Comment\n1 atoms\n\n Coords\n\n 1 0.0 0.0 0.0\n"); - auto output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + auto output = END_CAPTURE_OUTPUT(); ASSERT_THAT(output, MatchesRegex(".*Read molecule template.*1 molecules.*1 atoms.*0 bonds.*")); } TEST_F(MoleculeFileTest, twomols) { - ::testing::internal::CaptureStdout(); + BEGIN_CAPTURE_OUTPUT(); run_mol_cmd(test_name, "", "Comment\n2 atoms\n\n" " Coords\n\n 1 0.0 0.0 0.0\n 2 0.0 0.0 1.0\n" " Molecules\n\n 1 1\n 2 2\n\n Types\n\n 1 1\n 2 2\n\n"); - auto output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + auto output = END_CAPTURE_OUTPUT(); ASSERT_THAT(output, MatchesRegex(".*Read molecule template.*2 molecules.*2 atoms " "with max type 2.*0 bonds.*")); } TEST_F(MoleculeFileTest, twofiles) { - ::testing::internal::CaptureStdout(); - lmp->input->one("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); - auto output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + BEGIN_CAPTURE_OUTPUT(); + command("molecule twomols h2o.mol co2.mol offset 2 1 1 0 0"); + auto output = END_CAPTURE_OUTPUT(); ASSERT_THAT(output, MatchesRegex(".*Read molecule template twomols:.*1 molecules.*3 atoms " "with max type 2.*2 bonds with max type 1.*" "1 angles with max type 1.*0 dihedrals.*" @@ -236,11 +207,11 @@ TEST_F(MoleculeFileTest, twofiles) TEST_F(MoleculeFileTest, bonds) { - ::testing::internal::CaptureStdout(); - lmp->input->one("atom_style bond"); - lmp->input->one("region box block 0 1 0 1 0 1"); - lmp->input->one("create_box 2 box bond/types 2 extra/bond/per/atom 2 " - "extra/special/per/atom 4"); + BEGIN_CAPTURE_OUTPUT(); + command("atom_style bond"); + command("region box block 0 1 0 1 0 1"); + command("create_box 2 box bond/types 2 extra/bond/per/atom 2 " + "extra/special/per/atom 4"); run_mol_cmd(test_name, "", "Comment\n" "4 atoms\n" @@ -258,19 +229,17 @@ TEST_F(MoleculeFileTest, bonds) " Bonds\n\n" " 1 1 1 2\n" " 2 2 1 3\n\n"); - auto output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + auto output = END_CAPTURE_OUTPUT(); ASSERT_THAT(output, MatchesRegex(".*Read molecule template.*1 molecules.*4 atoms.*type.*2.*" "2 bonds.*type.*2.*0 angles.*")); - ::testing::internal::CaptureStdout(); - lmp->input->one("mass * 2.0"); - lmp->input->one("create_atoms 0 single 0.5 0.5 0.5 mol bonds 67235"); - output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + BEGIN_CAPTURE_OUTPUT(); + command("mass * 2.0"); + command("create_atoms 0 single 0.5 0.5 0.5 mol bonds 67235"); + output = END_CAPTURE_OUTPUT(); ASSERT_THAT(output, MatchesRegex(".*Created 4 atoms.*")); - ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); Molecule *mol = lmp->atom->molecules[0]; ASSERT_EQ(mol->natoms, 4); ASSERT_EQ(lmp->atom->natoms, 4); @@ -282,8 +251,7 @@ TEST_F(MoleculeFileTest, bonds) EXPECT_DOUBLE_EQ(mol->com[2], 0.5); EXPECT_DOUBLE_EQ(mol->maxextent, sqrt(2)); EXPECT_EQ(mol->comatom, 1); - output = ::testing::internal::GetCapturedStdout(); - if (verbose) std::cout << output; + END_HIDE_OUTPUT(); } int main(int argc, char **argv) @@ -291,7 +259,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/formats/test_pair_unit_convert.cpp b/unittest/formats/test_pair_unit_convert.cpp index 712e6ff50c..bdd66f67a6 100644 --- a/unittest/formats/test_pair_unit_convert.cpp +++ b/unittest/formats/test_pair_unit_convert.cpp @@ -20,6 +20,7 @@ #include "thermo.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include @@ -42,45 +43,36 @@ const double p_convert = 1.01325; // of data in update.cpp. could be 1.0e-12 const double rel_error = 5.0e-7; -class PairUnitConvertTest : public ::testing::Test { +class PairUnitConvertTest : public LAMMPSTest { protected: - LAMMPS *lmp; - Info *info; double fold[4][3]; void SetUp() override { - const char *args[] = {"PairUnitConvertTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); + testbinary = "PairUnitConvertTest"; + LAMMPSTest::SetUp(); ASSERT_NE(lmp, nullptr); - if (!verbose) ::testing::internal::CaptureStdout(); - info = new Info(lmp); - lmp->input->one("units metal"); - lmp->input->one("dimension 3"); - lmp->input->one("region box block -4 4 -4 4 -4 4"); - lmp->input->one("create_box 2 box"); - lmp->input->one("create_atoms 1 single -1.1 1.2 0.0 units box"); - lmp->input->one("create_atoms 1 single -1.2 -1.1 0.0 units box"); - lmp->input->one("create_atoms 2 single 0.9 1.0 0.0 units box"); - lmp->input->one("create_atoms 2 single 1.0 -0.9 0.0 units box"); - lmp->input->one("pair_style zero 4.0"); - lmp->input->one("pair_coeff * *"); - lmp->input->one("mass * 1.0"); - lmp->input->one("write_data test_pair_unit_convert.data nocoeff"); - lmp->input->one("clear"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("dimension 3"); + command("region box block -4 4 -4 4 -4 4"); + command("create_box 2 box"); + command("create_atoms 1 single -1.1 1.2 0.0 units box"); + command("create_atoms 1 single -1.2 -1.1 0.0 units box"); + command("create_atoms 2 single 0.9 1.0 0.0 units box"); + command("create_atoms 2 single 1.0 -0.9 0.0 units box"); + command("pair_style zero 4.0"); + command("pair_coeff * *"); + command("mass * 1.0"); + command("write_data test_pair_unit_convert.data nocoeff"); + command("clear"); + END_HIDE_OUTPUT(); } void TearDown() override { - if (!verbose) ::testing::internal::CaptureStdout(); - delete info; - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); + LAMMPSTest::TearDown(); remove("test_pair_unit_convert.data"); } }; @@ -90,13 +82,13 @@ TEST_F(PairUnitConvertTest, zero) // check if the prerequisite pair style is available if (!info->has_style("pair", "zero")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style zero 6.0"); - lmp->input->one("pair_coeff * *"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style zero 6.0"); + command("pair_coeff * *"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -107,14 +99,14 @@ TEST_F(PairUnitConvertTest, zero) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style zero 6.0"); - lmp->input->one("pair_coeff * *"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style zero 6.0"); + command("pair_coeff * *"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -133,17 +125,17 @@ TEST_F(PairUnitConvertTest, lj_cut) // check if the prerequisite pair style is available if (!info->has_style("pair", "lj/cut")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style lj/cut 6.0"); - lmp->input->one("pair_coeff * * 0.01014286346782117 2.0"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style lj/cut 6.0"); + command("pair_coeff * * 0.01014286346782117 2.0"); remove("test.table.metal"); - lmp->input->one("pair_write 1 1 1000 r 0.1 6.0 test.table.metal lj_1_1"); - lmp->input->one("pair_write 1 2 1000 r 0.1 6.0 test.table.metal lj_1_2"); - lmp->input->one("pair_write 2 2 1000 r 0.1 6.0 test.table.metal lj_2_2"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("pair_write 1 1 1000 r 0.1 6.0 test.table.metal lj_1_1"); + command("pair_write 1 2 1000 r 0.1 6.0 test.table.metal lj_1_2"); + command("pair_write 2 2 1000 r 0.1 6.0 test.table.metal lj_2_2"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -154,18 +146,18 @@ TEST_F(PairUnitConvertTest, lj_cut) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style lj/cut 6.0"); - lmp->input->one("pair_coeff * * 0.2339 2.0"); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style lj/cut 6.0"); + command("pair_coeff * * 0.2339 2.0"); remove("test.table.real"); - lmp->input->one("pair_write 1 1 1000 r 0.1 6.0 test.table.real lj_1_1"); - lmp->input->one("pair_write 1 2 1000 r 0.1 6.0 test.table.real lj_1_2"); - lmp->input->one("pair_write 2 2 1000 r 0.1 6.0 test.table.real lj_2_2"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + command("pair_write 1 1 1000 r 0.1 6.0 test.table.real lj_1_1"); + command("pair_write 1 2 1000 r 0.1 6.0 test.table.real lj_1_2"); + command("pair_write 2 2 1000 r 0.1 6.0 test.table.real lj_2_2"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -184,13 +176,13 @@ TEST_F(PairUnitConvertTest, eam) // check if the prerequisite pair style is available if (!info->has_style("pair", "eam")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam"); - lmp->input->one("pair_coeff * * Cu_u3.eam"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam"); + command("pair_coeff * * Cu_u3.eam"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -201,14 +193,14 @@ TEST_F(PairUnitConvertTest, eam) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam"); - lmp->input->one("pair_coeff * * Cu_u3.eam"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam"); + command("pair_coeff * * Cu_u3.eam"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -227,13 +219,13 @@ TEST_F(PairUnitConvertTest, eam_alloy) // check if the prerequisite pair style is available if (!info->has_style("pair", "eam/alloy")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam/alloy"); - lmp->input->one("pair_coeff * * AlCu.eam.alloy Al Cu"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam/alloy"); + command("pair_coeff * * AlCu.eam.alloy Al Cu"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -244,14 +236,14 @@ TEST_F(PairUnitConvertTest, eam_alloy) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam/alloy"); - lmp->input->one("pair_coeff * * AlCu.eam.alloy Al Cu"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam/alloy"); + command("pair_coeff * * AlCu.eam.alloy Al Cu"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -270,13 +262,13 @@ TEST_F(PairUnitConvertTest, eam_fs) // check if the prerequisite pair style is available if (!info->has_style("pair", "eam/fs")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam/fs"); - lmp->input->one("pair_coeff * * FeP_mm.eam.fs Fe P"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam/fs"); + command("pair_coeff * * FeP_mm.eam.fs Fe P"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -287,14 +279,14 @@ TEST_F(PairUnitConvertTest, eam_fs) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam/fs"); - lmp->input->one("pair_coeff * * FeP_mm.eam.fs Fe P"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam/fs"); + command("pair_coeff * * FeP_mm.eam.fs Fe P"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -313,13 +305,13 @@ TEST_F(PairUnitConvertTest, eam_cd) // check if the prerequisite pair style is available if (!info->has_style("pair", "eam/cd")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam/cd"); - lmp->input->one("pair_coeff * * FeCr.cdeam Cr Fe"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam/cd"); + command("pair_coeff * * FeCr.cdeam Cr Fe"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -330,14 +322,14 @@ TEST_F(PairUnitConvertTest, eam_cd) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eam/cd"); - lmp->input->one("pair_coeff * * FeCr.cdeam Cr Fe"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eam/cd"); + command("pair_coeff * * FeCr.cdeam Cr Fe"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -356,13 +348,13 @@ TEST_F(PairUnitConvertTest, eim) // check if the prerequisite pair style is available if (!info->has_style("pair", "eim")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eim"); - lmp->input->one("pair_coeff * * Na Cl ffield.eim Na Cl"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eim"); + command("pair_coeff * * Na Cl ffield.eim Na Cl"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -373,14 +365,14 @@ TEST_F(PairUnitConvertTest, eim) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style eim"); - lmp->input->one("pair_coeff * * Na Cl ffield.eim Na Cl"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style eim"); + command("pair_coeff * * Na Cl ffield.eim Na Cl"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -399,13 +391,13 @@ TEST_F(PairUnitConvertTest, gw) // check if the prerequisite pair style is available if (!info->has_style("pair", "gw")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style gw"); - lmp->input->one("pair_coeff * * SiC.gw Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style gw"); + command("pair_coeff * * SiC.gw Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -416,14 +408,14 @@ TEST_F(PairUnitConvertTest, gw) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style gw"); - lmp->input->one("pair_coeff * * SiC.gw Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style gw"); + command("pair_coeff * * SiC.gw Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -442,13 +434,13 @@ TEST_F(PairUnitConvertTest, gw_zbl) // check if the prerequisite pair style is available if (!info->has_style("pair", "gw/zbl")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style gw/zbl"); - lmp->input->one("pair_coeff * * SiC.gw.zbl Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style gw/zbl"); + command("pair_coeff * * SiC.gw.zbl Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -459,14 +451,14 @@ TEST_F(PairUnitConvertTest, gw_zbl) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style gw/zbl"); - lmp->input->one("pair_coeff * * SiC.gw.zbl Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style gw/zbl"); + command("pair_coeff * * SiC.gw.zbl Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -485,13 +477,13 @@ TEST_F(PairUnitConvertTest, nb3b_harmonic) // check if the prerequisite pair style is available if (!info->has_style("pair", "nb3b/harmonic")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style nb3b/harmonic"); - lmp->input->one("pair_coeff * * MOH.nb3b.harmonic M O"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style nb3b/harmonic"); + command("pair_coeff * * MOH.nb3b.harmonic M O"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -502,14 +494,14 @@ TEST_F(PairUnitConvertTest, nb3b_harmonic) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style nb3b/harmonic"); - lmp->input->one("pair_coeff * * MOH.nb3b.harmonic M O"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style nb3b/harmonic"); + command("pair_coeff * * MOH.nb3b.harmonic M O"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -528,13 +520,13 @@ TEST_F(PairUnitConvertTest, sw) // check if the prerequisite pair style is available if (!info->has_style("pair", "sw")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style sw"); - lmp->input->one("pair_coeff * * GaN.sw Ga N"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style sw"); + command("pair_coeff * * GaN.sw Ga N"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -545,14 +537,14 @@ TEST_F(PairUnitConvertTest, sw) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style sw"); - lmp->input->one("pair_coeff * * GaN.sw Ga N"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style sw"); + command("pair_coeff * * GaN.sw Ga N"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -571,15 +563,15 @@ TEST_F(PairUnitConvertTest, table_metal2real) // check if the prerequisite pair style is available if (!info->has_style("pair", "table")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style table linear 1000"); - lmp->input->one("pair_coeff 1 1 test.table.metal lj_1_1"); - lmp->input->one("pair_coeff 1 2 test.table.metal lj_1_2"); - lmp->input->one("pair_coeff 2 2 test.table.metal lj_2_2"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style table linear 1000"); + command("pair_coeff 1 1 test.table.metal lj_1_1"); + command("pair_coeff 1 2 test.table.metal lj_1_2"); + command("pair_coeff 2 2 test.table.metal lj_2_2"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -590,16 +582,16 @@ TEST_F(PairUnitConvertTest, table_metal2real) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style table linear 1000"); - lmp->input->one("pair_coeff 1 1 test.table.metal lj_1_1"); - lmp->input->one("pair_coeff 1 2 test.table.metal lj_1_2"); - lmp->input->one("pair_coeff 2 2 test.table.metal lj_2_2"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style table linear 1000"); + command("pair_coeff 1 1 test.table.metal lj_1_1"); + command("pair_coeff 1 2 test.table.metal lj_1_2"); + command("pair_coeff 2 2 test.table.metal lj_2_2"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -618,15 +610,15 @@ TEST_F(PairUnitConvertTest, table_real2metal) // check if the prerequisite pair style is available if (!info->has_style("pair", "table")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style table linear 1000"); - lmp->input->one("pair_coeff 1 1 test.table.real lj_1_1"); - lmp->input->one("pair_coeff 1 2 test.table.real lj_1_2"); - lmp->input->one("pair_coeff 2 2 test.table.real lj_2_2"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style table linear 1000"); + command("pair_coeff 1 1 test.table.real lj_1_1"); + command("pair_coeff 1 2 test.table.real lj_1_2"); + command("pair_coeff 2 2 test.table.real lj_2_2"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -637,16 +629,16 @@ TEST_F(PairUnitConvertTest, table_real2metal) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style table linear 1000"); - lmp->input->one("pair_coeff 1 1 test.table.real lj_1_1"); - lmp->input->one("pair_coeff 1 2 test.table.real lj_1_2"); - lmp->input->one("pair_coeff 2 2 test.table.real lj_2_2"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style table linear 1000"); + command("pair_coeff 1 1 test.table.real lj_1_1"); + command("pair_coeff 1 2 test.table.real lj_1_2"); + command("pair_coeff 2 2 test.table.real lj_2_2"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -665,13 +657,13 @@ TEST_F(PairUnitConvertTest, tersoff) // check if the prerequisite pair style is available if (!info->has_style("pair", "tersoff")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff"); - lmp->input->one("pair_coeff * * SiC.tersoff Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff"); + command("pair_coeff * * SiC.tersoff Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -682,14 +674,14 @@ TEST_F(PairUnitConvertTest, tersoff) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff"); - lmp->input->one("pair_coeff * * SiC.tersoff Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff"); + command("pair_coeff * * SiC.tersoff Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -708,13 +700,13 @@ TEST_F(PairUnitConvertTest, tersoff_mod) // check if the prerequisite pair style is available if (!info->has_style("pair", "tersoff/mod")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/mod"); - lmp->input->one("pair_coeff * * Si.tersoff.mod Si Si"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/mod"); + command("pair_coeff * * Si.tersoff.mod Si Si"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -725,14 +717,14 @@ TEST_F(PairUnitConvertTest, tersoff_mod) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/mod"); - lmp->input->one("pair_coeff * * Si.tersoff.mod Si Si"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/mod"); + command("pair_coeff * * Si.tersoff.mod Si Si"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -751,13 +743,13 @@ TEST_F(PairUnitConvertTest, tersoff_mod_c) // check if the prerequisite pair style is available if (!info->has_style("pair", "tersoff/mod/c")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/mod/c"); - lmp->input->one("pair_coeff * * Si.tersoff.modc Si Si"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/mod/c"); + command("pair_coeff * * Si.tersoff.modc Si Si"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -768,14 +760,14 @@ TEST_F(PairUnitConvertTest, tersoff_mod_c) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/mod/c"); - lmp->input->one("pair_coeff * * Si.tersoff.modc Si Si"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/mod/c"); + command("pair_coeff * * Si.tersoff.modc Si Si"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -794,13 +786,13 @@ TEST_F(PairUnitConvertTest, tersoff_table) // check if the prerequisite pair style is available if (!info->has_style("pair", "tersoff/table")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/table"); - lmp->input->one("pair_coeff * * SiC.tersoff Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/table"); + command("pair_coeff * * SiC.tersoff Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -811,14 +803,14 @@ TEST_F(PairUnitConvertTest, tersoff_table) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/table"); - lmp->input->one("pair_coeff * * SiC.tersoff Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/table"); + command("pair_coeff * * SiC.tersoff Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -837,13 +829,13 @@ TEST_F(PairUnitConvertTest, tersoff_zbl) // check if the prerequisite pair style is available if (!info->has_style("pair", "tersoff/zbl")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/zbl"); - lmp->input->one("pair_coeff * * SiC.tersoff.zbl Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/zbl"); + command("pair_coeff * * SiC.tersoff.zbl Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -854,14 +846,14 @@ TEST_F(PairUnitConvertTest, tersoff_zbl) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/zbl"); - lmp->input->one("pair_coeff * * SiC.tersoff.zbl Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/zbl"); + command("pair_coeff * * SiC.tersoff.zbl Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -880,14 +872,14 @@ TEST_F(PairUnitConvertTest, tersoff_zbl_omp) // check if the prerequisite pair style is available if (!info->has_style("pair", "tersoff/zbl/omp")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("package omp 4"); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/zbl/omp"); - lmp->input->one("pair_coeff * * SiC.tersoff.zbl Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("package omp 4"); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/zbl/omp"); + command("pair_coeff * * SiC.tersoff.zbl Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -898,15 +890,15 @@ TEST_F(PairUnitConvertTest, tersoff_zbl_omp) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("package omp 4"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style tersoff/zbl/omp"); - lmp->input->one("pair_coeff * * SiC.tersoff.zbl Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("package omp 4"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style tersoff/zbl/omp"); + command("pair_coeff * * SiC.tersoff.zbl Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); @@ -925,13 +917,13 @@ TEST_F(PairUnitConvertTest, vashishta) // check if the prerequisite pair style is available if (!info->has_style("pair", "vashishta")) GTEST_SKIP(); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style vashishta"); - lmp->input->one("pair_coeff * * SiC.vashishta Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units metal"); + command("read_data test_pair_unit_convert.data"); + command("pair_style vashishta"); + command("pair_coeff * * SiC.vashishta Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); // copy pressure, energy, and force from first step double pold; @@ -942,14 +934,14 @@ TEST_F(PairUnitConvertTest, vashishta) for (int j = 0; j < 3; ++j) fold[i][j] = f[i][j]; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("clear"); - lmp->input->one("units real"); - lmp->input->one("read_data test_pair_unit_convert.data"); - lmp->input->one("pair_style vashishta"); - lmp->input->one("pair_coeff * * SiC.vashishta Si C"); - lmp->input->one("run 0 post no"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("clear"); + command("units real"); + command("read_data test_pair_unit_convert.data"); + command("pair_style vashishta"); + command("pair_coeff * * SiC.vashishta Si C"); + command("run 0 post no"); + END_HIDE_OUTPUT(); double pnew; lmp->output->thermo->evaluate_keyword("press", &pnew); diff --git a/unittest/formats/test_potential_file_reader.cpp b/unittest/formats/test_potential_file_reader.cpp index 4279c8d1a7..1e3d96d6d7 100644 --- a/unittest/formats/test_potential_file_reader.cpp +++ b/unittest/formats/test_potential_file_reader.cpp @@ -28,37 +28,17 @@ #include "potential_file_reader.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "../testing/core.h" #include #include #include #include -#if defined(OMPI_MAJOR_VERSION) -const bool have_openmpi = true; -#else -const bool have_openmpi = false; -#endif - using namespace LAMMPS_NS; using ::testing::MatchesRegex; using utils::split_words; -#define TEST_FAILURE(errmsg, ...) \ - if (Info::has_exceptions()) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_ANY_THROW({__VA_ARGS__}); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } else { \ - if (!have_openmpi) { \ - ::testing::internal::CaptureStdout(); \ - ASSERT_DEATH({__VA_ARGS__}, ""); \ - auto mesg = ::testing::internal::GetCapturedStdout(); \ - ASSERT_THAT(mesg, MatchesRegex(errmsg)); \ - } \ - } - // whether to print verbose output (i.e. not capturing LAMMPS screen output). bool verbose = false; @@ -75,36 +55,16 @@ const int LAMMPS_NS::PairNb3bHarmonic::NPARAMS_PER_LINE; const int LAMMPS_NS::PairVashishta::NPARAMS_PER_LINE; const int LAMMPS_NS::PairTersoffTable::NPARAMS_PER_LINE; -class PotentialFileReaderTest : public ::testing::Test { -protected: - LAMMPS *lmp; - - void SetUp() override - { - const char *args[] = { - "PotentialFileReaderTest", "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); - lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); - if (!verbose) ::testing::internal::GetCapturedStdout(); - } - - void TearDown() override - { - if (!verbose) ::testing::internal::CaptureStdout(); - delete lmp; - if (!verbose) ::testing::internal::GetCapturedStdout(); - } +class PotentialFileReaderTest : public LAMMPSTest { }; // open for native units TEST_F(PotentialFileReaderTest, Sw_native) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "Si.sw", "Stillinger-Weber"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairSW::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairSW::NPARAMS_PER_LINE); @@ -113,10 +73,10 @@ TEST_F(PotentialFileReaderTest, Sw_native) // open with supported conversion enabled TEST_F(PotentialFileReaderTest, Sw_conv) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units real"); + BEGIN_HIDE_OUTPUT(); + command("units real"); PotentialFileReader reader(lmp, "Si.sw", "Stillinger-Weber", utils::METAL2REAL); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairSW::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairSW::NPARAMS_PER_LINE); @@ -125,9 +85,9 @@ TEST_F(PotentialFileReaderTest, Sw_conv) // open without conversion enabled TEST_F(PotentialFileReaderTest, Sw_noconv) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units real"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + BEGIN_HIDE_OUTPUT(); + command("units real"); + END_HIDE_OUTPUT(); TEST_FAILURE(".*ERROR on proc.*potential.*requires metal units but real.*", PotentialFileReader reader(lmp, "Si.sw", "Stillinger-Weber", utils::REAL2METAL);); @@ -135,10 +95,10 @@ TEST_F(PotentialFileReaderTest, Sw_noconv) TEST_F(PotentialFileReaderTest, Comb) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "ffield.comb", "COMB"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairComb::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairComb::NPARAMS_PER_LINE); @@ -146,10 +106,10 @@ TEST_F(PotentialFileReaderTest, Comb) TEST_F(PotentialFileReaderTest, Comb3) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "ffield.comb3", "COMB3"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairComb3::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairComb3::NPARAMS_PER_LINE); @@ -157,10 +117,10 @@ TEST_F(PotentialFileReaderTest, Comb3) TEST_F(PotentialFileReaderTest, Tersoff) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "Si.tersoff", "Tersoff"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairTersoff::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairTersoff::NPARAMS_PER_LINE); @@ -168,10 +128,10 @@ TEST_F(PotentialFileReaderTest, Tersoff) TEST_F(PotentialFileReaderTest, TersoffMod) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "Si.tersoff.mod", "Tersoff/Mod"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairTersoffMOD::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairTersoffMOD::NPARAMS_PER_LINE); @@ -179,10 +139,10 @@ TEST_F(PotentialFileReaderTest, TersoffMod) TEST_F(PotentialFileReaderTest, TersoffModC) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "Si.tersoff.modc", "Tersoff/ModC"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairTersoffMODC::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairTersoffMODC::NPARAMS_PER_LINE); @@ -190,10 +150,10 @@ TEST_F(PotentialFileReaderTest, TersoffModC) TEST_F(PotentialFileReaderTest, TersoffTable) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "Si.tersoff", "TersoffTable"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairTersoffTable::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairTersoffTable::NPARAMS_PER_LINE); @@ -201,10 +161,10 @@ TEST_F(PotentialFileReaderTest, TersoffTable) TEST_F(PotentialFileReaderTest, TersoffZBL) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "SiC.tersoff.zbl", "Tersoff/ZBL"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairTersoffZBL::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairTersoffZBL::NPARAMS_PER_LINE); @@ -212,10 +172,10 @@ TEST_F(PotentialFileReaderTest, TersoffZBL) TEST_F(PotentialFileReaderTest, GW) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "SiC.gw", "GW"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairGW::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairGW::NPARAMS_PER_LINE); @@ -223,10 +183,10 @@ TEST_F(PotentialFileReaderTest, GW) TEST_F(PotentialFileReaderTest, GWZBL) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "SiC.gw.zbl", "GW/ZBL"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairGWZBL::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairGWZBL::NPARAMS_PER_LINE); @@ -234,10 +194,10 @@ TEST_F(PotentialFileReaderTest, GWZBL) TEST_F(PotentialFileReaderTest, Nb3bHarmonic) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units real"); + BEGIN_HIDE_OUTPUT(); + command("units real"); PotentialFileReader reader(lmp, "MOH.nb3b.harmonic", "NB3B Harmonic"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairNb3bHarmonic::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairNb3bHarmonic::NPARAMS_PER_LINE); @@ -245,10 +205,10 @@ TEST_F(PotentialFileReaderTest, Nb3bHarmonic) TEST_F(PotentialFileReaderTest, Vashishta) { - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); PotentialFileReader reader(lmp, "SiC.vashishta", "Vashishta"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); auto line = reader.next_line(PairVashishta::NPARAMS_PER_LINE); ASSERT_EQ(utils::count_words(line), PairVashishta::NPARAMS_PER_LINE); @@ -259,38 +219,38 @@ TEST_F(PotentialFileReaderTest, UnitConvert) PotentialFileReader *reader; int unit_convert, flag; - if (!verbose) ::testing::internal::CaptureStdout(); - lmp->input->one("units metal"); + BEGIN_HIDE_OUTPUT(); + command("units metal"); reader = new PotentialFileReader(lmp, "Si.sw", "Stillinger-Weber"); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); unit_convert = reader->get_unit_convert(); ASSERT_EQ(unit_convert, 0); delete reader; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); flag = utils::get_supported_conversions(utils::UNKNOWN); reader = new PotentialFileReader(lmp, "Si.sw", "Stillinger-Weber", flag); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); unit_convert = reader->get_unit_convert(); ASSERT_EQ(unit_convert, 0); delete reader; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); flag = utils::get_supported_conversions(utils::ENERGY); reader = new PotentialFileReader(lmp, "Si.sw", "Stillinger-Weber", flag); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); unit_convert = reader->get_unit_convert(); ASSERT_EQ(unit_convert, 0); delete reader; - if (!verbose) ::testing::internal::CaptureStdout(); + BEGIN_HIDE_OUTPUT(); flag = utils::get_supported_conversions(utils::ENERGY); - lmp->input->one("units real"); + command("units real"); reader = new PotentialFileReader(lmp, "Si.sw", "Stillinger-Weber", flag); - if (!verbose) ::testing::internal::GetCapturedStdout(); + END_HIDE_OUTPUT(); unit_convert = reader->get_unit_convert(); ASSERT_EQ(unit_convert, utils::METAL2REAL); @@ -302,7 +262,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); ::testing::InitGoogleMock(&argc, argv); - if (have_openmpi && !LAMMPS_NS::Info::has_exceptions()) + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) std::cout << "Warning: using OpenMPI without exceptions. " "Death tests will be skipped\n"; diff --git a/unittest/testing/core.h b/unittest/testing/core.h index 566265f614..75b0564d02 100644 --- a/unittest/testing/core.h +++ b/unittest/testing/core.h @@ -19,8 +19,11 @@ #include "variable.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "exceptions.h" #include +#include +#include using namespace LAMMPS_NS; @@ -48,15 +51,43 @@ class LAMMPSTest : public ::testing::Test { public: void command(const std::string &line) { lmp->input->one(line.c_str()); } + void BEGIN_HIDE_OUTPUT() { + if (!verbose) ::testing::internal::CaptureStdout(); + } + + void END_HIDE_OUTPUT() { + if (!verbose) ::testing::internal::GetCapturedStdout(); + } + + void BEGIN_CAPTURE_OUTPUT() { + ::testing::internal::CaptureStdout(); + } + + std::string END_CAPTURE_OUTPUT() { + auto output = ::testing::internal::GetCapturedStdout(); + if (verbose) std::cout << output; + return output; + } + void HIDE_OUTPUT(std::function f) { if (!verbose) ::testing::internal::CaptureStdout(); - f(); + try { + f(); + } catch(LAMMPSException & e) { + if (!verbose) std::cout << ::testing::internal::GetCapturedStdout(); + throw e; + } if (!verbose) ::testing::internal::GetCapturedStdout(); } std::string CAPTURE_OUTPUT(std::function f) { ::testing::internal::CaptureStdout(); - f(); + try { + f(); + } catch(LAMMPSException & e) { + if (verbose) std::cout << ::testing::internal::GetCapturedStdout(); + throw e; + } auto output = ::testing::internal::GetCapturedStdout(); if (verbose) std::cout << output; return output; @@ -74,20 +105,31 @@ public: } protected: - const char *testbinary = "LAMMPSTest"; + std::string testbinary = "LAMMPSTest"; + std::vector args = {"-log", "none", "-echo", "screen", "-nocite"}; LAMMPS *lmp; Info *info; void SetUp() override { - const char *args[] = {testbinary, "-log", "none", "-echo", "screen", "-nocite"}; - char **argv = (char **)args; - int argc = sizeof(args) / sizeof(char *); + int argc = args.size() + 1; + char ** argv = new char*[argc]; + argv[0] = utils::strdup(testbinary); + for(int i = 1; i < argc; i++) { + argv[i] = utils::strdup(args[i-1]); + } + HIDE_OUTPUT([&] { lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD); info = new Info(lmp); }); InitSystem(); + + for(int i = 0; i < argc; i++) { + delete [] argv[i]; + argv[i] = nullptr; + } + delete [] argv; } virtual void InitSystem() {} @@ -100,6 +142,7 @@ protected: info = nullptr; lmp = nullptr; }); + std::cout.flush(); } }; diff --git a/unittest/utils/test_tokenizer.cpp b/unittest/utils/test_tokenizer.cpp index de7472599c..69ec7a55d2 100644 --- a/unittest/utils/test_tokenizer.cpp +++ b/unittest/utils/test_tokenizer.cpp @@ -112,7 +112,7 @@ TEST(Tokenizer, as_vector1) TEST(Tokenizer, as_vector2) { - auto list = Tokenizer("a\\b\\c","\\").as_vector(); + auto list = Tokenizer("a\\b\\c", "\\").as_vector(); ASSERT_THAT(list[0], Eq("a")); ASSERT_THAT(list[1], Eq("b")); ASSERT_THAT(list[2], Eq("c")); @@ -121,14 +121,14 @@ TEST(Tokenizer, as_vector2) TEST(Tokenizer, as_vector3) { - auto list = Tokenizer ("a\\","\\").as_vector(); + auto list = Tokenizer("a\\", "\\").as_vector(); ASSERT_THAT(list[0], Eq("a")); ASSERT_EQ(list.size(), 1); } TEST(Tokenizer, as_vector4) { - auto list = Tokenizer ("\\a","\\").as_vector(); + auto list = Tokenizer("\\a", "\\").as_vector(); ASSERT_THAT(list[0], Eq("a")); ASSERT_EQ(list.size(), 1); } diff --git a/unittest/utils/test_utils.cpp b/unittest/utils/test_utils.cpp index 2a87f1c347..81dda11615 100644 --- a/unittest/utils/test_utils.cpp +++ b/unittest/utils/test_utils.cpp @@ -542,10 +542,12 @@ TEST(Utils, strfind_dot) TEST(Utils, strfind_kim) { - ASSERT_THAT(utils::strfind("n3409jfse MO_004835508849_000 aslfjiaf", - "[MS][MO]_\\d\\d\\d+_\\d\\d\\d"), StrEq("MO_004835508849_000")); + ASSERT_THAT( + utils::strfind("n3409jfse MO_004835508849_000 aslfjiaf", "[MS][MO]_\\d\\d\\d+_\\d\\d\\d"), + StrEq("MO_004835508849_000")); ASSERT_THAT(utils::strfind("VanDuinChakraborty_2003_CHNO__SM_107643900657_000", - "[MS][MO]_\\d\\d\\d+_\\d\\d\\d"), StrEq("SM_107643900657_000")); + "[MS][MO]_\\d\\d\\d+_\\d\\d\\d"), + StrEq("SM_107643900657_000")); } TEST(Utils, bounds_case1)