Skip to content

Commit 4a12a62

Browse files
committed
Wipe the output.html file from previous run by writing a blank one sooner.
As soon as the input file has been read in, we write an output file which has 0 species and 0 reactions. The species pictures etc. from the previous run have been wiped by this point already, but it can be confusing to have the previous output file still there when you're running a new job.
1 parent ca3b3bc commit 4a12a62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rmg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ def execute(args):
251251
# Read input file
252252
reactionModel, coreSpecies, reactionSystems, database, seedMechanisms = readInputFile(inputFile)
253253

254+
# Delete previous HTML file
255+
from rmgpy.rmg.output import saveOutputHTML
256+
saveOutputHTML(os.path.join(settings.outputDirectory, 'output.html'), reactionModel)
257+
254258
# Initialize reaction model
255259
if args.restart:
256260
reactionModel = loadRestartFile(os.path.join(settings.outputDirectory,'restart.pkl.gz'))
@@ -335,7 +339,6 @@ def execute(args):
335339

336340
# Save the current state of the model core to a pretty HTML file
337341
logging.info('Saving latest model core to HTML file...')
338-
from rmgpy.rmg.output import saveOutputHTML
339342
saveOutputHTML(os.path.join(settings.outputDirectory, 'output.html'), reactionModel)
340343

341344
# Save a Chemkin file containing the current model core

0 commit comments

Comments
 (0)