Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MeanFi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quantum Tinkerer
MeanFi
Commits
0bd4ae7e
Commit
0bd4ae7e
authored
1 year ago
by
Kostas Vilkelis
Browse files
Options
Downloads
Patches
Plain Diff
remove unfinished constant energy terms
parent
8f56ff50
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Interface refactoring
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codes/hf.py
+1
-7
1 addition, 7 deletions
codes/hf.py
with
1 addition
and
7 deletions
codes/hf.py
+
1
−
7
View file @
0bd4ae7e
...
...
@@ -104,17 +104,11 @@ def compute_mf(rho, H_int):
local_density
=
np
.
diag
(
np
.
average
(
rho
,
axis
=
tuple
([
i
for
i
in
range
(
dim
)])))
exchange_mf
=
convolution
(
rho
,
H_int
)
*
nk
**
(
-
dim
)
direct_mf
=
np
.
diag
(
np
.
einsum
(
"
i,ij->j
"
,
local_density
,
H0_int
))
dc_direct
=
local_density
.
T
@
H0_int
@
local_density
dc_exchange
=
np
.
einsum
(
'
kij, kji
'
,
exchange_mf
,
rho
)
*
nk
**
(
-
dim
)
dc_energy
=
0.5
*
(
-
dc_exchange
+
dc_direct
)
*
np
.
eye
(
direct_mf
.
shape
[
-
1
])
else
:
local_density
=
np
.
diag
(
rho
)
exchange_mf
=
rho
*
H_int
direct_mf
=
np
.
diag
(
np
.
einsum
(
"
i,ij->j
"
,
local_density
,
H_int
))
dc_energy_direct
=
np
.
diag
(
np
.
einsum
(
"
ij, i, j->
"
,
H_int
,
local_density
,
local_density
))
dc_energy_cross
=
np
.
diag
(
np
.
einsum
(
"
ij, ij, ji->
"
,
H_int
,
rho
,
rho
))
dc_energy
=
2
*
dc_energy_direct
-
dc_energy_cross
return
direct_mf
-
exchange_mf
# - dc_energy * np.eye(direct_mf.shape[-1])
return
direct_mf
-
exchange_mf
def
total_energy
(
h
,
rho
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment