Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
west-public
westpy
Commits
dcf822cf
Commit
dcf822cf
authored
Jun 25, 2018
by
Marco Govoni
Browse files
Added nspin 2 in Qbox
parent
0abb31a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
westpy/groundState.py
View file @
dcf822cf
...
...
@@ -69,9 +69,9 @@ class GroundState(object) :
self
.
isolated
=
True
#
def
setCollinearSpin
(
self
,
tot_magnetization
=
0.
)
:
"""Sets collinear spin.
Valid only for QuantumEspresso calculations.
"""Sets collinear spin.
:param tot_magnetization:
t
otal ma
gnetization
, optional
:param tot_magnetization:
T
otal ma
jority spin charge - minority spin charge
, optional
:type tot_magnetization: float
:Example:
...
...
@@ -216,8 +216,13 @@ class GroundState(object) :
file
.
write
(
"set wf_dyn JD
\n
"
)
file
.
write
(
"set xc "
+
self
.
xc
+
"
\n
"
)
file
.
write
(
"set scf_tol 1.e-8
\n
"
)
if
(
"nspin"
in
self
.
spin
.
keys
()
or
self
.
isolated
or
self
.
kmesh
not
in
[
"gamma"
]
)
:
print
(
"ERR: non supported"
)
if
(
"nspin"
in
self
.
spin
.
keys
()
)
:
if
(
self
.
spin
[
"nspin"
]
==
2
)
:
file
.
write
(
"set nspin 2
\n
"
)
delta_spin
=
(
self
.
spin
[
"tot_magnetization"
]
-
(
self
.
geom
.
getNumberOfElectrons
()
%
2
)
)
/
2
file
.
write
(
"set delta_spin"
+
str
(
self
.
spin
[
"tot_magnetization"
])
+
"
\n
"
)
else
:
print
(
"ERR: non supported"
)
file
.
write
(
"randomize_wf
\n
"
)
file
.
write
(
"run -atomic_density 0 100 5
\n
"
)
file
.
write
(
"save gs.xml
\n
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment