CCL: accurate computation for active and inactive orbitals



Hi,

For the following pdb or xyz files, how do I determine the active orbitals indices using "Improved Virtual Orbitals" ?




```
 ~/D/Q/c/OpenMolcas_build  cat ../Fe2_CO2/step_001.pdb                              
COMPND    step_001.xyz
AUTHOR    GENERATED BY OPEN BABEL 3.1.0
HETATM    1 FE   UNL     1       6.765   5.739   5.000  1.00  0.00          Fe  
HETATM    2  O   UNL     1       8.308   6.386   5.000  1.00  0.00           O  
HETATM    3  C   UNL     1       9.373   6.856   5.000  1.00  0.00           C  
HETATM    4  O   UNL     1      10.403   7.310   5.000  1.00  0.00           O  
CONECT    1    2                                                      
CONECT    2    1    3                                                
CONECT    3    2    4                                                
CONECT    4    3                                                      
MASTER        0    0    0    0    0    0    0    0    4    0    4    0
END

 ~/D/Q/c/OpenMolcas_build  cat ../Fe2_CO2/step_001.xyz                              
4

Fe      6.764503782732331      5.739095260921351      5.000000000000000
O       8.308444217623119      6.385803739227534      5.000000000000000
C       9.372928217697705      6.855654739260454      5.000000000000000
O      10.403406217769907      7.310241739292306      5.000000000000000
 ~/D/Q/c/OpenMolcas_build   
```

Regards,
Phung Cheng Fei


From: owner-chemistry+feiphung==hotmail.com ^at^ ccl.net <owner-chemistry+feiphung==hotmail.com ^at^ ccl.net> on behalf of Cheng Fei Phung feiphung ~~ hotmail.com <owner-chemistry ^at^ ccl.net>
Sent: Sunday, April 2, 2023 11:48 PM
To: Phung, Cheng Fei -id#3zj- <feiphung ^at^ hotmail.com>
Subject: CCL: accurate computation for active and inactive orbitals
 
Hi Susi Lehtola,

> From https://pyscf.org/user/ci.html#frozen-orbitals , it still requires the exact list of the orbital indices (which is the question of this thread).

```

# freeze 2 core orbitals
myci = ci.CISD(mf, frozen=[0,1]).run()
# freeze 2 core orbitals and 3 unoccupied orbitals
myci = ci.CISD(mf, frozen=[0,1,16,17,18]).run()

```

Could you tell us more about the use of Improved Virtual orbitals in this particular context ?

Regards,
Phung Cheng Fei
________________________________
> From: owner-chemistry+feiphung==hotmail.com]^[ccl.net <owner-chemistry+feiphung==hotmail.com]^[ccl.net> on behalf of Susi Lehtola susi.lehtola() alumni.helsinki.fi <owner-chemistry]^[ccl.net>
Sent: Friday, March 31, 2023 10:47 PM
To: Phung, Cheng Fei  <feiphung]^[hotmail.com>
Subject: CCL: accurate computation for active and inactive orbitals


Sent to CCL by: Susi Lehtola [susi.lehtola-$-alumni.helsinki.fi]
On 3/31/23 07:47, Cheng Fei Phung feiphung-,-hotmail.com wrote:
>
> Sent to CCL by: "Cheng Fei  Phung" [feiphung#hotmail.com]
> Could anyone provide accurate computation for active and inactive orbitals to be used in https://qiskit.org/documentation/nature/locale/bn_BN/stubs/qiskit_nature.second_q.transformers.FreezeCoreTransformer.html and
> https://qiskit.org/documentation/nature/stubs/qiskit_nature.second_q.transformers.ActiveSpaceTransformer.html ?
>
> My current inaccurate solution is using HOMO-LUMO approach.  See https://github.com/tencent-quantum-lab/tensorcircuit/issues/120#issuecomment-1457932770
>
> I am looking at https://www.scm.com/doc/BAND/index.html which seems to provide [some DFT methods](https://i.imgur.com/mHeWCtl.png) to do so.
>
> However, I do not have access to SCM software.
>
> Any suggestions ?

There is a common misunderstanding here by what is meant by 1) active and
inactive orbitals in many-electron calculations, 2) the selection of the active
space orbitals, and 3) the use of a frozen core in ADF.

1. the active and inactive orbitals in many-electron calculations refer to
whether substitutions from/to the orbital is allowed when building the
many-electron basis, similarly to the complete active space (CAS) method which
is what quantum simulators are approximating. One builds the Hamiltonian and
diagonalizes it in the space of active orbitals, only.

