Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
52
Issues
52
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
c1f3fe68
Commit
c1f3fe68
authored
May 21, 2019
by
Matthias Redies
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for libxc errors
parent
ffdd0893
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
types/types_xcpot_libxc.F90
types/types_xcpot_libxc.F90
+18
-8
No files found.
types/types_xcpot_libxc.F90
View file @
c1f3fe68
...
...
@@ -63,6 +63,7 @@ CONTAINS
INTEGER
,
INTENT
(
IN
)
::
vxc_id_x
,
vxc_id_c
! potential functional
INTEGER
,
INTENT
(
IN
)
::
exc_id_x
,
exc_id_c
! energy functionals
LOGICAL
::
same_functionals
! are vxc and exc equal
INTEGER
::
errors
(
4
)
#ifdef CPP_LIBXC
INTEGER
::
err
...
...
@@ -84,23 +85,32 @@ CONTAINS
IF
(
jspins
==
1
)
THEN
! potential functionals
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_x
,
xcpot
%
func_vxc_id_x
,
XC_UNPOLARIZED
)
IF
(
xcpot
%
func_vxc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_c
,
xcpot
%
func_vxc_id_c
,
XC_UNPOLARIZED
)
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_x
,
xcpot
%
func_vxc_id_x
,
XC_UNPOLARIZED
,
err
=
errors
(
1
))
IF
(
xcpot
%
func_vxc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_c
,
xcpot
%
func_vxc_id_c
,
&
XC_UNPOLARIZED
,
err
=
errors
(
2
))
! energy functionals
CALL
xc_f03_func_init
(
xcpot
%
exc_func_x
,
xcpot
%
func_exc_id_x
,
XC_UNPOLARIZED
)
IF
(
xcpot
%
func_exc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
exc_func_c
,
xcpot
%
func_exc_id_c
,
XC_UNPOLARIZED
)
CALL
xc_f03_func_init
(
xcpot
%
exc_func_x
,
xcpot
%
func_exc_id_x
,
XC_UNPOLARIZED
,
err
=
errors
(
3
))
IF
(
xcpot
%
func_exc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
exc_func_c
,
xcpot
%
func_exc_id_c
,
&
XC_UNPOLARIZED
,
err
=
errors
(
4
))
ELSE
! potential functionals
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_x
,
xcpot
%
func_vxc_id_x
,
XC_POLARIZED
)
IF
(
xcpot
%
func_vxc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_c
,
xcpot
%
func_vxc_id_c
,
XC_POLARIZED
)
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_x
,
xcpot
%
func_vxc_id_x
,
XC_POLARIZED
,
err
=
errors
(
1
))
IF
(
xcpot
%
func_vxc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
vxc_func_c
,
xcpot
%
func_vxc_id_c
,
&
XC_POLARIZED
,
err
=
errors
(
2
))
!energy functionals
CALL
xc_f03_func_init
(
xcpot
%
exc_func_x
,
xcpot
%
func_exc_id_x
,
XC_POLARIZED
)
IF
(
xcpot
%
func_exc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
exc_func_c
,
xcpot
%
func_exc_id_c
,
XC_POLARIZED
)
CALL
xc_f03_func_init
(
xcpot
%
exc_func_x
,
xcpot
%
func_exc_id_x
,
XC_POLARIZED
,
err
=
errors
(
3
))
IF
(
xcpot
%
func_exc_id_c
>
0
)
CALL
xc_f03_func_init
(
xcpot
%
exc_func_c
,
xcpot
%
func_exc_id_c
,
&
XC_POLARIZED
,
err
=
errors
(
4
))
END
IF
IF
(
errors
(
1
)
/
=
0
)
call
juDFT_error
(
"Exchange potential functional not in LibXC"
)
IF
(
errors
(
2
)
/
=
0
)
call
juDFT_error
(
"Correlation potential functional not in LibXC"
)
IF
(
errors
(
3
)
/
=
0
)
call
juDFT_error
(
"Exchange energy functional not in LibXC"
)
IF
(
errors
(
4
)
/
=
0
)
call
juDFT_error
(
"Correlation energy functional not in LibXC"
)
!check if any potental is a MetaGGA
IF
(
ANY
([
XC_FAMILY_MGGA
,
XC_FAMILY_HYB_MGGA
]
==
xc_get_family
(
xcpot
%
vxc_func_x
)))
THEN
call
juDFT_error
(
"vxc_x: MetaGGA is not implemented for potentials"
)
...
...
Matthias Redies
@redies
mentioned in issue
#261 (closed)
·
May 21, 2019
mentioned in issue
#261 (closed)
mentioned in issue #261
Toggle commit list
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