Skip to content
Snippets Groups Projects
Commit 8f80ec98 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

meta 2.0 changes

parent 832fcac5
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,9 @@ class dftb_plusContext(object):
if forces is not None:
atom_force.append(forces)
if atom_force:
fId = backend.openSection('section_atom_forces')
backend.addArrayValues('atom_forces', np.transpose(np.asarray(atom_force)))
backend.closeSection('section_atom_forces', fId)
def onClose_section_system(self, backend, gIndex, section):
......@@ -101,7 +103,7 @@ mainFileDescription = SM(
sections = ['section_system','section_topology','section_molecule_type'],
subMatchers = [
SM(r"\s*Coordinates of moved atoms\s*\(?(au)?\)?:"),
SM(r"\s*(?P<atom>\d+)\s*(?P<x_dftbp_atom_positions_X__bohr>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_Y__bohr>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_Z__bohr>[+-]?\d+\.\d+)\s*", repeats = True),
SM(r"\s*(?P<atom>\d+)\s*(?P<x_dftbp_atom_positions_x__bohr>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_y__bohr>[+-]?\d+\.\d+)\s*(?P<x_dftbp_atom_positions_z__bohr>[+-]?\d+\.\d+)\s*", repeats = True),
],
),
SM(name = 'charges',
......@@ -159,7 +161,7 @@ mainFileDescription = SM(
sections = ['section_single_configuration_calculation'],
subMatchers = [
SM(r"\s*Total Forces*"),
SM(r"\s*(?P<x_dftbp_atom_forces_X__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_Y__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_Z__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*", repeats = True),
SM(r"\s*(?P<x_dftbp_atom_forces_x__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_y__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*(?P<x_dftbp_atom_forces_z__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*", repeats = True),
SM(r"\s*Maximal derivative component:\s*(?P<x_dftbp_force_max__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*(au)?"),
SM(r"\s*Max force for moved atoms::\s*(?P<x_dftbp_force_max_mov__forceAu>[+-]?\d+\.\d+E?[+-]?\d+)\s*(au)?"),
],
......
......@@ -48,7 +48,7 @@ object DftbPlusParser extends SimpleExternalParserGenerator(
"parser-dftb+/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/meta.nomadmetainfo.json",
"nomad_meta_info/dftb_plus.nomadmetainfo.json"
) ++ DefaultPythonInterpreter.commonFiles(),
dirMap = Map(
......
......@@ -21,10 +21,10 @@ import org.specs2.mutable.Specification
object DftbPlusTests extends Specification {
"DftbPlusParserTest" >> {
"test with json-events" >> {
ParserRun.parse(DftbPlusParser, "parsers/dftbPlus/test/examples/detailed.out", "json-events") must_== ParseResult.ParseSuccess
ParserRun.parse(DftbPlusParser, "parsers/dftb-plus/test/examples/detailed.out", "json-events") must_== ParseResult.ParseSuccess
}
"test with json" >> {
ParserRun.parse(DftbPlusParser, "parsers/dftbPlus/test/examples/detailed.out", "json") must_== ParseResult.ParseSuccess
ParserRun.parse(DftbPlusParser, "parsers/dftb-plus/test/examples/detailed.out", "json") must_== ParseResult.ParseSuccess
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment