This file is indexed.

/usr/share/doc/libchemps2/html/dmrgscfcalcs.html is in chemps2-doc 1.8.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>9. DMRG-SCF calculations &#8212; CheMPS2 1.8.5 (2018-01-14) documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.8.5 (2018-01-14)',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="/usr/share/javascript/jquery/jquery.js"></script>
    <script type="text/javascript" src="/usr/share/javascript/underscore/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="10. Internally contracted CASPT2" href="caspt2.html" />
    <link rel="prev" title="8. DMRG-SCF" href="dmrgscf.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="caspt2.html" title="10. Internally contracted CASPT2"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="dmrgscf.html" title="8. DMRG-SCF"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">CheMPS2 1.8.5 (2018-01-14) documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="dmrg-scf-calculations">
<h1>9. DMRG-SCF calculations<a class="headerlink" href="#dmrg-scf-calculations" title="Permalink to this headline"></a></h1>
<div class="section" id="chemps2-dmrgscfoptions">
<h2>9.1. <code class="docutils literal"><span class="pre">CheMPS2::DMRGSCFoptions</span></code><a class="headerlink" href="#chemps2-dmrgscfoptions" title="Permalink to this headline"></a></h2>
<p>An instance of the <code class="docutils literal"><span class="pre">CheMPS2::DMRGSCFoptions</span></code> class is required to perform DMRG-SCF calculations. It allows to overwrite the default algorithmic choices.</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="p">()</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setDoDIIS</span><span class="p">(</span> <span class="k">const</span> <span class="kt">bool</span> <span class="n">DoDIIS_in</span><span class="o">=</span><span class="nb">false</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setDIISGradientBranch</span><span class="p">(</span> <span class="k">const</span> <span class="kt">double</span> <span class="n">DIISGradientBranch_in</span><span class="o">=</span><span class="mf">1e-2</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setNumDIISVecs</span><span class="p">(</span> <span class="k">const</span> <span class="kt">int</span> <span class="n">NumDIISVecs_in</span><span class="o">=</span><span class="mi">7</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setStoreDIIS</span><span class="p">(</span> <span class="k">const</span> <span class="kt">bool</span> <span class="n">StoreDIIS_in</span><span class="o">=</span><span class="nb">true</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setDIISStorageName</span><span class="p">(</span> <span class="k">const</span> <span class="n">string</span> <span class="n">DIISStorageName_in</span><span class="o">=</span><span class="s">&quot;CheMPS2_DIIS.h5&quot;</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setMaxIterations</span><span class="p">(</span> <span class="k">const</span> <span class="kt">int</span> <span class="n">MaxIterations_in</span><span class="o">=</span><span class="mi">100</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setGradientThreshold</span><span class="p">(</span> <span class="k">const</span> <span class="kt">double</span> <span class="n">GradientThreshold_in</span><span class="o">=</span><span class="mf">1e-6</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setStoreUnitary</span><span class="p">(</span> <span class="k">const</span> <span class="kt">bool</span> <span class="n">StoreUnitary_in</span><span class="o">=</span><span class="nb">true</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setUnitaryStorageName</span><span class="p">(</span> <span class="k">const</span> <span class="n">string</span> <span class="n">UnitaryStorageName_in</span><span class="o">=</span><span class="s">&quot;CheMPS2_CASSCF.h5&quot;</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setStateAveraging</span><span class="p">(</span> <span class="k">const</span> <span class="kt">bool</span> <span class="n">StateAveraging_in</span><span class="o">=</span><span class="nb">true</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setWhichActiveSpace</span><span class="p">(</span> <span class="k">const</span> <span class="kt">int</span> <span class="n">WhichActiveSpace_in</span><span class="o">=</span><span class="mi">0</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setDumpCorrelations</span><span class="p">(</span> <span class="k">const</span> <span class="kt">bool</span> <span class="n">DumpCorrelations_in</span><span class="o">=</span><span class="nb">false</span> <span class="p">)</span>
<span class="kt">void</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">DMRGSCFoptions</span><span class="o">::</span><span class="n">setStartLocRandom</span><span class="p">(</span> <span class="k">const</span> <span class="kt">bool</span> <span class="n">StartLocRandom_in</span><span class="o">=</span><span class="nb">false</span> <span class="p">)</span>
</pre></div>
</div>
<ul class="simple">
<li>The variable <code class="docutils literal"><span class="pre">DoDIIS_in</span></code> allows to switch on the DIIS acceleration for DMRG-SCF calculations.</li>
<li>If <code class="docutils literal"><span class="pre">DoDIIS_in==true</span></code>, the DIIS acceleration starts when the update norm <span class="math">\(\|\vec{x}\|_2\)</span> is smaller than <code class="docutils literal"><span class="pre">DIISGradientBranch_in</span></code>.</li>
<li>The variable <code class="docutils literal"><span class="pre">NumDIISVecs_in</span></code> allows to set the size of the DIIS list.</li>
<li>The variable <code class="docutils literal"><span class="pre">StoreDIIS_in</span></code> allows to switch off storing the DIIS checkpoint file to disk.</li>
<li>The variable <code class="docutils literal"><span class="pre">DIISStorageName_in</span></code> contains the filename of the DIIS checkpoint.</li>
<li>The variable <code class="docutils literal"><span class="pre">MaxIterations_in</span></code> contains the maximum number of DMRG-SCF iterations to be performed.</li>
<li>The variable <code class="docutils literal"><span class="pre">GradientThreshold_in</span></code> specifies the convergence threshold for the norm of the orbital rotation gradient <span class="math">\(\|\vec{g}\|_2\)</span>.</li>
<li>The variable <code class="docutils literal"><span class="pre">StoreUnitary_in</span></code> allows to switch off storing the orbital rotation checkpoint file to disk.</li>
<li>The variable <code class="docutils literal"><span class="pre">UnitaryStorageName_in</span></code> contains the filename of the orbital rotation checkpoint.</li>
<li>The variable <code class="docutils literal"><span class="pre">StateAveraging_in</span></code> allows to switch off state-averaged DMRG-SCF calculations (to perform state-specific DMRG-SCF calculations).</li>
<li><dl class="first docutils">
<dt>The variable <code class="docutils literal"><span class="pre">WhichActiveSpace_in</span></code> allows to switch between active space orbital choices (please remember the remark in the section <a class="reference internal" href="inoutput.html#chemps2-orbitalchoiceordering"><span class="std std-ref">Orbital choice and ordering</span></a>):</dt>
<dd><ul class="first last">
<li>input orbitals (<code class="docutils literal"><span class="pre">0</span></code>) : No orbital rotations in addition to the occupied-active, active-virtual, and occupied-virtual rotations are performed.</li>
<li>natural orbitals (<code class="docutils literal"><span class="pre">1</span></code>) : After each DMRG calculation, and before the calculation of the gradient and Hessian for occupied-active, active-virtual, and occupied-virtual rotations, the active space orbitals are rotated to natural orbitals. This options allows to perform an initial approximate large active space DMRG calculation, from which a smaller active space can subsequently be selected based on the natural orbital occupation numbers.</li>
<li>localized (Edmiston-Ruedenberg) and ordered (Fiedler vector of the exchange matrix) orbitals (<code class="docutils literal"><span class="pre">2</span></code>) : Per irrep, the orbitals are localized with an augmented Hessian Newton-Raphson optimization of the Edmiston-Ruedenberg cost function. The orbitals are ordered per irrep based on the Fiedler vector of the exchange matrix. Orbitals belonging to different irreps are not mingled in the process.</li>
<li>ordered orbitals only (based on the Fiedler vector of the exchange matrix) (<code class="docutils literal"><span class="pre">3</span></code>) : The orbitals are ordered based on the Fiedler vector of the exchange matrix. Orbitals belonging to different irreps are mingled in the process.</li>
</ul>
</dd>
</dl>
</li>
<li>The variable <code class="docutils literal"><span class="pre">DumpCorrelations_in</span></code> allows to switch on printing the correlation functions defined in the section <a class="reference internal" href="inoutput.html#chemps2-dmrg-object"><span class="std std-ref">CheMPS2::DMRG</span></a> after each DMRG calculation during the DMRG-SCF iterations.</li>
<li>The variable <code class="docutils literal"><span class="pre">StartLocRandom_in</span></code> allows to start the localization of the orbitals (if <code class="docutils literal"><span class="pre">WhichActiveSpace_in==2</span></code>) from a random orbital rotation. To study the <span class="math">\(\pi\)</span>-orbitals of polyenes, for example, the matrix elements should be generated in the <span class="math">\(\mathsf{C_s}\)</span> subgroup of the molecule’s point group in order to be able to localize them. In order to break the symmetry of the R(O)HF orbitals during localization, it is important to start from a random orbital rotation.</li>
</ul>
</div>
<div class="section" id="chemps2-casscf">
<span id="label-casscf-calculations-api"></span><h2>9.2. <code class="docutils literal"><span class="pre">CheMPS2::CASSCF</span></code><a class="headerlink" href="#chemps2-casscf" title="Permalink to this headline"></a></h2>
<p>Augmented Hessian Newton-Raphson DMRG-SCF calculations can be performed with the <code class="docutils literal"><span class="pre">CheMPS2::CASSCF</span></code> class:</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="n">CheMPS2</span><span class="o">::</span><span class="n">CASSCF</span><span class="o">::</span><span class="n">CASSCF</span><span class="p">(</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">Hamiltonian</span> <span class="o">*</span> <span class="n">ham_in</span><span class="p">,</span> <span class="kt">int</span> <span class="o">*</span> <span class="n">docc</span><span class="p">,</span> <span class="kt">int</span> <span class="o">*</span> <span class="n">socc</span><span class="p">,</span> <span class="kt">int</span> <span class="o">*</span> <span class="n">nocc</span><span class="p">,</span> <span class="kt">int</span> <span class="o">*</span> <span class="n">ndmrg</span><span class="p">,</span> <span class="kt">int</span> <span class="o">*</span> <span class="n">nvirt</span><span class="p">,</span> <span class="k">const</span> <span class="n">string</span> <span class="n">tmp_folder</span> <span class="p">)</span>
<span class="kt">double</span> <span class="n">CheMPS2</span><span class="o">::</span><span class="n">CASSCF</span><span class="o">::</span><span class="n">solve</span><span class="p">(</span> <span class="k">const</span> <span class="kt">int</span> <span class="n">Nelectrons</span><span class="p">,</span> <span class="k">const</span> <span class="kt">int</span> <span class="n">TwoS</span><span class="p">,</span> <span class="k">const</span> <span class="kt">int</span> <span class="n">Irrep</span><span class="p">,</span> <span class="n">ConvergenceScheme</span> <span class="o">*</span> <span class="n">OptScheme</span><span class="p">,</span> <span class="k">const</span> <span class="kt">int</span> <span class="n">rootNum</span><span class="p">,</span> <span class="n">DMRGSCFoptions</span> <span class="o">*</span> <span class="n">scf_options</span> <span class="p">)</span>
</pre></div>
</div>
<p>The variables <code class="docutils literal"><span class="pre">docc</span></code>, <code class="docutils literal"><span class="pre">socc</span></code>, <code class="docutils literal"><span class="pre">nocc</span></code>, <code class="docutils literal"><span class="pre">ndmrg</span></code>, <code class="docutils literal"><span class="pre">nvirt</span></code> are arrays which have as length the number of irreps of the point group of the Hamiltonian (see the section <a class="reference internal" href="matrixelements.html#chemps2-psi4irrepconventions"><span class="std std-ref">Custom matrix elements</span></a>). The first two arrays contain the number of doubly and singly occupied orbitals per irrep of the initial R(O)HF calculation. The last three arrays define for each of the irreps the number of occupied, active, and virtual orbitals, respectively.</p>
<p>The augmented Hessian Newton-Raphson DMRG-SCF calculation is started by calling the function <code class="docutils literal"><span class="pre">solve</span></code>. The variables <code class="docutils literal"><span class="pre">Nelectrons</span></code>, <code class="docutils literal"><span class="pre">TwoS</span></code>, and <code class="docutils literal"><span class="pre">Irrep</span></code> define the active space symmetry sector. Note that <code class="docutils literal"><span class="pre">Nelectrons</span></code> is the total number of electrons, i.e. also the electrons in the doubly occupied core orbitals. <code class="docutils literal"><span class="pre">TwoS</span></code> is twice the targeted spin (multiplicity minus one). The numbering convention for the irreps can be found in the section <a class="reference internal" href="matrixelements.html#chemps2-psi4irrepconventions"><span class="std std-ref">Custom matrix elements</span></a>. The variable <code class="docutils literal"><span class="pre">rootNum</span></code> defines how many states should be calculated during each DMRG calculation: <code class="docutils literal"><span class="pre">rootNum==1</span></code> means ground state only, <code class="docutils literal"><span class="pre">rootNum==2</span></code> means ground state and first excited state, etc. The DMRG instructions are passed in the <code class="docutils literal"><span class="pre">CheMPS2::ConvergenceScheme</span></code> object and the DMRG-SCF algorithmic choices in the <code class="docutils literal"><span class="pre">CheMPS2::DMRGSCFoptions</span></code> object. After completion, the function <code class="docutils literal"><span class="pre">solve</span></code> returns the DMRG-SCF energy.</p>
<p>For DMRG-SCF calculations, the number of reduced virtual basis states should not be decreased in the <code class="docutils literal"><span class="pre">CheMPS2::ConvergenceScheme</span></code> object. It is however advised to perform a few sweeps without noise and with very small residual norm tolerance (1e-8 to 1e-10) at the largest value of <span class="math">\(D_{\mathsf{SU(2)}}\)</span>. When you want to extrapolate the energy in the converged active space, it is better to create an orbital rotation checkpoint, and restart the DMRG-SCF calculation for one iteration (<code class="docutils literal"><span class="pre">MaxIterations_in==1</span></code>) with a different <code class="docutils literal"><span class="pre">CheMPS2::ConvergenceScheme</span></code>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/CheMPS2logo.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">9. DMRG-SCF calculations</a><ul>
<li><a class="reference internal" href="#chemps2-dmrgscfoptions">9.1. <code class="docutils literal"><span class="pre">CheMPS2::DMRGSCFoptions</span></code></a></li>
<li><a class="reference internal" href="#chemps2-casscf">9.2. <code class="docutils literal"><span class="pre">CheMPS2::CASSCF</span></code></a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="dmrgscf.html"
                        title="previous chapter">8. DMRG-SCF</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="caspt2.html"
                        title="next chapter">10. Internally contracted CASPT2</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/dmrgscfcalcs.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="caspt2.html" title="10. Internally contracted CASPT2"
             >next</a> |</li>
        <li class="right" >
          <a href="dmrgscf.html" title="8. DMRG-SCF"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">CheMPS2 1.8.5 (2018-01-14) documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2013-2018, Sebastian Wouters.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
    </div>
  </body>
</html>