From 6e0b821625e81d86c3a7925e1a46c368292a2bed Mon Sep 17 00:00:00 2001 From: Mingjian Wen Date: Thu, 13 Feb 2020 21:39:27 -0800 Subject: [PATCH] Fix CalculatorTorchSeparateSpecies zeta is [] bug --- .../auto_examples/auto_examples_jupyter.zip | Bin 21633 -> 21994 bytes .../auto_examples/auto_examples_python.zip | Bin 16692 -> 17077 bytes docs/source/auto_examples/example_nn_Si.ipynb | 7 +++++++ docs/source/auto_examples/example_nn_Si.py | 9 +++++++++ .../source/auto_examples/example_nn_Si.py.md5 | 2 +- docs/source/auto_examples/example_nn_Si.rst | 11 ++++++++++- .../example_nn_Si_codeobj.pickle | Bin 2197 -> 2197 bytes .../auto_examples/sg_execution_times.rst | 8 ++++---- examples/eg_nn_SiC.py | 4 ++-- examples/example_nn_Si.py | 9 +++++++++ kliff/calculators/calculator_torch.py | 2 +- kliff/nn.py | 4 ++-- kliff/wrapcalculator.py | 6 +++--- 13 files changed, 48 insertions(+), 14 deletions(-) diff --git a/docs/source/auto_examples/auto_examples_jupyter.zip b/docs/source/auto_examples/auto_examples_jupyter.zip index 3036946830b71ba597f629252a20bee6cc0c349b..09b4750083ddc20c12b502dcac5c4f9b8e4effbc 100644 GIT binary patch delta 288 zcmZo%$@pqDzNZ)LfuxDGKF@c_j)Z`3j}QsR}8XX=$lNsX&2( z#G>HD+|-iPqGGUZ2pNcV#X4ZaN)oeEfiB6(&(Bs!1R9e8a))!gLTW`~F3@g08~p-1 l8~v2bGP@X{?J;?qAF_XDoIERd4w~mDyM&mtF@`b#0RZAwWP$(y delta 72 zcmaF0nz3;uGtzyQL+43qbVif-;T)|A`)f&B^NWaiL0e5i^h NuMIV4n-RK#647^5{ZcMlYfy5c_&v(wfFV~~j+tJf%x_9?@c7Ff1yID_yU_E($pWYnwoBd=- z2q^6^ipC*$#kz$SpJCz8x!l12_|9t8yh67;+^xUsP|Fn0(c72AcTfY9|x65C;Yz004+q B65s#; diff --git a/docs/source/auto_examples/example_nn_Si.ipynb b/docs/source/auto_examples/example_nn_Si.ipynb index b569df60..27752f77 100644 --- a/docs/source/auto_examples/example_nn_Si.ipynb +++ b/docs/source/auto_examples/example_nn_Si.ipynb @@ -125,6 +125,13 @@ "source": [ "model.save(\"./final_model.pkl\")\nloss.save_optimizer_stat(\"./optimizer_stat.pkl\")\n\nmodel.write_kim_model()" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Note

Now we have trained an NN for a single specie Si. If you have multiple species in\n your system and want to use different parameters for different species,\n take a look at the SiC_ example.

\n\n\n" + ] } ], "metadata": { diff --git a/docs/source/auto_examples/example_nn_Si.py b/docs/source/auto_examples/example_nn_Si.py index 864c8054..d169845e 100644 --- a/docs/source/auto_examples/example_nn_Si.py +++ b/docs/source/auto_examples/example_nn_Si.py @@ -141,3 +141,12 @@ loss.save_optimizer_stat("./optimizer_stat.pkl") model.write_kim_model() + + +########################################################################################## +# .. note:: +# Now we have trained an NN for a single specie Si. If you have multiple species in +# your system and want to use different parameters for different species, +# take a look at the SiC_ example. +# +# .. _SiC: https://github.com/mjwen/kliff/blob/master/examples/eg_nn_SiC.py diff --git a/docs/source/auto_examples/example_nn_Si.py.md5 b/docs/source/auto_examples/example_nn_Si.py.md5 index 702d4469..9b2a8f25 100644 --- a/docs/source/auto_examples/example_nn_Si.py.md5 +++ b/docs/source/auto_examples/example_nn_Si.py.md5 @@ -1 +1 @@ -99c760f443633dcf0ce755d5995447f7 \ No newline at end of file +6baccb59d251b6e52d886f0ec66aa7ae \ No newline at end of file diff --git a/docs/source/auto_examples/example_nn_Si.rst b/docs/source/auto_examples/example_nn_Si.rst index 929a71c0..c2871501 100644 --- a/docs/source/auto_examples/example_nn_Si.rst +++ b/docs/source/auto_examples/example_nn_Si.rst @@ -242,6 +242,8 @@ codes such as LAMMPS via the KIM API. + + .. rst-class:: sphx-glr-script-out Out: @@ -253,10 +255,17 @@ codes such as LAMMPS via the KIM API. +.. note:: + Now we have trained an NN for a single specie Si. If you have multiple species in + your system and want to use different parameters for different species, + take a look at the SiC_ example. + +.. _SiC: https://github.com/mjwen/kliff/blob/master/examples/eg_nn_SiC.py + .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 16.523 seconds) + **Total running time of the script:** ( 0 minutes 16.575 seconds) .. _sphx_glr_download_auto_examples_example_nn_Si.py: diff --git a/docs/source/auto_examples/example_nn_Si_codeobj.pickle b/docs/source/auto_examples/example_nn_Si_codeobj.pickle index c31fa6eaf825c85e010df52149cd243b10561b90..a3c6b2c07dde1cf8cf7ed988d057edaa32b81caf 100644 GIT binary patch delta 209 zcmbO#I8|_h-sA{I8TKBQyu{qpDU-_>l{kCYa`RJ4bAY@Ub~*kY9tbbKI3vHPWXj}S zjBb->GWk!oXNj52&Z@>JH+d#Y-efuU{K;yJMw7XiT_*RkhfQ{73Y)~_JlTg$lhJkZ zYc}J_kJ%$8FJSYVT*;=w7%}-WbI#<=%<_zhlbFK(cbQH; z!0bFZi#crKd;iHhS>+jxCZA(+o1Dy^%FN_vGRUWp2euf z7(Dqj+l