From: <ha...@us...> - 2011-02-03 03:47:15
|
Revision: 15110 http://jmol.svn.sourceforge.net/jmol/?rev=15110&view=rev Author: hansonr Date: 2011-02-03 03:47:09 +0000 (Thu, 03 Feb 2011) Log Message: ----------- NWChem reader fix for random message exclusion Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/quantum/NWChemReader.java trunk/Jmol/src/org/jmol/export/_ObjExporter.java Modified: trunk/Jmol/src/org/jmol/adapter/readers/quantum/NWChemReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/quantum/NWChemReader.java 2011-02-02 19:47:15 UTC (rev 15109) +++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/NWChemReader.java 2011-02-03 03:47:09 UTC (rev 15110) @@ -534,10 +534,12 @@ // first skip over the dummy atoms (not sure whether that really is needed..) while (atoms[i].elementNumber == 0) ++i; - // assign the partial charge - if (readLine() == null) - return; - tokens = getTokens(); + do { + // assign the partial charge + if (readLine() == null || line.length() < 3) + return; + tokens = getTokens(); + } while (tokens[0].indexOf(".") >= 0); atoms[i].partialCharge = parseInt(tokens[2]) - parseFloat(tokens[3]); } } @@ -913,4 +915,35 @@ energyUnits = "a.u."; setMOData(false); } + + /* +------------------------------------------------------------ +EAF file 0: "./CeO2-ECP-RHF.aoints.0" size=19922944 bytes +------------------------------------------------------------ + write read awrite aread wait + ----- ---- ------ ----- ---- + calls: 38 15 0 555 555 + data(b): 1.99e+07 7.86e+06 0.00e+00 2.91e+08 + time(s): 5.03e-02 3.82e-03 0.00e+00 1.17e-01 5.40e-05 +rate(mb/s): 3.96e+02 2.06e+03 0.00e+00* 2.49e+03* +------------------------------------------------------------ +* = Effective rate. Full wait time used for read and write. + + */ + + private boolean purging; + @Override + public String readLine() throws Exception { + super.readLine(); + if (!purging && line != null && line.startsWith("--")) { + purging = true; + discardLinesUntilStartsWith("*"); + readLine(); + purging = false; + super.readLine(); + } + return line; + } + + } Modified: trunk/Jmol/src/org/jmol/export/_ObjExporter.java =================================================================== --- trunk/Jmol/src/org/jmol/export/_ObjExporter.java 2011-02-02 19:47:15 UTC (rev 15109) +++ trunk/Jmol/src/org/jmol/export/_ObjExporter.java 2011-02-03 03:47:09 UTC (rev 15110) @@ -999,6 +999,5 @@ } output("\n"); } - } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |