Skip to content

Commit

Permalink
Deploying to gh-pages from main @ 2c5e04b 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
rugeli committed Nov 6, 2023
1 parent 594c2b9 commit b7ee02e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions _modules/cellpack/autopack/loaders/migrate_v1_to_v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ <h1>Source code for cellpack.autopack.loaders.migrate_v1_to_v2</h1><div class="h
<span class="n">new_ingredient</span><span class="p">[</span><span class="s2">&quot;representations&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">get_representations</span><span class="p">(</span><span class="n">old_ingredient</span><span class="p">)</span>
<span class="k">if</span> <span class="n">new_ingredient</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="n">INGREDIENT_TYPE</span><span class="o">.</span><span class="n">SINGLE_SPHERE</span><span class="p">:</span>
<span class="n">new_ingredient</span><span class="p">[</span><span class="s2">&quot;radius&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">old_ingredient</span><span class="p">[</span><span class="s2">&quot;radii&quot;</span><span class="p">][</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
<span class="k">if</span> <span class="s2">&quot;partners&quot;</span> <span class="ow">in</span> <span class="n">new_ingredient</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">new_ingredient</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;names&quot;</span><span class="p">):</span>
<span class="k">del</span> <span class="n">new_ingredient</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">new_ingredient</span></div>


Expand Down
7 changes: 5 additions & 2 deletions _modules/cellpack/autopack/loaders/migrate_v2_to_v2_1.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1>Source code for cellpack.autopack.loaders.migrate_v2_to_v2_1</h1><div class=
<a class="viewcode-back" href="../../../../cellpack.autopack.loaders.html#cellpack.autopack.loaders.migrate_v2_to_v2_1.convert_partners">[docs]</a>
<span class="k">def</span> <span class="nf">convert_partners</span><span class="p">(</span><span class="n">object_data</span><span class="p">):</span>
<span class="n">partners_list</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">if</span> <span class="s2">&quot;names&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="s2">&quot;partners&quot;</span><span class="p">:</span>
<span class="k">if</span> <span class="s2">&quot;names&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">]:</span>
<span class="k">return</span> <span class="n">partners_list</span>
<span class="k">for</span> <span class="n">index</span><span class="p">,</span> <span class="n">name</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">][</span><span class="s2">&quot;names&quot;</span><span class="p">]):</span>
<span class="n">positions</span> <span class="o">=</span> <span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">][</span><span class="s2">&quot;positions&quot;</span><span class="p">]</span>
Expand All @@ -58,7 +58,10 @@ <h1>Source code for cellpack.autopack.loaders.migrate_v2_to_v2_1</h1><div class=
<span class="n">binding_probability</span> <span class="o">=</span> <span class="mf">1.0</span>
<span class="k">if</span> <span class="s2">&quot;probability_binding&quot;</span> <span class="ow">in</span> <span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">]:</span>
<span class="n">binding_probability</span> <span class="o">=</span> <span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">][</span><span class="s2">&quot;probability_binding&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="s2">&quot;probability_repelled&quot;</span> <span class="ow">in</span> <span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">]:</span>
<span class="k">if</span> <span class="p">(</span>
<span class="s2">&quot;probability_repelled&quot;</span> <span class="ow">in</span> <span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">]</span>
<span class="ow">and</span> <span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">][</span><span class="s2">&quot;probability_repelled&quot;</span><span class="p">]</span> <span class="o">&lt;</span> <span class="mi">0</span>
<span class="p">):</span>
<span class="n">binding_probability</span> <span class="o">=</span> <span class="o">-</span><span class="n">object_data</span><span class="p">[</span><span class="s2">&quot;partners&quot;</span><span class="p">][</span><span class="s2">&quot;probability_repelled&quot;</span><span class="p">]</span>

<span class="n">partner</span> <span class="o">=</span> <span class="p">{</span>
Expand Down

0 comments on commit b7ee02e

Please sign in to comment.