Skip to content

Commit

Permalink
Update aiidalab-eln
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioacl committed May 7, 2024
1 parent 3331f90 commit 4b1d7b4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions aiidalab_eln/openbis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def get_all_structures_and_geoopts(self, node):
if "GeoOpt" in current_node.label:
all_geoopts.append(current_node)
current_node = current_node.inputs.structure
elif "ORBITALS" in current_node.label:
elif "ORBITALS" in current_node.label or "STM" in current_node.label:
current_node = current_node.inputs.structure
else:
current_node = current_node.caller
Expand Down Expand Up @@ -340,11 +340,11 @@ def create_stm_simulations(self, stms_nodes, stms_inside_openbis, collection_ide

#TODO: Remove this is the future. Orbitals do not have stm_params
try:
stm_params = dict(stm.inputs.stm_params)
stm_params = dict(stm.inputs.spm_params)
stm_model.props = {
"emin-J": stm_params['--energy_range'][0] * 1.60217663e-19,
"emax-J": stm_params['--energy_range'][1] * 1.60217663e-19,
"de-J": stm_params['--energy_range'][2] * 1.60217663e-19
"emin-j": float(stm_params['--energy_range'][0]) * 1.60217663e-19,
"emax-j": float(stm_params['--energy_range'][1]) * 1.60217663e-19,
"de-j": float(stm_params['--energy_range'][2]) * 1.60217663e-19
}
except:
pass
Expand Down Expand Up @@ -432,8 +432,7 @@ def export_data(self):
if isinstance(self.node, orm.WorkChainNode):

# Get structure used in the Workchain
structure_stm = self.node.inputs.structure
all_aiida_stms = [structure_stm]
all_aiida_stms = [self.node]

# Verify which structures (atomistic models) are already in openBIS
all_aiida_stms, all_stms_inside_openbis = self.check_aiida_objects_in_openbis(all_aiida_stms, simulations_openbis)
Expand Down

0 comments on commit 4b1d7b4

Please sign in to comment.