2. the choice of the active space orbitals is a complicated issue, mostly
because of limitations of classical computers. Unoccupied orbitals of
Hartree-Fock theory are often a bad starting point due to the incorrect form of
the potential experienced by the virtual orbitals in Hartree-Fock theory. Many
alternatives have been suggested in the literature, ranging from Improved
Virtual Orbitals to the use of natural orbitals from a lower level of theory,
such as Møller-Plesset perturbation theory truncated at the second order (MP2)
or configuration interaction singles and doubles (CISD). The latter class of
methods is available in PySCF, for example, for which Qiskit has an interface;
see the PySCF documentation for how to build the density matrices and natural
orbitals.

3. the frozen core orbitals in ADF refer to their behavior in self-consistent
field (SCF) calculations, meaning here Hartree-Fock and density functional
theory. Since the core orbitals are much lower in energy, polarization effects
in a chemical environment are smaller for them than for the valence orbitals,
which is the foundation for freezing the core orbitals to the atomic form. This
is also the foundation for the pseudopotential and effective core potential
approaches.

Susi
--
------------------------------------------------------------------------------
Mr. Susi Lehtola, PhD             Academy of Finland research fellow
susi.lehtola[*]helsinki.fi          Associate professor, computational chemistry
http://susilehtola.github.io/     University of Helsinki, Finland
------------------------------------------------------------------------------
Susi Lehtola, FT                  akatemiatutkija
susi.lehtola[*]helsinki.fi          dosentti, laskennallinen kemia
http://susilehtola.github.io/     Helsingin yliopisto
------------------------------------------------------------------------------



