Skip to content

Commit f6a6da9

Browse files
committed
deploy: 51f73c8
1 parent d5daae2 commit f6a6da9

File tree

8 files changed

+466
-2
lines changed

8 files changed

+466
-2
lines changed

_modules/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ <h1>All modules for which code is available</h1>
274274
<li><a href="torch_molecule/generator/digress/modeling_digress.html">torch_molecule.generator.digress.modeling_digress</a></li>
275275
<li><a href="torch_molecule/generator/graph_dit/modeling_graph_dit.html">torch_molecule.generator.graph_dit.modeling_graph_dit</a></li>
276276
<li><a href="torch_molecule/generator/graph_ga/modeling_graph_ga.html">torch_molecule.generator.graph_ga.modeling_graph_ga</a></li>
277+
<li><a href="torch_molecule/generator/graph_ga/oracle.html">torch_molecule.generator.graph_ga.oracle</a></li>
277278
<li><a href="torch_molecule/generator/molgpt/modeling_molgpt.html">torch_molecule.generator.molgpt.modeling_molgpt</a></li>
278279
<li><a href="torch_molecule/nn/attention.html">torch_molecule.nn.attention</a></li>
279280
<li><a href="torch_molecule/nn/embedder.html">torch_molecule.nn.embedder</a></li>

_modules/torch_molecule/generator/graph_ga/oracle.html

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

_sources/api/generator.rst.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ Modeling Molecules as Graphs with Heuristic-based Generators
5454
:undoc-members:
5555
:show-inheritance:
5656

57+
.. rubric:: Default Oracles in GraphGA
58+
.. autoclass:: torch_molecule.generator.graph_ga.oracle.Oracle
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
5763
Modeling Molecules as Sequences with Transformer-based Generators
5864
-----------------------------------------------------------------
5965

api/generator.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,45 @@ <h2>Modeling Molecules as Graphs with Heuristic-based Generators<a class="header
503503

504504
</dd></dl>
505505

506+
<p class="rubric">Default Oracles in GraphGA</p>
507+
<dl class="py class">
508+
<dt class="sig sig-object py" id="torch_molecule.generator.graph_ga.oracle.Oracle">
509+
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">torch_molecule.generator.graph_ga.oracle.</span></span><span class="sig-name descname"><span class="pre">Oracle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">models</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">num_task</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/torch_molecule/generator/graph_ga/oracle.html#Oracle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#torch_molecule.generator.graph_ga.oracle.Oracle" title="Link to this definition"></a></dt>
510+
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
511+
<p>Oracle class for scoring molecules.</p>
512+
<p>This class wraps predictive models (like RandomForestRegressor) to score molecules
513+
based on their properties. It handles conversion of SMILES to fingerprints.</p>
514+
<dl class="field-list simple">
515+
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
516+
<dd class="field-odd"><ul class="simple">
517+
<li><p><strong>models</strong> (<em>List</em><em>[</em><em>Any</em><em>]</em><em>, </em><em>optional</em>) – List of trained models that implement a predict method.
518+
If None, RandomForestRegressors will be created when fit is called.</p></li>
519+
<li><p><strong>num_task</strong> (<em>int</em><em>, </em><em>default=1</em>) – Number of properties to predict.</p></li>
520+
</ul>
521+
</dd>
522+
</dl>
523+
<dl class="py method">
524+
<dt class="sig sig-object py" id="torch_molecule.generator.graph_ga.oracle.Oracle.fit">
525+
<span class="sig-name descname"><span class="pre">fit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X_train</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y_train</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/torch_molecule/generator/graph_ga/oracle.html#Oracle.fit"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#torch_molecule.generator.graph_ga.oracle.Oracle.fit" title="Link to this definition"></a></dt>
526+
<dd><p>Fit the underlying models with training data.</p>
527+
<dl class="field-list simple">
528+
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
529+
<dd class="field-odd"><ul class="simple">
530+
<li><p><strong>X_train</strong> (<em>List</em><em>[</em><em>str</em><em>] or </em><em>List</em><em>[</em><em>RDKit.Mol</em><em>]</em>) – Training molecules as SMILES strings or RDKit Mol objects.</p></li>
531+
<li><p><strong>y_train</strong> (<em>np.ndarray</em>) – Training labels with shape (n_samples, num_task).</p></li>
532+
</ul>
533+
</dd>
534+
<dt class="field-even">Returns<span class="colon">:</span></dt>
535+
<dd class="field-even"><p><strong>self</strong> – Fitted oracle.</p>
536+
</dd>
537+
<dt class="field-odd">Return type<span class="colon">:</span></dt>
538+
<dd class="field-odd"><p><a class="reference internal" href="#torch_molecule.generator.graph_ga.oracle.Oracle" title="torch_molecule.generator.graph_ga.oracle.Oracle">Oracle</a></p>
539+
</dd>
540+
</dl>
541+
</dd></dl>
542+
543+
</dd></dl>
544+
506545
</section>
507546
<section id="modeling-molecules-as-sequences-with-transformer-based-generators">
508547
<h2>Modeling Molecules as Sequences with Transformer-based Generators<a class="headerlink" href="#modeling-molecules-as-sequences-with-transformer-based-generators" title="Link to this heading"></a></h2>
@@ -668,6 +707,10 @@ <h2>Modeling Molecules as Sequences with Transformer-based Generators<a class="h
668707
<li><a class="reference internal" href="#torch_molecule.generator.graph_ga.modeling_graph_ga.GraphGAMolecularGenerator.generate"><code class="docutils literal notranslate"><span class="pre">GraphGAMolecularGenerator.generate()</span></code></a></li>
669708
</ul>
670709
</li>
710+
<li><a class="reference internal" href="#torch_molecule.generator.graph_ga.oracle.Oracle"><code class="docutils literal notranslate"><span class="pre">Oracle</span></code></a><ul>
711+
<li><a class="reference internal" href="#torch_molecule.generator.graph_ga.oracle.Oracle.fit"><code class="docutils literal notranslate"><span class="pre">Oracle.fit()</span></code></a></li>
712+
</ul>
713+
</li>
671714
</ul>
672715
</li>
673716
<li><a class="reference internal" href="#modeling-molecules-as-sequences-with-transformer-based-generators">Modeling Molecules as Sequences with Transformer-based Generators</a><ul>

