Commit c1279328 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

fix orca program_name, program_basis_set_type

parent f0fab55f
...@@ -249,21 +249,14 @@ class OrcaContext(object): ...@@ -249,21 +249,14 @@ class OrcaContext(object):
tdm[:, 2] = z tdm[:, 2] = z
backend.addArrayValues("transition_dipole_moments", tdm) backend.addArrayValues("transition_dipole_moments", tdm)
# def onClose_x_orca_basis_set_info(self, backend, gIndex, value): def onClose_section_run(self, backend, gIndex, value):
# x = value["x_orca_atom_labels"] versionPieces = [value[x] for x in ["x_orca_program_version", "x_orca_program_svn", "x_orca_program_compilation_date", "x_orca_program_compilation_time"]]
# y = value["x_orca_basis_set"] version = []
# z = value["x_orca_basis_set_contracted"] for v in versionPieces:
# basisSet = np.zeros((len(x),3), dtype=float) if v:
# basisSet[:,0] = x version.append(v[0])
# basisSet[:,1] = y if version:
# basisSet[:,2] = z backend.addValue("program_version", " ".join(version))
# backend.addArrayValue("program_basis_set_type", 'Gaussian' + basisSet)
#
# def onClose_x_orca_program_name(self, backend, gIndex, value):
# x = 'ORCA'
# y = value["x_orca_program_version"]
# z = value["x_orca_program_compilation_date"]
# backend.addValue("program_name", x + y + z)
########################################################## ##########################################################
############ [2] MAIN PARSER STARTS HERE ############ ############ [2] MAIN PARSER STARTS HERE ############
...@@ -290,13 +283,15 @@ def build_OrcaMainFileSimpleMatcher(): ...@@ -290,13 +283,15 @@ def build_OrcaMainFileSimpleMatcher():
startReStr = r"\s*\* O R C A \*\s*", startReStr = r"\s*\* O R C A \*\s*",
forwardMatch = True, forwardMatch = True,
sections = ["section_run"], sections = ["section_run"],
fixedStartValues = {"program_name": "ORCA", "program_basis_set_type": "Gaussians" },
subMatchers = [ subMatchers = [
SM(name = 'ProgramHeader', SM(name = 'ProgramHeader',
startReStr = r"\s*\* O R C A \*\s*", startReStr = r"\s*\* O ?R ?C ?A \*\s*",
subMatchers = [ subMatchers = [
SM(r"\s*Program Version\s*(?P<x_orca_program_version>[0-9a-zA-Z_.]*)"), SM(r"\s*Program Version\s*(?P<x_orca_program_version>[0-9a-zA-Z_.].*)"),
SM(r" *\(\$Date\: *(?P<x_orca_program_compilation_date>[0-9/]+) at (?P<x_orca_program_compilation_time>[0-9:]+)") SM(r"\s*\(SVN:\s*\$(?P<x_orca_program_svn>[^$]+)\$\)\s*"),
]), SM(r"\s*\(\$Date\:\s*(?P<x_orca_program_compilation_date>[0-9a-zA-Z].+?)\s*\$\)")
]),
buildSinglePointMatcher(), buildSinglePointMatcher(),
buildGeoOptMatcher(), buildGeoOptMatcher(),
buildMp2Matcher(), buildMp2Matcher(),
......
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