Skip to content
Snippets Groups Projects
Commit 60313c37 authored by richard_berger's avatar richard_berger
Browse files

Fixed 2 Bugs in the setupCalculation function

1.  ensure_adsorbate_after_substrate now also works with configuration SETS.

2. For a single Configuration object the hash is now provided via configuration.getHash(). This ensures that the folder of the calculation matches the hash name
parent e48cfdbf
No related branches found
No related tags found
No related merge requests found
......@@ -565,7 +565,9 @@ def setupCalculation(config,
substrate_control_file = ControlFile(substrate_control_file)
if type(config).__name__ == 'Configuration':
h = config.getUntransformedHash()
#h = config.getUntransformedHash()
#R.B. bugfix -> the above seems to be unreasonable and gives the wrong hash for the calculation folder name
h = config.getHash()
elif type(config).__name__ == 'tuple':
h = config
config = proj.getConfiguration(h)
......@@ -594,7 +596,8 @@ def setupCalculation(config,
add_area_prefix=add_area_prefix,
substrate_displacements=substrate_displacements,
only_substrates=only_substrates,
remove_atoms_below_threshold=remove_atoms_below_threshold)
remove_atoms_below_threshold=remove_atoms_below_threshold,
ensure_adsorbate_after_substrate=ensure_adsorbate_after_substrate)
if verbose: print("list_of_calc_dirs: ", list_of_calc_dirs)
return list_of_calc_dirs
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment