<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.20" xml:lang="en-US">
  <compounddef id="ecpint_8cpp" kind="file" language="C++">
    <compoundname>ecpint.cpp</compoundname>
    <includes refid="ecpint_8hpp" local="yes">ecpint.hpp</includes>
    <includes local="no">iostream</includes>
    <includes local="no">cmath</includes>
    <includes local="no">cassert</includes>
    <includes local="yes">Faddeeva.hpp</includes>
    <includes refid="mathutil_8hpp" local="yes">mathutil.hpp</includes>
    <includes refid="qgen_8hpp" local="yes">qgen.hpp</includes>
    <incdepgraph>
      <node id="10">
        <label>functional</label>
      </node>
      <node id="11">
        <label>ecp.hpp</label>
        <link refid="ecp_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="25">
        <label>qgen.hpp</label>
        <link refid="qgen_8hpp"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="23">
        <label>mathutil.hpp</label>
        <link refid="mathutil_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>ecpint.hpp</label>
        <link refid="ecpint_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>bessel.hpp</label>
        <link refid="bessel_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>cmath</label>
      </node>
      <node id="21">
        <label>cassert</label>
      </node>
      <node id="24">
        <label>numeric</label>
      </node>
      <node id="13">
        <label>string</label>
      </node>
      <node id="12">
        <label>map</label>
      </node>
      <node id="17">
        <label>gshell.hpp</label>
        <link refid="gshell_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="18">
        <label>angular.hpp</label>
        <link refid="angular_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>config.hpp</label>
      </node>
      <node id="6">
        <label>tuple</label>
      </node>
      <node id="22">
        <label>Faddeeva.hpp</label>
      </node>
      <node id="1">
        <label>/Users/robertshaw/devfiles/libecpint/src/lib/ecpint.cpp</label>
        <link refid="ecpint_8cpp"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>vector</label>
      </node>
      <node id="4">
        <label>array</label>
      </node>
      <node id="8">
        <label>sstream</label>
      </node>
      <node id="5">
        <label>multiarr.hpp</label>
        <link refid="multiarr_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
      </node>
      <node id="19">
        <label>iostream</label>
      </node>
      <node id="9">
        <label>gaussquad.hpp</label>
        <link refid="gaussquad_8hpp"/>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>radial.hpp</label>
        <link refid="radial_8hpp"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>algorithm</label>
      </node>
    </incdepgraph>
    <innernamespace refid="namespacelibecpint">libecpint</innernamespace>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*<sp/></highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>Copyright<sp/>(c)<sp/>2020<sp/>Robert<sp/>Shaw</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>This<sp/>file<sp/>is<sp/>a<sp/>part<sp/>of<sp/>Libecpint.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>Permission<sp/>is<sp/>hereby<sp/>granted,<sp/>free<sp/>of<sp/>charge,<sp/>to<sp/>any<sp/>person<sp/>obtaining</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>a<sp/>copy<sp/>of<sp/>this<sp/>software<sp/>and<sp/>associated<sp/>documentation<sp/>files<sp/>(the</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>&quot;Software&quot;),<sp/>to<sp/>deal<sp/>in<sp/>the<sp/>Software<sp/>without<sp/>restriction,<sp/>including</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>without<sp/>limitation<sp/>the<sp/>rights<sp/>to<sp/>use,<sp/>copy,<sp/>modify,<sp/>merge,<sp/>publish,</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>distribute,<sp/>sublicense,<sp/>and/or<sp/>sell<sp/>copies<sp/>of<sp/>the<sp/>Software,<sp/>and<sp/>to</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>permit<sp/>persons<sp/>to<sp/>whom<sp/>the<sp/>Software<sp/>is<sp/>furnished<sp/>to<sp/>do<sp/>so,<sp/>subject<sp/>to</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>The<sp/>above<sp/>copyright<sp/>notice<sp/>and<sp/>this<sp/>permission<sp/>notice<sp/>shall<sp/>be</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>included<sp/>in<sp/>all<sp/>copies<sp/>or<sp/>substantial<sp/>portions<sp/>of<sp/>the<sp/>Software.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>THE<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>&quot;AS<sp/>IS&quot;,<sp/>WITHOUT<sp/>WARRANTY<sp/>OF<sp/>ANY<sp/>KIND,</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>EXPRESS<sp/>OR<sp/>IMPLIED,<sp/>INCLUDING<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO<sp/>THE<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>NONINFRINGEMENT.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>AUTHORS<sp/>OR<sp/>COPYRIGHT<sp/>HOLDERS<sp/>BE</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>CLAIM,<sp/>DAMAGES<sp/>OR<sp/>OTHER<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>AN<sp/>ACTION</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>OF<sp/>CONTRACT,<sp/>TORT<sp/>OR<sp/>OTHERWISE,<sp/>ARISING<sp/>FROM,<sp/>OUT<sp/>OF<sp/>OR<sp/>IN<sp/>CONNECTION</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>WITH<sp/>THE<sp/>SOFTWARE<sp/>OR<sp/>THE<sp/>USE<sp/>OR<sp/>OTHER<sp/>DEALINGS<sp/>IN<sp/>THE<sp/>SOFTWARE.</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ecpint_8hpp" kindref="compound">ecpint.hpp</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;iostream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cmath&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cassert&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;Faddeeva.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="mathutil_8hpp" kindref="compound">mathutil.hpp</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="qgen_8hpp" kindref="compound">qgen.hpp</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cassert&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal"><ref refid="namespacelibecpint" kindref="compound">libecpint</ref><sp/>{</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36" refid="classlibecpint_1_1_e_c_p_integral_1ae5871ce6997e2893ff6a8bd24fe236b0" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1ae5871ce6997e2893ff6a8bd24fe236b0" kindref="member">ECPIntegral::ECPIntegral</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>maxLB,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>maxLU,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>deriv)<sp/>{</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Make<sp/>sure<sp/>library<sp/>can<sp/>perform<sp/>requested<sp/>integrals</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>assert(maxLB+deriv<sp/>&lt;=<sp/>LIBECPINT_MAX_L);<sp/></highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>assert(maxLU<sp/>&lt;=<sp/>LIBECPINT_MAX_L);</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialise<sp/>singletons</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespacelibecpint_1a0d3d7448d52abd739d6d100afa6d4e8a" kindref="member">initFactorials</ref>();</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aae5da3068b091751bb508d88aed0fe01" kindref="member">zero</ref><sp/>=<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1ad5e0dad126b9c0631dd3afe137c58d64" kindref="member">nonzero</ref><sp/>=<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aba908eb13b8af1c8e75985689e261b52" kindref="member">skipped</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialise<sp/>angular<sp/>and<sp/>radial<sp/>integrators</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>.<ref refid="classlibecpint_1_1_angular_integral_1aa800d3d2f3edac502daf5e8fc332d710" kindref="member">init</ref>(maxLB<sp/>+<sp/>deriv,<sp/>maxLU);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>.<ref refid="classlibecpint_1_1_angular_integral_1a2d43cc97a39834a4d398a952396b3ae7" kindref="member">compute</ref>();</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1af9cee7a7a59bfa3ae1645d77b3fec7d6" kindref="member">radInts</ref>.<ref refid="classlibecpint_1_1_radial_integral_1ab393e4e63a410d922c4b8fa1bee7df3f" kindref="member">init</ref>(2*(maxLB+deriv)<sp/>+<sp/>maxLU,<sp/>1e-15,<sp/>256,<sp/>512);</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51" refid="classlibecpint_1_1_e_c_p_integral_1a4659eadbdeaf45a872facaf1f88c5664" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a4659eadbdeaf45a872facaf1f88c5664" kindref="member">ECPIntegral::calcC</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>a,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>A)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>value<sp/>=<sp/>1.0<sp/>-<sp/>2*((a-m)<sp/>%<sp/>2);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>value<sp/>*=<sp/>std::pow(A,<sp/>a-m);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>value<sp/>*=<sp/><ref refid="namespacelibecpint_1a975e7b9e0f57709418adede308d80405" kindref="member">FAC</ref>[a]/(<ref refid="namespacelibecpint_1a975e7b9e0f57709418adede308d80405" kindref="member">FAC</ref>[m]<sp/>*<sp/><ref refid="namespacelibecpint_1a975e7b9e0f57709418adede308d80405" kindref="member">FAC</ref>[a-m]);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>value;</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58" refid="classlibecpint_1_1_e_c_p_integral_1ac87491d54072488ef0862d9e2d0b0853" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1ac87491d54072488ef0862d9e2d0b0853" kindref="member">ECPIntegral::makeC</ref>(<ref refid="structlibecpint_1_1_five_index" kindref="compound">FiveIndex&lt;double&gt;</ref><sp/>&amp;C,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>L,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*A)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>z;<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ck,<sp/>Cl;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>na<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x<sp/>=<sp/>L;<sp/>x<sp/>&gt;=<sp/>0;<sp/>x--)<sp/>{</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>y<sp/>=<sp/>L-x;<sp/>y<sp/>&gt;=<sp/>0;<sp/>y--)<sp/>{</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>z<sp/>=<sp/>L<sp/>-<sp/>x<sp/>-<sp/>y;</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k<sp/>=<sp/>0;<sp/>k&lt;=<sp/>x;<sp/>k++)<sp/>{</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ck<sp/>=<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a4659eadbdeaf45a872facaf1f88c5664" kindref="member">calcC</ref>(x,<sp/>k,<sp/>A[0]);</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l<sp/>=<sp/>0;<sp/>l<sp/>&lt;=<sp/>y;<sp/>l++)<sp/>{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Cl<sp/>=<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a4659eadbdeaf45a872facaf1f88c5664" kindref="member">calcC</ref>(y,<sp/>l,<sp/>A[1]);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m<sp/>=<sp/>0;<sp/>m<sp/>&lt;=<sp/>z;<sp/>m++)<sp/>C(0,<sp/>na,<sp/>k,<sp/>l,<sp/>m)<sp/>=<sp/>Ck<sp/>*<sp/>Cl<sp/>*<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a4659eadbdeaf45a872facaf1f88c5664" kindref="member">calcC</ref>(z,<sp/>m,<sp/>A[2]);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>na++;</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight></codeline>
<codeline lineno="77" refid="classlibecpint_1_1_e_c_p_integral_1a06dd2e29925e83c5fe29b5d14eadf66b" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a06dd2e29925e83c5fe29b5d14eadf66b" kindref="member">ECPIntegral::type1</ref>(</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref><sp/>&amp;U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_shell_pair_data" kindref="compound">ShellPairData</ref><sp/>&amp;data,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_five_index" kindref="compound">FiveIndex&lt;double&gt;</ref><sp/>&amp;CA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_five_index" kindref="compound">FiveIndex&lt;double&gt;</ref><sp/>&amp;CB,</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_radial_integral_1_1_parameters" kindref="compound">RadialIntegral::Parameters</ref><sp/>&amp;<sp/>parameters,<sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>&amp;values)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LA<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>;<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LB<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>maxLBasis<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ab98896b5598353c208092f517f500fc9" kindref="member">maxLBasis</ref>;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Build<sp/>radial<sp/>integrals</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>L<sp/>=<sp/>LA<sp/>+<sp/>LB;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>temp;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_three_index" kindref="compound">ThreeIndex&lt;double&gt;</ref><sp/>radials(L+1,<sp/>L+1,<sp/>2*L+1);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ix<sp/>=<sp/>0;<sp/>ix<sp/>&lt;=<sp/>L;<sp/>ix++)<sp/>{</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1af9cee7a7a59bfa3ae1645d77b3fec7d6" kindref="member">radInts</ref>.<ref refid="classlibecpint_1_1_radial_integral_1a7fde45f9ebebc6b50cfd98bd93545daa" kindref="member">type1</ref>(ix,<sp/>ix,<sp/>ix<sp/>%<sp/>2,<sp/>U,<sp/>shellA,<sp/>shellB,<sp/>data,<sp/>parameters,<sp/>temp);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l<sp/>=<sp/>0;<sp/>l<sp/>&lt;=<sp/>ix;<sp/>l++)<sp/>{</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m<sp/>=<sp/>-l;<sp/>m<sp/>&lt;=<sp/>l;<sp/>m++)<sp/>radials(ix,<sp/>l,<sp/>l+m)<sp/>=<sp/>temp(l,<sp/>l+m);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Unpack<sp/>positions</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ax<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[0];<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Ay<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[1];<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Az<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[2];</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Bx<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[0];<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>By<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[1];<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Bz<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[2];</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Calculate<sp/>chi_ab<sp/>for<sp/>all<sp/>ab<sp/>in<sp/>shells</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>z1,<sp/>z2,<sp/>lparity,<sp/>mparity,<sp/>msign,<sp/>ix,<sp/>k,<sp/>l,<sp/>m;</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>C;</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>na<sp/>=<sp/>0,<sp/>nb<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x1<sp/>=<sp/>LA;<sp/>x1<sp/>&gt;=<sp/>0;<sp/>x1--)<sp/>{</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>y1<sp/>=<sp/>LA-x1;<sp/>y1<sp/>&gt;=<sp/>0;<sp/>y1--)<sp/>{</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>z1<sp/>=<sp/>LA<sp/>-<sp/>x1<sp/>-<sp/>y1;</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x2<sp/>=<sp/>LB;<sp/>x2<sp/>&gt;=<sp/>0;<sp/>x2--)<sp/>{</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>y2<sp/>=<sp/>LB-x2;<sp/>y2<sp/>&gt;=<sp/>0;<sp/>y2--)<sp/>{</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>z2<sp/>=<sp/>LB<sp/>-<sp/>x2<sp/>-<sp/>y2;</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k1<sp/>=<sp/>0;<sp/>k1<sp/>&lt;=<sp/>x1;<sp/>k1++)<sp/>{</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k2<sp/>=<sp/>0;<sp/>k2<sp/>&lt;=<sp/>x2;<sp/>k2++)<sp/>{</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>k<sp/>=<sp/>k1<sp/>+<sp/>k2;</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l1<sp/>=<sp/>0;<sp/>l1<sp/>&lt;=<sp/>y1;<sp/>l1++)<sp/>{</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l2<sp/>=<sp/>0;<sp/>l2<sp/>&lt;=<sp/>y2;<sp/>l2++)<sp/>{</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>l<sp/>=<sp/>l1<sp/>+<sp/>l2;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m1<sp/>=<sp/>0;<sp/>m1<sp/>&lt;=<sp/>z1;<sp/>m1++)<sp/>{</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m2<sp/>=<sp/>0;<sp/>m2<sp/>&lt;=<sp/>z2;<sp/>m2++){</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>m<sp/>=<sp/>m1<sp/>+<sp/>m2;</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C<sp/>=<sp/>CA(0,<sp/>na,<sp/>k1,<sp/>l1,<sp/>m1)<sp/>*<sp/>CB(0,<sp/>nb,<sp/>k2,<sp/>l2,<sp/>m2);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>fabs(C)<sp/>&gt;<sp/>1e-14<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Build<sp/>radial<sp/>integrals</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ix<sp/>=<sp/>k<sp/>+<sp/>l<sp/>+<sp/>m;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Certain<sp/>terms<sp/>can<sp/>be<sp/>neglected<sp/>as<sp/>the<sp/>angular<sp/>integrals<sp/>will<sp/>always<sp/>be<sp/>zero</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>See<sp/>Flores06<sp/>appendix<sp/>for<sp/>details.<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lparity<sp/>=<sp/>ix<sp/>%<sp/>2;<sp/></highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msign<sp/>=<sp/>1<sp/>-<sp/>2*(l%2);</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mparity<sp/>=<sp/>(lparity<sp/>+<sp/>m)<sp/>%<sp/>2;</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>lam<sp/>=<sp/>lparity;<sp/>lam<sp/>&lt;=<sp/>ix;<sp/>lam+=2)<sp/>{</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mu<sp/>=<sp/>mparity;<sp/>mu<sp/>&lt;=<sp/>lam;<sp/>mu+=2)</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>values(na,<sp/>nb)<sp/>+=<sp/>C<sp/>*<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>.<ref refid="classlibecpint_1_1_angular_integral_1a9effa990cf6a6d2b1a760b465e3cd458" kindref="member">getIntegral</ref>(k,<sp/>l,<sp/>m,<sp/>lam,<sp/>msign*mu)<sp/>*<sp/>radials(ix,<sp/>lam,<sp/>lam+msign*mu);</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>values(na,<sp/>nb)<sp/>*=<sp/>4.0<sp/>*<sp/><ref refid="mathutil_8hpp_1ae71449b1cc6e6250b91f539153a7a0d3" kindref="member">M_PI</ref>;</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb++;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>na++;</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="158"><highlight class="normal"></highlight></codeline>
<codeline lineno="159" refid="classlibecpint_1_1_e_c_p_integral_1a5cc59f53c27c3e7c195afadf102cd394" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a5cc59f53c27c3e7c195afadf102cd394" kindref="member">ECPIntegral::type2</ref>(</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>lam,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref>&amp;<sp/>U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_shell_pair_data" kindref="compound">ShellPairData</ref><sp/>&amp;data,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_five_index" kindref="compound">FiveIndex&lt;double&gt;</ref><sp/>&amp;CA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_five_index" kindref="compound">FiveIndex&lt;double&gt;</ref><sp/>&amp;CB,</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_radial_integral_1_1_parameters" kindref="compound">RadialIntegral::Parameters</ref><sp/>&amp;<sp/>parameters,<sp/><ref refid="structlibecpint_1_1_three_index" kindref="compound">ThreeIndex&lt;double&gt;</ref><sp/>&amp;values)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Unpack<sp/>some<sp/>data<sp/>for<sp/>convenience</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LA<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>;</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LB<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>L<sp/>=<sp/>LA<sp/>+<sp/>LB;<sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>maxLBasis<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ab98896b5598353c208092f517f500fc9" kindref="member">maxLBasis</ref>;</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Am<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a1fc38f370c8ff674e6cfeefeaf975088" kindref="member">Am</ref>;<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Bm<sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac062ca4fde545f74f14601cb6cac1587" kindref="member">Bm</ref>;</highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1aac24de62e12b6daa7c5f7280c50c26f0" kindref="member">A_on_ecp</ref><sp/>&amp;&amp;<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ad1041f05603bf28fcb8e29074702be18" kindref="member">B_on_ecp</ref>)<sp/>{</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Both<sp/>on<sp/>ECP,<sp/>simplest<sp/>case<sp/>-<sp/>see<sp/>Shaw2017<sp/>supplementary<sp/>material</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>prefactor<sp/>=<sp/>4.0<sp/>*<sp/><ref refid="mathutil_8hpp_1ae71449b1cc6e6250b91f539153a7a0d3" kindref="member">M_PI</ref>;<sp/></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>npA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1ad9e3f82004442f284beac5b246ae3f82" kindref="member">nprimitive</ref>();</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>npB<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1ad9e3f82004442f284beac5b246ae3f82" kindref="member">nprimitive</ref>();</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>npC<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a1eb8f3a9515a591efc9e3da28ba0a9c2" kindref="member">getN</ref>();<sp/></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>zA,<sp/>zB,<sp/>zC,<sp/>dA,<sp/>dB,<sp/>dC,<sp/>p;<sp/></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nC,<sp/>z1,<sp/>z2;</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>na<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x1<sp/>=<sp/>LA;<sp/>x1<sp/>&gt;=<sp/>0;<sp/>x1--)<sp/>{</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>r1<sp/>=<sp/>LA-x1;<sp/>r1<sp/>&gt;=<sp/>0;<sp/>r1--)<sp/>{</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>z1<sp/>=<sp/>LA<sp/>-<sp/>x1<sp/>-<sp/>r1;<sp/></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x2<sp/>=<sp/>LB;<sp/>x2<sp/>&gt;=<sp/>0;<sp/>x2--)<sp/>{</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>y2<sp/>=<sp/>LB<sp/>-<sp/>x2;<sp/>y2<sp/>&gt;=<sp/>0;<sp/>y2--)<sp/>{</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>z2<sp/>=<sp/>LB<sp/>-<sp/>x2<sp/>-<sp/>y2;<sp/></highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>value<sp/>=<sp/>0.0;</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>c<sp/>=<sp/>0;<sp/>c<sp/>&lt;<sp/>npC;<sp/>c++)<sp/>{</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_e_c_p" kindref="compound">GaussianECP</ref>&amp;<sp/>g<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a9b17e65c73b6671205b3295e2d2c52f8" kindref="member">getGaussian</ref>(c);</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(g.<ref refid="structlibecpint_1_1_gaussian_e_c_p_1a9933bcb032148c4152160a0b70521189" kindref="member">l</ref><sp/>==<sp/>lam)<sp/>{</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zC<sp/>=<sp/>g.<ref refid="structlibecpint_1_1_gaussian_e_c_p_1a89433d98899bfcf9e11c40590b9a585e" kindref="member">a</ref>;</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dC<sp/>=<sp/>g.<ref refid="structlibecpint_1_1_gaussian_e_c_p_1a4899fa6262f84344b3d0f8c304c8e9f5" kindref="member">d</ref>;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nC<sp/>=<sp/>g.<ref refid="structlibecpint_1_1_gaussian_e_c_p_1a75255bfcde88a8f3b3e56c316ec7a99c" kindref="member">n</ref>;<sp/></highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/></highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>a<sp/>=<sp/>0;<sp/>a<sp/>&lt;<sp/>npA;<sp/>a++)<sp/>{</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a738b66cf3e241c179829616e400b845e" kindref="member">exp</ref>(a);</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1aa05357293d4bdb6d482dbd55ac80a592" kindref="member">coef</ref>(a);</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>b<sp/>=<sp/>0;<sp/>b<sp/>&lt;<sp/>npB;<sp/>b++)<sp/>{</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zB<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a738b66cf3e241c179829616e400b845e" kindref="member">exp</ref>(b);</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dB<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1aa05357293d4bdb6d482dbd55ac80a592" kindref="member">coef</ref>(b);<sp/></highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/>zA<sp/>+<sp/>zB<sp/>+<sp/>zC;</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>o_root_p<sp/>=<sp/>1.0<sp/>/<sp/>sqrt(p);</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>N<sp/>=<sp/>2<sp/>+<sp/>LA<sp/>+<sp/>LB<sp/>+<sp/>nC;</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>value<sp/>+=<sp/>0.5*dA*dB*dC*<ref refid="namespacelibecpint_1a4fc3cf89f4b0b1787baabc364a16e377" kindref="member">GAMMA</ref>[N]*FAST_POW[N+1](o_root_p);</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mu<sp/>=<sp/>-lam;<sp/>mu<sp/>&lt;=<sp/>lam;<sp/>mu++)<sp/>{</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>angular<sp/>=<sp/>prefactor<sp/>*<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>.<ref refid="classlibecpint_1_1_angular_integral_1a9effa990cf6a6d2b1a760b465e3cd458" kindref="member">getIntegral</ref>(x1,<sp/>r1,<sp/>z1,<sp/>lam,<sp/>mu,<sp/>0,<sp/>0)<sp/>*<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>.<ref refid="classlibecpint_1_1_angular_integral_1a9effa990cf6a6d2b1a760b465e3cd458" kindref="member">getIntegral</ref>(x2,<sp/>y2,<sp/>z2,<sp/>lam,<sp/>mu,<sp/>0,<sp/>0);<sp/></highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>values(na,<sp/>nb,<sp/>lam+mu)<sp/>=<sp/>angular<sp/>*<sp/>value;<sp/></highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb++;<sp/></highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>na++;</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>At<sp/>least<sp/>one<sp/>of<sp/>the<sp/>shells<sp/>is<sp/>not<sp/>on<sp/>the<sp/>ECP,<sp/>so<sp/>spherical<sp/>harmonics<sp/>will<sp/>be<sp/>required</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>xA<sp/>=<sp/>Am<sp/>&gt;<sp/>0<sp/>?<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[2]<sp/>/<sp/>Am<sp/>:<sp/>0.0;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>xB<sp/>=<sp/>Bm<sp/>&gt;<sp/>0<sp/>?<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[2]<sp/>/<sp/>Bm<sp/>:<sp/>0.0;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>phiA<sp/>=<sp/>atan2(data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[1],<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[0]);</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>phiB<sp/>=<sp/>atan2(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[1],<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[0]);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>SA<sp/>=<sp/><ref refid="namespacelibecpint_1ac8004320c2b47b1ce75ab1ccfff376e4" kindref="member">realSphericalHarmonics</ref>(lam+LA,<sp/>xA,<sp/>phiA);</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>SB<sp/>=<sp/><ref refid="namespacelibecpint_1ac8004320c2b47b1ce75ab1ccfff376e4" kindref="member">realSphericalHarmonics</ref>(lam+LB,<sp/>xB,<sp/>phiB);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1aac24de62e12b6daa7c5f7280c50c26f0" kindref="member">A_on_ecp</ref>)<sp/>{</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Radial<sp/>integrals<sp/>need<sp/>to<sp/>be<sp/>calculated<sp/>by<sp/>a<sp/>different<sp/>recursive<sp/>scheme,<sp/>or<sp/>by<sp/>quadrature</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_three_index" kindref="compound">ThreeIndex&lt;double&gt;</ref><sp/>radials(L+1,<sp/>lam<sp/>+<sp/>LA<sp/>+<sp/>1,<sp/>lam<sp/>+<sp/>LB<sp/>+<sp/>1);<sp/></highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>temp;</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::fill(values.<ref refid="structlibecpint_1_1_three_index_1a4a403cb73ae1bed2e869ec212ccdf9b7" kindref="member">data</ref>.begin(),<sp/>values.<ref refid="structlibecpint_1_1_three_index_1a4a403cb73ae1bed2e869ec212ccdf9b7" kindref="member">data</ref>.end(),<sp/>0.0);</highlight></codeline>
<codeline lineno="248"><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>N<sp/>=<sp/>0;<sp/>N<sp/>&lt;<sp/>L+1;<sp/>N++)<sp/>{</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1af9cee7a7a59bfa3ae1645d77b3fec7d6" kindref="member">radInts</ref>.<ref refid="classlibecpint_1_1_radial_integral_1a0781fd9b60144e1312d547471148c05b" kindref="member">type2</ref>(lam,<sp/>0,<sp/>lam<sp/>+<sp/>LA,<sp/>0,<sp/>lam<sp/>+<sp/>LB,<sp/>N,<sp/>U,<sp/>shellA,<sp/>shellB,<sp/>data,<sp/>parameters,<sp/>temp);</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l1<sp/>=<sp/>0;<sp/>l1<sp/>&lt;<sp/>lam<sp/>+<sp/>LA<sp/>+<sp/>1;<sp/>l1++)</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l2<sp/>=<sp/>0;<sp/>l2<sp/>&lt;<sp/>lam<sp/>+<sp/>LB<sp/>+<sp/>1;<sp/>l2++)</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>radials(N,<sp/>l1,<sp/>l2)<sp/>=<sp/>temp(l1,<sp/>l2);</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>a<sp/>significant<sp/>number<sp/>of<sp/>terms<sp/>can<sp/>be<sp/>neglected<sp/>a<sp/>priori<sp/>-<sp/>see<sp/>Shaw2017<sp/>supplementary<sp/>material.<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespacelibecpint_1_1qgen_1ab020c384dfc8c0f23cf165448b10216e" kindref="member">qgen::rolled_up_special</ref>(lam,<sp/>LA,<sp/>LB,<sp/>radials,<sp/>CB,<sp/>SB,<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>,<sp/>values);</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1ad1041f05603bf28fcb8e29074702be18" kindref="member">B_on_ecp</ref>){</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Same<sp/>as<sp/>above<sp/>with<sp/>A<sp/>and<sp/>B<sp/>reversed</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_three_index" kindref="compound">ThreeIndex&lt;double&gt;</ref><sp/>radials(L+1,<sp/>lam<sp/>+<sp/>LB<sp/>+<sp/>1,<sp/>lam<sp/>+<sp/>LA<sp/>+<sp/>1);<sp/></highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_three_index" kindref="compound">ThreeIndex&lt;double&gt;</ref><sp/>tmpValues(values.<ref refid="structlibecpint_1_1_three_index_1ad1e6c311bcac26aa69fd610004527dbe" kindref="member">dims</ref>[1],<sp/>values.<ref refid="structlibecpint_1_1_three_index_1ad1e6c311bcac26aa69fd610004527dbe" kindref="member">dims</ref>[0],<sp/>values.<ref refid="structlibecpint_1_1_three_index_1ad1e6c311bcac26aa69fd610004527dbe" kindref="member">dims</ref>[2]);</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::fill(tmpValues.<ref refid="structlibecpint_1_1_three_index_1a4a403cb73ae1bed2e869ec212ccdf9b7" kindref="member">data</ref>.begin(),<sp/>tmpValues.<ref refid="structlibecpint_1_1_three_index_1a4a403cb73ae1bed2e869ec212ccdf9b7" kindref="member">data</ref>.end(),<sp/>0.0);</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>temp;</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>N<sp/>=<sp/>0;<sp/>N<sp/>&lt;<sp/>L+1;<sp/>N++)<sp/>{</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1af9cee7a7a59bfa3ae1645d77b3fec7d6" kindref="member">radInts</ref>.<ref refid="classlibecpint_1_1_radial_integral_1a0781fd9b60144e1312d547471148c05b" kindref="member">type2</ref>(lam,<sp/>0,<sp/>lam<sp/>+<sp/>LA,<sp/>0,<sp/>lam<sp/>+<sp/>LB,<sp/>N,<sp/>U,<sp/>shellA,<sp/>shellB,<sp/>data,<sp/>parameters,<sp/>temp);</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l1<sp/>=<sp/>0;<sp/>l1<sp/>&lt;<sp/>lam<sp/>+<sp/>LB<sp/>+<sp/>1;<sp/>l1++)</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l2<sp/>=<sp/>0;<sp/>l2<sp/>&lt;<sp/>lam<sp/>+<sp/>LA<sp/>+<sp/>1;<sp/>l2++)</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>radials(N,<sp/>l1,<sp/>l2)<sp/>=<sp/>temp(l2,<sp/>l1);</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>a<sp/>significant<sp/>number<sp/>of<sp/>terms<sp/>can<sp/>be<sp/>neglected<sp/>a<sp/>priori<sp/>-<sp/>see<sp/>Shaw2017<sp/>supplementary<sp/>material.<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespacelibecpint_1_1qgen_1ab020c384dfc8c0f23cf165448b10216e" kindref="member">qgen::rolled_up_special</ref>(lam,<sp/>LB,<sp/>LA,<sp/>radials,<sp/>CA,<sp/>SA,<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>,<sp/>tmpValues);</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>transcribe<sp/>back<sp/>into<sp/>values</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>na<sp/>=<sp/>0;<sp/>na<sp/>&lt;<sp/>values.<ref refid="structlibecpint_1_1_three_index_1ad1e6c311bcac26aa69fd610004527dbe" kindref="member">dims</ref>[0];<sp/>na++)</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb<sp/>=<sp/>0;<sp/>nb<sp/>&lt;<sp/>values.<ref refid="structlibecpint_1_1_three_index_1ad1e6c311bcac26aa69fd610004527dbe" kindref="member">dims</ref>[1];<sp/>nb++)</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nc<sp/>=<sp/>0;<sp/>nc<sp/>&lt;<sp/>values.<ref refid="structlibecpint_1_1_three_index_1ad1e6c311bcac26aa69fd610004527dbe" kindref="member">dims</ref>[2];<sp/>nc++)</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>values(na,<sp/>nb,<sp/>nc)<sp/>=<sp/>tmpValues(nb,<sp/>na,<sp/>nc);</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Neither<sp/>is<sp/>on<sp/>the<sp/>ECP,<sp/>the<sp/>full<sp/>recursive<sp/>scheme<sp/>with<sp/>generated<sp/>integrals<sp/>can<sp/>be<sp/>used</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Need<sp/>LA<sp/>&lt;=<sp/>LB,<sp/>but<sp/>symmetry<sp/>means<sp/>we<sp/>can<sp/>just<sp/>swap<sp/>the<sp/>arguments<sp/>if<sp/>LB<sp/>&gt;<sp/>LA.<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LA<sp/>&lt;=<sp/>LB)<sp/></highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1affb51c06d517d5fb762b486c572cfeca" kindref="member">QGEN</ref>[LA][LB][lam](U,<sp/>shellA,<sp/>shellB,<sp/>CA,<sp/>CB,<sp/>SA,<sp/>SB,<sp/>Am,<sp/>Bm,<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1af9cee7a7a59bfa3ae1645d77b3fec7d6" kindref="member">radInts</ref>,<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>,<sp/>parameters,<sp/>values);</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_three_index" kindref="compound">ThreeIndex&lt;double&gt;</ref><sp/>temp_values(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a7375bb4a1a452df895172f9731c8fa32" kindref="member">ncartB</ref>,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a94ebbd7fee35f60f77492663e13e715f" kindref="member">ncartA</ref>,<sp/>2*U.getL()<sp/>+<sp/>1);<sp/></highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1affb51c06d517d5fb762b486c572cfeca" kindref="member">QGEN</ref>[LB][LA][lam](U,<sp/>shellB,<sp/>shellA,<sp/>CB,<sp/>CA,<sp/>SB,<sp/>SA,<sp/>Bm,<sp/>Am,<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1af9cee7a7a59bfa3ae1645d77b3fec7d6" kindref="member">radInts</ref>,<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a1d53a9bf47dfc66607950856e0f8f8b1" kindref="member">angInts</ref>,<sp/>parameters,<sp/>temp_values);</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>na<sp/>=<sp/>0;<sp/>na<sp/>&lt;<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a94ebbd7fee35f60f77492663e13e715f" kindref="member">ncartA</ref>;<sp/>na++)</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb<sp/>=<sp/>0;<sp/>nb<sp/>&lt;<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a7375bb4a1a452df895172f9731c8fa32" kindref="member">ncartB</ref>;<sp/>nb++)</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nu<sp/>=<sp/>0;<sp/>nu<sp/>&lt;<sp/>2*U.getL()<sp/>+<sp/>1;<sp/>nu++)</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>values(na,<sp/>nb,<sp/>nu)<sp/>=<sp/>temp_values(nb,<sp/>na,<sp/>nu);<sp/></highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="298"><highlight class="normal"></highlight></codeline>
<codeline lineno="299" refid="classlibecpint_1_1_e_c_p_integral_1a8f3537112c03c75e4745f57977b4e6ee" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a8f3537112c03c75e4745f57977b4e6ee" kindref="member">ECPIntegral::estimate_type2</ref>(</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref>&amp;<sp/>U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_shell_pair_data" kindref="compound">ShellPairData</ref><sp/>&amp;data,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal">*<sp/>results)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>sigma_a,<sp/>sigma_b,<sp/>min_eta,<sp/>n2,<sp/>an,<sp/>bn,<sp/>a_bound,<sp/>b_bound,<sp/>ab_bound;</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>atilde,<sp/>btilde,<sp/>ztilde,<sp/>Tk,<sp/>Tk_0,<sp/>xp;</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Na_0<sp/>=<sp/>0.5<sp/>*<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref><sp/>/<sp/><ref refid="mathutil_8hpp_1a620539bb392918432be69023bb266dfb" kindref="member">M_EULER</ref>;</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Nb_0<sp/>=<sp/>0.5<sp/>*<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref><sp/>/<sp/><ref refid="mathutil_8hpp_1a620539bb392918432be69023bb266dfb" kindref="member">M_EULER</ref>;</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l<sp/>=<sp/>0;<sp/>l<sp/>&lt;=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a8c9d96f791a742fe18616c8361d6ad0b" kindref="member">getL</ref>();<sp/>l++)<sp/>{</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>min_eta<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a265c9db1f48ad60398265d29ac915457" kindref="member">min_exp_l</ref>[l];</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n2<sp/>=<sp/>min_eta<sp/>*<sp/>min_eta;</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>an<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref><sp/>+<sp/>min_eta;</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bn<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref><sp/>+<sp/>min_eta;</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a84c698aa2367eabcef0b4317c69f5a42" kindref="member">A2</ref><sp/>&lt;<sp/>1e-6)<sp/>sigma_a<sp/>=<sp/>0.5<sp/>*<sp/>an<sp/>/<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref>;</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>sigma_a<sp/>=<sp/>0.5<sp/>*<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref><sp/>*<sp/>an<sp/>*<sp/>an<sp/>/<sp/>(shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref><sp/>*<sp/>(n2*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a84c698aa2367eabcef0b4317c69f5a42" kindref="member">A2</ref><sp/>+<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref><sp/>*<sp/>an));</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a9600ebca9c4bcc09c6fdae223ec9fb09" kindref="member">B2</ref><sp/>&lt;<sp/>1e-6)<sp/>sigma_b<sp/>=<sp/>0.5<sp/>*<sp/>bn<sp/>/<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref>;</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>sigma_b<sp/>=<sp/>0.5<sp/>*<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref><sp/>*<sp/>bn<sp/>*<sp/>bn<sp/>/<sp/>(shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref><sp/>*<sp/>(n2*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a9600ebca9c4bcc09c6fdae223ec9fb09" kindref="member">B2</ref><sp/>+<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref><sp/>*<sp/>bn));</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>atilde<sp/>=<sp/>(1.0<sp/>-<sp/>sigma_a)<sp/>*<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref>;</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>btilde<sp/>=<sp/>(1.0<sp/>-<sp/>sigma_b)<sp/>*<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1aa6aa70752f7dd2317a67327522971b87" kindref="member">min_exp</ref>;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>a_bound<sp/>=<sp/>0.0;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>.size();<sp/>i++)</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>a_bound<sp/>+=<sp/>FAST_POW[data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>](std::sqrt(Na_0<sp/>/<sp/>(shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>[i]<sp/>*<sp/>sigma_a)))<sp/>*<sp/>std::abs(shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1a12d01b4556196b36b8df746fac403d" kindref="member">coeffs</ref>[i]);<sp/></highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>b_bound<sp/>=<sp/>0.0;</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>.size();<sp/>i++)</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>b_bound<sp/>+=<sp/>FAST_POW[data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>](std::sqrt(Nb_0<sp/>/<sp/>(shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>[i]<sp/>*<sp/>sigma_b)))<sp/>*<sp/>std::abs(shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1a12d01b4556196b36b8df746fac403d" kindref="member">coeffs</ref>[i]);</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Tk_0<sp/>=<sp/>2.0<sp/>*<sp/>atilde<sp/>*<sp/>btilde<sp/>*<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a1fc38f370c8ff674e6cfeefeaf975088" kindref="member">Am</ref><sp/>*<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac062ca4fde545f74f14601cb6cac1587" kindref="member">Bm</ref>;<sp/></highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ab_bound<sp/>=<sp/>0.0;</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>xp<sp/>=<sp/>atilde*atilde*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a84c698aa2367eabcef0b4317c69f5a42" kindref="member">A2</ref><sp/>+<sp/>btilde*btilde*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a9600ebca9c4bcc09c6fdae223ec9fb09" kindref="member">B2</ref>;</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1ad2dd3b092c83374688c51093d824e6af" kindref="member">l_starts</ref>[l];<sp/>k<sp/>&lt;<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1ad2dd3b092c83374688c51093d824e6af" kindref="member">l_starts</ref>[l+1];<sp/>k++)<sp/>{</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_e_c_p" kindref="compound">GaussianECP</ref>&amp;<sp/>g<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a9b17e65c73b6671205b3295e2d2c52f8" kindref="member">getGaussian</ref>(k);</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ztilde<sp/>=<sp/>atilde<sp/>+<sp/>btilde<sp/>+<sp/>g.<ref refid="structlibecpint_1_1_gaussian_e_c_p_1a89433d98899bfcf9e11c40590b9a585e" kindref="member">a</ref>;</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Tk<sp/>=<sp/>Tk_0<sp/>/<sp/>ztilde;</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Tk<sp/>=<sp/>Tk<sp/>&gt;<sp/>1<sp/>?<sp/>0.5<sp/>*<sp/>std::exp(Tk)<sp/>/<sp/>Tk<sp/>:<sp/><ref refid="namespacelibecpint_1ae8056358eb2736d93b3a78dd1428555c" kindref="member">SINH_1</ref>;</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ab_bound<sp/>+=<sp/>std::abs(g.<ref refid="structlibecpint_1_1_gaussian_e_c_p_1a4899fa6262f84344b3d0f8c304c8e9f5" kindref="member">d</ref>)<sp/>*<sp/>FAST_POW[3](std::sqrt(<ref refid="mathutil_8hpp_1ae71449b1cc6e6250b91f539153a7a0d3" kindref="member">M_PI</ref>/g.<ref refid="structlibecpint_1_1_gaussian_e_c_p_1a89433d98899bfcf9e11c40590b9a585e" kindref="member">a</ref>))<sp/>*<sp/>std::exp(xp<sp/>/<sp/>ztilde)<sp/>*<sp/>Tk;</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ab_bound<sp/>*=<sp/>std::exp(-atilde*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a84c698aa2367eabcef0b4317c69f5a42" kindref="member">A2</ref><sp/>-btilde*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a9600ebca9c4bcc09c6fdae223ec9fb09" kindref="member">B2</ref>);</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[l]<sp/>=<sp/>(2*l+1)*(2*l+1)*<sp/>a_bound<sp/>*<sp/>b_bound<sp/>*<sp/>ab_bound;</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="343"><highlight class="normal"></highlight></codeline>
<codeline lineno="344" refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">ECPIntegral::compute_shell_pair</ref>(</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref><sp/>&amp;U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>&amp;values,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>shiftA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>shiftB)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_shell_pair_data" kindref="compound">ShellPairData</ref><sp/>data;</highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Shift<sp/>A<sp/>and<sp/>B<sp/>to<sp/>be<sp/>relative<sp/>to<sp/>U</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal">*<sp/>C<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a67b0097de7275b589d8fb104559c85f2" kindref="member">center</ref>();</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[0]<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[0]<sp/>-<sp/>C[0];<sp/></highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[1]<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[1]<sp/>-<sp/>C[1];</highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[2]<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[2]<sp/>-<sp/>C[2];<sp/></highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[0]<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[0]<sp/>-<sp/>C[0];<sp/></highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[1]<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[1]<sp/>-<sp/>C[1];</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[2]<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[2]<sp/>-<sp/>C[2];<sp/></highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Construct<sp/>data<sp/>that<sp/>will<sp/>be<sp/>reused<sp/>everywhere,<sp/>and<sp/>takes<sp/>account<sp/>of<sp/>derivative<sp/>shifts</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref><sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()<sp/>+<sp/>shiftA;<sp/></highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref><sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()<sp/>+<sp/>shiftB;</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ab98896b5598353c208092f517f500fc9" kindref="member">maxLBasis</ref><sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref><sp/>&gt;<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref><sp/>?<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref><sp/>:<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>;</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a94ebbd7fee35f60f77492663e13e715f" kindref="member">ncartA</ref><sp/>=<sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>+1)*(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>+2)/2;</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a7375bb4a1a452df895172f9731c8fa32" kindref="member">ncartB</ref><sp/>=<sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>+1)*(data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>+2)/2;</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a84c698aa2367eabcef0b4317c69f5a42" kindref="member">A2</ref><sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[0]*data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[0]<sp/>+<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[1]*data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[1]<sp/>+<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[2]*data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[2];</highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a1fc38f370c8ff674e6cfeefeaf975088" kindref="member">Am</ref><sp/>=<sp/>sqrt(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a84c698aa2367eabcef0b4317c69f5a42" kindref="member">A2</ref>);</highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1aac24de62e12b6daa7c5f7280c50c26f0" kindref="member">A_on_ecp</ref><sp/>=<sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a1fc38f370c8ff674e6cfeefeaf975088" kindref="member">Am</ref><sp/>&lt;<sp/>1e-6);<sp/></highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a9600ebca9c4bcc09c6fdae223ec9fb09" kindref="member">B2</ref><sp/>=<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[0]*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[0]<sp/>+<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[1]*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[1]<sp/>+<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[2]*data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[2];</highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac062ca4fde545f74f14601cb6cac1587" kindref="member">Bm</ref><sp/>=<sp/>sqrt(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a9600ebca9c4bcc09c6fdae223ec9fb09" kindref="member">B2</ref>);</highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ad1041f05603bf28fcb8e29074702be18" kindref="member">B_on_ecp</ref><sp/>=<sp/>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac062ca4fde545f74f14601cb6cac1587" kindref="member">Bm</ref><sp/>&lt;<sp/>1e-6);</highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>RAB[3]<sp/>=<sp/>{data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[0]<sp/>-<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[0],<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[1]<sp/>-<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[1],<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>[2]<sp/>-<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>[2]};</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a3f78ab3a033791dbd8a6cd676c2a904d" kindref="member">RAB2</ref><sp/>=<sp/>RAB[0]*RAB[0]<sp/>+<sp/>RAB[1]*RAB[1]<sp/>+<sp/>RAB[2]*RAB[2];</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ab2f6be977b253b7726a8082af3ed00e8" kindref="member">RABm</ref><sp/>=<sp/>sqrt(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a3f78ab3a033791dbd8a6cd676c2a904d" kindref="member">RAB2</ref>);</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Prepare<sp/>the<sp/>radial<sp/>integrator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>radIntParameters<sp/>=<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1af9cee7a7a59bfa3ae1645d77b3fec7d6" kindref="member">radInts</ref>.<ref refid="classlibecpint_1_1_radial_integral_1a8fbfa7ff4f2147f12e532bb8c1091e2a" kindref="member">buildParameters</ref>(shellA,<sp/>shellB,<sp/>data);</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Construct<sp/>coefficients<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_five_index" kindref="compound">FiveIndex&lt;double&gt;</ref><sp/>CA(1,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a94ebbd7fee35f60f77492663e13e715f" kindref="member">ncartA</ref>,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>+1,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>+1,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>+1);</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_five_index" kindref="compound">FiveIndex&lt;double&gt;</ref><sp/>CB(1,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a7375bb4a1a452df895172f9731c8fa32" kindref="member">ncartB</ref>,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>+1,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>+1,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>+1);</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1ac87491d54072488ef0862d9e2d0b0853" kindref="member">makeC</ref>(CA,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a55c45f1c204af209b42a1b02697e4c1d" kindref="member">LA</ref>,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac43603240b081b43b4f512d1b1acc31a" kindref="member">A</ref>);</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1ac87491d54072488ef0862d9e2d0b0853" kindref="member">makeC</ref>(CB,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1ac5e107efbf69f950bb7e0bf70df1e1fc" kindref="member">LB</ref>,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a20bca75c83dc42e380791903c829afce" kindref="member">B</ref>);</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>screens[U.<ref refid="structlibecpint_1_1_e_c_p_1a8c9d96f791a742fe18616c8361d6ad0b" kindref="member">getL</ref>()<sp/>+<sp/>1];</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a8f3537112c03c75e4745f57977b4e6ee" kindref="member">estimate_type2</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>data,<sp/>screens);</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Calculate<sp/>type1<sp/>integrals,<sp/>if<sp/>necessary</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>values.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a94ebbd7fee35f60f77492663e13e715f" kindref="member">ncartA</ref>,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a7375bb4a1a452df895172f9731c8fa32" kindref="member">ncartB</ref>,<sp/>0.0);</highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!U.<ref refid="structlibecpint_1_1_e_c_p_1a6f3c3cbf7401f8559be5c0616f21cb2b" kindref="member">noType1</ref>()<sp/>&amp;&amp;<sp/>screens[U.<ref refid="structlibecpint_1_1_e_c_p_1a8c9d96f791a742fe18616c8361d6ad0b" kindref="member">getL</ref>()]<sp/>&gt;<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a604134684da59d3654bd081db9e3be55" kindref="member">tolerance</ref>)</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a06dd2e29925e83c5fe29b5d14eadf66b" kindref="member">type1</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>data,<sp/>CA,<sp/>CB,<sp/>radIntParameters,<sp/>values);</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::vector&lt;int&gt;<sp/>l_list;<sp/></highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l<sp/>=<sp/>0;<sp/>l<sp/>&lt;<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a8c9d96f791a742fe18616c8361d6ad0b" kindref="member">getL</ref>();<sp/>l++)<sp/></highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(screens[l]<sp/>&gt;<sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a604134684da59d3654bd081db9e3be55" kindref="member">tolerance</ref>)<sp/>l_list.push_back(l);<sp/></highlight></codeline>
<codeline lineno="396"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Now<sp/>all<sp/>the<sp/>type2<sp/>integrals</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_three_index" kindref="compound">ThreeIndex&lt;double&gt;</ref><sp/>t2vals(data.<ref refid="structlibecpint_1_1_shell_pair_data_1a94ebbd7fee35f60f77492663e13e715f" kindref="member">ncartA</ref>,<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a7375bb4a1a452df895172f9731c8fa32" kindref="member">ncartB</ref>,<sp/>2*U.<ref refid="structlibecpint_1_1_e_c_p_1a8c9d96f791a742fe18616c8361d6ad0b" kindref="member">getL</ref>()<sp/>+<sp/>1);</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l<sp/>:<sp/>l_list)<sp/>{</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>t2vals.<ref refid="structlibecpint_1_1_three_index_1a94f949d2e6508d7ddade76ca665dafb8" kindref="member">fill</ref>(0.0);</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a5cc59f53c27c3e7c195afadf102cd394" kindref="member">type2</ref>(l,<sp/>U,<sp/>shellA,<sp/>shellB,<sp/>data,<sp/>CA,<sp/>CB,<sp/>radIntParameters,<sp/>t2vals);</highlight></codeline>
<codeline lineno="402"><highlight class="normal"></highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m<sp/>=<sp/>-l;<sp/>m<sp/>&lt;=<sp/>l;<sp/>m++)<sp/>{</highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>na<sp/>=<sp/>0;<sp/>na<sp/>&lt;<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a94ebbd7fee35f60f77492663e13e715f" kindref="member">ncartA</ref>;<sp/>na++)<sp/>{</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb<sp/>=<sp/>0;<sp/>nb<sp/>&lt;<sp/>data.<ref refid="structlibecpint_1_1_shell_pair_data_1a7375bb4a1a452df895172f9731c8fa32" kindref="member">ncartB</ref>;<sp/>nb++)<sp/>{</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>values(na,<sp/>nb)<sp/>+=<sp/>t2vals(na,<sp/>nb,<sp/>l+m);</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="413" refid="classlibecpint_1_1_e_c_p_integral_1a6ec52d533d7359b4d5e824977ef4097e" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a6ec52d533d7359b4d5e824977ef4097e" kindref="member">ECPIntegral::left_shell_derivative</ref>(</highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref><sp/>&amp;U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;<ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref>,<sp/>3&gt;<sp/>&amp;results)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>();</highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LB<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>();</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartB<sp/>=<sp/>(LB+1)<sp/>*<sp/>(LB+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA<sp/>=<sp/>(LA+1)<sp/>*<sp/>(LA+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA_minus<sp/>=<sp/>LA<sp/>*<sp/>(LA+1)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>Q_minus,<sp/>Q_plus;<sp/></highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">auto</highlight><highlight class="normal">&amp;<sp/>r<sp/>:<sp/>results)<sp/>r.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA,<sp/>ncartB,<sp/>0.0);<sp/></highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LA<sp/>!=<sp/>0)</highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>Q_minus,<sp/>-1,<sp/>0);<sp/></highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>hack<sp/>in<sp/>the<sp/>exponents<sp/>to<sp/>the<sp/>coefficients</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>tempA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1ab1e7930b32e4ba26ee00e9747f19dca2" kindref="member">copy</ref>();</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ad9e3f82004442f284beac5b246ae3f82" kindref="member">nprimitive</ref>();<sp/>i++)<sp/></highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1a12d01b4556196b36b8df746fac403d" kindref="member">coeffs</ref>[i]<sp/>*=<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>[i];</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>tempA,<sp/>shellB,<sp/>Q_plus,<sp/>1,<sp/>0);<sp/></highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Now<sp/>compile<sp/>the<sp/>derivatives</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LA<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA_minus,<sp/>nA_plus;</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k=LA;<sp/>k<sp/>&gt;=<sp/>0;<sp/>k--)<sp/>{</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l=LA-k;<sp/>l&gt;=0;<sp/>l--)<sp/>{</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m<sp/>=<sp/>LA<sp/>-<sp/>k<sp/>-<sp/>l;</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nB<sp/>=<sp/>0;<sp/>nB<sp/>&lt;<sp/>ncartB;<sp/>nB++)<sp/>{</highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_plus<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m);</highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_minus<sp/>=<sp/>std::min(nA_plus,<sp/>Q_minus.dims[0]-1);</highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[0](nA,<sp/>nB)<sp/>=<sp/>-k*Q_minus(nA_minus,<sp/>nB)<sp/>+<sp/>2.0*Q_plus(nA_plus,<sp/>nB);</highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_minus<sp/>=<sp/>l<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l-1,<sp/>m)<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_plus<sp/><sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l+1,<sp/>m);</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[1](nA,<sp/>nB)<sp/>=<sp/>-l*Q_minus(nA_minus,<sp/>nB)<sp/>+<sp/>2.0*Q_plus(nA_plus,<sp/>nB);</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_minus<sp/>=<sp/>m<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m-1)<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_plus<sp/><sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m+1);</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[2](nA,<sp/>nB)<sp/>=<sp/>-m*Q_minus(nA_minus,<sp/>nB)<sp/>+<sp/>2.0*Q_plus(nA_plus,<sp/>nB);</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA<sp/>+=<sp/>1;</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nB<sp/>=<sp/>0;<sp/>nB<sp/>&lt;<sp/>ncartB;<sp/>nB++)<sp/>{</highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[0](0,<sp/>nB)<sp/>=<sp/>2.0*Q_plus(0,<sp/>nB);</highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[1](0,<sp/>nB)<sp/>=<sp/>2.0*Q_plus(1,<sp/>nB);</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[2](0,<sp/>nB)<sp/>=<sp/>2.0*Q_plus(2,<sp/>nB);</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="468" refid="classlibecpint_1_1_e_c_p_integral_1aaa4a5ba77942b3f26e965ba3db90348f" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aaa4a5ba77942b3f26e965ba3db90348f" kindref="member">ECPIntegral::left_shell_second_derivative</ref>(</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref><sp/>&amp;U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;<ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref>,<sp/>6&gt;<sp/>&amp;results)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>();</highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LB<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>();</highlight></codeline>
<codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartB<sp/>=<sp/>(LB+1)<sp/>*<sp/>(LB+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA<sp/>=<sp/>(LA+1)<sp/>*<sp/>(LA+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA_minus<sp/>=<sp/>std::max(1,<sp/>(LA-1)<sp/>*<sp/>(LA)<sp/>/<sp/>2);</highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>Q_minus,<sp/>Q_plus,<sp/>Q_0;</highlight></codeline>
<codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">auto</highlight><highlight class="normal">&amp;<sp/>r<sp/>:<sp/>results)<sp/>r.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA,<sp/>ncartB,<sp/>0.0);<sp/></highlight></codeline>
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LA<sp/>&gt;<sp/>1)</highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>Q_minus,<sp/>-2,<sp/>0);<sp/></highlight></codeline>
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_minus.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_minus,<sp/>ncartB,<sp/>0.0);</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>hack<sp/>in<sp/>the<sp/>exponents<sp/>to<sp/>the<sp/>coefficients</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>tempA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1ab1e7930b32e4ba26ee00e9747f19dca2" kindref="member">copy</ref>();</highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ad9e3f82004442f284beac5b246ae3f82" kindref="member">nprimitive</ref>();<sp/>i++)<sp/></highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1a12d01b4556196b36b8df746fac403d" kindref="member">coeffs</ref>[i]<sp/>*=<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>[i];</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>tempA,<sp/>shellB,<sp/>Q_0,<sp/>0,<sp/>0);<sp/></highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>and<sp/>for<sp/>the<sp/>l+2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ad9e3f82004442f284beac5b246ae3f82" kindref="member">nprimitive</ref>();<sp/>i++)<sp/></highlight></codeline>
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1a12d01b4556196b36b8df746fac403d" kindref="member">coeffs</ref>[i]<sp/>*=<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>[i];</highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>tempA,<sp/>shellB,<sp/>Q_plus,<sp/>2,<sp/>0);<sp/></highlight></codeline>
<codeline lineno="496"><highlight class="normal"></highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Now<sp/>compile<sp/>the<sp/>derivatives</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA_mm,<sp/>nA_pp,<sp/>nA_mp,<sp/>nA_pm;</highlight></codeline>
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k=LA;<sp/>k<sp/>&gt;=<sp/>0;<sp/>k--)<sp/>{</highlight></codeline>
<codeline lineno="501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>l=LA-k;<sp/>l&gt;=0;<sp/>l--)<sp/>{</highlight></codeline>
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m<sp/>=<sp/>LA<sp/>-<sp/>k<sp/>-<sp/>l;</highlight></codeline>
<codeline lineno="503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nB<sp/>=<sp/>0;<sp/>nB<sp/>&lt;<sp/>ncartB;<sp/>nB++)<sp/>{</highlight></codeline>
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mp<sp/>=<sp/>nA_pp<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m);<sp/></highlight><highlight class="comment">//dxx</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mm<sp/>=<sp/>std::min(nA_mp,<sp/>Q_minus.<ref refid="structlibecpint_1_1_two_index_1a713cd82eaf61abc07a21c0bc07547121" kindref="member">dims</ref>[0]-1);</highlight></codeline>
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[0](nA,<sp/>nB)<sp/>=<sp/>k*(k-1)*Q_minus(nA_mm,<sp/>nB)<sp/>-<sp/>2.0*(2*k+1)*Q_0(nA_mp,<sp/>nB)</highlight></codeline>
<codeline lineno="508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+4.0*Q_plus(nA_pp,<sp/>nB);</highlight></codeline>
<codeline lineno="509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pm<sp/>=<sp/>l<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l-1,<sp/>m)<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mm<sp/>=<sp/>k<sp/>&gt;<sp/>0<sp/>?<sp/>nA_pm<sp/>:<sp/>0;<sp/></highlight><highlight class="comment">//dxy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pp<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l+1,<sp/>m);<sp/></highlight></codeline>
<codeline lineno="513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mp<sp/><sp/>=<sp/>k<sp/>&gt;<sp/>0<sp/>?<sp/>nA_pp<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[1](nA,<sp/>nB)<sp/>=<sp/>k*l*Q_minus(nA_mm,<sp/>nB)<sp/>-<sp/>2.0*k*Q_0(nA_mp,<sp/>nB)</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>-<sp/>2.0*l*Q_0(nA_pm,<sp/>nB)<sp/>+<sp/>4.0*Q_plus(nA_pp,<sp/>nB);</highlight></codeline>
<codeline lineno="516"><highlight class="normal"></highlight></codeline>
<codeline lineno="517"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pm<sp/>=<sp/>m<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m-1)<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="518"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mm<sp/>=<sp/>k<sp/>&gt;<sp/>0<sp/>?<sp/>nA_pm<sp/>:<sp/>0;<sp/></highlight><highlight class="comment">//dxz</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pp<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m+1);</highlight></codeline>
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mp<sp/><sp/>=<sp/>k<sp/>&gt;<sp/>0<sp/>?<sp/>nA_pp<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="521"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[2](nA,<sp/>nB)<sp/>=<sp/>k*m*Q_minus(nA_mm,<sp/>nB)<sp/>-<sp/>2.0*k*Q_0(nA_mp,<sp/>nB)</highlight></codeline>
<codeline lineno="522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>-<sp/>2.0*m*Q_0(nA_pm,<sp/>nB)<sp/>+<sp/>4.0*Q_plus(nA_pp,<sp/>nB);</highlight></codeline>
<codeline lineno="523"><highlight class="normal"></highlight></codeline>
<codeline lineno="524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mm<sp/>=<sp/>l<sp/>&gt;<sp/>1<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l-2,<sp/>m)<sp/>:<sp/>0;<sp/></highlight><highlight class="comment">//dyy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mp<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m);</highlight></codeline>
<codeline lineno="526"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pp<sp/><sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l+2,m);</highlight></codeline>
<codeline lineno="527"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[3](nA,<sp/>nB)<sp/>=<sp/>l*(l-1)*Q_minus(nA_mm,<sp/>nB)<sp/>-<sp/>2.0*(2*l+1)*Q_0(nA_mp,<sp/>nB)</highlight></codeline>
<codeline lineno="528"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+4.0*Q_plus(nA_pp,<sp/>nB);</highlight></codeline>
<codeline lineno="529"><highlight class="normal"></highlight></codeline>
<codeline lineno="530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mm<sp/>=<sp/>l*m<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l-1,<sp/>m-1)<sp/>:<sp/>0;<sp/></highlight><highlight class="comment">//dyz</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mp<sp/>=<sp/>l<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l-1,<sp/>m+1)<sp/>:<sp/>0;<sp/></highlight></codeline>
<codeline lineno="532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pm<sp/>=<sp/>m<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l+1,<sp/>m-1)<sp/>:<sp/>0;<sp/></highlight></codeline>
<codeline lineno="533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pp<sp/><sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l+1,<sp/>m+1);</highlight></codeline>
<codeline lineno="534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[4](nA,<sp/>nB)<sp/>=<sp/>l*m*Q_minus(nA_mm,<sp/>nB)<sp/>-<sp/>2.0*l*Q_0(nA_mp,<sp/>nB)</highlight></codeline>
<codeline lineno="535"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>-<sp/>2.0*m*Q_0(nA_pm,<sp/>nB)<sp/>+<sp/>4.0*Q_plus(nA_pp,<sp/>nB);</highlight></codeline>
<codeline lineno="536"><highlight class="normal"></highlight></codeline>
<codeline lineno="537"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mm<sp/>=<sp/><sp/>m<sp/>&gt;<sp/>1<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m-2)<sp/>:<sp/>0;<sp/></highlight><highlight class="comment">//dzz</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_mp<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,<sp/>m);</highlight></codeline>
<codeline lineno="539"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_pp<sp/><sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(l,m+2);</highlight></codeline>
<codeline lineno="540"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[5](nA,<sp/>nB)<sp/>=<sp/>m*(m-1)*Q_minus(nA_mm,<sp/>nB)<sp/>-<sp/>2.0*(2*m+1)*Q_0(nA_mp,<sp/>nB)</highlight></codeline>
<codeline lineno="541"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+4.0*Q_plus(nA_pp,<sp/>nB);</highlight></codeline>
<codeline lineno="542"><highlight class="normal"></highlight></codeline>
<codeline lineno="543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA<sp/>+=<sp/>1;</highlight></codeline>
<codeline lineno="545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="547"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="548"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="549" refid="classlibecpint_1_1_e_c_p_integral_1a46cb1305f88bae416a513852fcfd0a9f" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a46cb1305f88bae416a513852fcfd0a9f" kindref="member">ECPIntegral::mixed_second_derivative</ref>(</highlight></codeline>
<codeline lineno="550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref><sp/>&amp;U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;<ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref>,<sp/>9&gt;<sp/>&amp;results)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>();</highlight></codeline>
<codeline lineno="553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LB<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>();</highlight></codeline>
<codeline lineno="554"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartB<sp/>=<sp/>(LB+1)<sp/>*<sp/>(LB+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA<sp/>=<sp/>(LA+1)<sp/>*<sp/>(LA+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="557"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartB_minus<sp/>=<sp/>std::max(1,<sp/>(LB)<sp/>*<sp/>(LB+1)<sp/>/<sp/>2);</highlight></codeline>
<codeline lineno="558"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA_minus<sp/>=<sp/>std::max(1,<sp/>(LA)<sp/>*<sp/>(LA+1)<sp/>/<sp/>2);</highlight></codeline>
<codeline lineno="559"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartB_plus<sp/>=<sp/>(LB+2)<sp/>*<sp/>(LB+3)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA_plus<sp/>=<sp/>(LA+2)<sp/>*<sp/>(LA+3)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref><sp/>Q_mm,<sp/>Q_mp,<sp/>Q_pm,<sp/>Q_pp;</highlight></codeline>
<codeline lineno="562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">auto</highlight><highlight class="normal">&amp;<sp/>r<sp/>:<sp/>results)<sp/>r.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA,<sp/>ncartB,<sp/>0.0);<sp/></highlight></codeline>
<codeline lineno="564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>tempA<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1ab1e7930b32e4ba26ee00e9747f19dca2" kindref="member">copy</ref>();</highlight></codeline>
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ad9e3f82004442f284beac5b246ae3f82" kindref="member">nprimitive</ref>();<sp/>i++)<sp/></highlight></codeline>
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1a12d01b4556196b36b8df746fac403d" kindref="member">coeffs</ref>[i]<sp/>*=<sp/>tempA.<ref refid="structlibecpint_1_1_gaussian_shell_1ac05c0305dc8422cbdc94e668a5e9a09e" kindref="member">exps</ref>[i];</highlight></codeline>
<codeline lineno="568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>tempB<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1ab1e7930b32e4ba26ee00e9747f19dca2" kindref="member">copy</ref>();</highlight></codeline>
<codeline lineno="569"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>tempB.nprimitive();<sp/>i++)<sp/></highlight></codeline>
<codeline lineno="570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tempB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1a12d01b4556196b36b8df746fac403d" kindref="member">coeffs</ref>[i]<sp/>*=<sp/>tempB.exps[i];</highlight></codeline>
<codeline lineno="571"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="572"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(LA<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LB<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>Q_mm,<sp/>-1,<sp/>-1);<sp/></highlight></codeline>
<codeline lineno="575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>tempA,<sp/>shellB,<sp/>Q_pm,<sp/>1,<sp/>-1);</highlight></codeline>
<codeline lineno="576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_mm.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_minus,<sp/>ncartB_minus,<sp/>0.0);</highlight></codeline>
<codeline lineno="578"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_pm.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_plus,<sp/>ncartB_minus,<sp/>0.0);</highlight></codeline>
<codeline lineno="579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>shellA,<sp/>tempB,<sp/>Q_mp,<sp/>-1,<sp/>1);</highlight></codeline>
<codeline lineno="581"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LB<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="582"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>tempA,<sp/>shellB,<sp/>Q_pm,<sp/>1,<sp/>-1);</highlight></codeline>
<codeline lineno="583"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_mm.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_minus,<sp/>ncartB_minus,<sp/>0.0);</highlight></codeline>
<codeline lineno="584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_mp.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_minus,<sp/>ncartB_plus,<sp/>0.0);</highlight></codeline>
<codeline lineno="585"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_mm.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_minus,<sp/>ncartB_minus,<sp/>0.0);</highlight></codeline>
<codeline lineno="587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_mp.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_minus,<sp/>ncartB_plus,<sp/>0.0);</highlight></codeline>
<codeline lineno="588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q_pm.<ref refid="structlibecpint_1_1_two_index_1a44b5fe46251bc63db296a718d4f47506" kindref="member">assign</ref>(ncartA_plus,<sp/>ncartB_minus,<sp/>0.0);</highlight></codeline>
<codeline lineno="589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="590"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aefe90ea26c932064396e5b1cafecdc7c" kindref="member">compute_shell_pair</ref>(U,<sp/>tempA,<sp/>tempB,<sp/>Q_pp,<sp/>1,<sp/>1);<sp/></highlight></codeline>
<codeline lineno="591"><highlight class="normal"></highlight></codeline>
<codeline lineno="592"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Now<sp/>compile<sp/>the<sp/>derivatives</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nB<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA_m[3],<sp/>nA_p[3],<sp/>nB_m[3],<sp/>nB_p[3],<sp/>AL[3],<sp/>BL[3];</highlight></codeline>
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ka=LA;<sp/>ka<sp/>&gt;=<sp/>0;<sp/>ka--)<sp/>{</highlight></codeline>
<codeline lineno="597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>la=LA-ka;<sp/>la&gt;=0;<sp/>la--)<sp/>{</highlight></codeline>
<codeline lineno="598"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ma<sp/>=<sp/>LA<sp/>-<sp/>ka<sp/>-<sp/>la;</highlight></codeline>
<codeline lineno="599"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>AL[0]=ka;<sp/>AL[1]=la;<sp/>AL[2]=ma;</highlight></codeline>
<codeline lineno="600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_p[0]<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(la,<sp/>ma);</highlight></codeline>
<codeline lineno="601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_m[0]<sp/>=<sp/>std::min(nA_p[0],<sp/>Q_mm.<ref refid="structlibecpint_1_1_two_index_1a713cd82eaf61abc07a21c0bc07547121" kindref="member">dims</ref>[0]-1);</highlight></codeline>
<codeline lineno="602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_m[1]<sp/>=<sp/>la<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(la-1,<sp/>ma)<sp/>:<sp/>0;<sp/></highlight></codeline>
<codeline lineno="603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_m[2]<sp/>=<sp/>ma<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(la,<sp/>ma-1)<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_p[1]<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(la+1,ma);</highlight></codeline>
<codeline lineno="605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA_p[2]<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(la,<sp/>ma+1);</highlight></codeline>
<codeline lineno="606"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>kb=LB;<sp/>kb<sp/>&gt;=<sp/>0;<sp/>kb--)<sp/>{</highlight></codeline>
<codeline lineno="609"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>lb=LB-kb;<sp/>lb&gt;=0;<sp/>lb--)<sp/>{</highlight></codeline>
<codeline lineno="610"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mb<sp/>=<sp/>LB<sp/>-<sp/>kb<sp/>-<sp/>lb;</highlight></codeline>
<codeline lineno="611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB_p[0]<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(lb,<sp/>mb);</highlight></codeline>
<codeline lineno="612"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB_m[0]<sp/>=<sp/>std::min(nB_p[0],<sp/>Q_mm.<ref refid="structlibecpint_1_1_two_index_1a713cd82eaf61abc07a21c0bc07547121" kindref="member">dims</ref>[1]-1);</highlight></codeline>
<codeline lineno="613"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB_m[1]<sp/>=<sp/>lb<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(lb-1,<sp/>mb)<sp/>:<sp/>0;<sp/></highlight></codeline>
<codeline lineno="614"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB_m[2]<sp/>=<sp/>mb<sp/>&gt;<sp/>0<sp/>?<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(lb,<sp/>mb-1)<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB_p[1]<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(lb+1,mb);</highlight></codeline>
<codeline lineno="616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB_p[2]<sp/>=<sp/><ref refid="ecpint_8hpp_1a8546f51f524d0baff0bf3f3b321fbc9b" kindref="member">N_INDEX</ref>(lb,<sp/>mb+1);</highlight></codeline>
<codeline lineno="617"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BL[0]=kb;<sp/>BL[1]=lb;<sp/>BL[2]=mb;</highlight></codeline>
<codeline lineno="618"><highlight class="normal"></highlight></codeline>
<codeline lineno="619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>p<sp/>=<sp/>0;<sp/>p<sp/>&lt;<sp/>3;<sp/>p++)<sp/>{</highlight></codeline>
<codeline lineno="620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref><sp/>=<sp/>0;<sp/><ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref><sp/>&lt;<sp/>3;<sp/><ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>++)<sp/>{</highlight></codeline>
<codeline lineno="621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[3*p+<ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>](nA,<sp/>nB)<sp/>=<sp/>AL[p]*BL[<ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>]*Q_mm(nA_m[p],<sp/>nB_m[<ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>])<sp/>-<sp/>2.0*BL[<ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>]*Q_pm(nA_p[p],<sp/>nB_m[<ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>])</highlight></codeline>
<codeline lineno="622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>-<sp/>2.0*AL[p]*Q_mp(nA_m[p],<sp/>nB_p[<ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>])<sp/>+<sp/>4.0*Q_pp(nA_p[p],<sp/>nB_p[<ref refid="namespaceunrol__radial_1a032ec358895dd239986cf46342a0de86" kindref="member">q</ref>]);</highlight></codeline>
<codeline lineno="623"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nB<sp/>+=<sp/>1;</highlight></codeline>
<codeline lineno="627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nA<sp/>+=<sp/>1;</highlight></codeline>
<codeline lineno="630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="632"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="633"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="634" refid="classlibecpint_1_1_e_c_p_integral_1aed236dd4e66196f85bc11a398897602a" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aed236dd4e66196f85bc11a398897602a" kindref="member">ECPIntegral::compute_shell_pair_derivative</ref>(</highlight></codeline>
<codeline lineno="635"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref><sp/>&amp;U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="636"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;<ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref>,<sp/>9&gt;<sp/>&amp;results)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="637"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>First<sp/>we<sp/>check<sp/>centres</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="638"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>A[3],<sp/>B[3],<sp/>C[3];</highlight></codeline>
<codeline lineno="639"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>3;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="640"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>A[i]<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[i];</highlight></codeline>
<codeline lineno="641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>B[i]<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[i];</highlight></codeline>
<codeline lineno="642"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C[i]<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a67b0097de7275b589d8fb104559c85f2" kindref="member">center</ref>()[i];</highlight></codeline>
<codeline lineno="643"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="645"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dAC<sp/>=<sp/>std::abs(A[0]<sp/>-<sp/>C[0])<sp/>+<sp/>std::abs(A[1]<sp/>-<sp/>C[1])<sp/>+<sp/>std::abs(A[2]<sp/>-<sp/>C[2]);</highlight></codeline>
<codeline lineno="646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dBC<sp/>=<sp/>std::abs(B[0]<sp/>-<sp/>C[0])<sp/>+<sp/>std::abs(B[1]<sp/>-<sp/>C[1])<sp/>+<sp/>std::abs(B[2]<sp/>-<sp/>C[2]);</highlight></codeline>
<codeline lineno="647"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="648"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Calculate<sp/>shell<sp/>derivatives</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="649"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;TwoIndex&lt;double&gt;,<sp/>3&gt;<sp/>QA,<sp/>QB;</highlight></codeline>
<codeline lineno="650"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dAC<sp/>&gt;<sp/>1e-6)<sp/></highlight></codeline>
<codeline lineno="651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a6ec52d533d7359b4d5e824977ef4097e" kindref="member">left_shell_derivative</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>QA);</highlight></codeline>
<codeline lineno="652"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dBC<sp/>&gt;<sp/>1e-6)</highlight></codeline>
<codeline lineno="653"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a6ec52d533d7359b4d5e824977ef4097e" kindref="member">left_shell_derivative</ref>(U,<sp/>shellB,<sp/>shellA,<sp/>QB);</highlight></codeline>
<codeline lineno="654"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="655"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>initialise<sp/>results<sp/>matrices</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="656"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA<sp/>=<sp/>(shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+1)<sp/>*<sp/>(shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="657"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartB<sp/>=<sp/>(shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+1)<sp/>*<sp/>(shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="658"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="659"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Now<sp/>construct<sp/>the<sp/>nuclear<sp/>derivs</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="660"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dAC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="661"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[0]<sp/>=<sp/>QA[0];</highlight></codeline>
<codeline lineno="662"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[1]<sp/>=<sp/>QA[1];</highlight></codeline>
<codeline lineno="663"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[2]<sp/>=<sp/>QA[2];</highlight></codeline>
<codeline lineno="664"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dBC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="665"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[3]<sp/>=<sp/>QB[0].transpose();</highlight></codeline>
<codeline lineno="666"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[4]<sp/>=<sp/>QB[1].transpose();</highlight></codeline>
<codeline lineno="667"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[5]<sp/>=<sp/>QB[2].transpose();</highlight></codeline>
<codeline lineno="668"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>6;<sp/>i<sp/>&lt;<sp/>9;<sp/>i++)<sp/>results[i].assign(ncartA,<sp/>ncartB,<sp/>0.0);</highlight></codeline>
<codeline lineno="669"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA<sp/>=<sp/>0;<sp/>nA<sp/>&lt;<sp/>ncartA;<sp/>nA++)<sp/>{</highlight></codeline>
<codeline lineno="670"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nB<sp/>=<sp/>0;<sp/>nB<sp/>&lt;<sp/>ncartB;<sp/>nB++){</highlight></codeline>
<codeline lineno="671"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[6](nA,<sp/>nB)<sp/>=<sp/>-1.0<sp/>*<sp/>(results[0](nA,<sp/>nB)<sp/>+<sp/>results[3](nA,<sp/>nB));</highlight></codeline>
<codeline lineno="672"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[7](nA,<sp/>nB)<sp/>=<sp/>-1.0<sp/>*<sp/>(results[1](nA,<sp/>nB)<sp/>+<sp/>results[4](nA,<sp/>nB));</highlight></codeline>
<codeline lineno="673"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[8](nA,<sp/>nB)<sp/>=<sp/>-1.0<sp/>*<sp/>(results[2](nA,<sp/>nB)<sp/>+<sp/>results[5](nA,<sp/>nB));</highlight></codeline>
<codeline lineno="674"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="675"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="676"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="677"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[3]<sp/>=<sp/>results[0];<sp/>results[3].multiply(-1.0);</highlight></codeline>
<codeline lineno="678"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[4]<sp/>=<sp/>results[1];<sp/>results[4].multiply(-1.0);</highlight></codeline>
<codeline lineno="679"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[5]<sp/>=<sp/>results[2];<sp/>results[5].multiply(-1.0);</highlight></codeline>
<codeline lineno="680"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>6;<sp/>i<sp/>&lt;<sp/>9;<sp/>i++)<sp/>results[i].assign(ncartA,<sp/>ncartB,<sp/>0.0);</highlight></codeline>
<codeline lineno="681"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="682"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dBC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="683"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[3]<sp/>=<sp/>QB[0].transpose();</highlight></codeline>
<codeline lineno="684"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[4]<sp/>=<sp/>QB[1].transpose();</highlight></codeline>
<codeline lineno="685"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[5]<sp/>=<sp/>QB[2].transpose();</highlight></codeline>
<codeline lineno="686"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[0]<sp/>=<sp/>results[3];<sp/>results[0].multiply(-1.0);</highlight></codeline>
<codeline lineno="687"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[1]<sp/>=<sp/>results[4];<sp/>results[1].multiply(-1.0);</highlight></codeline>
<codeline lineno="688"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[2]<sp/>=<sp/>results[5];<sp/>results[2].multiply(-1.0);</highlight></codeline>
<codeline lineno="689"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>6;<sp/>i<sp/>&lt;<sp/>9;<sp/>i++)<sp/>results[i].assign(ncartA,<sp/>ncartB,<sp/>0.0);</highlight></codeline>
<codeline lineno="690"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="691"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>else<sp/>everything<sp/>is<sp/>zero</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="692"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">auto</highlight><highlight class="normal">&amp;<sp/>r<sp/>:<sp/>results)<sp/>r.assign(ncartA,<sp/>ncartB,<sp/>0.0);</highlight></codeline>
<codeline lineno="693"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="694"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="695"><highlight class="normal"></highlight></codeline>
<codeline lineno="696" refid="classlibecpint_1_1_e_c_p_integral_1a7c15127045f4a6ea84d2440664ab659b" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a7c15127045f4a6ea84d2440664ab659b" kindref="member">ECPIntegral::compute_shell_pair_second_derivative</ref>(</highlight></codeline>
<codeline lineno="697"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_e_c_p" kindref="compound">ECP</ref><sp/>&amp;U,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellA,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structlibecpint_1_1_gaussian_shell" kindref="compound">GaussianShell</ref><sp/>&amp;shellB,</highlight></codeline>
<codeline lineno="698"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;<ref refid="structlibecpint_1_1_two_index" kindref="compound">TwoIndex&lt;double&gt;</ref>,<sp/>45&gt;<sp/>&amp;results)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="699"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>First<sp/>we<sp/>check<sp/>centres</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="700"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>A[3],<sp/>B[3],<sp/>C[3];</highlight></codeline>
<codeline lineno="701"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>3;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="702"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>A[i]<sp/>=<sp/>shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[i];</highlight></codeline>
<codeline lineno="703"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>B[i]<sp/>=<sp/>shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a4516bca17cc123b121cc058052b56984" kindref="member">center</ref>()[i];</highlight></codeline>
<codeline lineno="704"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C[i]<sp/>=<sp/>U.<ref refid="structlibecpint_1_1_e_c_p_1a67b0097de7275b589d8fb104559c85f2" kindref="member">center</ref>()[i];</highlight></codeline>
<codeline lineno="705"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="706"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="707"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dAC<sp/>=<sp/>std::abs(A[0]<sp/>-<sp/>C[0])<sp/>+<sp/>std::abs(A[1]<sp/>-<sp/>C[1])<sp/>+<sp/>std::abs(A[2]<sp/>-<sp/>C[2]);</highlight></codeline>
<codeline lineno="708"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>dBC<sp/>=<sp/>std::abs(B[0]<sp/>-<sp/>C[0])<sp/>+<sp/>std::abs(B[1]<sp/>-<sp/>C[1])<sp/>+<sp/>std::abs(B[2]<sp/>-<sp/>C[2]);</highlight></codeline>
<codeline lineno="709"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="710"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Calculate<sp/>shell<sp/>derivatives</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="711"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;TwoIndex&lt;double&gt;,<sp/>6&gt;<sp/>QAA,<sp/>QBB;</highlight></codeline>
<codeline lineno="712"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::array&lt;TwoIndex&lt;double&gt;,<sp/>9&gt;<sp/>QAB;</highlight></codeline>
<codeline lineno="713"><highlight class="normal"></highlight></codeline>
<codeline lineno="714"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dAC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="715"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aaa4a5ba77942b3f26e965ba3db90348f" kindref="member">left_shell_second_derivative</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>QAA);</highlight></codeline>
<codeline lineno="716"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dBC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="717"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aaa4a5ba77942b3f26e965ba3db90348f" kindref="member">left_shell_second_derivative</ref>(U,<sp/>shellB,<sp/>shellA,<sp/>QBB);</highlight></codeline>
<codeline lineno="718"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1a46cb1305f88bae416a513852fcfd0a9f" kindref="member">mixed_second_derivative</ref>(U,<sp/>shellA,<sp/>shellB,<sp/>QAB);</highlight></codeline>
<codeline lineno="719"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="720"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dBC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="721"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classlibecpint_1_1_e_c_p_integral_1aaa4a5ba77942b3f26e965ba3db90348f" kindref="member">left_shell_second_derivative</ref>(U,<sp/>shellB,<sp/>shellA,<sp/>QBB);</highlight></codeline>
<codeline lineno="722"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="723"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="724"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>initialise<sp/>results<sp/>matrices</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="725"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartA<sp/>=<sp/>(shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+1)<sp/>*<sp/>(shellA.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="726"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ncartB<sp/>=<sp/>(shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+1)<sp/>*<sp/>(shellB.<ref refid="structlibecpint_1_1_gaussian_shell_1a1b813a78cfad1112ac6dd4a18243f1e2" kindref="member">am</ref>()+2)<sp/>/<sp/>2;</highlight></codeline>
<codeline lineno="727"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">auto</highlight><highlight class="normal">&amp;<sp/>r<sp/>:<sp/>results)<sp/>r.assign(ncartA,<sp/>ncartB,<sp/>0.0);</highlight></codeline>
<codeline lineno="728"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="729"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Now<sp/>construct<sp/>the<sp/>nuclear<sp/>derivs</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="730"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>jaas[9]<sp/>=<sp/>{0,<sp/>1,<sp/>2,<sp/>1,<sp/>3,<sp/>4,<sp/>2,<sp/>4,<sp/>5};</highlight></codeline>
<codeline lineno="731"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>jbbs[9]<sp/>=<sp/>{0,<sp/>3,<sp/>6,<sp/>1,<sp/>4,<sp/>7,<sp/>2,<sp/>5,<sp/>8};</highlight></codeline>
<codeline lineno="732"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>jaa,<sp/>jbb;</highlight></codeline>
<codeline lineno="733"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dAC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="734"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//AA<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yy,<sp/>yz,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="735"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>6;<sp/>i++)<sp/>results[i]<sp/>=<sp/>QAA[i];<sp/></highlight></codeline>
<codeline lineno="736"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="737"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dBC<sp/>&gt;<sp/>1e-6)<sp/>{<sp/><sp/><sp/></highlight></codeline>
<codeline lineno="738"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>AB<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yx,<sp/>yy,<sp/>yz,<sp/>zx,<sp/>zy,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="739"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>6;<sp/>i<sp/>&lt;<sp/>15;<sp/>i++)<sp/>results[i]<sp/>=<sp/>QAB[i-6];</highlight></codeline>
<codeline lineno="740"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//BB<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yy,<sp/>yz,<sp/>zz)<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="741"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>24;<sp/>i<sp/>&lt;<sp/>30;<sp/>i++)<sp/>results[i]<sp/>=<sp/>QBB[i-24].transpose();</highlight></codeline>
<codeline lineno="742"><highlight class="normal"></highlight></codeline>
<codeline lineno="743"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nA<sp/>=<sp/>0;<sp/>nA<sp/>&lt;<sp/>ncartA;<sp/>nA++)<sp/>{</highlight></codeline>
<codeline lineno="744"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nB<sp/>=<sp/>0;<sp/>nB<sp/>&lt;<sp/>ncartB;<sp/>nB++){</highlight></codeline>
<codeline lineno="745"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>9;<sp/>j++)<sp/>{</highlight></codeline>
<codeline lineno="746"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>jaa<sp/>=<sp/>jaas[j];</highlight></codeline>
<codeline lineno="747"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>jbb<sp/>=<sp/>jbbs[j];</highlight></codeline>
<codeline lineno="748"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="749"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>AC<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yx,<sp/>yy,<sp/>yz,<sp/>zx,<sp/>zy,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="750"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[15+j](nA,<sp/>nB)<sp/>=<sp/>-1.0*(QAA[jaa](nA,<sp/>nB)<sp/>+<sp/>QAB[j](nA,<sp/>nB));</highlight></codeline>
<codeline lineno="751"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="752"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>BC<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yx,<sp/>yy,<sp/>yz,<sp/>zx,<sp/>zy,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="753"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[30+j](nA,<sp/>nB)<sp/>=<sp/>-1.0*(QBB[jaa](nB,<sp/>nA)<sp/>+<sp/>QAB[jbb](nA,<sp/>nB));</highlight></codeline>
<codeline lineno="754"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="755"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>CC<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yy,<sp/>yz,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="756"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[39+jaa](nA,<sp/>nB)<sp/>=<sp/>-results[30+j](nA,<sp/>nB)<sp/>-results[15+j](nA,<sp/>nB);<sp/></highlight></codeline>
<codeline lineno="757"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="758"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="759"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="760"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="761"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>AB<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yx,<sp/>yy,<sp/>yz,<sp/>zx,<sp/>zy,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="762"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>6;<sp/>i<sp/>&lt;<sp/>15;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="763"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[i]<sp/>=<sp/>QAA[jaas[i-6]];</highlight></codeline>
<codeline lineno="764"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[i].multiply(-1.0);</highlight></codeline>
<codeline lineno="765"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="766"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//BB<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yy,<sp/>yz,<sp/>zz)<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="767"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>24;<sp/>i<sp/>&lt;<sp/>30;<sp/>i++)<sp/>results[i]<sp/>=<sp/>QAA[i-24];</highlight></codeline>
<codeline lineno="768"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="769"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dBC<sp/>&gt;<sp/>1e-6)<sp/>{</highlight></codeline>
<codeline lineno="770"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//BB<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yy,<sp/>yz,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="771"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>24;<sp/>i<sp/>&lt;<sp/>30;<sp/>i++)<sp/>results[i]<sp/>=<sp/>QBB[i-24].transpose();<sp/></highlight></codeline>
<codeline lineno="772"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>AB<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yx,<sp/>yy,<sp/>yz,<sp/>zx,<sp/>zy,<sp/>zz)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="773"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>6;<sp/>i<sp/>&lt;<sp/>15;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="774"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[i]<sp/>=<sp/>QBB[jaas[i-6]].transpose();</highlight></codeline>
<codeline lineno="775"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>results[i].multiply(-1.0);</highlight></codeline>
<codeline lineno="776"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="777"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//AA<sp/>(xx,<sp/>xy,<sp/>xz,<sp/>yy,<sp/>yz,<sp/>zz)<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="778"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>6;<sp/>i++)<sp/>results[i]<sp/>=<sp/>QBB[i].transpose();</highlight></codeline>
<codeline lineno="779"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight></codeline>
<codeline lineno="780"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="781"><highlight class="normal"></highlight></codeline>
<codeline lineno="782"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/Users/robertshaw/devfiles/libecpint/src/lib/ecpint.cpp"/>
  </compounddef>
</doxygen>
