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-asap
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-asap
Commits
5f407d1b
Commit
5f407d1b
authored
Sep 12, 2016
by
Mikkel Strange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added single_configuration_to_calculation_method_ref and ...
parent
7bcc89c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
parser/parser-asap/parser.py
parser/parser-asap/parser.py
+9
-5
No files found.
parser/parser-asap/parser.py
View file @
5f407d1b
...
...
@@ -13,7 +13,7 @@ from nomadcore.parser_backend import JsonParseEventsWriterBackend
@
contextmanager
def
open_section
(
p
,
name
):
gid
=
p
.
openSection
(
name
)
yield
yield
gid
p
.
closeSection
(
name
,
gid
)
...
...
@@ -53,9 +53,11 @@ def parse(filename):
p
.
addArrayValues
(
'constraint_atoms'
,
np
.
asarray
(
indices
))
p
.
addValue
(
'constraint_kind'
,
get_nomad_name
(
constraint
))
with
o
(
p
,
'section_method'
)
as
method_gid
:
p
.
addValue
(
'calculation_method'
,
'EMT'
)
with
o
(
p
,
'section_frame_sequence'
):
for
f
in
t
:
with
o
(
p
,
'section_system'
):
with
o
(
p
,
'section_system'
)
as
system_gid
:
p
.
addArrayValues
(
'simulation_cell'
,
f
.
get_cell
(),
'angstrom'
)
...
...
@@ -68,6 +70,10 @@ def parse(filename):
f
.
get_pbc
())
p
.
addArrayValues
(
'atom_velocities'
,
f
.
get_velocities
())
with
o
(
p
,
'section_single_configuration_calculation'
):
p
.
addValue
(
'single_configuration_to_calculation_method_ref'
,
method_gid
)
p
.
addValue
(
'single_configuration_calculation_to_system_ref'
,
system_gid
)
p
.
addRealValue
(
'energy_total'
,
c
(
f
.
get_total_energy
(),
'eV'
))
p
.
addArrayValues
(
'atom_forces'
,
...
...
@@ -75,9 +81,7 @@ def parse(filename):
with
o
(
p
,
'section_sampling_method'
):
p
.
addValue
(
'ensemble_type'
,
'NVE'
)
with
o
(
p
,
'section_method'
):
pass
# p.addValue('x_asap_electronic_structure_method', 'EMT')
# p.addValue('x_asap_electronic_structure_method', 'EMT')
p
.
finishedParsingSession
(
"ParseSuccess"
,
None
)
if
__name__
==
'__main__'
:
...
...
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