Revision: 18607
          http://sourceforge.net/p/jmol/code/18607
Author:   hansonr
Date:     2013-08-20 18:23:45 +0000 (Tue, 20 Aug 2013)
Log Message:
-----------
___JmolVersion="13.2.4_dev_2013.08.20b"

bug fix: GAMESS reader not reading energies

Modified Paths:
--------------
    branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java
    branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java

Modified: 
branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java
===================================================================
--- branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java  
2013-08-20 18:17:22 UTC (rev 18606)
+++ branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java  
2013-08-20 18:23:45 UTC (rev 18607)
@@ -41,10 +41,11 @@
   abstract protected void readAtomsInBohrCoordinates() throws Exception;  
  
   protected void readEnergy() {
-    String[] tokens = getTokens();
-    if (!tokens[1].equals("ENERGY") || tokens.length < 4)
+    //  ... ENERGY IS   or    ... ENERGY = 
+    String[] tokens = getTokensStr(line.substring(line.indexOf("ENERGY")));
+    if (tokens.length < 3)
       return;
-    String strEnergy = tokens[3];
+    String strEnergy = tokens[2];
     float e = parseFloatStr(strEnergy);
     if (!Float.isNaN(e))
       atomSetCollection.setAtomSetEnergy(strEnergy, e);

Modified: 
branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java
===================================================================
--- 
branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java    
    2013-08-20 18:17:22 UTC (rev 18606)
+++ 
branches/v13_2/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java    
    2013-08-20 18:23:45 UTC (rev 18607)
@@ -91,7 +91,8 @@
   @Override
   protected boolean checkLine() throws Exception {
     boolean isBohr;
-    if (line.indexOf("FINAL ENERGY IS") >= 0 || line.indexOf("TOTAL ENERGY = 
") >= 0)
+    if (line.indexOf("FINAL ENERGY IS") >= 0 || line.indexOf("TOTAL ENERGY = 
") >= 0
+        || line.indexOf("FINAL RHF ENERGY IS") >= 0)
       readEnergy();
     if (line.indexOf("BASIS OPTIONS") >= 0){
       readBasisInfo();

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


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to