Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-cp2k
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-cp2k
Commits
ff3bf906
Commit
ff3bf906
authored
9 years ago
by
Himanen, Lauri (himanel1)
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.mpcdf.mpg.de:nomad-lab/parser-cp2k
parents
58afb4ce
59bce5dc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
library.md
+5
-5
5 additions, 5 deletions
library.md
with
5 additions
and
5 deletions
library.md
+
5
−
5
View file @
ff3bf906
...
@@ -65,7 +65,7 @@ class MyParserImplementation1():
...
@@ -65,7 +65,7 @@ class MyParserImplementation1():
result.
result.
"""
"""
result
=
Result
()
result
=
Result
()
result
.
unit
=
ureg
.
joule
result
.
unit
=
"
joule
"
result
.
value
=
2.0
result
.
value
=
2.0
return
result
return
result
...
@@ -76,7 +76,7 @@ class MyParserImplementation1():
...
@@ -76,7 +76,7 @@ class MyParserImplementation1():
one example on how to avoid loading the entire file into memory.
one example on how to avoid loading the entire file into memory.
"""
"""
result
=
Result
()
result
=
Result
()
result
.
unit
=
ureg
.
newton
result
.
unit
=
"
newton
"
xyz_string
=
self
.
parser
.
get_file_contents
(
"
forces
"
)
xyz_string
=
self
.
parser
.
get_file_contents
(
"
forces
"
)
forces
=
[]
forces
=
[]
i_forces
=
[]
i_forces
=
[]
...
@@ -127,7 +127,7 @@ class MyParserImplementation1():
...
@@ -127,7 +127,7 @@ class MyParserImplementation1():
yield
np
.
array
(
i_forces
)
yield
np
.
array
(
i_forces
)
result
=
Result
()
result
=
Result
()
result
.
unit
=
ureg
.
angstrom
result
.
unit
=
"
angstrom
"
result
.
value_iterable
=
position_generator
()
result
.
value_iterable
=
position_generator
()
return
result
return
result
```
```
...
@@ -149,7 +149,7 @@ class MyParserImplementation2(MyParserImplementation1):
...
@@ -149,7 +149,7 @@ class MyParserImplementation2(MyParserImplementation1):
def
energy
(
self
):
def
energy
(
self
):
"""
The energy unit has changed in this version.
"""
"""
The energy unit has changed in this version.
"""
result
=
Result
()
result
=
Result
()
result
.
unit
=
ureg
.
hartree
result
.
unit
=
"
hartree
"
result
.
value
=
"
2.0
"
result
.
value
=
"
2.0
"
return
result
return
result
```
```
...
@@ -181,4 +181,4 @@ The 'files' object contains all the files that are given to the parser. The
...
@@ -181,4 +181,4 @@ The 'files' object contains all the files that are given to the parser. The
attribute names are the file paths and their values are optional id's. The id's
attribute names are the file paths and their values are optional id's. The id's
are not typically given and they have to be assigned by using the
are not typically given and they have to be assigned by using the
setup_file_id() function of NomadParser. Assigning id's helps to manage the
setup_file_id() function of NomadParser. Assigning id's helps to manage the
files.
files.
\ No newline at end of file
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