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
233f7abf
Commit
233f7abf
authored
1 year ago
by
Antonio Manesco
Browse files
Options
Downloads
Patches
Plain Diff
fix k-space potential
parent
ded03c54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
create solvers and interface modules
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codes/model.py
+7
-2
7 additions, 2 deletions
codes/model.py
with
7 additions
and
2 deletions
codes/model.py
+
7
−
2
View file @
233f7abf
...
...
@@ -6,7 +6,8 @@ class Model:
def
__init__
(
self
,
tb_model
,
int_model
=
None
,
Vk
=
None
,
guess
=
None
):
self
.
tb_model
=
tb_model
self
.
hk
=
utils
.
model2hk
(
tb_model
=
tb_model
)
if
int_model
is
not
None
:
self
.
int_model
=
int_model
if
self
.
int_model
is
not
None
:
self
.
int_model
=
int_model
self
.
Vk
=
utils
.
model2hk
(
tb_model
=
int_model
)
else
:
...
...
@@ -17,10 +18,14 @@ class Model:
def
random_guess
(
self
,
vectors
):
if
self
.
int_model
is
None
:
scale
=
1
else
:
scale
=
1
+
np
.
max
(
np
.
abs
([
*
self
.
int_model
.
values
()]))
self
.
guess
=
utils
.
generate_guess
(
vectors
=
vectors
,
ndof
=
self
.
ndof
,
scale
=
1
+
np
.
max
(
np
.
abs
([
*
self
.
int_model
.
values
()]))
scale
=
scale
)
def
kgrid_evaluation
(
self
,
nk
):
...
...
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