Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-big-dft
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nomad-lab
parser-big-dft
Commits
42b2b0ea
Commit
42b2b0ea
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed insufficient handling of atom positions.
parent
4114f96b
No related branches found
Branches containing commit
Tags
legacy-metainfo
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bigdftparser/versions/bigdft18/mainparser.py
+9
-5
9 additions, 5 deletions
bigdftparser/versions/bigdft18/mainparser.py
with
9 additions
and
5 deletions
bigdftparser/versions/bigdft18/mainparser.py
+
9
−
5
View file @
42b2b0ea
# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed
# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
@@ -18,6 +18,7 @@ from yaml import Loader, YAMLError
...
@@ -18,6 +18,7 @@ from yaml import Loader, YAMLError
from
yaml
import
ScalarNode
,
SequenceNode
,
MappingNode
,
MappingEndEvent
from
yaml
import
ScalarNode
,
SequenceNode
,
MappingNode
,
MappingEndEvent
from
nomadcore.baseclasses
import
AbstractBaseParser
from
nomadcore.baseclasses
import
AbstractBaseParser
from
bigdftparser.generic.libxc_codes
import
LIB_XC_MAPPING
from
bigdftparser.generic.libxc_codes
import
LIB_XC_MAPPING
import
ase.data
LOGGER
=
logging
.
getLogger
(
"
nomad
"
)
LOGGER
=
logging
.
getLogger
(
"
nomad
"
)
...
@@ -143,8 +144,11 @@ class BigDFTMainParser(AbstractBaseParser):
...
@@ -143,8 +144,11 @@ class BigDFTMainParser(AbstractBaseParser):
np_labels
=
[]
np_labels
=
[]
positions
=
value
[
"
Positions
"
]
positions
=
value
[
"
Positions
"
]
for
position
in
positions
:
for
position
in
positions
:
np_positions
.
append
(
*
position
.
values
())
for
key
,
value
in
position
.
items
():
np_labels
.
append
(
*
position
.
keys
())
# Not all keys are chemical symbols, e.g. spin, etc.
if
key
in
ase
.
data
.
chemical_symbols
:
np_positions
.
append
(
value
)
np_labels
.
append
(
key
)
np_positions
=
np
.
array
(
np_positions
)
np_positions
=
np
.
array
(
np_positions
)
np_labels
=
np
.
array
(
np_labels
)
np_labels
=
np
.
array
(
np_labels
)
self
.
backend
.
addArrayValues
(
"
atom_positions
"
,
np_positions
,
unit
=
"
angstrom
"
)
self
.
backend
.
addArrayValues
(
"
atom_positions
"
,
np_positions
,
unit
=
"
angstrom
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment