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
912790d4
Commit
912790d4
authored
9 years ago
by
Himanen, Lauri (himanel1)
Browse files
Options
Downloads
Patches
Plain Diff
Fixed readme markup syntax.
parent
cb222142
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+15
-15
15 additions, 15 deletions
README.md
cp2kparser/engines/cp2kinputengine.py
+0
-1
0 additions, 1 deletion
cp2kparser/engines/cp2kinputengine.py
with
15 additions
and
16 deletions
README.md
+
15
−
15
View file @
912790d4
...
@@ -33,9 +33,9 @@ the common parser structure when it is available.
...
@@ -33,9 +33,9 @@ the common parser structure when it is available.
# Structure
# Structure
Currently the python package is divided into three subpackages:
Currently the python package is divided into three subpackages:
-
Engines: Classes for parsing different type of files
-
Engines: Classes for parsing different type of files
-
Generics: Generic utility classes and base classes
-
Generics: Generic utility classes and base classes
-
Implementation: The classes that actually define the parser functionality.
-
Implementation: The classes that actually define the parser functionality.
# Reusable components and ideas for other parsers
# Reusable components and ideas for other parsers
...
@@ -56,13 +56,13 @@ the performance of an engine but if the function calls remain the same no other
...
@@ -56,13 +56,13 @@ the performance of an engine but if the function calls remain the same no other
code has to be changed.
code has to be changed.
Currently implemented engines that could be reused (not tested properly yet):
Currently implemented engines that could be reused (not tested properly yet):
-
RegexEngine: For parsing text files with regular expressions. Uses the re2
-
RegexEngine: For parsing text files with regular expressions. Uses the re2
library if available (falls back to default python regex implementation if
library if available (falls back to default python regex implementation if
re2 not found).
re2 not found).
-
XYZEngine: For parsing XYZ files and files with similar structure. Has a very
-
XYZEngine: For parsing XYZ files and files with similar structure. Has a very
flexible nature as you can specify comments, column delimiters, column
flexible nature as you can specify comments, column delimiters, column
indices and the patterns used to separate different configurations.
indices and the patterns used to separate different configurations.
-
XMLEngine: For parsing XML files using XPath syntax.
-
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
In the generics folder there is a module called nomadparser.py that defines a
...
@@ -74,11 +74,11 @@ the scala code (will be modified later to conform to the common interface).
...
@@ -74,11 +74,11 @@ the scala code (will be modified later to conform to the common interface).
This class is also responsible for some common tasks that are present in all
This class is also responsible for some common tasks that are present in all
parsers:
parsers:
- Unit conversion
-
Unit conversion
- JSON encoding
-
JSON encoding
- Caching
-
Caching
- Time measurement for performance analysis
-
Time measurement for performance analysis
- Providing file contents, sizes and handles
-
Providing file contents, sizes and handles
## Logging
## Logging
Python has a great
[
logging package
](
https://www.google.com
)
which helps in
Python has a great
[
logging package
](
https://www.google.com
)
which helps in
...
...
This diff is collapsed.
Click to expand it.
cp2kparser/engines/cp2kinputengine.py
+
0
−
1
View file @
912790d4
#! /usr/bin/env python
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
os
import
os
from
collections
import
defaultdict
import
logging
import
logging
import
cPickle
as
pickle
import
cPickle
as
pickle
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
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