@@ -463,6 +463,8 @@ public molFile embed3D(molFile twoDmolFile, int numConfAttempts){
463
463
System .out .println ("RDKit received error (see above) on " + twoDmolFile .getName ()+". File was probably not written." );
464
464
}
465
465
int exitValue = pythonProc .waitFor ();
466
+ pythonProc .getInputStream ().close ();
467
+ pythonProc .getOutputStream ().close ();
466
468
br .close ();
467
469
isr .close ();
468
470
is .close ();
@@ -614,6 +616,8 @@ public int createGaussianPM3Input(String name, String directory, molFile p_molfi
614
616
//do nothing
615
617
}
616
618
int exitValue = babelProc .waitFor ();
619
+ babelProc .getErrorStream ().close ();
620
+ babelProc .getOutputStream ().close ();
617
621
br .close ();
618
622
isr .close ();
619
623
is .close ();
@@ -718,6 +722,8 @@ public int createMM4Input(String name, String directory, molFile p_molfile, int
718
722
//do nothing
719
723
}
720
724
int exitValue = molecoorProc .waitFor ();
725
+ molecoorProc .getErrorStream ().close ();
726
+ molecoorProc .getOutputStream ().close ();
721
727
br .close ();
722
728
isr .close ();
723
729
is .close ();
@@ -1000,6 +1006,8 @@ else if(attemptNumber%scriptAttempts==0){//used for troublesome HGRZRPHFLAXXBT-U
1000
1006
//do nothing
1001
1007
}
1002
1008
int exitValue = babelProc .waitFor ();
1009
+ babelProc .getErrorStream ().close ();
1010
+ babelProc .getOutputStream ().close ();
1003
1011
br .close ();
1004
1012
isr .close ();
1005
1013
is .close ();
@@ -1046,6 +1054,8 @@ public int runGaussian(String name, String directory){
1046
1054
System .out .println ("Gaussian process received error (see above) on " + name );
1047
1055
}
1048
1056
int exitValue = gaussianProc .waitFor ();
1057
+ gaussianProc .getInputStream ().close ();
1058
+ gaussianProc .getOutputStream ().close ();
1049
1059
br .close ();
1050
1060
isr .close ();
1051
1061
is .close ();
@@ -1142,6 +1152,8 @@ public int runMM4(String name, String directory){
1142
1152
1143
1153
1144
1154
int exitValue = mm4Proc .waitFor ();
1155
+ mm4Proc .getErrorStream ().close ();
1156
+ mm4Proc .getOutputStream ().close ();
1145
1157
br .close ();
1146
1158
isr .close ();
1147
1159
is .close ();
@@ -1241,6 +1253,8 @@ public void runMM4Rotor(String name, String directory, int rotors){
1241
1253
1242
1254
1243
1255
int exitValue = mm4Proc .waitFor ();
1256
+ mm4Proc .getErrorStream ().close ();
1257
+ mm4Proc .getOutputStream ().close ();
1244
1258
br .close ();
1245
1259
isr .close ();
1246
1260
is .close ();
@@ -1283,6 +1297,8 @@ public int runMOPAC(String name, String directory){
1283
1297
System .out .println ("MOPAC process received error (see above) on " + name );
1284
1298
}
1285
1299
int exitValue = mopacProc .waitFor ();
1300
+ mopacProc .getInputStream ().close ();
1301
+ mopacProc .getOutputStream ().close ();
1286
1302
br .close ();
1287
1303
isr .close ();
1288
1304
is .close ();
@@ -1596,6 +1612,8 @@ public QMData performCanThermCalcs(String name, String directory, ChemGraph p_ch
1596
1612
}
1597
1613
1598
1614
int exitValue = canProc .waitFor ();
1615
+ canProc .getErrorStream ().close ();
1616
+ canProc .getOutputStream ().close ();
1599
1617
br .close ();
1600
1618
isr .close ();
1601
1619
is .close ();
@@ -1785,6 +1803,8 @@ public ThermoData getPM3MM4ThermoDataUsingCCLib(String name, String directory, C
1785
1803
//do nothing (there shouldn't be any more information, but this is included to get all the output)
1786
1804
}
1787
1805
int exitValue = cclibProc .waitFor ();
1806
+ cclibProc .getErrorStream ().close ();
1807
+ cclibProc .getOutputStream ().close ();
1788
1808
br .close ();
1789
1809
isr .close ();
1790
1810
is .close ();
@@ -1995,6 +2015,8 @@ else if (attemptNumber==4){
1995
2015
}
1996
2016
}
1997
2017
int exitValue = symmProc .waitFor ();
2018
+ symmProc .getErrorStream ().close ();
2019
+ symmProc .getOutputStream ().close ();
1998
2020
br .close ();
1999
2021
isr .close ();
2000
2022
is .close ();
@@ -2730,6 +2752,8 @@ public QMData getQMDataWithCClib(String name, String directory, ChemGraph p_chem
2730
2752
//do nothing (there shouldn't be any more information, but this is included to get all the output)
2731
2753
}
2732
2754
int exitValue = cclibProc .waitFor ();
2755
+ cclibProc .getErrorStream ().close ();
2756
+ cclibProc .getOutputStream ().close ();
2733
2757
br .close ();
2734
2758
isr .close ();
2735
2759
is .close ();
0 commit comments