-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from TRIQS/solver_interface_refactoring
Simplified solver interface for adding new solvers
- Loading branch information
Showing
17 changed files
with
1,859 additions
and
1,565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# miscellanous functions for the DMFT calculation used in other modules | ||
|
||
def get_n_orbitals(sum_k): | ||
""" | ||
determines the number of orbitals within the | ||
solver block structure. | ||
Parameters | ||
---------- | ||
sum_k : dft_tools sumk object | ||
Returns | ||
------- | ||
n_orb : dict of int | ||
number of orbitals for up / down as dict for SOC calculation | ||
without up / down block up holds the number of orbitals | ||
""" | ||
n_orbitals = [{'up': 0, 'down': 0} for i in range(sum_k.n_inequiv_shells)] | ||
for icrsh in range(sum_k.n_inequiv_shells): | ||
for block, n_orb in sum_k.gf_struct_solver[icrsh].items(): | ||
if 'down' in block: | ||
n_orbitals[icrsh]['down'] += sum_k.gf_struct_solver[icrsh][block] | ||
else: | ||
n_orbitals[icrsh]['up'] += sum_k.gf_struct_solver[icrsh][block] | ||
|
||
return n_orbitals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.