genindex.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261

262262
<section class="genindex-section">
263263
<h1 id="index">Index</h1>
264-
<div class="genindex-jumpbox"><a href="#A"><strong>A</strong></a> | <a href="#B"><strong>B</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#L"><strong>L</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#V"><strong>V</strong></a></div>
264+
<div class="genindex-jumpbox"><a href="#A"><strong>A</strong></a> | <a href="#B"><strong>B</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#L"><strong>L</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#O"><strong>O</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#V"><strong>V</strong></a></div>
265265
</section>
266266
<section id="A" class="genindex-section">
267267
<h2>A</h2>
@@ -439,6 +439,8 @@ <h2>F</h2>
439439
<li><a href="api/generator.html#torch_molecule.generator.graph_dit.modeling_graph_dit.GraphDITMolecularGenerator.fit">(torch_molecule.generator.graph_dit.modeling_graph_dit.GraphDITMolecularGenerator method)</a>
440440
</li>
441441
<li><a href="api/generator.html#torch_molecule.generator.graph_ga.modeling_graph_ga.GraphGAMolecularGenerator.fit">(torch_molecule.generator.graph_ga.modeling_graph_ga.GraphGAMolecularGenerator method)</a>
442+
</li>
443+
<li><a href="api/generator.html#torch_molecule.generator.graph_ga.oracle.Oracle.fit">(torch_molecule.generator.graph_ga.oracle.Oracle method)</a>
442444
</li>
443445
<li><a href="api/generator.html#torch_molecule.generator.molgpt.modeling_molgpt.MolGPTMolecularGenerator.fit">(torch_molecule.generator.molgpt.modeling_molgpt.MolGPTMolecularGenerator method)</a>
444446
</li>
@@ -710,6 +712,16 @@ <h2>N</h2>
710712
</tr></table>
711713
</section>
712714

715+
<section id="O" class="genindex-section">
716+
<h2>O</h2>
717+
<table style="width: 100%" class="indextable genindextable"><tr>
718+
<td style="width: 33%; vertical-align: top;"><ul>
719+
<li><a href="api/generator.html#torch_molecule.generator.graph_ga.oracle.Oracle">Oracle (class in torch_molecule.generator.graph_ga.oracle)</a>
720+
</li>
721+
</ul></td>
722+
</tr></table>
723+
</section>
724+
713725
<section id="P" class="genindex-section">
714726
<h2>P</h2>
715727
<table style="width: 100%" class="indextable genindextable"><tr>

objects.inv

11 Bytes
Binary file not shown.

overview.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ <h2>Model Persistence<a class="headerlink" href="#model-persistence" title="Link
314314
</li>
315315
<li class="toctree-l2"><a class="reference internal" href="api/generator.html#modeling-molecules-as-graphs-with-heuristic-based-generators">Modeling Molecules as Graphs with Heuristic-based Generators</a><ul>
316316
<li class="toctree-l3"><a class="reference internal" href="api/generator.html#torch_molecule.generator.graph_ga.modeling_graph_ga.GraphGAMolecularGenerator"><code class="docutils literal notranslate"><span class="pre">GraphGAMolecularGenerator</span></code></a></li>
317+
<li class="toctree-l3"><a class="reference internal" href="api/generator.html#torch_molecule.generator.graph_ga.oracle.Oracle"><code class="docutils literal notranslate"><span class="pre">Oracle</span></code></a></li>
317318
</ul>
318319
</li>
319320
<li class="toctree-l2"><a class="reference internal" href="api/generator.html#modeling-molecules-as-sequences-with-transformer-based-generators">Modeling Molecules as Sequences with Transformer-based Generators</a><ul>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)