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-charmm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nomad-lab
parser-charmm
Commits
e1a54afa
Commit
e1a54afa
authored
Apr 10, 2018
by
Berk Onat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding restriction_uri info.
parent
4c4660c9
Pipeline
#27122
passed with stage
in 10 minutes and 32 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
3 deletions
+98
-3
parser/parser-charmm/CHARMMDictionary.py
parser/parser-charmm/CHARMMDictionary.py
+46
-1
parser/parser-charmm/CHARMMParser.py
parser/parser-charmm/CHARMMParser.py
+52
-2
No files found.
parser/parser-charmm/CHARMMDictionary.py
View file @
e1a54afa
...
@@ -784,6 +784,49 @@ def get_updateDictionary(self, defname):
...
@@ -784,6 +784,49 @@ def get_updateDictionary(self, defname):
),
),
}
}
# Info for section_restricted_uri
restrictions
=
{
'number_of_restricted_uri_files'
:
MetaInfoMap
(
startpage
,
value
=
int
(
1
),
#autoSections=True,
activeInfo
=
True
,
activeSections
=
[
'section_restricted_uri'
]
),
'restricted_uri_files'
:
MetaInfoMap
(
startpage
,
#autoSections=True,
activeInfo
=
True
,
activeSections
=
[
'section_restricted_uri'
],
subfunction
=
{
'function'
:
self
.
parameter_file_name
,
'supportDict'
:
self
.
fileDict
,
},
),
'restricted_uri_license'
:
MetaInfoMap
(
startpage
,
value
=
'CHARMM License'
,
#autoSections=True,
activeInfo
=
True
,
activeSections
=
[
'section_restricted_uri'
]
),
'restricted_uri_restriction'
:
MetaInfoMap
(
startpage
,
value
=
'any access'
,
#autoSections=True,
activeInfo
=
True
,
activeSections
=
[
'section_restricted_uri'
]
),
'restricted_uri_reason'
:
MetaInfoMap
(
startpage
,
value
=
'propriety license'
,
#autoSections=True,
activeInfo
=
True
,
activeSections
=
[
'section_restricted_uri'
]
),
'restricted_uri_issue_authority'
:
MetaInfoMap
(
startpage
,
value
=
'CHARMM'
,
#autoSections=True,
activeInfo
=
True
,
activeSections
=
[
'section_restricted_uri'
]
),
}
# ------------------------------------------
# ------------------------------------------
# Definitions for section_frame_sequence
# Definitions for section_frame_sequence
# ------------------------------------------
# ------------------------------------------
...
@@ -1503,6 +1546,8 @@ def get_updateDictionary(self, defname):
...
@@ -1503,6 +1546,8 @@ def get_updateDictionary(self, defname):
dictionary
=
topology
dictionary
=
topology
elif
defname
==
'singleconfcalc'
:
elif
defname
==
'singleconfcalc'
:
dictionary
=
singleconfcalc
dictionary
=
singleconfcalc
elif
defname
==
'restrictions'
:
dictionary
=
restrictions
elif
defname
==
'frameseq'
:
elif
defname
==
'frameseq'
:
dictionary
=
frameseq
dictionary
=
frameseq
elif
defname
==
'frameseqend'
:
elif
defname
==
'frameseqend'
:
...
...
parser/parser-charmm/CHARMMParser.py
View file @
e1a54afa
...
@@ -66,6 +66,8 @@ class CHARMMParser(SmartParser.ParserBase):
...
@@ -66,6 +66,8 @@ class CHARMMParser(SmartParser.ParserBase):
set_Dictionaries
(
self
)
set_Dictionaries
(
self
)
self
.
metaInfoEnv
=
get_metaInfo
(
self
)
self
.
metaInfoEnv
=
get_metaInfo
(
self
)
self
.
secGIndexDict
=
{}
self
.
secGIndexDict
=
{}
#self.metaStorageRestrict = mStore.Container('section_restricted_uri')
#self.metaStorageRestrict.build(jsonmetadata, 'section_restricted_uri', {})
self
.
cachingLevelForMetaName
=
{
self
.
cachingLevelForMetaName
=
{
PARSERTAG
+
'_trajectory_file_detect'
:
CachingLevel
.
Cache
,
PARSERTAG
+
'_trajectory_file_detect'
:
CachingLevel
.
Cache
,
...
@@ -256,8 +258,25 @@ class CHARMMParser(SmartParser.ParserBase):
...
@@ -256,8 +258,25 @@ class CHARMMParser(SmartParser.ParserBase):
#self.initialize_values()
#self.initialize_values()
self
.
secRunOpen
=
False
self
.
secRunOpen
=
False
self
.
metaStorage
.
reset
({
'startSection'
:
[[
'section_run'
]]})
self
.
metaStorage
.
reset
({
'startSection'
:
[[
'section_run'
]]})
self
.
metaStorageRestrict
.
reset
({
'startSection'
:
[[
'section_restricted_uri'
]]})
self
.
reset_values
()
self
.
reset_values
()
def
parameter_file_name
(
self
,
filedict
,
itemdict
):
""" Function to generate data for parameter files list
"""
working_dir_name
=
os
.
path
.
dirname
(
os
.
path
.
normpath
(
os
.
path
.
abspath
(
self
.
fName
)))
parmmeta
=
isMetaStrInDict
(
"prm_file"
,
self
.
fileDict
)
filename
=
[]
if
parmmeta
is
not
None
:
if
self
.
fileDict
[
parmmeta
].
value
is
not
None
:
fname
=
self
.
fileDict
[
parmmeta
].
value
filename
.
append
(
fname
.
replace
(
working_dir_name
,
'.'
+
os
.
path
.
sep
))
if
filename
:
return
False
,
filename
,
itemdict
else
:
return
False
,
None
,
itemdict
def
findUnitFileInIODict
(
self
,
theUnit
):
def
findUnitFileInIODict
(
self
,
theUnit
):
theUnitList
=
[]
theUnitList
=
[]
for
secRun
,
secList
in
self
.
inputOutputCards
.
items
():
for
secRun
,
secList
in
self
.
inputOutputCards
.
items
():
...
@@ -565,7 +584,7 @@ class CHARMMParser(SmartParser.ParserBase):
...
@@ -565,7 +584,7 @@ class CHARMMParser(SmartParser.ParserBase):
if
self
.
fileDict
[
fKey
+
'stream'
].
value
is
None
:
if
self
.
fileDict
[
fKey
+
'stream'
].
value
is
None
:
self
.
fileDict
[
fKey
+
'stream'
].
value
=
'input coor card'
self
.
fileDict
[
fKey
+
'stream'
].
value
=
'input coor card'
else
:
else
:
self
.
fileDict
[
fKey
+
'stream'
].
value
=
elf
.
fileDict
[
self
.
fileDict
[
fKey
+
'stream'
].
value
=
s
elf
.
fileDict
[
fKey
+
'stream'
].
value
+
', input coor card'
fKey
+
'stream'
].
value
+
', input coor card'
if
self
.
fileDict
[
fKey
+
'stream'
].
strDict
is
None
:
if
self
.
fileDict
[
fKey
+
'stream'
].
strDict
is
None
:
self
.
fileDict
[
fKey
+
'stream'
].
strDict
=
self
.
latestTopoFile
[
'topoStrDict'
]
self
.
fileDict
[
fKey
+
'stream'
].
strDict
=
self
.
latestTopoFile
[
'topoStrDict'
]
...
@@ -1096,6 +1115,38 @@ class CHARMMParser(SmartParser.ParserBase):
...
@@ -1096,6 +1115,38 @@ class CHARMMParser(SmartParser.ParserBase):
#self.stepcontrolDict.update({"follow" : followsteps})
#self.stepcontrolDict.update({"follow" : followsteps})
self
.
onOpen_section_sampling_method
(
backend
,
None
,
None
)
self
.
onOpen_section_sampling_method
(
backend
,
None
,
None
)
self
.
onClose_section_sampling_method
(
backend
,
None
,
None
)
self
.
onClose_section_sampling_method
(
backend
,
None
,
None
)
if
self
.
topology
:
if
self
.
newTopo
:
section_file_Dict
=
{}
section_file_Dict
.
update
(
self
.
fileDict
)
updateDict
=
{
'startSection'
:
[[
PARSERTAG
+
'_section_control_parameters'
]],
'dictionary'
:
section_file_Dict
}
self
.
metaStorage
.
update
(
updateDict
)
self
.
metaStorage
.
updateBackend
(
backend
.
superBackend
,
startsection
=
[
PARSERTAG
+
'_section_control_parameters'
],
autoopenclose
=
False
)
#updateDict = {
# 'startSection' : [[PARSERTAG+'_section_input_output_files']],
# 'dictionary' : self.sectionInoutDict
# }
#self.metaStorage.update(updateDict)
#self.metaStorage.updateBackend(backend.superBackend,
# startsection=[PARSERTAG+'_section_input_output_files'],
# autoopenclose=False)
self
.
secRestrictGIndex
=
backend
.
superBackend
.
openSection
(
"section_restricted_uri"
)
restrictionsDict
=
get_updateDictionary
(
self
,
'restrictions'
)
updateDict
=
{
'startSection'
:
[[
'section_restricted_uri'
]],
'dictionary'
:
restrictionsDict
}
self
.
metaStorageRestrict
.
update
(
updateDict
)
self
.
metaStorageRestrict
.
updateBackend
(
backend
.
superBackend
,
startsection
=
[
'section_restricted_uri'
],
autoopenclose
=
False
)
backend
.
superBackend
.
closeSection
(
"section_restricted_uri"
,
self
.
secRestrictGIndex
)
def
onOpen_section_method
(
self
,
backend
,
gIndex
,
section
):
def
onOpen_section_method
(
self
,
backend
,
gIndex
,
section
):
# keep track of the latest method section
# keep track of the latest method section
...
@@ -2610,7 +2661,6 @@ class CHARMMParser(SmartParser.ParserBase):
...
@@ -2610,7 +2661,6 @@ class CHARMMParser(SmartParser.ParserBase):
cntrlNameList
=
getList_MetaStrInDict
(
self
.
metaDicts
[
'cntrl'
])
cntrlNameList
=
getList_MetaStrInDict
(
self
.
metaDicts
[
'cntrl'
])
filecntrlNameList
=
getList_MetaStrInDict
(
self
.
metaDicts
[
'filecntrl'
])
filecntrlNameList
=
getList_MetaStrInDict
(
self
.
metaDicts
[
'filecntrl'
])
fileNameList
=
getList_MetaStrInDict
(
self
.
metaDicts
[
'file'
])
extraNameList
=
getList_MetaStrInDict
(
self
.
metaDicts
[
'extra'
])
extraNameList
=
getList_MetaStrInDict
(
self
.
metaDicts
[
'extra'
])
self
.
enerOutputSubParsers
=
[
self
.
enerOutputSubParsers
=
[
...
...
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