Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
qbox-public
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
qbox
qbox-public
Commits
6734bf55
Commit
6734bf55
authored
Feb 04, 2020
by
Francois Gygi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
45ca6412
260b6bec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
17 deletions
+20
-17
D3tensor.h
src/D3tensor.h
+3
-3
ExchangeOperator.C
src/ExchangeOperator.C
+0
-1
Matrix.C
src/Matrix.C
+8
-4
qbox_xyz.py
util/qbox_xyz.py
+9
-9
No files found.
src/D3tensor.h
View file @
6734bf55
...
...
@@ -244,9 +244,9 @@ class D3tensor
double
norm2
(
const
D3tensor
&
a
)
const
{
return
a
_
[
0
]
*
a_
[
0
]
+
a_
[
1
]
*
a_
[
1
]
+
a_
[
2
]
*
a_
[
2
]
+
a
_
[
3
]
*
a_
[
3
]
+
a_
[
4
]
*
a_
[
4
]
+
a_
[
5
]
*
a_
[
5
]
+
a
_
[
6
]
*
a_
[
6
]
+
a_
[
7
]
*
a_
[
7
]
+
a_
[
8
]
*
a_
[
8
];
return
a
[
0
]
*
a
[
0
]
+
a
[
1
]
*
a
[
1
]
+
a
[
2
]
*
a
[
2
]
+
a
[
3
]
*
a
[
3
]
+
a
[
4
]
*
a
[
4
]
+
a
[
5
]
*
a
[
5
]
+
a
[
6
]
*
a
[
6
]
+
a
[
7
]
*
a
[
7
]
+
a
[
8
]
*
a
[
8
];
}
double
norm
(
const
D3tensor
&
a
)
const
...
...
src/ExchangeOperator.C
View file @
6734bf55
...
...
@@ -356,7 +356,6 @@ void ExchangeOperator::apply_VXC_(double mix, Wavefunction& wf_ref,
////////////////////////////////////////////////////////////////////////////////
void
ExchangeOperator
::
apply_operator
(
Wavefunction
&
dwf
)
{
cout
<<
"ExchangeOperator::apply_operator"
<<
endl
;
// apply sigmaHF to s_.wf and store result in dwf
// use the reference function wf0_ and reference sigma(wf) dwf0_
apply_VXC_
(
1
.
0
,
wf0_
,
dwf0_
,
dwf
);
...
...
src/Matrix.C
View file @
6734bf55
...
...
@@ -2025,6 +2025,7 @@ double DoubleMatrix::det_from_lu(valarray<int> ipiv)
return
det
;
}
return
0
.
0
;
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2041,6 +2042,7 @@ double DoubleMatrix::inverse_det(void)
inverse_from_lu
(
ipiv
);
return
det
;
}
return
0
.
0
;
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2131,6 +2133,7 @@ complex<double> ComplexMatrix::det_from_lu(valarray<int> ipiv)
return
det
;
}
return
complex
<
double
>
(
0
.
0
,
0
.
0
);
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2147,6 +2150,7 @@ complex<double> ComplexMatrix::inverse_det(void)
inverse_from_lu
(
ipiv
);
return
det
;
}
return
complex
<
double
>
(
0
.
0
,
0
.
0
);
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2814,7 +2818,7 @@ void DoubleMatrix::syev(char uplo, valarray<double>& w, DoubleMatrix& z)
z
.
val
,
&
ione
,
&
ione
,
z
.
desc_
,
&
tmpwork
,
&
lwork
,
&
info
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
pdsyev
(
&
jobz
,
&
uplo
,
&
m_
,
val
,
&
ione
,
&
ione
,
desc_
,
&
w
[
0
],
z
.
val
,
&
ione
,
&
ione
,
z
.
desc_
,
work
,
&
lwork
,
...
...
@@ -2871,7 +2875,7 @@ void DoubleMatrix::syevd(char uplo, valarray<double>& w, DoubleMatrix& z)
z
.
val
,
&
ione
,
&
ione
,
z
.
desc_
,
&
tmpwork
,
&
lwork
,
&
tmpiwork
,
&
liwork
,
&
info
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
liwork
=
tmpiwork
;
int
*
iwork
=
new
int
[
liwork
];
...
...
@@ -2943,7 +2947,7 @@ void DoubleMatrix::syevx(char uplo, valarray<double>& w, DoubleMatrix& z,
assert
(
info
==
0
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
liwork
=
tmpiwork
;
int
*
iwork
=
new
int
[
liwork
];
...
...
@@ -3061,7 +3065,7 @@ void DoubleMatrix::syevd(char uplo, valarray<double>& w)
zval
,
&
ione
,
&
ione
,
descz
,
&
tmpwork
,
&
lwork
,
&
tmpiwork
,
&
liwork
,
&
info
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
liwork
=
tmpiwork
;
int
*
iwork
=
new
int
[
liwork
];
...
...
util/qbox_xyz.py
View file @
6734bf55
...
...
@@ -2,33 +2,33 @@
# Copyright 2016 The Regents of the University of California
# This file is part of Qbox
#
# qbox_xyz.py: extract
first (or all) set(s)
of atomic positions in xyz format
# qbox_xyz.py: extract
sets
of atomic positions in xyz format
# from a Qbox output file or from a Qbox sample file using SAX
# incremental parsing
#
# use: qbox_xyz.py [-
all
] {file|URL}
# use: qbox_xyz.py [-
first
] {file|URL}
import
os.path
import
xml.sax
import
sys
import
urllib2
def
usage
():
print
"use: "
,
sys
.
argv
[
0
],
" [-
all
] {file|URL}"
print
"use: "
,
sys
.
argv
[
0
],
" [-
first
] {file|URL}"
sys
.
exit
()
argc
=
len
(
sys
.
argv
)
if
(
argc
<
2
or
argc
>
3
):
usage
()
# check if option "-
all
" is used
# "-
all" option: extract all atomsets
# default: extract
first atomset only
first_only
=
Tru
e
# check if option "-
first
" is used
# "-
first" option: extract first atomset only
# default: extract
all atomsets
first_only
=
Fals
e
input_source
=
sys
.
argv
[
1
]
if
(
sys
.
argv
[
1
]
==
"-
all
"
):
if
(
sys
.
argv
[
1
]
==
"-
first
"
):
if
(
argc
!=
3
):
usage
()
first_only
=
Fals
e
first_only
=
Tru
e
input_source
=
sys
.
argv
[
2
]
# conversion from Bohr to Angstrom
...
...
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