From: <ha...@us...> - 2011-09-24 17:57:20
|
Revision: 16107 http://jmol.svn.sourceforge.net/jmol/?rev=16107&view=rev Author: hansonr Date: 2011-09-24 17:57:13 +0000 (Sat, 24 Sep 2011) Log Message: ----------- version=12.2.RC8_dev # bug fix: MOLDEN reader not reading spherical basis functions Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.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 2011-09-24 17:01:03 UTC (rev 16106) +++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/MoldenReader.java 2011-09-24 17:57:13 UTC (rev 16107) @@ -26,7 +26,8 @@ private boolean loadVibrations; private boolean vibOnly; private boolean optOnly; - + + private String orbitalType = ""; private int modelAtomCount; @Override @@ -46,19 +47,27 @@ @Override protected boolean checkLine() throws Exception { - if (line.indexOf("[Atoms]") >= 0 || line.indexOf("[ATOMS]") >= 0) { + if (!line.contains("[")) + return true; + line = line.toUpperCase().trim(); + if (!line.startsWith("[")) + return true; + Logger.info(line); + if (line.indexOf("[ATOMS]") == 0) { readAtoms(); modelAtomCount = atomSetCollection.getFirstAtomSetAtomCount(); return false; } - if (line.indexOf("[GTO]") >= 0) + if (line.indexOf("[GTO]") == 0) return readGaussianBasis(); - if (line.indexOf("[MO]") >= 0) + if (line.indexOf("[MO]") == 0) return (!readMolecularOrbitals || readMolecularOrbitals()); - if (line.indexOf("[FREQ]") >= 0) + if (line.indexOf("[FREQ]") == 0) return (!loadVibrations || readFreqsAndModes()); - if (line.indexOf("[GEOCONV]") >= 0) + if (line.indexOf("[GEOCONV]") == 0) return (!loadGeometries || readGeometryOptimization()); + if ("[5D][7F][9G]".indexOf(line) >= 0) + orbitalType += line; return true; } @@ -139,6 +148,10 @@ // Next line has the shell label and a count of the number of primitives tokens = getTokens(); String shellLabel = tokens[0].toUpperCase(); + if (shellLabel.equals("D") && orbitalType.contains("5D")) + shellLabel = "5D"; + if (shellLabel.equals("F") && orbitalType.contains("7F")) + shellLabel = "7F"; int nPrimitives = parseInt(tokens[1]); int[] slater = new int[4]; Modified: trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java 2011-09-24 17:01:03 UTC (rev 16106) +++ trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java 2011-09-24 17:57:13 UTC (rev 16107) @@ -449,7 +449,7 @@ String[] recordTags = fileStartsWithRecords[i]; for (int j = 1; j < recordTags.length; ++j) { String recordTag = recordTags[j]; - if (leader.startsWith(recordTag)) + if (leader.contains(recordTag)) return recordTags[0]; } } @@ -910,7 +910,7 @@ private final static int LEADER_CHAR_MAX = 10; private final static String[] cubeFileStartRecords = - {"Cube", "JVXL", "#JVXL"}; + {"Cube", "JVXL"}; private final static String[] mol2Records = {"Mol2", "mol2", "@<TRIPOS>"}; Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-09-24 17:01:03 UTC (rev 16106) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-09-24 17:57:13 UTC (rev 16107) @@ -3,6 +3,7 @@ version=12.2.RC8_dev +# bug fix: MOLDEN reader not reading spherical basis functions # bug fix: contact command not symmetric # Set A should generally be the ligand. However, consider note: # // check for O--H...N or O...H--N and not considering This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |