Skip to content

Commit

Permalink
deploy: 01320fa
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomDefaultUser committed Nov 21, 2024
1 parent 0139675 commit de17536
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 94 deletions.
102 changes: 84 additions & 18 deletions _modules/mala/common/parameters.html

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions _modules/mala/network/hyper_opt_oat.html
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,6 @@ <h1>Source code for mala.network.hyper_opt_oat</h1><div class="highlight"><pre>

<span class="bp">self</span><span class="o">.</span><span class="n">_save_params_and_scaler</span><span class="p">()</span>

<span class="c1"># Next, we save all the other objects.</span>
<span class="c1"># Here some horovod stuff would have to go.</span>
<span class="c1"># But so far, the optuna implementation is not horovod-ready...</span>
<span class="c1"># if self.params.use_horovod:</span>
<span class="c1"># if hvd.rank() != 0:</span>
<span class="c1"># return</span>
<span class="c1"># The study only has to be saved if the no RDB storage is used.</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">hyperparameters</span><span class="o">.</span><span class="n">rdb_storage</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">hyperopt_name</span> <span class="o">=</span> <span class="p">(</span>
Expand Down
6 changes: 0 additions & 6 deletions _modules/mala/network/hyper_opt_optuna.html
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,6 @@ <h1>Source code for mala.network.hyper_opt_optuna</h1><div class="highlight"><pr

<span class="bp">self</span><span class="o">.</span><span class="n">_save_params_and_scaler</span><span class="p">()</span>

<span class="c1"># Next, we save all the other objects.</span>
<span class="c1"># Here some horovod stuff would have to go.</span>
<span class="c1"># But so far, the optuna implementation is not horovod-ready...</span>
<span class="c1"># if self.params.use_horovod:</span>
<span class="c1"># if hvd.rank() != 0:</span>
<span class="c1"># return</span>
<span class="c1"># The study only has to be saved if the no RDB storage is used.</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">hyperparameters</span><span class="o">.</span><span class="n">rdb_storage</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">hyperopt_name</span> <span class="o">=</span> <span class="p">(</span>
Expand Down
8 changes: 4 additions & 4 deletions _modules/mala/targets/density.html
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ <h1>Source code for mala.targets.density</h1><div class="highlight"><pre>
<span class="c1"># instantiate the process with the file.</span>
<span class="n">positions_for_qe</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_scaled_positions_for_qe</span><span class="p">(</span><span class="n">atoms_Angstrom</span><span class="p">)</span>

<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parameters_full</span><span class="o">.</span><span class="n">descriptors</span><span class="o">.</span><span class="n">use_atomic_density_energy_formula</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">_configuration</span><span class="p">[</span><span class="s2">&quot;atomic_density_formula&quot;</span><span class="p">]:</span>
<span class="c1"># Calculate the Gaussian descriptors for the calculation of the</span>
<span class="c1"># structure factors.</span>
<span class="n">barrier</span><span class="p">()</span>
Expand Down Expand Up @@ -1335,8 +1335,8 @@ <h1>Source code for mala.targets.density</h1><div class="highlight"><pre>
<span class="n">te</span><span class="o">.</span><span class="n">set_positions</span><span class="p">(</span>
<span class="n">np</span><span class="o">.</span><span class="n">transpose</span><span class="p">(</span><span class="n">positions_for_qe</span><span class="p">),</span>
<span class="n">number_of_atoms</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_parameters_full</span><span class="o">.</span><span class="n">descriptors</span><span class="o">.</span><span class="n">use_atomic_density_energy_formula</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_parameters_full</span><span class="o">.</span><span class="n">descriptors</span><span class="o">.</span><span class="n">use_atomic_density_energy_formula</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">_configuration</span><span class="p">[</span><span class="s2">&quot;atomic_density_formula&quot;</span><span class="p">],</span>
<span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">_configuration</span><span class="p">[</span><span class="s2">&quot;atomic_density_formula&quot;</span><span class="p">],</span>
<span class="p">)</span>
<span class="n">barrier</span><span class="p">()</span>
<span class="n">printout</span><span class="p">(</span>
Expand All @@ -1347,7 +1347,7 @@ <h1>Source code for mala.targets.density</h1><div class="highlight"><pre>
<span class="p">)</span>
<span class="n">barrier</span><span class="p">()</span>

<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_parameters_full</span><span class="o">.</span><span class="n">descriptors</span><span class="o">.</span><span class="n">use_atomic_density_energy_formula</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">_configuration</span><span class="p">[</span><span class="s2">&quot;atomic_density_formula&quot;</span><span class="p">]:</span>
<span class="n">t0</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">perf_counter</span><span class="p">()</span>
<span class="n">gaussian_descriptors</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span>
<span class="n">gaussian_descriptors</span><span class="p">,</span>
Expand Down
6 changes: 4 additions & 2 deletions _sources/advanced_usage/predictions.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ Gaussian representation of atomic positions. In this algorithm, most of the
computational overhead of the total energy calculation is offloaded to the
computation of this Gaussian representation. This calculation is realized via
LAMMPS and can therefore be GPU accelerated (parallelized) in the same fashion
as the bispectrum descriptor calculation. Simply activate this option via
as the bispectrum descriptor calculation. If a GPU is activated (and LAMMPS
is available), this option will be used by default. It can also manually be
activated via

