Skip to content

Commit ec3544d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 44c6d77 commit ec3544d

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

dpti/hti_liq.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ def parse_lj_sigma_epsilon(ret, sparam, hybrid=False):
5454
for i, j in sigma_key_index:
5555
epsilon_ij[i, j] = epsilon
5656
else:
57-
assert (
58-
epsilon_0_0 is not None
59-
), "epsilon or epsilon_0_0 must be set"
57+
assert epsilon_0_0 is not None, "epsilon or epsilon_0_0 must be set"
6058
for i, j in sigma_key_index:
6159
epsilon_ij[i, j] = sparam["epsilon_" + str(i) + "_" + str(j)]
6260

@@ -76,26 +74,17 @@ def parse_lj_sigma_epsilon(ret, sparam, hybrid=False):
7674
for i, j in sigma_key_index:
7775
activation_ij[i, j] = activation
7876
else:
79-
assert (
80-
activation_0_0 is not None
81-
), "activation or activation_0_0 must be set"
77+
assert activation_0_0 is not None, "activation or activation_0_0 must be set"
8278
for i, j in sigma_key_index:
8379
activation_ij[i, j] = sparam["activation_" + str(i) + "_" + str(j)]
84-
80+
8581
if hybrid:
8682
pair_coeff_str = "lj/cut/soft "
8783
else:
8884
pair_coeff_str = ""
8985

9086
for i, j in sigma_key_index:
91-
ret += "pair_coeff {} {} {:s}{:f} {:f} {:f}\n".format(
92-
i + 1,
93-
j + 1,
94-
pair_coeff_str,
95-
epsilon_ij[i, j],
96-
sigma_ij[i, j],
97-
activation_ij[i, j],
98-
)
87+
ret += f"pair_coeff {i + 1} {j + 1} {pair_coeff_str:s}{epsilon_ij[i, j]:f} {sigma_ij[i, j]:f} {activation_ij[i, j]:f}\n"
9988
return ret
10089

10190

0 commit comments

Comments
 (0)