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
P
parser-siesta
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nomad-lab
parser-siesta
Commits
5703e407
Commit
5703e407
authored
Mar 01, 2018
by
Ask Hjorth Larsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused util module. Add license header to python files
parent
8c882fff
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
22 deletions
+80
-22
parser/parser-siesta/inputvars.py
parser/parser-siesta/inputvars.py
+16
-0
parser/parser-siesta/main.py
parser/parser-siesta/main.py
+16
-1
parser/parser-siesta/mkjson.py
parser/parser-siesta/mkjson.py
+16
-0
parser/parser-siesta/pycheck.py
parser/parser-siesta/pycheck.py
+16
-0
parser/parser-siesta/setup_paths.py
parser/parser-siesta/setup_paths.py
+16
-0
parser/parser-siesta/util.py
parser/parser-siesta/util.py
+0
-20
src/main/scala/eu/nomad_lab/parsers/SiestaParser.scala
src/main/scala/eu/nomad_lab/parsers/SiestaParser.scala
+0
-1
No files found.
parser/parser-siesta/inputvars.py
View file @
5703e407
# Copyright 2016-2018 The NOMAD Developers Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Main author and maintainer: Ask Hjorth Larsen <asklarsen@gmail.com>
varlist
=
[
'%endblock'
,
'Atom-Setup-Only'
,
...
...
parser/parser-siesta/main.py
View file @
5703e407
# Copyright 2016-2018 The NOMAD Developers Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Main author and maintainer: Ask Hjorth Larsen <asklarsen@gmail.com>
from
__future__
import
print_function
import
os
import
sys
...
...
@@ -15,7 +31,6 @@ from nomadcore.local_meta_info import loadJsonFile, InfoKindEl
from
nomadcore.unit_conversion.unit_conversion
\
import
register_userdefined_quantity
,
convert_unit
from
util
import
floating
,
integer
from
inputvars
import
varlist
metaInfoPath
=
os
.
path
.
normpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"../../../../nomad-meta-info/meta_info/nomad_meta_info/siesta.nomadmetainfo.json"
))
...
...
parser/parser-siesta/mkjson.py
View file @
5703e407
# Copyright 2016-2018 The NOMAD Developers Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Main author and maintainer: Ask Hjorth Larsen <asklarsen@gmail.com>
from
__future__
import
print_function
# TEMPLATES TAKEN FROM OCTOPUS. KEEP SYNCHRONIZED.
...
...
parser/parser-siesta/pycheck.py
View file @
5703e407
# Copyright 2016-2018 The NOMAD Developers Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Main author and maintainer: Ask Hjorth Larsen <asklarsen@gmail.com>
from
__future__
import
print_function
import
os
...
...
parser/parser-siesta/setup_paths.py
View file @
5703e407
# Copyright 2016-2018 The NOMAD Developers Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Main author and maintainer: Ask Hjorth Larsen <asklarsen@gmail.com>
import
sys
,
os
,
os
.
path
baseDir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
commonDir
=
os
.
path
.
normpath
(
os
.
path
.
join
(
baseDir
,
"../../../../python-common/common/python"
))
...
...
parser/parser-siesta/util.py
deleted
100644 → 0
View file @
8c882fff
OCT_ENERGY_UNIT_NAME
=
'usrOctEnergyUnit'
f_num
=
r'[-+]?(\d*\.\d+|\d+\.\d*)'
# e.g.: 0.7 1. -.1
e_num
=
r'[-+]?\d*\.\d+[EeDd][-+]\d*'
# e.g.: -7.642e-300
i_num
=
r'[-+\d]*'
def
numpattern
(
id
,
unit
=
None
,
pattern
=
f_num
):
if
unit
is
None
:
pat
=
r'(?P<%(id)s>%(pattern)s)'
else
:
pat
=
r'(?P<%(id)s__%(unit)s>%(pattern)s)'
return
pat
%
dict
(
id
=
id
,
unit
=
unit
,
pattern
=
pattern
)
def
pat
(
meta
,
regex
):
return
'(?P<%s>%s)'
%
(
meta
,
regex
)
def
word
(
meta
):
return
pat
(
meta
,
regex
=
r'\S*'
)
def
integer
(
meta
):
return
pat
(
meta
,
regex
=
i_num
)
def
floating
(
meta
):
return
pat
(
meta
,
regex
=
'%s|%s'
%
(
f_num
,
e_num
))
src/main/scala/eu/nomad_lab/parsers/SiestaParser.scala
View file @
5703e407
...
...
@@ -43,7 +43,6 @@ object SiestaParser extends SimpleExternalParserGenerator(
resList
=
Seq
(
"parser-siesta/main.py"
,
"parser-siesta/inputvars.py"
,
"parser-siesta/util.py"
,
"parser-siesta/setup_paths.py"
,
"nomad_meta_info/public.nomadmetainfo.json"
,
"nomad_meta_info/common.nomadmetainfo.json"
,
...
...
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