Skip to content

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosanjose committed Nov 11, 2024
1 parent 4badccd commit ba0e1ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/docstrings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2617,6 +2617,7 @@ where `U` is the onsite interaction.
- `onsite`: charge-charge onsite potential. Overrides both Hartree and Fock potentials for onsite interactions. Default: `hartree(0)`
- `charge`: a number (in single-orbital systems) or a matrix (in multi-orbital systems) representing the charge operator on each site. Default: `I`
- `nambu::Bool`: specifies whether the model is defined in Nambu space. In such case, `charge` should also be in Nambu space, typically `SA[1 0; 0 -1]` or similar. Default: `false`
- `namburotation::Bool`: if `nambu == true` and spinful systems, specifies whether the spinor basis is `[c↑, c↓, c↓⁺, -c↑⁺]` (`namburotation = true`) or `[c↑, c↓, c↑⁺, c↓⁺]` (`namburotation = false`). Default: `false`
- `selector::NamedTuple`: a collection of `hopselector` directives that defines the pairs of sites (`pair_selection` above) that interact through the charge-charge potential. Default: `(; range = 0)` (i.e. onsite)
Any additional keywords `kw` are passed to the `densitymatrix` function used to compute the
Expand Down
4 changes: 2 additions & 2 deletions src/meanfield.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ struct ZeroField end

function meanfield(g::GreenFunction{T,E}, args...;
potential = Returns(1), hartree = potential, fock = hartree,
onsite = missing, charge = I, nambu::Bool = false, is_nambu_rotated = missing,
onsite = missing, charge = I, nambu::Bool = false, namburotation = missing,
selector::NamedTuple = (; range = 0), kw...) where {T,E}

Vh = sanitize_potential(hartree)
Vf = sanitize_potential(fock)
is_nambu_rotated´ = sanitize_nambu_rotated(is_nambu_rotated, nambu)
is_nambu_rotated´ = sanitize_nambu_rotated(namburotation, nambu)
Q = sanitize_charge(charge, blocktype(hamiltonian(g)), nambu, is_nambu_rotated´)
U = onsite === missing ? T(Vh(zero(SVector{E,T}))) : T(onsite)
Uf = fock === nothing ? zero(U) : U
Expand Down

0 comments on commit ba0e1ec

Please sign in to comment.