...
 
Commits (3)
Metadata-Version: 1.0
Name: gaussianparser
Version: 0.1
Summary: NOMAD parser implementation for Gaussian.
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: APACHE 2.0
Description: UNKNOWN
Platform: UNKNOWN
README.md
setup.py
./gaussianparser/__init__.py
./gaussianparser/parser_gaussian.py
./gaussianparser/setup_paths.py
./gaussianparser.egg-info/PKG-INFO
./gaussianparser.egg-info/SOURCES.txt
./gaussianparser.egg-info/dependency_links.txt
./gaussianparser.egg-info/requires.txt
./gaussianparser.egg-info/top_level.txt
\ No newline at end of file
from gaussianparser.parser_gaussian import GaussianParser
This diff is collapsed.
# Copyright 2015-2018 Lorenzo Pardini
#
# 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.
from setuptools import setup, find_packages
def main():
setup(
name='gaussianparser',
version='0.1',
description='NOMAD parser implementation for Gaussian.',
license='APACHE 2.0',
package_dir={'': './'},
packages=find_packages(),
install_requires=[
'nomadcore'
],
)
if __name__ == '__main__':
main()
/*
* Copyright 2015-2018 Rosendo Valero, Fawzi Mohamed, Ankit Kariryaa
*
* 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 => lab }
import eu.nomad_lab.DefaultPythonInterpreter
import org.{ json4s => jn }
import scala.collection.breakOut
object GaussianParser extends SimpleExternalParserGenerator(
name = "GaussianParser",
parserInfo = jn.JObject(
("name" -> jn.JString("GaussianParser")) ::
("parserId" -> jn.JString("GaussianParser" + lab.GaussianVersionInfo.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.GaussianVersionInfo.toMap.map {
case (key, value) =>
(key -> jn.JString(value.toString))
}(breakOut): List[(String, jn.JString)])
)) :: Nil
),
mainFileTypes = Seq("text/.*"),
mainFileRe = """\s*Gaussian, Inc\. All Rights Reserved\.\s*
\s*
\s*This is part of the Gaussian\(R\) [0-9]* program.""".r,
cmd = Seq(DefaultPythonInterpreter.pythonExe(), "${envDir}/parsers/gaussian/parser/parser-gaussian/parser_gaussian.py",
"--uri", "${mainFileUri}", "${mainFilePath}"),
resList = Seq(
"parser-gaussian/parser_gaussian.py",
"parser-gaussian/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/gaussian.nomadmetainfo.json"
) ++ DefaultPythonInterpreter.commonFiles(),
dirMap = Map(
"parser-gaussian" -> "parsers/gaussian/parser/parser-gaussian",
"nomad_meta_info" -> "nomad-meta-info/meta_info/nomad_meta_info",
"python" -> "python-common/common/python/nomadcore"
) ++ DefaultPythonInterpreter.commonDirMapping()
)
/*
* Copyright 2015-2018 Rosendo Valero, Fawzi Mohamed, Ankit Kariryaa
*
* 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.{ parsers, DefaultPythonInterpreter }
import org.scalacheck.Properties
import org.specs2.mutable.Specification
import org.{ json4s => jn }
object GaussianParserSpec extends Specification {
"GaussianParserTest" >> {
"test with Al.out" >> {
"test with json-events" >> {
ParserRun.parse(GaussianParser, "parsers/gaussian/test/examples/Al.out", "json-events") must_== ParseResult.ParseSuccess
}
"test with json" >> {
ParserRun.parse(GaussianParser, "parsers/gaussian/test/examples/Al.out", "json") must_== ParseResult.ParseSuccess
}
}
}
}