Skip to content

Commit de48ee7

Browse files
committed
PEP
1 parent 531ce9d commit de48ee7

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

hpctestlib/sciapps/metalwalls/benchmarks.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
address_tpl = (
1212
'https://gitlab.com/ampere2/metalwalls/-/raw/{version}/{bench}/{file}'
13-
'?ref_type=tags\&inline=false'
13+
'?ref_type=tags&inline=false'
1414
)
1515

1616
extract_fields = [
@@ -95,7 +95,11 @@
9595

9696
#######
9797
('Ions Coulomb electric field gradient', 'long range', 'Ions Cfield grad'),
98-
('Ions Coulomb electric field gradient', 'short range', 'Ions Cfield grad'),
98+
(
99+
'Ions Coulomb electric field gradient',
100+
'short range',
101+
'Ions Cfield grad'
102+
),
99103
('Ions Coulomb electric field gradient', 'self', 'Ions Cfield grad'),
100104

101105
#######
@@ -130,11 +134,12 @@
130134
('Diagnostics', 'IO', 'Diagnostics'),
131135
]
132136

137+
133138
@rfm.simple_test
134139
class MetalWallsCheck(rfm.RunOnlyRegressionTest):
135140
"""MetalWalls benchmark test.
136-
137-
`MetalWalls <https://gitlab.com/ampere2/metalwalls>`__ is a molecular
141+
142+
`MetalWalls <https://gitlab.com/ampere2/metalwalls>`__ is a molecular
138143
dynamics code dedicated to the modelling of electrochemical systems.
139144
Its main originality is the inclusion of a series of methods allowing to
140145
apply a constant potential within the electrode materials.
@@ -143,7 +148,7 @@ class MetalWallsCheck(rfm.RunOnlyRegressionTest):
143148
number of atoms and the type of simulation performed.
144149
They can be found in the following repository, which is also versioned:
145150
https://gitlab.com/ampere2/metalwalls/.
146-
151+
147152
"""
148153

149154
#: The name of the output files to keep.
@@ -200,14 +205,14 @@ def total_elapsed_time(self):
200205
"""Extract the total elapsed time from the output file"""
201206
return sn.extractsingle(
202207
r'Total elapsed time:\s+(?P<time>\S+)', 'run.out', 'time', float
203-
)
208+
)
204209

205210
@performance_function('s')
206211
def extract_time(
207212
self, name: str = None, parent: str = None, kind: str = None
208-
) -> float:
213+
) -> float:
209214
"""Extract the time from a specific report section of the output file
210-
215+
211216
Args:
212217
name (str): The name of the report to extract
213218
parent (str): The parent section of the report
@@ -220,13 +225,13 @@ def extract_time(
220225
tag = 2
221226
else:
222227
raise ValueError(f'Unknown kind: {kind}')
223-
228+
224229
# Example Fromat:
225230
# Ions->Atoms Coulomb potential
226231
# -----------------------------
227-
# long range 9.55040E-03 9.64590E-01 0.71
228-
# k==0 2.48271E-02 2.50754E+00 1.84
229-
# short range 8.72464E-02 8.81189E+00 6.46
232+
# long range 9.55040E-03 9.64590E-01 0.71
233+
# k==0 2.48271E-02 2.50754E+00 1.84
234+
# short range 8.72464E-02 8.81189E+00 6.46
230235
#
231236
# NEXT SECTION
232237
res = -1

0 commit comments

Comments
 (0)