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

meta 2.0 changes, to fix

parent 65077108
Pipeline #42638 failed with stage
in 15 minutes and 52 seconds
......@@ -696,7 +696,7 @@ def get_updateDictionary(self, defname):
# 'settings_geometry_optimization' : MetaInfoMap(startpage),
# 'settings_metadynamics' : MetaInfoMap(startpage),
# 'settings_molecular_dynamics' : MetaInfoMap(startpage),
# 'settings_Monte_Carlo' : MetaInfoMap(startpage),
# 'settings_monte_carlo' : MetaInfoMap(startpage),
# 'geometry_optimization_energy_change' : MetaInfoMap(startpage,
# depends={
# '' : {'imin' : '1'},
......@@ -883,9 +883,9 @@ def get_updateDictionary(self, defname):
# depends=[{'assign' : 'Force Field'}],
# lookupdict=self.mddataDict
# ),
'energy_T0_per_atom' : MetaInfoMap(startpage),
'energy_total_T0_per_atom' : MetaInfoMap(startpage),
'energy_total_T0' : MetaInfoMap(startpage),
'energy_t0_per_atom' : MetaInfoMap(startpage),
'energy_total_t0_per_atom' : MetaInfoMap(startpage),
'energy_total_t0' : MetaInfoMap(startpage),
'energy_total' : MetaInfoMap(startpage,
depends=[{'value' : 'Etot'}],
valtype='float',
......@@ -896,7 +896,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),
......@@ -910,14 +910,14 @@ def get_updateDictionary(self, defname):
# section_single_energy_van_der_Waals of section_single_configuration_calculation
singlevdw = {
'energy_van_der_Waals_value' : MetaInfoMap(startpage,
'energy_van_der_waals_value' : MetaInfoMap(startpage,
depends=[{'value' : 'VDWAALS'}],
lookupdict=self.mddataDict,
valtype='float',
unitdict=self.unitDict,
unit='kcal/mol',
#autoSections=True,
activeSections=['section_energy_van_der_Waals']
activeSections=['section_energy_van_der_waals']
),
}
......@@ -960,13 +960,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' : 'NSTEP'}],
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' : 'RESTRAINT'}],
valtype='float',
unitdict=self.unitDict,
......@@ -975,51 +975,51 @@ 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' : 'NSTEP'}],
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' : 'EKtot'}],
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' : 'NSTEP'}],
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' : 'EPtot'}],
valtype='float',
unitdict=self.unitDict,
unit='kcal/mol',
lookupdict=self.mddataDict
),
'frame_sequence_pressure_frames' : MetaInfoMap(startpage,
'xxx_to_rm_frame_sequence_pressure_frames' : MetaInfoMap(startpage,
depends=[{'store' : 'NSTEP'}],
valtype='int',
lookupdict=self.mddataDict
),
'frame_sequence_pressure_stats' : MetaInfoMap(startpage),
'frame_sequence_pressure' : MetaInfoMap(startpage,
'xxx_instant_pressure' : MetaInfoMap(startpage,
depends=[{'store' : 'PRESS'}],
valtype='float',
lookupdict=self.mddataDict
),
'frame_sequence_temperature_frames' : MetaInfoMap(startpage,
'xxx_to_rm_frame_sequence_temperature_frames' : MetaInfoMap(startpage,
depends=[{'store' : 'NSTEP'}],
valtype='int',
lookupdict=self.mddataDict
),
'frame_sequence_temperature_stats' : MetaInfoMap(startpage),
'frame_sequence_temperature' : MetaInfoMap(startpage,
'xxx_instant_temperature' : MetaInfoMap(startpage,
depends=[{'store' : 'TEMP\(K\)'}],
valtype='float',
unitdict=self.unitDict,
......@@ -1057,50 +1057,50 @@ def get_updateDictionary(self, defname):
unit='1.0/Angstrom**3',
lookupdict=self.mddataDict
),
#'frame_sequence_to_sampling_ref' : MetaInfoMap(startpage),
#'frame_sequence_to_sampling_method_ref' : MetaInfoMap(startpage),
'geometry_optimization_converged' : MetaInfoMap(startpage,
value=self.minConverged
),
'number_of_conserved_quantity_evaluations_in_sequence' : MetaInfoMap(startpage,
value=(lambda x: np.array(x).flatten().shape[0] if x is not None else None)(
self.metaStorage.fetchAttr(
{'frame_sequence_conserved_quantity_frames' : None}
)['frame_sequence_conserved_quantity_frames']['val']
{'xxx_to_rm_frame_sequence_conserved_quantity_frames' : None}
)['xxx_to_rm_frame_sequence_conserved_quantity_frames']['val']
)
),
'number_of_frames_in_sequence' : MetaInfoMap(startpage,
value=(lambda x: np.array(x).flatten().shape[0] if x is not None else None)(
self.metaStorage.fetchAttr(
{'frame_sequence_potential_energy_frames' : None}
)['frame_sequence_potential_energy_frames']['val']
{'xxx_to_rm_frame_sequence_potential_energy_frames' : None}
)['xxx_to_rm_frame_sequence_potential_energy_frames']['val']
)
),
'number_of_kinetic_energies_in_sequence' : MetaInfoMap(startpage,
value=(lambda x: np.array(x).flatten().shape[0] if x is not None else None)(
self.metaStorage.fetchAttr(
{'frame_sequence_kinetic_energy_frames' : None}
)['frame_sequence_kinetic_energy_frames']['val']
{'xxx_to_rm_frame_sequence_kinetic_energy_frames' : None}
)['xxx_to_rm_frame_sequence_kinetic_energy_frames']['val']
)
),
'number_of_potential_energies_in_sequence' : MetaInfoMap(startpage,
value=(lambda x: np.array(x).flatten().shape[0] if x is not None else None)(
self.metaStorage.fetchAttr(
{'frame_sequence_potential_energy_frames' : None}
)['frame_sequence_potential_energy_frames']['val']
{'xxx_to_rm_frame_sequence_potential_energy_frames' : None}
)['xxx_to_rm_frame_sequence_potential_energy_frames']['val']
)
),
'number_of_pressure_evaluations_in_sequence' : MetaInfoMap(startpage,
value=(lambda x: np.array(x).flatten().shape[0] if x is not None else None)(
self.metaStorage.fetchAttr(
{'frame_sequence_pressure_frames' : None}
)['frame_sequence_pressure_frames']['val']
{'xxx_to_rm_frame_sequence_pressure_frames' : None}
)['xxx_to_rm_frame_sequence_pressure_frames']['val']
)
),
'number_of_temperatures_in_sequence' : MetaInfoMap(startpage,
value=(lambda x: np.array(x).flatten().shape[0] if x is not None else None)(
self.metaStorage.fetchAttr(
{'frame_sequence_temperature_frames' : None}
)['frame_sequence_temperature_frames']['val']
{'xxx_to_rm_frame_sequence_temperature_frames' : None}
)['xxx_to_rm_frame_sequence_temperature_frames']['val']
)
),
#'previous_sequence_ref' : MetaInfoMap(startpage)
......@@ -1124,7 +1124,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),
......
......@@ -60,7 +60,7 @@ class AMBERParser(AmberC.AMBERParserBase):
# dictionary of energy values, which are tracked between SCF iterations and written after convergence
self.totalEnergyList = {
'energy_electrostatic': None,
'energy_total_T0_per_atom': None,
'energy_total_t0_per_atom': None,
'energy_free_per_atom': None,
}
AmberC.AMBERParserBase.__init__(
......@@ -433,8 +433,8 @@ class AMBERParser(AmberC.AMBERParserBase):
self.metaStorage.updateBackend(backend,
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
......@@ -603,7 +603,7 @@ class AMBERParser(AmberC.AMBERParserBase):
def onOpen_section_single_configuration_calculation(self, backend, gIndex, section):
# write the references to section_method and section_system
backend.addValue('single_configuration_to_calculation_method_ref', self.secMethodGIndex)
backend.addValue('single_configuration_calculation_to_method_ref', self.secMethodGIndex)
backend.addValue('single_configuration_calculation_to_system_ref', self.secSystemGIndex)
self.singleConfCalcs.append(gIndex)
self.secSingleGIndex = backend.superBackend.openSection("section_single_configuration_calculation")
......@@ -630,16 +630,16 @@ class AMBERParser(AmberC.AMBERParserBase):
section_singlevdw_Dict = get_updateDictionary(self, 'singlevdw')
updateDictVDW = {
'startSection' : [
['section_energy_van_der_Waals']],
['section_energy_van_der_waals']],
'muteSections' : [['section_sampling_method']],
'dictionary' : section_singlevdw_Dict
}
self.secVDWGIndex = backend.superBackend.openSection("section_energy_van_der_Waals")
self.secVDWGIndex = backend.superBackend.openSection("section_energy_van_der_waals")
self.metaStorage.update(updateDictVDW)
self.metaStorage.updateBackend(backend.superBackend,
startsection=['section_energy_van_der_Waals'],
startsection=['section_energy_van_der_waals'],
autoopenclose=False)
backend.superBackend.closeSection("section_energy_van_der_Waals", self.secVDWGIndex)
backend.superBackend.closeSection("section_energy_van_der_waals", self.secVDWGIndex)
section_singlecalc_Dict = get_updateDictionary(self, 'singleconfcalc')
updateDict = {
'startSection' : [
......@@ -673,10 +673,10 @@ class AMBERParser(AmberC.AMBERParserBase):
# forces_free.append(fi)
# if forces_free:
# # need to transpose array since its shape is [number_of_atoms,3] in the metadata
# backend.addArrayValues('atom_forces_free', np.transpose(np.asarray(forces_free)))
# backend.addArrayValues('atom_forces_xxx_free', np.transpose(np.asarray(forces_free)))
# if self.forces_raw:
# # need to transpose array since its shape is [number_of_atoms,3] in the metadata
# backend.addArrayValues('atom_forces_free_raw', np.transpose(np.asarray(self.forces_raw)))
# backend.addArrayValues('atom_forces_xxx_free_raw', np.transpose(np.asarray(self.forces_raw)))
def setStartingPointCalculation(self, parser):
backend = parser.backend
......
Supports Markdown
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