.. code-block:: python
parameters.descriptors.use_atomic_density_energy_formula = True
parameters.use_atomic_density_formula = True
The Gaussian representation algorithm is describe in
the publication `Predicting electronic structures at any length scale with machine learning <doi.org/10.1038/s41524-023-01070-z>`_.
Expand Down
6 changes: 4 additions & 2 deletions advanced_usage/predictions.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@
computational overhead of the total energy calculation is offloaded to the
computation of this Gaussian representation. This calculation is realized via
LAMMPS and can therefore be GPU accelerated (parallelized) in the same fashion
as the bispectrum descriptor calculation. Simply activate this option via</p>
as the bispectrum descriptor calculation. If a GPU is activated (and LAMMPS
is available), this option will be used by default. It can also manually be
activated via</p>
<blockquote>
<div><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">parameters</span><span class="o">.</span><span class="n">descriptors</span><span class="o">.</span><span class="n">use_atomic_density_energy_formula</span> <span class="o">=</span> <span class="kc">True</span>
<div><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">parameters</span><span class="o">.</span><span class="n">use_atomic_density_formula</span> <span class="o">=</span> <span class="kc">True</span>
</pre></div>
</div>
</div></blockquote>
Expand Down
4 changes: 1 addition & 3 deletions api/mala.common.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ <h1>common<a class="headerlink" href="#common" title="Link to this heading"><
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.data"><code class="docutils literal notranslate"><span class="pre">Parameters.data</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.running"><code class="docutils literal notranslate"><span class="pre">Parameters.running</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.hyperparameters"><code class="docutils literal notranslate"><span class="pre">Parameters.hyperparameters</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.debug"><code class="docutils literal notranslate"><span class="pre">Parameters.debug</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.manual_seed"><code class="docutils literal notranslate"><span class="pre">Parameters.manual_seed</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.load_from_file"><code class="docutils literal notranslate"><span class="pre">Parameters.load_from_file()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.load_from_json"><code class="docutils literal notranslate"><span class="pre">Parameters.load_from_json()</span></code></a></li>
Expand All @@ -159,6 +158,7 @@ <h1>common<a class="headerlink" href="#common" title="Link to this heading"><
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.device"><code class="docutils literal notranslate"><span class="pre">Parameters.device</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.openpmd_configuration"><code class="docutils literal notranslate"><span class="pre">Parameters.openpmd_configuration</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.openpmd_granularity"><code class="docutils literal notranslate"><span class="pre">Parameters.openpmd_granularity</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.use_atomic_density_formula"><code class="docutils literal notranslate"><span class="pre">Parameters.use_atomic_density_formula</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.use_ddp"><code class="docutils literal notranslate"><span class="pre">Parameters.use_ddp</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.use_gpu"><code class="docutils literal notranslate"><span class="pre">Parameters.use_gpu</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.Parameters.use_lammps"><code class="docutils literal notranslate"><span class="pre">Parameters.use_lammps</span></code></a></li>
Expand All @@ -173,7 +173,6 @@ <h1>common<a class="headerlink" href="#common" title="Link to this heading"><
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersData"><code class="docutils literal notranslate"><span class="pre">ParametersData</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersData.descriptors_contain_xyz"><code class="docutils literal notranslate"><span class="pre">ParametersData.descriptors_contain_xyz</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersData.snapshot_directories_list"><code class="docutils literal notranslate"><span class="pre">ParametersData.snapshot_directories_list</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersData.data_splitting_type"><code class="docutils literal notranslate"><span class="pre">ParametersData.data_splitting_type</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersData.input_rescaling_type"><code class="docutils literal notranslate"><span class="pre">ParametersData.input_rescaling_type</span></code></a></li>
Expand Down Expand Up @@ -205,7 +204,6 @@ <h1>common<a class="headerlink" href="#common" title="Link to this heading"><
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersDescriptors.lammps_compute_file"><code class="docutils literal notranslate"><span class="pre">ParametersDescriptors.lammps_compute_file</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersDescriptors.descriptors_contain_xyz"><code class="docutils literal notranslate"><span class="pre">ParametersDescriptors.descriptors_contain_xyz</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersDescriptors.atomic_density_sigma"><code class="docutils literal notranslate"><span class="pre">ParametersDescriptors.atomic_density_sigma</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersDescriptors.use_atomic_density_energy_formula"><code class="docutils literal notranslate"><span class="pre">ParametersDescriptors.use_atomic_density_energy_formula</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersDescriptors.bispectrum_cutoff"><code class="docutils literal notranslate"><span class="pre">ParametersDescriptors.bispectrum_cutoff</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersDescriptors.bispectrum_switchflag"><code class="docutils literal notranslate"><span class="pre">ParametersDescriptors.bispectrum_switchflag</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="mala.common.parameters.html#mala.common.parameters.ParametersDescriptors.use_y_splitting"><code class="docutils literal notranslate"><span class="pre">ParametersDescriptors.use_y_splitting</span></code></a></li>
Expand Down
Loading

0 comments on commit de17536

Please sign in to comment.