diff --git a/doc/src/pair_ufm.rst b/doc/src/pair_ufm.rst index 1e4daa874c..b03ad1e17a 100644 --- a/doc/src/pair_ufm.rst +++ b/doc/src/pair_ufm.rst @@ -94,10 +94,8 @@ of a run: **Mixing, shift, table, tail correction, restart, rRESPA info**\ : -For atom type pairs I,J and I != J, the A coefficient and cutoff -distance for this pair style can be mixed. A is always mixed via a -*geometric* rule. The cutoff is mixed according to the pair_modify -mix value. The default mix value is *geometric*\ . See the +For atom type pairs I,J and I != J, the epsilon and sigma coefficients and cutoff +distance for this pair style can be mixed. The default mix value is *geometric*\ . See the "pair_modify" command for details. This pair style support the :doc:`pair_modify ` shift option for the energy of the pair interaction. diff --git a/src/pair_ufm.cpp b/src/pair_ufm.cpp index dd5bd078a3..dc162bfaae 100644 --- a/src/pair_ufm.cpp +++ b/src/pair_ufm.cpp @@ -263,7 +263,7 @@ void PairUFM::write_restart(FILE *fp) fwrite(&epsilon[i][j],sizeof(double),1,fp); fwrite(&sigma[i][j],sizeof(double),1,fp); fwrite(&cut[i][j],sizeof(double),1,fp); - } + } } } diff --git a/unittest/force-styles/tests/mol-pair-ufm.yaml b/unittest/force-styles/tests/mol-pair-ufm.yaml new file mode 100644 index 0000000000..a4ed9c4201 --- /dev/null +++ b/unittest/force-styles/tests/mol-pair-ufm.yaml @@ -0,0 +1,93 @@ +--- +lammps_version: 21 Jul 2020 +date_generated: Mon Aug 3 06:00:36 202 +epsilon: 5e-14 +prerequisites: ! | + atom full + pair ufm +pre_commands: ! "" +post_commands: ! | + pair_modify mix arithmetic +input_file: in.fourmol +pair_style: ufm 8.0 +pair_coeff: ! | + 1 1 45 1 + 2 2 2.5 0.5 + 2 4 1.25 0.3 + 3 3 90 1.2 + 4 4 50 1.2 + 5 5 50 1.2 +extract: ! | + epsilon 2 + sigma 2 + scale 2 +natoms: 29 +init_vdwl: 15.9448178985075 +init_coul: 0 +init_stress: ! |2- + 2.6146863286957891e+00 3.3096167885357781e+00 1.8896692790686620e+00 -7.8103578168488674e-01 -6.3646037139141465e-01 -1.1050969820118191e+00 +init_forces: ! |2 + 1 -4.1107682568782042e-02 8.4159671159269589e-02 1.4364066878816075e-02 + 2 1.4855194550175699e-09 1.1595834852760475e-09 3.0222642548520869e-10 + 3 -8.4091235974453749e-01 8.6504468102758003e-01 5.6311502835738503e-01 + 4 -2.8369162919057533e-06 2.3093358001197420e-06 -6.8629050475239722e-06 + 5 2.8352737357564812e-06 -2.3104132057858338e-06 6.8626120453466700e-06 + 6 6.8227906787574855e-01 -7.4225150779271154e-01 -5.7924092724791576e-01 + 7 -1.0624422246648743e-02 -1.7713737837028117e-02 6.0685027629518388e-03 + 8 4.1107682568782042e-02 -8.4159671159269589e-02 -1.4364066878816075e-02 + 9 -8.4589231542866213e-09 -4.4870340991811177e-09 8.1470249958068988e-09 + 10 -1.5076237946330699e+00 -1.4818713946413264e-01 -2.7001103229334023e-01 + 11 -2.5234373282159868e-06 -4.9173823745521049e-06 2.4018562394577883e-06 + 12 1.0688406659323306e+00 1.0218751924370559e+00 -7.3324647342325111e-01 + 13 1.6247427935699038e-05 -1.1277029275365798e-05 5.4862483755923800e-06 + 14 -1.6644232300571339e-05 -1.3550601437242502e-05 -4.2100576670980872e-05 + 15 2.9288576529368216e-06 2.9749417943440398e-05 3.4204315806686696e-05 + 16 5.9741642056952804e-01 -9.9648122620779178e-01 1.0193834046071222e+00 + 17 6.0647800874562208e-05 -6.7138753522781464e-05 1.1587201951671083e-04 + 18 1.0555874350003051e-02 1.7766239964206315e-02 -6.1513369271515989e-03 + 19 -1.3385271294173110e-04 -1.1135668675472203e-04 -4.7773382101580517e-05 + 20 1.4175280871286179e-04 1.2599331309930736e-04 1.4735526784629409e-05 + 21 -3.2883236264640949e-314 -4.0183081710317287e-314 1.1784710987769653e-313 + 22 -2.0070940223656638e-04 -9.2248259523763674e-05 -8.5507042438020091e-05 + 23 2.0070940223656638e-04 9.2248259523763674e-05 8.5507042438020091e-05 + 24 2.5296422778585082e-314 -1.0640178056368574e-313 6.1834993002757979e-314 + 25 -1.4222865295220291e-04 -8.1775415336075356e-05 -7.8174976843060461e-05 + 26 1.4222865295220291e-04 8.1775415336075356e-05 7.8174976843060475e-05 + 27 1.7123386955271695e-314 -1.1695047946457333e-313 4.1453168286921200e-314 + 28 -1.5089915815236302e-04 -4.4475887332562913e-05 -7.2311197921039549e-05 + 29 1.5089915815236302e-04 4.4475887332562913e-05 7.2311197921039549e-05 +run_vdwl: 15.914861699973 +run_coul: 0 +run_stress: ! |2- + 2.5986029230420753e+00 3.2703803218300571e+00 1.8750476643208827e+00 -7.6811158158004422e-01 -6.4578984797982841e-01 -1.0961457953207117e+00 +run_forces: ! |2 + 1 -4.0285344683711741e-02 8.2721708589664378e-02 1.4050186122562973e-02 + 2 8.2524533331550006e-10 6.5064964459978354e-10 1.7834995585782599e-10 + 3 -8.3850322601506833e-01 8.6035681760410276e-01 5.5552529331530642e-01 + 4 -2.3621080627757856e-06 1.8984773073055223e-06 -5.7817438681843766e-06 + 5 2.3611663663774969e-06 -1.8990665800372113e-06 5.7815721165980424e-06 + 6 6.8338309348494286e-01 -7.3951579325775574e-01 -5.7116539020312607e-01 + 7 -1.0720959251302932e-02 -1.7896645856104468e-02 6.1253885515083562e-03 + 8 4.0285344683711741e-02 -8.2721708589664378e-02 -1.4050186122562973e-02 + 9 -1.2529030864834394e-08 -6.6015217820196229e-09 1.2066214019287245e-08 + 10 -1.4925702810659471e+00 -1.5492229055449536e-01 -2.5424719548240826e-01 + 11 -2.7825191632564174e-06 -5.3814455866493166e-06 2.6594982448938168e-06 + 12 1.0652652212470886e+00 1.0107254838122148e+00 -7.3255807711309329e-01 + 13 1.4554848679557421e-05 -1.0096970352400502e-05 4.2909309690308132e-06 + 14 -1.2196220854745091e-05 -8.1371410886308519e-06 -3.3215932875268475e-05 + 15 4.3653682037388778e-07 2.3622097172549777e-05 2.6253430848955018e-05 + 16 5.8242519234898404e-01 -9.7664421760406650e-01 1.0024453694833211e+00 + 17 5.9118312883491684e-05 -6.5197720063684263e-05 1.1296727313095274e-04 + 18 1.0666806754866611e-02 1.7959806185223737e-02 -6.2089089533038464e-03 + 19 -9.2155356734353660e-05 -7.6243764734605334e-05 -3.8917301718863713e-05 + 20 8.7189540287183314e-05 7.8281155679022087e-05 9.4704303834019288e-06 + 21 -3.3899956358599345e-314 -3.8120230525720721e-314 1.1774050158333511e-313 + 22 -1.8226187218665669e-04 -8.2023784186295039e-05 -7.6389640896495654e-05 + 23 1.8226187218665669e-04 8.2023784186295039e-05 7.6389640896495654e-05 + 24 2.8143855119790067e-314 -1.0911129688595383e-313 6.4142652183265380e-314 + 25 -1.6999302282135528e-04 -1.0050305244071937e-04 -9.5843764445722771e-05 + 26 1.6999302282135528e-04 1.0050305244071937e-04 9.5843764445722784e-05 + 27 1.9138245457764810e-314 -1.1871547879715288e-313 4.0053139644108828e-314 + 28 -1.6222449740137501e-04 -4.8434776046882793e-05 -7.8562045851869852e-05 + 29 1.6222449740137501e-04 4.8434776046882793e-05 7.8562045851869852e-05 +...