@@ -197,8 +197,9 @@ Add the same lines at the top of the *MinimizeEnergy.py* file:
197197Test the code
198198-------------
199199
200- One can use the same test as previously, and ask the code to print information
201- every 10 steps in the dump files, as well as in the log:
200+ One can use a test similar as the previous ones. Let us ask out code to print
201+ information in the dump and the log files, and then let us assert the
202+ files were indeed created without the *Outputs/ * folder:
202203
203204.. label :: start_test_5a_class
204205
@@ -208,8 +209,8 @@ every 10 steps in the dump files, as well as in the log:
208209 from MinimizeEnergy import MinimizeEnergy
209210
210211 min = MinimizeEnergy(maximum_steps = 100 ,
211- thermo_period = 10 ,
212- dumping_period = 10 ,
212+ thermo_period = 25 ,
213+ dumping_period = 25 ,
213214 thermo_outputs = " Epot-MaxF" ,
214215 number_atoms = [2 , 3 ],
215216 epsilon = [0.1 , 1.0 ], # kcal/mol
@@ -220,19 +221,19 @@ every 10 steps in the dump files, as well as in the log:
220221 )
221222 min .run()
222223
223- assert os.path.exists(" Outputs/dump.min.lammpstrj" )
224+ assert os.path.exists(" Outputs/dump.min.lammpstrj" ), f " Test failed: dump file was not created "
225+ assert os.path.exists(" Outputs/simulation.log" ), f " Test failed: log file was not created "
224226
225227 .. label :: end_test_5a_class
226228
227- When running the simulation, information must be printed in the terminal:
229+ I addition to the files getting created, information must be printed in the terminal
230+ during the similation:
228231
229232.. code-block :: bw
230233
231- step Epot (kcal/mol) MaxF (kcal/A/mol)
232- 0, -1.40, 14.19
233- 10, -1.80, 17.98
234- 20, -2.37, 2.65
235- 30, -2.50, 4.00
236- (...)
237-
238- and a file named *dump.min.lammpstrj * must have appeared in the *Outputs/ * folder.
234+ step Epot MaxF
235+ 0 -0.17 1.93
236+ 25 -1.08 1.81
237+ 50 -1.11 1.42
238+ 75 -1.22 3.77
239+ 100 -2.10 1.28
0 commit comments