Commit 09b52a74 authored by Markus Scheidgen's avatar Markus Scheidgen

Adapted to nomad-fair.

parent 0865874d
This diff is collapsed.
/*
* Copyright 2017-2018 Berk Onat, Fawzi Mohamed
*
* 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 AmberParser extends SimpleExternalParserGenerator(
name = "AmberParser",
parserInfo = jn.JObject(
("name" -> jn.JString("AmberParser")) ::
("parserId" -> jn.JString("AmberParser" + lab.AmberVersionInfo.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.AmberVersionInfo.toMap.map {
case (key, value) =>
(key -> jn.JString(value.toString))
}(breakOut): List[(String, jn.JString)])
)) :: Nil
),
mainFileTypes = Seq("text/.*"),
mainFileRe = """\s*Amber\s*[0-9]+""".r,
cmd = Seq(DefaultPythonInterpreter.pythonExe(), "${envDir}/parsers/amber/parser/parser-amber/AMBERParser.py",
"${mainFilePath}"),
resList = Seq(
"parser-amber/AMBERParser.py",
"parser-amber/AMBERDictionary.py",
"parser-amber/AMBERCommon.py",
"parser-amber/MetaInfoStorage.py",
"parser-amber/trajectory_reader.py",
"parser-amber/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/amber.nomadmetainfo.json"
) ++ DefaultPythonInterpreter.commonFiles(),
dirMap = Map(
"parser-amber" -> "parsers/amber/parser/parser-amber",
"nomad_meta_info" -> "nomad-meta-info/meta_info/nomad_meta_info",
"python" -> "python-common/common/python/nomadcore"
) ++ DefaultPythonInterpreter.commonDirMapping(),
metaInfoEnv = Some(lab.meta.KnownMetaInfoEnvs.amber)
)
/*
* Copyright 2017-2018 Berk Onat, Fawzi Mohamed
*
* 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 AmberParserSpec extends Specification {
"AmberParserTest" >> {
"test with json-events" >> {
ParserRun.parse(AmberParser, "parsers/amber/test/examples/03_Prod.out", "json-events") must_== ParseResult.ParseSuccess
}
"test with json" >> {
ParserRun.parse(AmberParser, "parsers/amber/test/examples/03_Prod.out", "json") must_== ParseResult.ParseSuccess
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# List of Example Files
This directory contains examples calculations of Amber.
The content of the folders and files is detailed below.
The examples in this directory are from the tutorials of Amber as detailed below.
## DNA
The examples are taken from the [DNA Tutorial](http://ambermd.org/tutorials/basic/tutorial1/)
## Single Files
This diff is collapsed.
27
7.9210000 0.5360000 -1.2990000 7.5180000 1.0200000 -0.0800000
6.1550000 1.0160000 0.2840000 5.8360000 1.3880000 1.2180000
8.1290000 1.3940000 0.6430000 8.9550000 0.6100000 -1.5460000
7.0430000 0.1080000 -2.2750000 7.5380000 -0.2250000 -3.1860000
5.6220000 0.0720000 -1.9620000 5.0010000 -0.1760000 -2.8570000
5.2290000 0.5920000 -0.7210000 3.7210000 0.7980000 -0.3630000
3.6230000 1.4700000 0.5450000 3.4320000 1.4060000 -1.2770000
3.0440000 -0.4270000 -0.1840000 1.7100000 -0.2140000 0.0040000
1.0000000 1.0000000 0.0000000 1.4340000 1.9960000 0.0800000
-0.4010000 0.9900000 0.0000000 -0.9520000 1.9160000 0.1200000
-1.0420000 -0.3200000 -0.0320000 -2.1470000 -0.4340000 -0.0310000
-0.4000000 -1.4670000 0.1230000 0.9590000 -1.4440000 0.1300000
1.6830000 -2.6180000 0.1220000 2.7010000 -2.4150000 0.1230000
1.1390000 -3.4500000 0.1430000
# MNDO dynamics
&cntrl
imin=0,
nstlim=5000000,
dt=0.0005,
ntpr=1000,
ntwx=1000,
ntwr=-1000,
ntb=0,
cut=50.0,
temp0=300.0,
ntt=3,
gamma_ln=5,
ifqnt=1,
&end
&qmmm
qmmask=":1",
qmcharge=0,
qm_theory="MNDO",
qmcut=9.0,
&end
This diff is collapsed.
This diff is collapsed.
Production
&cntrl
imin=0,
ntx=5,
irest=1,
nstlim=30000,
dt=0.002,
ntf=2,
ntc=2,
temp0=300.0,
ntpr=100,
ntwx=100,
cut=8.0,
ntb=2,
ntp=1,
ntt=3,
gamma_ln=2.0,
ig=-1,
/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment