Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:standard_operators:atomic_coulomb_repulsion [2019/08/28 11:36] – Martin Brassdocumentation:standard_operators:atomic_coulomb_repulsion [2026/11/17 07:34] (current) – Maurits W. Haverkort
Line 1: Line 1:
-{{indexmenu_n>999}}+{{indexmenu_n>13}}
 ====== Atomic coulomb repulsion ====== ====== Atomic coulomb repulsion ======
-Note: parts of the functionality of this function will be available in the release of October 2019+;;#  
 +<color #ed1c24>Modified in 0.9.1</color> 
 +;;# 
 ### ###
-NewOperator("AtomicU",indices,RadialWavefunctions1,RadialWavefunctions2,options) calculates the full Coulomb interaction operator between all given atomic orbitals.+NewOperator("AtomicU",NF,indices,RadialWavefunctions1,RadialWavefunctions2,options) calculates the full Coulomb interaction operator between all given atomic orbitals. 
 + 
 +NewOperator("AtomicU",NF,indices,RadialWavefunctions1,RadialWavefunctions2,kappas1,kappas2,options) calculates only the interaction between the orbitals in kappas1 and kappas2. 
 + 
 +Together with the one-electron //[[documentation:standard_operators:dirac_operator|Dirac operator]]// it gives the relativistic many-electron Hamiltonian of an atom.
 ### ###
  
 ===== Input ===== ===== Input =====
  
 +  * NF : the number of fermionic modes (spin-orbitals) in the 1-particle basis
   * indices : indices of atomic orbitals belonging to the radial wave-functions   * indices : indices of atomic orbitals belonging to the radial wave-functions
   * RadialWavefunctions1 : table of InterpolatingFunction objects    * RadialWavefunctions1 : table of InterpolatingFunction objects 
   * RadialWavefunctions2 : optional - table of InterpolatingFunction objects - if given, the function calculates relativistic Slater integrals where RadialWavefunctions1 are the large parts and RadialWavefunctions2 the small ones   * RadialWavefunctions2 : optional - table of InterpolatingFunction objects - if given, the function calculates relativistic Slater integrals where RadialWavefunctions1 are the large parts and RadialWavefunctions2 the small ones
 +  * kappas1, kappas2 : optional - tables of the quantum numbers $\kappa$ of the core orbitals (the first orbitals of indices) and of the valence orbitals (the others). Only the direct and exchange interaction between one core and one valence electron is calculated.
   * options : possible Options are {"conserve", bool} and {"1P-Operator", bool}   * options : possible Options are {"conserve", bool} and {"1P-Operator", bool}
-              * "conserve" : if true only occupation conserving Slater integrals are calculated +              * "conserve" : (default false) if true only the Slater integrals that conserve the occupation of every orbital are calculated, the direct and exchange integrals $(ab|ab)$ and $(ab|ba)$. Without kappas1 and kappas2 only. 
-              * "1P-Operator" : only if "conserve" is true and additional arguments are given, transforms interaction to 1-particle operator (see example)+              * "1P-Operator" : (default true) with kappas1 and kappas2 only. If true the core-valence interaction is returned as the one particle operator it is when the core is filled, the Hartree-Fock potential of the core acting on the valence orbitals (see the second example). If false the two particle core-valence interaction is returned. For radial functions on a grid the core orbitals must also have the lowest fermion indices, 0 to the number of core spin-orbitals minus 1. 
 + 
 +;;#  
 +<color #ed1c24>New in 0.9.1</color> 
 +;;# 
 + 
 +### 
 +The radial wave-functions can be read from FPLO with //ReadFPLOBasisFunctions()//, or calculated with //[[documentation:language_reference:functions:calculateatomicbasisfunctions|CalculateAtomicBasisFunctions()]]//. For the functions of //CalculateAtomicBasisFunctions()// the Slater integrals are calculated exactly on the B-spline basis of the atom, without a radial grid (see the second example). All functions must then come from the same call. 
 +###
  
 ===== Example ===== ===== Example =====
 +;;# 
 +<color #ed1c24>New in 0.9.1</color>
 +;;#
  
 ### ###
-The example below shows how to create the full Coulomb interaction between multiple atomic orbitals with relativistic wave-functions. It is recommended to use CreateAtomicIndicesList(orbitallabels,{{"Kappas",true}}) for index creation, since it automatically calculates the quantum numbers kappa and stores them in the field ind.kappas which needs to be set when calling NewOperator("AtomicU",...) with relativistic wave-functions.+The example below shows how to create the full Coulomb interaction between multiple atomic orbitals with relativistic wave-functions. It is recommended to use CreateAtomicIndicesList(orbitallabels,{ {"Kappas",true} }) for index creation, since it automatically calculates the quantum numbers kappa and stores them in the field ind.kappas which needs to be set when calling NewOperator("AtomicU",...) with relativistic wave-functions.
 ### ###
  
 ==== Input ==== ==== Input ====
 <code Quanty Example.Quanty> <code Quanty Example.Quanty>
-orbitallabels = {"1s1/2","2s1/2","2p1/2","2p3/2"} +-- the Coulomb interaction of the electrons of Ne on its own Dirac-Fock orbitals 
-ind, NF = CreateAtomicIndicesList(orbitallabels,{{"Kappas",true}}) +G, F, Atom = CalculateAtomicBasisFunctions(10) 
-G, F = ReadFPLOBasisFunctions(orbitallabels,"+fval.001.1", "+fval.001.2")+ind, NF = CreateAtomicIndicesList(Atom.Labels, {{"Kappas", true}})
  
