Skip to content

Commit 8f0952d

Browse files
committed
Fixed the same error as previous commit in another part of the code
1 parent 95cadef commit 8f0952d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Modules/Cluster.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,16 @@ def run_atoms(self, ase_calc, ase_atoms, label="ESP",
835835

836836
# Append the additional parameters
837837
for add_parameter in self.custom_params:
838-
submission += "#{} --{}={}\n".format(self.submit_name, add_parameter, self.custom_params[add_parameter])
839-
838+
839+
adder_string = "--{}".format(add_parameter)
840+
if add_parameter.startswith("-"):
841+
adder_string = add_parameter
842+
843+
if self.custom_params[add_parameter] is None:
844+
submission += "#{} {}\n".format(self.submit_name, adder_string)
845+
else:
846+
submission += "#{} {}={}\n".format(self.submit_name, adder_string, self.custom_params[add_parameter])
847+
840848
# Add the loading of the modules
841849
submission += self.load_modules + "\n"
842850

0 commit comments

Comments
 (0)