From: <ha...@us...> - 2012-11-23 22:41:44
|
Revision: 17757 http://jmol.svn.sourceforge.net/jmol/?rev=17757&view=rev Author: hansonr Date: 2012-11-23 22:41:37 +0000 (Fri, 23 Nov 2012) Log Message: ----------- ___JmolVersion="13.1.9" Molden reade tweaks Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/quantum/BasisFunctionReader.java 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/BasisFunctionReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/quantum/BasisFunctionReader.java 2012-11-23 14:13:33 UTC (rev 17756) +++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/BasisFunctionReader.java 2012-11-23 22:41:37 UTC (rev 17757) @@ -186,6 +186,8 @@ return isOK; } + protected int nCoef; + protected int[][] getDfCoefMaps() { if (dfCoefMaps == null) dfCoefMaps = JmolAdapter.getNewDfCoefMap(); @@ -202,16 +204,19 @@ return tag; } - protected void fixSlaterTypes(int typeOld, int typeNew) { + protected int fixSlaterTypes(int typeOld, int typeNew) { // in certain cases we assume Cartesian and then later have to // correct that. if (shells == null) - return; + return 0; + nCoef = 0; for (int i = shells.size(); --i >=0 ;) { int[] slater = shells.get(i); if (slater[1] == typeOld) slater[1] = typeNew; + nCoef += getDfCoefMaps()[slater[1]].length; } + return nCoef; } Modified: trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java 2012-11-23 14:13:33 UTC (rev 17756) +++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java 2012-11-23 22:41:37 UTC (rev 17757) @@ -153,6 +153,7 @@ private BitSet bsAtomOK = new BitSet(); private BitSet bsBadIndex = new BitSet(); + private int[] nSPDF; private boolean readGaussianBasis() throws Exception { /* @@ -175,8 +176,8 @@ List<float[]> gdata = new ArrayList<float[]>(); int atomIndex = 0; int gaussianPtr = 0; - int nCoef = 0; - + nCoef = 0; + nSPDF = new int[12]; while (readLine() != null && !((line = line.trim()).length() == 0 || line.charAt(0) == '[')) { // First, expect the number of the atomic center @@ -195,15 +196,15 @@ // Next line has the shell label and a count of the number of primitives tokens = getTokens(); String shellLabel = tokens[0].toUpperCase(); + int type = JmolAdapter.getQuantumShellTagID(shellLabel); int nPrimitives = parseIntStr(tokens[1]); int[] slater = new int[4]; - + nSPDF[type]++; slater[0] = atomIndex; - slater[1] = JmolAdapter.getQuantumShellTagID(shellLabel); + slater[1] = type; slater[2] = gaussianPtr; slater[3] = nPrimitives; - nCoef += getDfCoefMaps()[slater[1]].length; - + nCoef += getDfCoefMaps()[type].length; for (int ip = nPrimitives; --ip >= 0;) { // Read ip primitives, each containing an exponent and one (s,p,d,f) // or two (sp) contraction coefficient(s) @@ -292,6 +293,12 @@ } float[] coefs = new float[data.size()]; + if (orbitalType.equals("") && coefs.length < nCoef) { + Logger.info("too few orbital coefficients for 6D"); + //implicit 5D. Try switching. + orbitalType = "[5D]"; + fixOrbitalType(); + } 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 2012-11-23 14:13:33 UTC (rev 17756) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2012-11-23 22:41:37 UTC (rev 17757) @@ -16,6 +16,7 @@ -- That is, displays the collective electron density (if occupied) -- if [...] is not given, groups orbitals by energy code: adding quotes to above properties allows them to be used in JavaScript; j2sNative in JmolConstants.java +bug fix: Molden reader tweaks bug fix: Jmol application toolbar picking tool should not select none bug fix: ellipsoid rendering fails bug fix: translucent echo oddities in Jmol 13.1.8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |