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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
nomad-lab
parser-cp2k
Commits
88166032
Commit
88166032
authored
Nov 13, 2015
by
Himanen, Lauri (himanel1)
Browse files
Options
Downloads
Patches
Plain Diff
Fixed readme
parent
7fbb08a7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+11
-12
11 additions, 12 deletions
README.md
with
11 additions
and
12 deletions
README.md
+
11
−
12
View file @
88166032
...
...
@@ -2,8 +2,7 @@
The NoMaD parser for CP2K. Under development. Will be modified to conform to
the common parser structure when it is available.
---
## QuickStart
# QuickStart
-
Clone repository
```shell
...
...
@@ -31,21 +30,20 @@ the common parser structure when it is available.
```shell
python -m cp2kparser
```
---
#
# Structure
# Structure
Currently the python package is divided into three subpackages:
-
Engines: Classes for parsing different type of files
-
Generics: Generic utility classes and base classes
-
Implementation: The classes that actually define the parser functionality.
---
## Reusable components and ideas for other parsers
# Reusable components and ideas for other parsers
Some components and ideas could be reused in other parsers as well. If you find
any of the following ideas useful in you parser, you are welcome to
do
reuse
any of the following ideas useful in you parser, you are welcome to reuse
them.
##
#
Engines
## Engines
Basically all the "engines", that is the modules that parse certain type of
files, are reusable as is in other parsers. They could be put into a common
repository where other developers can improve and extend them. One should also
...
...
@@ -64,8 +62,9 @@ Currently implemented engines that could be reused (not tested properly yet):
-
XYZEngine: For parsing XYZ files and files with similar structure. Has a very
flexible nature as you can specify comments, column delimiters, column
indices and the patterns used to separate different configurations.
-
XMLEngine: For parsing XML files using XPath syntax.
##
#
NomadParser base class
## NomadParser base class
In the generics folder there is a module called nomadparser.py that defines a
class called NomadParser. This acts as a base class for the cp2k parser defined
in the implementation folder.
...
...
@@ -81,20 +80,20 @@ parsers:
-
Time measurement for performance analysis
-
Providing file contents, sizes and handles
##
#
Logging
## Logging
Python has a great
[
logging package
](
https://www.google.com
)
which helps in
following the program flow and catching different errors and warnings. In
cp2kparser the file cp2kparser/generics/logconfig.py defines the behaviour of
the logger. There you can setup the log levels even at a modular level. A more
easily readable formatting is also provided for the log messages.
##
#
Testing
## Testing
The parsers can become quite complicated and maintaining them without
systematic testing is perhaps not a good idea. Unittests provide one way to
test each parseable quantity and python has a very good
[
library for
unittesting
](
https://docs.python.org/2/library/unittest.html
)
.
##
#
Profiling
## Profiling
The parsers have to be reasonably fast. For some codes there is already
significant amount of data in the NoMaD repository and the time taken to parse
it will depend on the performance of the parser. Also each time the parser
...
...
...
...
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
sign in
to comment