Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-dftb-plus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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-dftb-plus
Commits
fd41e095
Commit
fd41e095
authored
8 years ago
by
Adriel Domínguez
Browse files
Options
Downloads
Patches
Plain Diff
fix conversion units
parent
5635f871
No related branches found
Branches containing commit
Tags
1.0.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
parser/parser-dftb+/parser_dftb_plus.py
+24
-5
24 additions, 5 deletions
parser/parser-dftb+/parser_dftb_plus.py
with
24 additions
and
5 deletions
parser/parser-dftb+/parser_dftb_plus.py
+
24
−
5
View file @
fd41e095
...
...
@@ -37,6 +37,25 @@ class dftb_plusContext(object):
if
occ
is
not
None
:
backend
.
addArrayValues
(
'
eigenvalues_occupation
'
,
np
.
asarray
(
occ
))
def
onClose_section_single_configuration_calculation
(
self
,
backend
,
gIndex
,
section
):
atom_force
=
[]
for
i
in
[
'
X
'
,
'
Y
'
,
'
Z
'
]:
forces
=
section
[
'
x_dftbp_atom_forces_
'
+
i
]
if
forces
is
not
None
:
atom_force
.
append
(
forces
)
if
atom_force
:
backend
.
addArrayValues
(
'
atom_forces
'
,
np
.
transpose
(
np
.
asarray
(
atom_force
)))
def
onClose_section_system
(
self
,
backend
,
gIndex
,
section
):
atom_coord
=
[]
for
i
in
[
'
X
'
,
'
Y
'
,
'
Z
'
]:
coord
=
section
[
'
x_dftbp_atom_positions_
'
+
i
]
if
coord
is
not
None
:
atom_coord
.
append
(
coord
)
if
atom_coord
:
backend
.
addArrayValues
(
'
atom_positions
'
,
np
.
transpose
(
np
.
asarray
(
atom_coord
)))
# description of the input
...
...
@@ -64,7 +83,7 @@ mainFileDescription = SM(
sections
=
[
'
section_system
'
,
'
section_molecule_type
'
],
subMatchers
=
[
SM
(
r
"
\s*Coordinates of moved atoms\s*\(?(au)?\)?:
"
),
SM
(
r
"
\s*(?P<atom>\d+)\s*(?P<x_dftbp_atom_positions_X>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_Y>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_Z>[+-]?\d+\.\d+)\s*
"
,
repeats
=
True
),
SM
(
r
"
\s*(?P<atom>\d+)\s*(?P<x_dftbp_atom_positions_X
__bohr
>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_Y
__bohr
>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_Z
__bohr
>[+-]?\d+\.\d+)\s*
"
,
repeats
=
True
),
],
),
SM
(
name
=
'
charges
'
,
...
...
@@ -74,7 +93,7 @@ mainFileDescription = SM(
sections
=
[
'
section_molecule_type
'
],
subMatchers
=
[
SM
(
r
"
\s*Atom\s*Net charge
"
),
SM
(
r
"
\s*(?P<atom>\d+)\s*(?P<x_dftbp_charge>[+-]?\d+\.\d+)\s*
"
,
repeats
=
True
),
SM
(
r
"
\s*(?P<atom>\d+)\s*(?P<x_dftbp_charge
__e
>[+-]?\d+\.\d+)\s*
"
,
repeats
=
True
),
#SM(r"\s*")
],
),
...
...
@@ -122,9 +141,9 @@ mainFileDescription = SM(
sections
=
[
'
section_single_configuration_calculation
'
],
subMatchers
=
[
SM
(
r
"
\s*Total Forces*
"
),
SM
(
r
"
\s*(?P<x_dftbp_atom_forces_X>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_Y>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_Z>[+-]?\d+\.\d+E?[+-]?\d+)\s*
"
,
repeats
=
True
),
SM
(
r
"
\s*Maximal
forc
e component:\s*(?P<x_dftbp_force_max>[+-]?\d+\.\d+E?[+-]?\d+)\s*
"
),
SM
(
r
"
\s*Max force for moved atoms::\s*(?P<x_dftbp_force_max>[+-]?\d+\.\d+E?[+-]?\d+)\s*(au)?
"
),
SM
(
r
"
\s*(?P<x_dftbp_atom_forces_X
__forceAu
>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_Y
__forceAu
>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_Z
__forceAu
>[+-]?\d+\.\d+E?[+-]?\d+)\s*
"
,
repeats
=
True
),
SM
(
r
"
\s*Maximal
derivativ
e component:\s*(?P<x_dftbp_force_max
__forceAu
>[+-]?\d+\.\d+E?[+-]?\d+)\s*
(au)?
"
),
SM
(
r
"
\s*Max force for moved atoms::\s*(?P<x_dftbp_force_max
_mov__forceAu
>[+-]?\d+\.\d+E?[+-]?\d+)\s*(au)?
"
),
],
),
...
...
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