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-orca
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nomad-lab
parser-orca
Commits
c1279328
Commit
c1279328
authored
Jan 31, 2018
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix orca program_name, program_basis_set_type
parent
f0fab55f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
parser/parser-orca/orca_parser.py
parser/parser-orca/orca_parser.py
+14
-19
No files found.
parser/parser-orca/orca_parser.py
View file @
c1279328
...
...
@@ -249,21 +249,14 @@ class OrcaContext(object):
tdm
[:,
2
]
=
z
backend
.
addArrayValues
(
"transition_dipole_moments"
,
tdm
)
# def onClose_x_orca_basis_set_info(self, backend, gIndex, value):
# x = value["x_orca_atom_labels"]
# y = value["x_orca_basis_set"]
# z = value["x_orca_basis_set_contracted"]
# basisSet = np.zeros((len(x),3), dtype=float)
# basisSet[:,0] = x
# basisSet[:,1] = y
# basisSet[:,2] = z
# 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)
def
onClose_section_run
(
self
,
backend
,
gIndex
,
value
):
versionPieces
=
[
value
[
x
]
for
x
in
[
"x_orca_program_version"
,
"x_orca_program_svn"
,
"x_orca_program_compilation_date"
,
"x_orca_program_compilation_time"
]]
version
=
[]
for
v
in
versionPieces
:
if
v
:
version
.
append
(
v
[
0
])
if
version
:
backend
.
addValue
(
"program_version"
,
" "
.
join
(
version
))
##########################################################
############ [2] MAIN PARSER STARTS HERE ############
...
...
@@ -290,13 +283,15 @@ def build_OrcaMainFileSimpleMatcher():
startReStr
=
r"\s*\* O R C A \*\s*"
,
forwardMatch
=
True
,
sections
=
[
"section_run"
],
fixedStartValues
=
{
"program_name"
:
"ORCA"
,
"program_basis_set_type"
:
"Gaussians"
},
subMatchers
=
[
SM
(
name
=
'ProgramHeader'
,
startReStr
=
r"\s*\* O
R C
A \*\s*"
,
startReStr
=
r"\s*\* O
?R ?C ?
A \*\s*"
,
subMatchers
=
[
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*Program Version\s*(?P<x_orca_program_version>[0-9a-zA-Z_.].*)"
),
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
(),
buildGeoOptMatcher
(),
buildMp2Matcher
(),
...
...
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