Revision: 20438
          http://sourceforge.net/p/jmol/code/20438
Author:   hansonr
Date:     2015-04-07 16:55:48 +0000 (Tue, 07 Apr 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.3.13_2015.04.07" 

bug fix: Molden reader broken for Dalton2015 version

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java   
2015-04-07 16:55:16 UTC (rev 20437)
+++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java   
2015-04-07 16:55:48 UTC (rev 20438)
@@ -349,20 +349,27 @@
         }
         tokens = getMoTokens(null);
       }
+      int pt = 0;
       while (tokens != null && tokens.length > 0
           && parseIntStr(tokens[0]) != Integer.MIN_VALUE) {
         if (tokens.length != 2)
           throw new Exception("invalid MO coefficient specification");
         // tokens[0] is the function number, and tokens[1] is the coefficient
+        int i = parseIntStr(tokens[0]);
+        while (i > ++pt)
+          data.addLast("0");
         data.addLast(tokens[1]);
         tokens = getMoTokens(null);
       }
-
-      float[] coefs = new float[data.size()];
-      if (orbitalType.equals("") && coefs.length < nCoef) {
+      if (orbitalType.equals("") && data.size() < nCoef) {
         Logger.info("too few orbital coefficients for 6D");
         checkOrbitalType("[5D]");
       }
+      while (++pt <= nCoef) {
+        data.addLast("0");
+      }
+      
+      float[] coefs = new float[nCoef];
       for (int i = data.size(); --i >= 0;)
         coefs[i] = parseFloatStr(data.get(i));
       String l = line;

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-04-07 16:55:16 UTC 
(rev 20437)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-04-07 16:55:48 UTC 
(rev 20438)
@@ -14,9 +14,12 @@
 
 TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT 
command for problems)
 
+Jmol.___JmolVersion="14.3.13_2015.04.07" 
 
-Jmol.___JmolVersion="14.3.13_2015.04.05b" 
+bug fix: Molden reader broken for Dalton2015 version
 
+JmolVersion="14.3.13_2015.04.05b" 
+
 bug fix: language switching not working from popup menu;
 bug fix: language bundles not processed in the correct order for variants 
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to