-= This is automatically added to each message by the mailing script =-http://www.ccl.net/cgi-bin/ccl/send_ccl_messagehttp://www.ccl.net/chemistry/sub_unsub.shtmlhttp://www.ccl.net/spammers.txt--_000_SEYPR06MB5514FC22C2F45B51E981C7DAC18D9SEYPR06MB5514apcp_
Content-Type: text/html; charset=so-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hi Susi Lehtola,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
> From <a href="" href="https://pyscf.org/user/ci.html#frozen-orbitals" data-auth="NotApplicable">https://pyscf.org/user/ci.html#frozen-orbitals" id="LPlnk410877">https://pyscf.org/user/ci.html#frozen-orbitals</a> , it still requires the exact list of the orbital indices (which is the question of this thread).<br>
<br>
```<br>
<pre class="ContentPasted1 elementToProof"><span class="c1 ContentPasted1"># freeze 2 core orbitals</span>
<span class="n ContentPasted1">myci</span>&nbsp;<span class="o ContentPasted1">=</span>&nbsp;<span class="n ContentPasted1">ci</span><span class="o ContentPasted1">.</span><span class="n ContentPasted1">CISD</span><span class="p ContentPasted1">(</span><span class="n ContentPasted1">mf</span><span class="p ContentPasted1">,</span>&nbsp;<span class="n ContentPasted1">frozen</span><span class="o ContentPasted1">=</span><span class="p ContentPasted1">[</span><span class="mi ContentPasted1">0</span><span class="p ContentPasted1">,</span><span class="mi ContentPasted1">1</span><span class="p ContentPasted1">])</span><span class="o ContentPasted1">.</span><span class="n ContentPasted1">run</span><span class="p ContentPasted1">()</span>
<span class="c1 ContentPasted1"># freeze 2 core orbitals and 3 unoccupied orbitals</span>
<span class="n ContentPasted1">myci</span>&nbsp;<span class="o ContentPasted1">=</span>&nbsp;<span class="n ContentPasted1">ci</span><span class="o ContentPasted1">.</span><span class="n ContentPasted1">CISD</span><span class="p ContentPasted1">(</span><span class="n ContentPasted1">mf</span><span class="p ContentPasted1">,</span>&nbsp;<span class="n ContentPasted1">frozen</span><span class="o ContentPasted1">=</span><span class="p ContentPasted1">[</span><span class="mi ContentPasted1">0</span><span class="p ContentPasted1">,</span><span class="mi ContentPasted1">1</span><span class="p ContentPasted1">,</span><span class="mi ContentPasted1">16</span><span class="p ContentPasted1">,</span><span class="mi ContentPasted1">17</span><span class="p ContentPasted1">,</span><span class="mi ContentPasted1">18</span><span class="p ContentPasted1">])</span><span class="o ContentPasted1">.</span><span class="n ContentPasted1">run</span><span class="p ContentPasted1">()</span></pre>
```<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Could you tell us more about the use of Improved Virtual orbitals in this particular context ?<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Regards,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Phung Cheng Fei<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> owner-chemistry+feiphung==hotmail.com]^[ccl.net &lt;owner-chemistry+feiphung==hotmail.com]^[ccl.net&gt; on behalf of Susi Lehtola susi.lehtola() alumni.helsinki.fi
 &lt;owner-chemistry]^[ccl.net&gt;<br>
<b>Sent:</b> Friday, March 31, 2023 10:47 PM<br>
<b>To:</b> Phung, Cheng Fei  &lt;feiphung]^[hotmail.com&gt;<br>
<b>Subject:</b> CCL: accurate computation for active and inactive orbitals</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
Sent to CCL by: Susi Lehtola [susi.lehtola-$-alumni.helsinki.fi]<br>
On 3/31/23 07:47, Cheng Fei Phung feiphung-,-hotmail.com wrote:<br>
&gt; <br>
&gt; Sent to CCL by: &quot;Cheng Fei&nbsp; Phung&quot; [feiphung#hotmail.com]<br>
&gt; Could anyone provide accurate computation for active and inactive orbitals to be used in
<a href="" href="https://qiskit.org/documentation/nature/locale/bn_BN/stubs/qiskit_nature.second_q.transformers.FreezeCoreTransformer.html" data-auth="NotApplicable">https://qiskit.org/documentation/nature/locale/bn_BN/stubs/qiskit_nature.second_q.transformers.FreezeCoreTransformer.html">
https://qiskit.org/documentation/nature/locale/bn_BN/stubs/qiskit_nature.second_q.transformers.FreezeCoreTransformer.html</a> and
<br>
&gt; <a href="" href="https://qiskit.org/documentation/nature/stubs/qiskit_nature.second_q.transformers.ActiveSpaceTransformer.html" data-auth="NotApplicable">https://qiskit.org/documentation/nature/stubs/qiskit_nature.second_q.transformers.ActiveSpaceTransformer.html">
https://qiskit.org/documentation/nature/stubs/qiskit_nature.second_q.transformers.ActiveSpaceTransformer.html</a> ?<br>
&gt; <br>
&gt; My current inaccurate solution is using HOMO-LUMO approach.&nbsp; See <a href="" href="https://github.com/tencent-quantum-lab/tensorcircuit/issues/120#issuecomment-1457932770" data-auth="NotApplicable">https://github.com/tencent-quantum-lab/tensorcircuit/issues/120#issuecomment-1457932770">
https://github.com/tencent-quantum-lab/tensorcircuit/issues/120#issuecomment-1457932770</a><br>
&gt; <br>
&gt; I am looking at <a href="" href="https://www.scm.com/doc/BAND/index.html">https://www.scm.com/doc/BAND/index.html</a" data-auth="NotApplicable">https://www.scm.com/doc/BAND/index.html">https://www.scm.com/doc/BAND/index.html</a> which seems to provide [some DFT methods](<a href="" href="https://i.imgur.com/mHeWCtl.png">https://i.imgur.com/mHeWCtl.png</a" data-auth="NotApplicable">https://i.imgur.com/mHeWCtl.png">https://i.imgur.com/mHeWCtl.png</a>) to do so.<br>
&gt; <br>
&gt; However, I do not have access to SCM software.<br>
&gt; <br>
&gt; Any suggestions ?<br>
<br>
There is a common misunderstanding here by what is meant by 1) active and<br>
inactive orbitals in many-electron calculations, 2) the selection of the active<br>
space orbitals, and 3) the use of a frozen core in ADF.<br>
<br>
1. the active and inactive orbitals in many-electron calculations refer to<br>
whether substitutions from/to the orbital is allowed when building the<br>
many-electron basis, similarly to the complete active space (CAS) method which<br>
is what quantum simulators are approximating. One builds the Hamiltonian and<br>
diagonalizes it in the space of active orbitals, only.<br>
<br>
2. the choice of the active space orbitals is a complicated issue, mostly<br>
because of limitations of classical computers. Unoccupied orbitals of<br>
Hartree-Fock theory are often a bad starting point due to the incorrect form of<br>
the potential experienced by the virtual orbitals in Hartree-Fock theory. Many<br>
alternatives have been suggested in the literature, ranging from Improved<br>
Virtual Orbitals to the use of natural orbitals from a lower level of theory,<br>
such as Møller-Plesset perturbation theory truncated at the second order (MP2)<br>
or configuration interaction singles and doubles (CISD). The latter class of<br>
methods is available in PySCF, for example, for which Qiskit has an interface;<br>
see the PySCF documentation for how to build the density matrices and natural<br>
orbitals.<br>
<br>
3. the frozen core orbitals in ADF refer to their behavior in self-consistent<br>
field (SCF) calculations, meaning here Hartree-Fock and density functional<br>
theory. Since the core orbitals are much lower in energy, polarization effects<br>
in a chemical environment are smaller for them than for the valence orbitals,<br>
which is the foundation for freezing the core orbitals to the atomic form. This<br>
is also the foundation for the pseudopotential and effective core potential<br>
approaches.<br>
<br>
Susi<br>
-- <br>
------------------------------------------------------------------------------<br>
Mr. Susi Lehtola, PhD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Academy of Finland research fellow<br>
susi.lehtola[*]helsinki.fi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Associate professor, computational chemistry<br>
<a href="" href="http://susilehtola.github.io/">http://susilehtola.github.io/</a" data-auth="NotApplicable">http://susilehtola.github.io/">http://susilehtola.github.io/</a>&nbsp;&nbsp;&nbsp;&nbsp; University of Helsinki, Finland<br>
------------------------------------------------------------------------------<br>
Susi Lehtola, FT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; akatemiatutkija<br>
susi.lehtola[*]helsinki.fi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dosentti, laskennallinen kemia<br>
<a href="" href="http://susilehtola.github.io/">http://susilehtola.github.io/</a" data-auth="NotApplicable">http://susilehtola.github.io/">http://susilehtola.github.io/</a>&nbsp;&nbsp;&nbsp;&nbsp; Helsingin yliopisto<br>
------------------------------------------------------------------------------<br>
<br>
<br>
<br>
-= This is automatically added to each message by the mailing script =-<br<br=r<br>
<br<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="" href="http://www.ccl.net/cgi-bin/ccl/send_ccl_message">http://www.ccl.net/cgi-bin/ccl/send_ccl_message</a><br" data-auth="NotApplicable">http://www.ccl.net/cgi-bin/ccl/send_ccl_message">http://www.ccl.net/cgi-bin/ccl/send_ccl_message</a><br>
<br<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="" href="http://www.ccl.net/cgi-bin/ccl/send_ccl_message">http://www.ccl.net/cgi-bin/ccl/send_ccl_message</a><br" data-auth="NotApplicable">http://www.ccl.net/cgi-bin/ccl/send_ccl_message">http://www.ccl.net/cgi-bin/ccl/send_ccl_message</a><br>
<br<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="" href="http://www.ccl.net/chemistry/sub_unsub.shtml">http://www.ccl.net/chemistry/sub_unsub.shtml</a><br" data-auth="NotApplicable">http://www.ccl.net/chemistry/sub_unsub.shtml">http://www.ccl.net/chemistry/sub_unsub.shtml</a><br>
<br>
Before posting, check wait time at: <a href=""> <br>
Job: <a href="" href="http://www.ccl.net/jobs">http://www.ccl.net/jobs</a" data-auth="NotApplicable">http://www.ccl.net/jobs">http://www.ccl.net/jobs</a> <br>
Conferences: <a href="" href="http://server.ccl.net/chemistry/announcements/conferences/" data-auth="NotApplicable">http://server.ccl.net/chemistry/announcements/conferences/">
http://server.ccl.net/chemistry/announcements/conferences/</a><br>
<br>
Search Messages: <a href="" href="http://www.ccl.net/chemistry/searchccl/index.shtml">http://www.ccl.net/chemistry/searchccl/index.shtml</a><br" data-auth="NotApplicable">http://www.ccl.net/chemistry/searchccl/index.shtml">http://www.ccl.net/chemistry/searchccl/index.shtml</a><br>
<br<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="" href="http://www.ccl.net/spammers.txt">=a><br" data-auth="NotApplicable">http://www.ccl.net/spammers.txt">=a><br>
<br>
RTFI: <a href="" href="http://www.ccl.net/chemistry/aboutccl/instructions/">http://www.ccl.net/chemistry/aboutccl/instructions/</a><br" data-auth="NotApplicable">http://www.ccl.net/chemistry/aboutccl/instructions/">http://www.ccl.net/chemistry/aboutccl/instructions/</a><br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>