Skip to content

Commit 95cadef

Browse files
committed
Fix an error of too much -- when using custom parameters for the cluster
1 parent 4d8931c commit 95cadef

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Modules/Cluster.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,15 @@ def create_submission_script(self, labels):
442442

443443
# Append the additional parameters
444444
for add_parameter in self.custom_params:
445+
446+
adder_string = "--{}".format(add_parameter)
447+
if add_parameter.startswith("-"):
448+
adder_string = add_parameter
449+
445450
if self.custom_params[add_parameter] is None:
446-
submission += "#{} --{}\n".format(self.submit_name, add_parameter)
451+
submission += "#{} {}\n".format(self.submit_name, adder_string)
447452
else:
448-
submission += "#{} --{}={}\n".format(self.submit_name, add_parameter, self.custom_params[add_parameter])
453+
submission += "#{} {}={}\n".format(self.submit_name, adder_string, self.custom_params[add_parameter])
449454

450455

451456
# Add the set -x option

Modules/Optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def UpdateCell(self, unit_cell, stress_tensor, fix_volume = False, verbose = Tru
271271

272272

273273

274-
# Get the strain tensor up to know
274+
# Get the strain tensor up to now
275275
strain = np.transpose(self.uc_0_inv.dot(unit_cell) - I)
276276

277277
# Get the gradient with respect to the strain

0 commit comments

Comments
 (0)