span>
0088     <span class="comment">% compute connection strengths from interface energies</span>
0089     <span class="comment">%   first, normalize energy:</span>
0090     normalize = ((numpts * numpts') - diag(numpts));    <span class="comment">% Off diag: Na*Nb, On diag: Na^2-Na ...</span>
0091     normalize = normalize - diag(0.5*diag(normalize));  <span class="comment">% ... and divide diagonal by 2</span>
0092     norm_energy = interface_energy ./ normalize;
0093     <span class="comment">%   then, 