From: <pie...@us...> - 2011-02-05 17:11:31
|
Revision: 15128 http://jmol.svn.sourceforge.net/jmol/?rev=15128&view=rev Author: pierocanepa Date: 2011-02-05 17:11:25 +0000 (Sat, 05 Feb 2011) Log Message: ----------- Fixed minor bugs into the CRYSTal class Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java Modified: trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java 2011-02-05 17:07:26 UTC (rev 15127) +++ trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java 2011-02-05 17:11:25 UTC (rev 15128) @@ -227,11 +227,11 @@ if (line.startsWith(" TOTAL ATOMIC CHARGES")) return readTotalAtomicCharges(); - if (addVibrations && line.indexOf("EIGENVALUES (EV) OF THE MASS") >= 0 + if (addVibrations && line.contains(isVersion3 ? "EIGENVALUES (EV) OF THE MASS": "EIGENVALUES (EIGV) OF THE MASS") || line.indexOf("LONGITUDINAL OPTICAL (LO)") >= 0) { if (vInputCoords != null) processInputCoords(); - isLongMode = (line.indexOf("LONGITUDINAL OPTICAL (LO)") >= 0); + isLongMode = (line.indexOf("LONGITUDINAL OPTICAL (LO)") >= 0); return readFrequencies(); } @@ -830,9 +830,11 @@ 41- 43 0.9004E-06 208.2551 6.2433 (F1U) 244.7 10.821 0.3244 */ private boolean readFrequencies() throws Exception { + energy = null; // don't set energy for these models discardLinesUntilContains("MODES"); - boolean haveIntensities = (line.indexOf("INTENS") >= 0); + // This line is always there + boolean haveIntensities = (line.indexOf("INTENS") >= 0); readLine(); List<String[]> vData = new ArrayList<String[]>(); int freqAtomCount = atomCount; @@ -840,7 +842,7 @@ int i0 = parseInt(line.substring(1, 5)); int i1 = parseInt(line.substring(6, 10)); String irrep = (isLongMode ? line.substring(48, 51) : line.substring(49, - 52)).trim(); + 52)).trim(); String intens = (!haveIntensities ? "not available" : (isLongMode ? line.substring(53, 61) : line.substring(59, 69).replace(')', ' ')).trim()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |