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
797585d5
Commit
797585d5
authored
May 17, 2019
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ISO date stamp in upf2qso output
parent
4f93df79
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
4 deletions
+59
-4
Makefile
util/upf2qso/src/Makefile
+1
-1
isodate.C
util/upf2qso/src/isodate.C
+29
-0
isodate.h
util/upf2qso/src/isodate.h
+22
-0
upf2qso.C
util/upf2qso/src/upf2qso.C
+7
-3
No files found.
util/upf2qso/src/Makefile
View file @
797585d5
CXXFLAGS
=
-g
upf2qso
:
upf2qso.o PeriodicTable.o spline.o
upf2qso
:
upf2qso.o PeriodicTable.o spline.o
isodate.o
$(CXX)
-o
$@
$^
clean
:
rm
-f
*
.o upf2qso
util/upf2qso/src/isodate.C
0 → 100644
View file @
797585d5
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
// the License, or (at your option) any later version.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
// isodate.C
//
////////////////////////////////////////////////////////////////////////////////
#include "isodate.h"
#include <ctime>
std
::
string
isodate
(
void
)
{
const
time_t
t
=
time
(
NULL
);
struct
tm
*
tms
=
gmtime
(
&
t
);
char
s
[
32
];
const
char
*
fmt
=
"%Y-%m-%dT%TZ"
;
strftime
(
s
,
32
,
fmt
,
tms
);
return
std
::
string
(
s
);
}
util/upf2qso/src/isodate.h
0 → 100644
View file @
797585d5
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
// the License, or (at your option) any later version.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
// isodate.h:
//
////////////////////////////////////////////////////////////////////////////////
#ifndef ISODATE_H
#include <string>
std
::
string
isodate
(
void
);
#endif
util/upf2qso/src/upf2qso.C
View file @
797585d5
...
...
@@ -33,6 +33,7 @@
#include <cstdlib>
#include <stdexcept>
#include "spline.h"
#include "isodate.h"
#include "PeriodicTable.h"
using
namespace
std
;
...
...
@@ -753,7 +754,8 @@ int main(int argc, char** argv)
cout
<<
" xsi:schemaLocation=
\"
http://www.quantum-simulation.org/ns/fpmd/fpmd-1.0"
<<
endl
;
cout
<<
" species.xsd
\"
>"
<<
endl
;
cout
<<
"<description>"
<<
endl
;
cout
<<
"Translated from UPF format by upf2qso "
<<
release
<<
endl
;
cout
<<
"Translated from UPF format by upf2qso "
<<
release
<<
" on "
<<
isodate
()
<<
endl
;
cout
<<
upf_pp_info
;
cout
<<
"</description>"
<<
endl
;
cout
<<
"<symbol>"
<<
upf_symbol
<<
"</symbol>"
<<
endl
;
...
...
@@ -1392,7 +1394,8 @@ int main(int argc, char** argv)
cout
<<
" xsi:schemaLocation=
\"
http://www.quantum-simulation.org/ns/fpmd/fpmd-1.0"
<<
endl
;
cout
<<
" species.xsd
\"
>"
<<
endl
;
cout
<<
"<description>"
<<
endl
;
cout
<<
"Translated from UPF format by upf2qso "
<<
release
<<
endl
;
cout
<<
"Translated from UPF format by upf2qso "
<<
release
<<
" on "
<<
isodate
()
<<
endl
;
cout
<<
upf_pp_info
;
cout
<<
"</description>"
<<
endl
;
cout
<<
"<symbol>"
<<
upf_symbol
<<
"</symbol>"
<<
endl
;
...
...
@@ -1617,7 +1620,8 @@ int main(int argc, char** argv)
cout
<<
" xsi:schemaLocation=
\"
http://www.quantum-simulation.org/ns/fpmd/fpmd-1.0"
<<
endl
;
cout
<<
" species.xsd
\"
>"
<<
endl
;
cout
<<
"<description>"
<<
endl
;
cout
<<
"Translated from UPF format by upf2qso "
<<
release
<<
endl
;
cout
<<
"Translated from UPF format by upf2qso "
<<
release
<<
" on "
<<
isodate
()
<<
endl
;
cout
<<
upf_pp_info
;
cout
<<
"</description>"
<<
endl
;
cout
<<
"<symbol>"
<<
upf_symbol
<<
"</symbol>"
<<
endl
;
...
...
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