Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
parser-gromos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nomad-lab
parser-gromos
Commits
1494b76d
Commit
1494b76d
authored
May 04, 2020
by
Markus Scheidgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more parsers to NOMAD
parent
354d933b
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2973 additions
and
440 deletions
+2973
-440
.gitignore
.gitignore
+3
-3
gromosparser/GROMOSCommon.py
gromosparser/GROMOSCommon.py
+0
-0
gromosparser/GROMOSDictionary.py
gromosparser/GROMOSDictionary.py
+88
-89
gromosparser/GROMOSParser.py
gromosparser/GROMOSParser.py
+266
-244
gromosparser/__init__.py
gromosparser/__init__.py
+1
-0
gromosparser/metainfo/__init__.py
gromosparser/metainfo/__init__.py
+13
-0
gromosparser/metainfo/gromos.py
gromosparser/metainfo/gromos.py
+2579
-0
setup.py
setup.py
+23
-11
src/main/scala/eu/nomad_lab/parsers/GromosParser.scala
src/main/scala/eu/nomad_lab/parsers/GromosParser.scala
+0
-61
src/test/scala/eu/nomad_lab/parsers/GromosParserSpec.scala
src/test/scala/eu/nomad_lab/parsers/GromosParserSpec.scala
+0
-32
No files found.
.gitignore
View file @
1494b76d
...
...
@@ -10,9 +10,7 @@ syntax: glob
*.bk
*.swp
.DS_Store
# logging files
detailed.log
*.annotate
# eclipse conf file
.settings
...
...
@@ -52,3 +50,5 @@ TAGS
lib/
env/
*.egg-info
\ No newline at end of file
parser/parser-gromos
/GROMOSCommon.py
→
gromosparser
/GROMOSCommon.py
View file @
1494b76d
File moved
parser/parser-gromos
/GROMOSDictionary.py
→
gromosparser
/GROMOSDictionary.py
View file @
1494b76d
This diff is collapsed.
Click to expand it.
parser/parser-gromos
/GROMOSParser.py
→
gromosparser
/GROMOSParser.py
View file @
1494b76d
This diff is collapsed.
Click to expand it.
gromosparser/__init__.py
0 → 100644
View file @
1494b76d
from
.GROMOSParser
import
GromacsParserInterface
as
GromosParser
\ No newline at end of file
gromosparser/metainfo/__init__.py
0 → 100644
View file @
1494b76d
import
sys
from
nomad.metainfo
import
Environment
from
nomad.metainfo.legacy
import
LegacyMetainfoEnvironment
import
gromosparser.metainfo.gromos
import
nomad.datamodel.metainfo.common
import
nomad.datamodel.metainfo.public
import
nomad.datamodel.metainfo.general
m_env
=
LegacyMetainfoEnvironment
()
m_env
.
m_add_sub_section
(
Environment
.
packages
,
sys
.
modules
[
'gromosparser.metainfo.gromos'
].
m_package
)
# type: ignore
m_env
.
m_add_sub_section
(
Environment
.
packages
,
sys
.
modules
[
'nomad.datamodel.metainfo.common'
].
m_package
)
# type: ignore
m_env
.
m_add_sub_section
(
Environment
.
packages
,
sys
.
modules
[
'nomad.datamodel.metainfo.public'
].
m_package
)
# type: ignore
m_env
.
m_add_sub_section
(
Environment
.
packages
,
sys
.
modules
[
'nomad.datamodel.metainfo.general'
].
m_package
)
# type: ignore
gromosparser/metainfo/gromos.py
0 → 100644
View file @
1494b76d
This diff is collapsed.
Click to expand it.
parser/parser-gromos/setup_paths
.py
→
setup
.py
View file @
1494b76d
# Copyright 201
8
-2018 Berk Onat
#
# Copyright 201
5
-2018 Berk Onat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
sys
import
os
import
os.path
basedir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
commondir
=
os
.
path
.
normpath
(
os
.
path
.
join
(
basedir
,
"../../../../python-common/common/python"
))
from
setuptools
import
setup
,
find_packages
if
not
commondir
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
commondir
)
def
main
():
setup
(
name
=
'gromossparser'
,
version
=
'0.1'
,
description
=
'NOMAD parser implementation for Gromos.'
,
license
=
'APACHE 2.0'
,
package_dir
=
{
''
:
'./'
},
packages
=
find_packages
(),
install_requires
=
[
'nomadcore'
,
'nomad'
],
)
if
__name__
==
'__main__'
:
main
()
src/main/scala/eu/nomad_lab/parsers/GromosParser.scala
deleted
100644 → 0
View file @
354d933b
/*
* Copyright 2018-2018 Berk Onat
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
eu.nomad_lab.parsers
import
eu.nomad_lab
import
eu.nomad_lab.DefaultPythonInterpreter
import
org.
{
json4s
=>
jn
}
import
eu.
{
nomad_lab
=>
lab
}
import
scala.collection.breakOut
object
GromosParser
extends
SimpleExternalParserGenerator
(
name
=
"GromosParser"
,
parserInfo
=
jn
.
JObject
(
(
"name"
->
jn
.
JString
(
"GromosParser"
))
::
(
"parserId"
->
jn
.
JString
(
"GromosParser"
+
lab
.
GromosVersionInfo
.
version
))
::
(
"versionInfo"
->
jn
.
JObject
(
(
"nomadCoreVersion"
->
jn
.
JObject
(
lab
.
NomadCoreVersionInfo
.
toMap
.
map
{
case
(
k
,
v
)
=>
k
->
jn
.
JString
(
v
.
toString
)
}(
breakOut
)
:
List
[(
String
,
jn.JString
)]))
::
(
lab
.
GromosVersionInfo
.
toMap
.
map
{
case
(
key
,
value
)
=>
(
key
->
jn
.
JString
(
value
.
toString
))
}(
breakOut
)
:
List
[(
String
,
jn.JString
)])
))
::
Nil
),
mainFileTypes
=
Seq
(
"text/.*"
),
mainFileRe
=
"""^MD\+\+\s*\s*"""
.
r
,
cmd
=
Seq
(
DefaultPythonInterpreter
.
pythonExe
(),
"${envDir}/parsers/gromos/parser/parser-gromos/GROMOSParser.py"
,
"${mainFilePath}"
),
resList
=
Seq
(
"parser-gromos/GROMOSParser.py"
,
"parser-gromos/GROMOSDictionary.py"
,
"parser-gromos/GROMOSCommon.py"
,
"parser-gromos/setup_paths.py"
,
"nomad_meta_info/public.nomadmetainfo.json"
,
"nomad_meta_info/common.nomadmetainfo.json"
,
"nomad_meta_info/meta_types.nomadmetainfo.json"
,
"nomad_meta_info/gromos.nomadmetainfo.json"
)
++
DefaultPythonInterpreter
.
commonFiles
(),
dirMap
=
Map
(
"parser-gromos"
->
"parsers/gromos/parser/parser-gromos"
,
"nomad_meta_info"
->
"nomad-meta-info/meta_info/nomad_meta_info"
,
"python"
->
"python-common/common/python/nomadcore"
)
++
DefaultPythonInterpreter
.
commonDirMapping
(),
metaInfoEnv
=
Some
(
lab
.
meta
.
KnownMetaInfoEnvs
.
gromos
)
)
src/test/scala/eu/nomad_lab/parsers/GromosParserSpec.scala
deleted
100644 → 0
View file @
354d933b
/*
* Copyright 2018-2018 Berk Onat
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
eu.nomad_lab.parsers
import
org.specs2.mutable.Specification
object
GromosParserTests
extends
Specification
{
"GromosParserTest_1"
>>
{
"[Peptide in Water with 2792 atoms] test with json-events"
>>
{
ParserRun
.
parse
(
GromosParser
,
"parsers/gromos/test/examples/eq/eq_peptide_1.omd"
,
"json-events"
)
must_==
ParseResult
.
ParseSuccess
}
}
"GromosParserTest_2"
>>
{
"[Peptide in Water with 2792 atoms] test with json"
>>
{
ParserRun
.
parse
(
GromosParser
,
"parsers/gromos/test/examples/eq/eq_peptide_1.omd"
,
"json"
)
must_==
ParseResult
.
ParseSuccess
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment