From: <ha...@us...> - 2010-04-28 21:11:19
|
Revision: 12966 http://jmol.svn.sourceforge.net/jmol/?rev=12966&view=rev Author: hansonr Date: 2010-04-28 21:11:13 +0000 (Wed, 28 Apr 2010) Log Message: ----------- version=12.0.RC9_dev # bug fix: CSF reader upgrade Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/quantum/CsfReader.java trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java Modified: trunk/Jmol/src/org/jmol/adapter/readers/quantum/CsfReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/quantum/CsfReader.java 2010-04-28 21:00:16 UTC (rev 12965) +++ trunk/Jmol/src/org/jmol/adapter/readers/quantum/CsfReader.java 2010-04-28 21:11:13 UTC (rev 12966) @@ -95,8 +95,6 @@ } public void finalizeReader() throws Exception { - for (int i = 0; i < nAtoms; i++) - atomSetCollection.getAtom(i).sequenceNumber = Integer.MIN_VALUE; super.finalizeReader(); } /* @@ -243,6 +241,7 @@ if (connectors.containsKey(thisBondID)) { int[] connect = (int[])connectors.get(thisBondID); connect[1] = thisAtomID; + System.out.println("*" + thisBondID + " " + thisAtomID); if (htBonds != null) { Bond bond = (Bond) htBonds.get(thisBondID); setBond(bond, connect); @@ -250,6 +249,7 @@ } else { int[] connect = new int[2]; connect[0] = thisAtomID; + System.out.println("" + thisBondID + " " + thisAtomID); connectors.put(thisBondID, connect); } } @@ -300,11 +300,11 @@ Logger.warn("field == null in " + line); switch (fieldTypes[i]) { case ID: - atom.sequenceNumber = Parser.parseInt(field); + atom.atomSerial = Parser.parseInt(field); break; case sym: atom.elementSymbol = field; - atom.atomName = field + atom.sequenceNumber; + atom.atomName = field + atom.atomSerial; break; case anum: strAtomicNumbers += field + " "; // for MO slater basis calc Modified: trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java 2010-04-28 21:00:16 UTC (rev 12965) +++ trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java 2010-04-28 21:11:13 UTC (rev 12966) @@ -1067,14 +1067,14 @@ boolean haveMappedSerials; void mapMostRecentAtomSerialNumber() { - // from ?? - if (atomCount == 0) + // from ?? + if (atomCount == 0) return; - int index = atomCount - 1; - int atomSerial = atoms[index].atomSerial; - if (atomSerial != Integer.MIN_VALUE) - atomSymbolicMap.put(new Integer(atomSerial), new Integer(index)); - haveMappedSerials = true; + int index = atomCount - 1; + int atomSerial = atoms[index].atomSerial; + if (atomSerial != Integer.MIN_VALUE) + atomSymbolicMap.put(new Integer(atomSerial), new Integer(index)); + haveMappedSerials = true; } public void createAtomSerialMap() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |