Table of Contents
This is an old revision of the document!
DeterminantString
DeterminantString(Inds,NF) creates a string of length NF and sets all characters to '0', except for those indices included in Inds, which it sets to '1'. This automatizes the input of functions like NewWavefunction or Eigensystem.
Input
-
Inds : A list of indices.
-
NF : The number of fermionic states (and hence the length of the resulting string).
Output
-
Det : A string that can be used as determinant input for wavefunctions, restrictions, or the like.
Example
A small example:
Input
- Example.Quanty
orbitals = {"H_1s","Fe_2s","Fe_2p","Fe_3s","Fe_3d"} groupings = { {"H_states", {"H_1s"} }, {"Fe_states", {"Fe_2s","Fe_2p","Fe_3s","Fe_3d"}} } Ind, NF = CreateAtomicIndicesDict(orbitals,groupings) print("\nDeterminantString({0,1,2,3},NF):" ) print(DeterminantString({0,1,2,3},NF) ) print("\nDeterminantString(Ind[\"Fe_2p\"],NF):") print(DeterminantString(Ind["Fe_2p"],NF) ) print("\nDeterminantString(Ind[\"H_states\"],NF):") print(DeterminantString(Ind["H_states"],NF) ) print("\nDeterminantString(Ind[\"Fe_states\"],NF):") print(DeterminantString(Ind["Fe_states"],NF) ) psi = NewWavefunction(NF,0,{{DeterminantString(Ind["Fe_3d"],NF) , 1}}) print(psi)
Result
DeterminantString({0,1,2,3},NF): 1111000000000000000000 DeterminantString(Ind["Fe_2p"],NF): 0000111111000000000000 DeterminantString(Ind["H_states"],NF): 1100000000000000000000 DeterminantString(Ind["Fe_states"],NF): 0011111111111111111111 WaveFunction: Wave Function QComplex = 0 (Real==0 or Complex==1) N = 1 (Number of basis functions used to discribe psi) NFermionic modes = 22 (Number of fermions in the one particle basis) NBosonic modes = 0 (Number of bosons in the one particle basis) # pre-factor Determinant 1 1.000000000000E+00 0000000000001111111111