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
70ede943
Commit
70ede943
authored
Aug 03, 2018
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add XML namespace to response file
parent
fd6df2e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
ResponseCmd.C
src/ResponseCmd.C
+11
-4
No files found.
src/ResponseCmd.C
View file @
70ede943
...
...
@@ -30,6 +30,7 @@ using namespace std;
#include "isodate.h"
#include "Species.h"
#include "Base64Transcoder.h"
#include "qbox_xmlns.h"
#include <unistd.h>
...
...
@@ -345,7 +346,6 @@ void ResponseCmd::responseVext(bool rpa, bool ipa, int nitscf, int nite,
// now write drho_r to disk
const
Context
*
ctxt
=
s
->
wf
.
spincontext
();
int
nprow
=
ctxt
->
nprow
();
int
npcol
=
ctxt
->
npcol
();
int
myrow
=
ctxt
->
myrow
();
int
mycol
=
ctxt
->
mycol
();
Timer
tm_write_drho
;
...
...
@@ -395,8 +395,15 @@ void ResponseCmd::responseVext(bool rpa, bool ipa, int nitscf, int nite,
xcdr
.
encode
(
nbytes
,
(
byte
*
)
&
drho_r_gathered
[
0
],
wbuf
);
ofstream
os
(
filename
.
c_str
(),
ios
::
out
);
os
<<
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>"
<<
endl
;
os
<<
"<function3d name=
\"
delta_rho
\"
>"
<<
endl
;
os
<<
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>
\n
"
<<
"<fpmd:function3d xmlns:fpmd=
\"
"
<<
qbox_xmlns
()
<<
"
\"\n
"
<<
" xmlns:xsi=
\"
http://www.w3.org/2001/XMLSchema-instance
\"\n
"
<<
" xsi:schemaLocation=
\"
"
<<
qbox_xmlns
()
<<
" function3d.xsd
\"\n
"
<<
" name=
\"
delta_rho
\"
>"
<<
endl
;
D3vector
a0
=
s
->
atoms
.
cell
().
a
(
0
);
D3vector
a1
=
s
->
atoms
.
cell
().
a
(
1
);
D3vector
a2
=
s
->
atoms
.
cell
().
a
(
2
);
...
...
@@ -410,7 +417,7 @@ void ResponseCmd::responseVext(bool rpa, bool ipa, int nitscf, int nite,
<<
"
\"
encoding=
\"
base64
\"
>"
<<
endl
;
xcdr
.
print
(
nchars
,
wbuf
,
os
);
os
<<
"</grid_function>"
<<
endl
;
os
<<
"</function3d>"
<<
endl
;
os
<<
"</f
pmd:f
unction3d>"
<<
endl
;
os
.
close
();
delete
[]
wbuf
;
tm_write_drho
.
stop
();
...
...
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