From: <ha...@us...> - 2013-08-20 04:14:40
|
Revision: 18601 http://sourceforge.net/p/jmol/code/18601 Author: hansonr Date: 2013-08-20 04:14:33 +0000 (Tue, 20 Aug 2013) Log Message: ----------- ___JmolVersion="13.3.4_dev_2013.08.19" bug fix: GAMESS reader not reading energies Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java 2013-08-20 04:14:11 UTC (rev 18600) +++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessReader.java 2013-08-20 04:14:33 UTC (rev 18601) @@ -40,6 +40,16 @@ abstract protected void readAtomsInBohrCoordinates() throws Exception; + protected void readEnergy() { + String[] tokens = getTokens(); + if (!tokens[1].equals("ENERGY") || tokens.length < 4) + return; + String strEnergy = tokens[3]; + float e = parseFloatStr(strEnergy); + if (!Float.isNaN(e)) + atomSetCollection.setAtomSetEnergy(strEnergy, e); + } + protected void readGaussianBasis(String initiator, String terminator) throws Exception { JmolList<String[]> gdata = new JmolList<String[]>(); gaussianCount = 0; Modified: trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java 2013-08-20 04:14:11 UTC (rev 18600) +++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/GamessUSReader.java 2013-08-20 04:14:33 UTC (rev 18601) @@ -91,6 +91,8 @@ @Override protected boolean checkLine() throws Exception { boolean isBohr; + if (line.indexOf("FINAL ENERGY IS") >= 0 || line.indexOf("TOTAL ENERGY = ") >= 0) + readEnergy(); if (line.indexOf("BASIS OPTIONS") >= 0){ readBasisInfo(); return true; Modified: trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java 2013-08-20 04:14:11 UTC (rev 18600) +++ trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java 2013-08-20 04:14:33 UTC (rev 18601) @@ -1940,6 +1940,7 @@ public void setAtomSetEnergy(String energyString, float value) { if (currentAtomSetIndex < 0) return; + Logger.info("Energy for model " + (currentAtomSetIndex + 1) + " = " + energyString); setAtomSetAuxiliaryInfo("EnergyString", energyString); setAtomSetAuxiliaryInfo("Energy", Float.valueOf(value)); setAtomSetModelProperty("Energy", "" + value); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-08-20 04:14:11 UTC (rev 18600) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-08-20 04:14:33 UTC (rev 18601) @@ -13,6 +13,7 @@ ___JmolVersion="13.3.4_dev_2013.08.19" +bug fix: GAMESS reader not reading energies bug fix: TRY failure in a load command followed by a successful load having a loadScript will pop past the second TRY and crash Jmol This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |