From: <ha...@us...> - 2006-11-05 23:27:24
|
Revision: 6101 http://svn.sourceforge.net/jmol/?rev=6101&view=rev Author: hansonr Date: 2006-11-05 15:27:12 -0800 (Sun, 05 Nov 2006) Log Message: ----------- fixes bug for not reading certain Gaussian 03 orbitals Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java trunk/Jmol/src/org/jmol/quantum/QuantumCalculation.java Modified: trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java 2006-11-05 23:07:46 UTC (rev 6100) +++ trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java 2006-11-05 23:27:12 UTC (rev 6101) @@ -143,11 +143,13 @@ || line.indexOf("Standard orientation:") >= 0) { if (++modelNumber != desiredModelNumber && desiredModelNumber > 0) { if (iHaveAtoms) - break; + break; continue; } equivalentAtomSets++; - logger.log(" model " + modelNumber + " step " + stepNumber+" equivalentAtomSet " + equivalentAtomSets + " calculation " + calculationNumber + " scan point " + scanPoint+line); + logger.log(" model " + modelNumber + " step " + stepNumber + + " equivalentAtomSet " + equivalentAtomSets + " calculation " + + calculationNumber + " scan point " + scanPoint + line); readAtoms(); iHaveAtoms = true; } else if (iHaveAtoms && line.startsWith(" Energy=")) { @@ -165,12 +167,18 @@ readPartialCharges(); } else if (iHaveAtoms && line.startsWith(" Standard basis:")) { logger.log(line); - moData.put("energyUnits",""); + moData.put("energyUnits", ""); moData.put("calculationType", line.substring(17).trim()); + } else if (iHaveAtoms + && line.startsWith(" General basis read from cards:")) { + logger.log(line); + moData.put("energyUnits", ""); + moData.put("calculationType", line.substring(31).trim()); } else if (iHaveAtoms && line.startsWith(" AO basis set:")) { readBasis(); atomSetCollection.setAtomSetAuxiliaryInfo("moData", moData); - } else if (iHaveAtoms && line.indexOf("Molecular Orbital Coefficients") >=0) { + } else if (iHaveAtoms + && line.indexOf("Molecular Orbital Coefficients") >= 0) { readMolecularOrbitals(); logger.log(orbitals.size() + " molecular orbitals read"); moData.put("mos", orbitals); Modified: trunk/Jmol/src/org/jmol/quantum/QuantumCalculation.java =================================================================== --- trunk/Jmol/src/org/jmol/quantum/QuantumCalculation.java 2006-11-05 23:07:46 UTC (rev 6100) +++ trunk/Jmol/src/org/jmol/quantum/QuantumCalculation.java 2006-11-05 23:27:12 UTC (rev 6101) @@ -179,6 +179,11 @@ } private boolean checkCalculationType() { + if (calculationType == null) { + Logger + .warn("calculation type not identified -- continuing"); + return true; + } if (calculationType.indexOf("5D") >= 0) { Logger .error("QuantumCalculation.checkCalculationType: can't read 5D basis sets yet: " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |