Skip to content

Commit 714f768

Browse files
committed
Flush QM library files so incomplete jobs save their data.
Previously you could lose a lot of data if the job finished and the buffered file writers had not written recently.
1 parent 305fdf1 commit 714f768

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/RMG/jing/chem/QMLibraryEditor.java

+2
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public static void addLibraryEntry(String inChI, ThermoData qmResult, String qmM
155155
//write to Library.txt
156156
try {
157157
libraryFile.write(line + newLine);
158+
libraryFile.flush();
158159
}
159160
catch (IOException e) {
160161
// What should we do here?
@@ -178,6 +179,7 @@ public static void addDictionaryEntry(String inChI, ChemGraph p_graph) {
178179
//write to Dictionary.txt
179180
try {
180181
dictionaryFile.write(definition);
182+
dictionaryFile.flush();
181183
}
182184
catch (IOException e) {
183185
// What should we do here?

0 commit comments

Comments
 (0)