-U = NewOperator("AtomicU",NF,ind,G,F) -- creates full Coulomb interaction+U = NewOperator("AU", NF, ind, G, F)
  
--- now occupation of the s-orbitals shall be conserved+psi = NewWavefunction(NF, 0, { {string.rep("1", NF), 1} }) 
 +print(string.format("<psi|U|psi> = %.8f Hartree, Edirect + Eexchange = %.8f Hartree", psi*U*psi, Atom.Edirect + Atom.Eexchange)) 
 +</code>
  
-function Take(list,n1,n2) +<file Quanty_Output Example.out> 
-  local result={} +<psi|U|psi> = 54.08660432 Hartree, Edirect + Eexchange = 54.08660432 Hartree 
-  if n2== nil then +</file>
-    if n1 > 0 then +
-      for i = 1, n1 do +
-        result[i]=list[i] +
-      end +
-    else +
-      for i=1,-n1 do +
-        result[i]=list[#list+n1+i] +
-      end +
-    end +
-   else +
-     for i = n1, n2 do +
-       result[i+1-n1] = list[i] +
-     end +
-   end +
-  return result +
-end+
  
-n0 = 3 +### 
-n1 = 4+The second example calculates the interaction of the electrons in the 3d and 4s orbitals of Fe with its [Ar] core. With the core filled this is a one particle operator, the Hartree-Fock potential of the core. For a state with the core filled and one valence electron, the full Coulomb interaction gives the same energy plus the interaction within the core. 
 +###
  
-indConserved = Take(ind,1,n0-1) +==== Input ==== 
-indConserved.kappas = Take(ind.kappas,1,n0-1) +<code Quanty Example.Quanty> 
-GConserved = Take(G,1,n0-1) +-- the Hartree-Fock potential of the [Ar] core of Fe on its 3d and 4s orbitals 
-FConserved = Take(F,1,n0-1) +G, F, Atom = CalculateAtomicBasisFunctions(26) 
- +ind, NF = CreateAtomicIndicesList(Atom.Labels, {{"Kappas", true}}) 
-indNonCnsrvd = Take(ind,n0,n1) +NCore = 7   -- 1s, 2s, 2p1/2, 2p3/2, 3s, 3p1/2, 3p3/2 
-indNonCnsrvd.kappas = Take(ind.kappas,n0,n1) +kappasCore, kappasValence = {}, {} 
-GNonCnsrvd = Take(G,n0,n1) +for i = 1, #ind do 
-FNonCnsrvd = Take(F,n0,n1)+  if i <= NCore then kappasCore[i] = ind.kappas[i] else kappasValence[i - NCore] = ind.kappas[i] end 
 +end 
 +U     = NewOperator("AU", NF, ind, G, F) 
 +Ucore = NewOperator("AU", NF, ind, G, F, kappasCore, kappasValence)
  
-U0 = NewOperator("AU",NF,indConserved,GConserved,FConserved,{{"conserve",true}}) -- Coulomb interaction between conserved orbitals only +-- the core filled, without and with one valence electron 
- +core = {} 
-U1 = NewOperator("AU",NF,ind,G,F,indConserved.kappas,indNonCnsrvd.kappas,{{"conserve",true},{"1P-Operator",true}}) -- Coulomb interaction between conserved orbitals and others transformed to a one-particle operator given that the conserved orbitals are always completely filled. +for i = 1, NCore do for _, k in ipairs(ind[i]) do core[k + 1] = true end end 
- +function Determinant(extra) 
-U2 = NewOperator("AU",NF,indNonCnsrvd,GNonCnsrvd,FNonCnsrvd) -- Coulomb interaction between non-conserved orbitals +  local s = {} 
- +  for k = 1, NF do s[k] = (core[k] or k == extra + 1) and "1" or "0" end 
-Uconserved = U0 + U1 + U2+  return NewWavefunction(NF, 0, {{table.concat(s), 1}}) 
 +end 
 +psiCore = Determinant(-1) 
 +for i = NCore + 1, #ind do 
 +  psi = Determinant(ind[i][1]) 
 +  print(string.format("%-6s <core v|U|core v> - <core|U|core> = %.10f   <v|Ucore|v> = %.10f Hartree", 
 +                      Atom.Labels[i], psi*U*psi - psiCore*U*psiCore, psi*Ucore*psi)) 
 +end
 </code> </code>
  
 +<file Quanty_Output Example.out>
 +3d3/2  <core v|U|core v> - <core|U|core> = 19.2150519829   <v|Ucore|v> = 19.2150519829 Hartree
 +3d5/2  <core v|U|core v> - <core|U|core> = 19.1391273600   <v|Ucore|v> = 19.1391273600 Hartree
 +4s1/2  <core v|U|core v> - <core|U|core> = 6.8098698278   <v|Ucore|v> = 6.8098698278 Hartree
 +</file>
  
 ===== Table of contents ===== ===== Table of contents =====
 {{indexmenu>.#1|msort}} {{indexmenu>.#1|msort}}
 +
  
Print/export