Table of Contents
DeterminantString
DeterminantString(NF,Inds1) creates a string of length NF and sets all characters to '0', except for those indices included in Inds1 etc, which it sets to '1'. This automatizes the input of functions like NewWavefunction() or Eigensystem().
Input
-
NF : The number of fermionic states (and hence the length of the resulting string).
-
Inds1,… : One (release version) or several (upcoming versions) lists of indices.
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(NF, {0,1,2,3}) ) print("\nDeterminantString(NF, Ind[\"Fe_2p\"]):") print(DeterminantString(NF, Ind["Fe_2p"]) ) print("\nDeterminantString(NF, Ind[\"H_states\"]):") print(DeterminantString(NF, Ind["H_states"]) ) print("\nDeterminantString(NF, Ind[\"Fe_states\"]):") print(DeterminantString(NF, Ind["Fe_states"]) ) --Upcoming Version: print("\nDeterminantString(NF, Ind[\"H_1s\"], Ind[\"Fe_2p\"], Ind[\"Fe_3d\"]):" ) print(DeterminantString(NF, Ind["H_1s"], Ind["Fe_2p"], Ind["Fe_3d"]) ) psi = NewWavefunction(NF,0,{{DeterminantString(NF, Ind["Fe_3d"]) , 1}}) print(psi)
Result
DeterminantString({0,1,2,3},NF): 1111000000000000000000 DeterminantString(NF, Ind["Fe_2p"]): 0000111111000000000000 DeterminantString(NF, Ind["H_states"]): 1100000000000000000000 DeterminantString(NF, Ind["Fe_states"]): 0011111111111111111111 DeterminantString(NF, Ind["H_1s"], Ind["Fe_2p"], Ind["Fe_3d"]): 1100111111001111111111 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