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-tinker
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-tinker
Commits
895b5013
Commit
895b5013
authored
Jan 29, 2019
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meta 2.0 changes, to fix
parent
b7ce9292
Pipeline
#42949
failed with stage
in 15 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
35 deletions
+35
-35
parser/parser-tinker/TINKERDictionary.py
parser/parser-tinker/TINKERDictionary.py
+26
-26
parser/parser-tinker/TINKERParser.py
parser/parser-tinker/TINKERParser.py
+8
-8
src/main/scala/eu/nomad_lab/parsers/TinkerParser.scala
src/main/scala/eu/nomad_lab/parsers/TinkerParser.scala
+1
-1
No files found.
parser/parser-tinker/TINKERDictionary.py
View file @
895b5013
...
...
@@ -388,7 +388,7 @@ def get_updateDictionary(self, defname):
# 'settings_geometry_optimization' : MetaInfoMap(startpage),
# 'settings_metadynamics' : MetaInfoMap(startpage),
# 'settings_molecular_dynamics' : MetaInfoMap(startpage),
# 'settings_
Monte_C
arlo' : MetaInfoMap(startpage),
# 'settings_
monte_c
arlo' : MetaInfoMap(startpage),
# 'geometry_optimization_energy_change' : MetaInfoMap(startpage,
# depends={
# '' : {'imin' : '1'},
...
...
@@ -603,9 +603,9 @@ def get_updateDictionary(self, defname):
# depends=[{'assign' : 'Force Field'}],
# lookupdict=self.mddataDict
# ),
'energy_
T
0_per_atom'
:
MetaInfoMap
(
startpage
),
'energy_total_
T
0_per_atom'
:
MetaInfoMap
(
startpage
),
'energy_total_
T
0'
:
MetaInfoMap
(
startpage
,
'energy_
t
0_per_atom'
:
MetaInfoMap
(
startpage
),
'energy_total_
t
0_per_atom'
:
MetaInfoMap
(
startpage
),
'energy_total_
t
0'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'value'
:
'E Potential'
}],
valtype
=
'float'
,
unitdict
=
self
.
unitDict
,
...
...
@@ -624,7 +624,7 @@ def get_updateDictionary(self, defname):
'hessian_matrix'
:
MetaInfoMap
(
startpage
),
'single_configuration_calculation_converged'
:
MetaInfoMap
(
startpage
),
'single_configuration_calculation_to_system_ref'
:
MetaInfoMap
(
startpage
),
'single_configuration_
to_calculation
_method_ref'
:
MetaInfoMap
(
startpage
),
'single_configuration_
calculation_to
_method_ref'
:
MetaInfoMap
(
startpage
),
'time_calculation'
:
MetaInfoMap
(
startpage
),
'time_single_configuration_calculation_cpu1_end'
:
MetaInfoMap
(
startpage
),
'time_single_configuration_calculation_cpu1_start'
:
MetaInfoMap
(
startpage
),
...
...
@@ -647,14 +647,14 @@ def get_updateDictionary(self, defname):
# section_single_energy_van_der_Waals of section_single_configuration_calculation
singlevdw
=
{
'energy_van_der_
W
aals_value'
:
MetaInfoMap
(
startpage
,
'energy_van_der_
w
aals_value'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'value'
:
'E Vdw'
}],
lookupdict
=
self
.
mddataDict
,
valtype
=
'float'
,
unitdict
=
self
.
unitDict
,
unit
=
'kcal/mol'
,
#autoSections=True,
activeSections
=
[
'section_energy_van_der_
W
aals'
]
activeSections
=
[
'section_energy_van_der_
w
aals'
]
),
}
...
...
@@ -705,13 +705,13 @@ def get_updateDictionary(self, defname):
# Definitions for section_frame_sequence
# ------------------------------------------
frameseq
=
{
#'frame_sequence_conserved_quantity_frames' : MetaInfoMap(startpage,
#'
xxx_to_rm_
frame_sequence_conserved_quantity_frames' : MetaInfoMap(startpage,
# depends=[{'store' : 'TS'}],
# valtype='int',
# lookupdict=self.mddataDict
# ),
#'frame_sequence_conserved_quantity_stats' : MetaInfoMap(startpage),
#'
frame_sequence
_conserved_quantity' : MetaInfoMap(startpage,
#'
xxx
_conserved_quantity' : MetaInfoMap(startpage,
# depends=[{'store' : ''}],
# valtype='float',
# unitdict=self.unitDict,
...
...
@@ -720,27 +720,27 @@ def get_updateDictionary(self, defname):
# ),
'frame_sequence_continuation_kind'
:
MetaInfoMap
(
startpage
),
'frame_sequence_external_url'
:
MetaInfoMap
(
startpage
),
'frame_sequence_kinetic_energy_frames'
:
MetaInfoMap
(
startpage
,
'
xxx_to_rm_
frame_sequence_kinetic_energy_frames'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'MD Step'
}],
valtype
=
'int'
,
lookupdict
=
self
.
mddataDict
),
'frame_sequence_kinetic_energy_stats'
:
MetaInfoMap
(
startpage
),
'
frame_sequence
_kinetic_energy'
:
MetaInfoMap
(
startpage
,
'
xxx
_kinetic_energy'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'E Kinetic'
}],
valtype
=
'float'
,
unitdict
=
self
.
unitDict
,
unit
=
'kcal/mol'
,
lookupdict
=
self
.
mddataDict
),
'frame_sequence_
local
_frames_ref'
:
MetaInfoMap
(
startpage
),
'frame_sequence_potential_energy_frames'
:
MetaInfoMap
(
startpage
,
'frame_sequence_
to
_frames_ref'
:
MetaInfoMap
(
startpage
),
'
xxx_to_rm_
frame_sequence_potential_energy_frames'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'MD Step'
}],
valtype
=
'int'
,
lookupdict
=
self
.
mddataDict
),
'frame_sequence_potential_energy_stats'
:
MetaInfoMap
(
startpage
),
'
frame_sequence
_potential_energy'
:
MetaInfoMap
(
startpage
,
'
xxx
_potential_energy'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'E Potential'
}],
valtype
=
'float'
,
unitdict
=
self
.
unitDict
,
...
...
@@ -759,13 +759,13 @@ def get_updateDictionary(self, defname):
# unit='atmosphere',
# lookupdict=self.mddataDict
# ),
'frame_sequence_pressure_frames'
:
MetaInfoMap
(
startpage
,
'
xxx_to_rm_
frame_sequence_pressure_frames'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'MD Step'
}],
valtype
=
'int'
,
lookupdict
=
self
.
mddataDict
),
'frame_sequence_pressure_stats'
:
MetaInfoMap
(
startpage
),
'
frame_sequence
_pressure'
:
MetaInfoMap
(
startpage
,
'
xxx_instant
_pressure'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'Pres'
}],
valtype
=
'float'
,
unitdict
=
self
.
unitDict
,
...
...
@@ -784,13 +784,13 @@ def get_updateDictionary(self, defname):
# unit='Kelvin',
# lookupdict=self.mddataDict
# ),
'frame_sequence_temperature_frames'
:
MetaInfoMap
(
startpage
,
'
xxx_to_rm_
frame_sequence_temperature_frames'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'MD Step'
}],
valtype
=
'int'
,
lookupdict
=
self
.
mddataDict
),
'frame_sequence_temperature_stats'
:
MetaInfoMap
(
startpage
),
'
frame_sequence
_temperature'
:
MetaInfoMap
(
startpage
,
'
xxx_instant
_temperature'
:
MetaInfoMap
(
startpage
,
depends
=
[{
'store'
:
'Temp'
}],
valtype
=
'float'
,
unitdict
=
self
.
unitDict
,
...
...
@@ -1001,7 +1001,7 @@ def get_updateDictionary(self, defname):
# unit='kilo-joule/mol',
# lookupdict=self.mddataDict
# ),
#'frame_sequence_to_sampling_ref' : MetaInfoMap(startpage),
#'frame_sequence_to_sampling_
method_
ref' : MetaInfoMap(startpage),
'geometry_optimization_converged'
:
MetaInfoMap
(
startpage
,
depends
=
[
{
'test'
:
[[
"MINI"
,
" is not None"
],
...
...
@@ -1020,7 +1020,7 @@ def get_updateDictionary(self, defname):
# value=(lambda x: np.array(x['val']).flatten().shape[0] if(
# x is not None and x['val'] is not None) else None)(
# self.metaStorage.fetchAttrValue(
# 'frame_sequence_conserved_quantity_frames'
# '
xxx_to_rm_
frame_sequence_conserved_quantity_frames'
# )
# )
# ),
...
...
@@ -1028,7 +1028,7 @@ def get_updateDictionary(self, defname):
value
=
(
lambda
x
:
np
.
array
(
x
[
'val'
]).
flatten
().
shape
[
0
]
if
(
x
is
not
None
and
x
[
'val'
]
is
not
None
)
else
None
)(
self
.
metaStorage
.
fetchAttrValue
(
'frame_sequence_potential_energy_frames'
'
xxx_to_rm_
frame_sequence_potential_energy_frames'
)
)
),
...
...
@@ -1036,7 +1036,7 @@ def get_updateDictionary(self, defname):
value
=
(
lambda
x
:
np
.
array
(
x
[
'val'
]).
flatten
().
shape
[
0
]
if
(
x
is
not
None
and
x
[
'val'
]
is
not
None
)
else
None
)(
self
.
metaStorage
.
fetchAttrValue
(
'frame_sequence_kinetic_energy_frames'
'
xxx_to_rm_
frame_sequence_kinetic_energy_frames'
)
)
),
...
...
@@ -1045,7 +1045,7 @@ def get_updateDictionary(self, defname):
value
=
(
lambda
x
:
np
.
array
(
x
[
'val'
]).
flatten
().
shape
[
0
]
if
(
x
is
not
None
and
x
[
'val'
]
is
not
None
)
else
None
)(
self
.
metaStorage
.
fetchAttrValue
(
'frame_sequence_potential_energy_frames'
'
xxx_to_rm_
frame_sequence_potential_energy_frames'
)
)
),
...
...
@@ -1054,7 +1054,7 @@ def get_updateDictionary(self, defname):
value
=
(
lambda
x
:
np
.
array
(
x
[
'val'
]).
flatten
().
shape
[
0
]
if
(
x
is
not
None
and
x
[
'val'
]
is
not
None
)
else
None
)(
self
.
metaStorage
.
fetchAttrValue
(
'frame_sequence_pressure_frames'
'
xxx_to_rm_
frame_sequence_pressure_frames'
)
)
),
...
...
@@ -1063,7 +1063,7 @@ def get_updateDictionary(self, defname):
value
=
(
lambda
x
:
np
.
array
(
x
[
'val'
]).
flatten
().
shape
[
0
]
if
(
x
is
not
None
and
x
[
'val'
]
is
not
None
)
else
None
)(
self
.
metaStorage
.
fetchAttrValue
(
'frame_sequence_temperature_frames'
'
xxx_to_rm_
frame_sequence_temperature_frames'
)
)
),
...
...
@@ -1188,7 +1188,7 @@ def get_updateDictionary(self, defname):
'number_of_symmetry_operations'
:
MetaInfoMap
(
startpage
),
'reduced_symmetry_matrices'
:
MetaInfoMap
(
startpage
),
'reduced_symmetry_translations'
:
MetaInfoMap
(
startpage
),
'
SC
_matrix'
:
MetaInfoMap
(
startpage
),
'
sc
_matrix'
:
MetaInfoMap
(
startpage
),
'spacegroup_3D_choice'
:
MetaInfoMap
(
startpage
),
'spacegroup_3D_hall'
:
MetaInfoMap
(
startpage
),
'spacegroup_3D_international'
:
MetaInfoMap
(
startpage
),
...
...
parser/parser-tinker/TINKERParser.py
View file @
895b5013
...
...
@@ -59,7 +59,7 @@ class TINKERParser(SmartParser.ParserBase):
# dictionary of energy values, which are tracked between SCF iterations and written after convergence
self
.
totalEnergyList
=
{
'energy_electrostatic'
:
None
,
'energy_total_
T
0_per_atom'
:
None
,
'energy_total_
t
0_per_atom'
:
None
,
'energy_free_per_atom'
:
None
,
}
SmartParser
.
ParserBase
.
__init__
(
...
...
@@ -268,8 +268,8 @@ class TINKERParser(SmartParser.ParserBase):
self
.
metaStorage
.
updateBackend
(
backend
.
superBackend
,
startsection
=
[
'section_frame_sequence'
],
autoopenclose
=
False
)
backend
.
addValue
(
"frame_sequence_to_sampling_ref"
,
self
.
secSamplingGIndex
)
backend
.
addArrayValues
(
"frame_sequence_
local
_frames_ref"
,
np
.
asarray
(
self
.
singleConfCalcs
))
backend
.
addValue
(
"frame_sequence_to_sampling_
method_
ref"
,
self
.
secSamplingGIndex
)
backend
.
addArrayValues
(
"frame_sequence_
to
_frames_ref"
,
np
.
asarray
(
self
.
singleConfCalcs
))
backend
.
closeSection
(
"section_frame_sequence"
,
frameSequenceGIndex
)
# reset all variables
...
...
@@ -905,16 +905,16 @@ class TINKERParser(SmartParser.ParserBase):
section_singlevdw_Dict
=
get_updateDictionary
(
self
,
'singlevdw'
)
#updateDictVDW = {
# 'startSection' : [
# ['section_energy_van_der_
W
aals']],
# ['section_energy_van_der_
w
aals']],
# #'muteSections' : [['section_sampling_method']],
# 'dictionary' : section_singlevdw_Dict
# }
#self.secVDWGIndex = backend.superBackend.openSection("section_energy_van_der_
W
aals")
#self.secVDWGIndex = backend.superBackend.openSection("section_energy_van_der_
w
aals")
#self.metaStorage.update(updateDictVDW)
#self.metaStorage.updateBackend(backend.superBackend,
# startsection=['section_energy_van_der_
W
aals'],
# startsection=['section_energy_van_der_
w
aals'],
# autoopenclose=False)
#backend.superBackend.closeSection("section_energy_van_der_
W
aals", self.secVDWGIndex)
#backend.superBackend.closeSection("section_energy_van_der_
w
aals", self.secVDWGIndex)
section_singlecalc_Dict
=
get_updateDictionary
(
self
,
'singleconfcalc'
)
updateDict
=
{
'startSection'
:
[
...
...
@@ -931,7 +931,7 @@ class TINKERParser(SmartParser.ParserBase):
#if callable(pos_obj):
if
self
.
trajectory
.
forces
is
not
None
:
# Forces in PDB/TINKER binary/DCD files are stored in kcal/mol/A
SloppyBackend
.
addArrayValues
(
'atom_forces'
,
np
.
transpose
(
np
.
asarray
(
SloppyBackend
.
addArrayValues
(
'atom_forces
_xxx
'
,
np
.
transpose
(
np
.
asarray
(
self
.
metaStorage
.
convertUnits
(
self
.
atompositions
.
velocities
,
"kilo-joule/(mol*nano-meter)"
,
self
.
unitDict
))))
# need to transpose array since its shape is [number_of_atoms,3] in the metadata
...
...
src/main/scala/eu/nomad_lab/parsers/TinkerParser.scala
View file @
895b5013
...
...
@@ -48,7 +48,7 @@ object TinkerParser extends SimpleExternalParserGenerator(
"parser-tinker/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/tinker.nomadmetainfo.json"
)
++
DefaultPythonInterpreter
.
commonFiles
(),
dirMap
=
Map
(
...
...
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