Skip to content

Commit

Permalink
deploy: 764fdb5
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronabrams committed Feb 24, 2024
1 parent 6fedeb0 commit 6175090
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _modules/HTPolyNet/topocoord.html
Original file line number Diff line number Diff line change
Expand Up @@ -1804,8 +1804,8 @@ <h1>Source code for HTPolyNet.topocoord</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">new_bdf</span>
<span class="c1"># make a temporary working copy of the bondchains structure from its snapshot</span>
<span class="n">tmp_local_cm</span><span class="o">=</span><span class="n">deepcopy</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ChainManager</span><span class="p">)</span>
<span class="n">existing_cycles</span><span class="o">=</span><span class="p">[</span><span class="n">x</span><span class="o">.</span><span class="n">idx</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">tmp_local_cm</span><span class="o">.</span><span class="n">chains</span> <span class="k">if</span> <span class="n">x</span><span class="o">.</span><span class="n">is_cyclic</span><span class="p">]</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Existing cyclic C-C chains: </span><span class="si">{</span><span class="n">existing_cycles</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="n">existing_cyclic_chains</span><span class="o">=</span><span class="p">[</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">tmp_local_cm</span><span class="o">.</span><span class="n">chains</span> <span class="k">if</span> <span class="n">x</span><span class="o">.</span><span class="n">is_cyclic</span><span class="p">]</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Existing cyclic C-C chains: </span><span class="si">{</span><span class="p">[</span><span class="n">c</span><span class="o">.</span><span class="n">idx</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">existing_cyclic_chains</span><span class="p">]</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="c1"># bondchains=[working_bondlist(i,self.idx_lists[&#39;bondchain&#39;][i][:]) for i in range(len(self.idx_lists[&#39;bondchain&#39;]))]</span>
<span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="n">bdf</span><span class="o">.</span><span class="n">iterrows</span><span class="p">():</span>
<span class="n">tmp_local_cm</span><span class="o">.</span><span class="n">injest_bond</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">ai</span><span class="p">,</span><span class="n">r</span><span class="o">.</span><span class="n">aj</span><span class="p">)</span>
Expand All @@ -1815,7 +1815,7 @@ <h1>Source code for HTPolyNet.topocoord</h1><div class="highlight"><pre>
<span class="n">c</span><span class="o">.</span><span class="n">added_bonds</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
<span class="c1"># addlink(bondchains,i,r.ai,r.aj)</span>
<span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">tmp_local_cm</span><span class="o">.</span><span class="n">chains</span><span class="p">:</span>
<span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">is_cyclic</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">c</span><span class="o">.</span><span class="n">idx</span> <span class="ow">in</span> <span class="n">existing_cycles</span><span class="p">:</span>
<span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">is_cyclic</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">existing_cyclic_chains</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Bondchain </span><span class="si">{</span><span class="n">c</span><span class="o">.</span><span class="n">idx</span><span class="si">}</span><span class="s1"> (</span><span class="si">{</span><span class="s2">&quot;-&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">str</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">c</span><span class="o">.</span><span class="n">idx_list</span><span class="p">])</span><span class="si">}</span><span class="s1">) is a new cycle&#39;</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;-&gt; New bonds added: </span><span class="si">{</span><span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">str</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">c</span><span class="o">.</span><span class="n">added_bonds</span><span class="p">])</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;-&gt; Cycle length is </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">idx_list</span><span class="p">)</span><span class="si">}</span><span class="s1"> atoms&#39;</span><span class="p">)</span>
Expand Down

0 comments on commit 6175090

Please sign in to comment.