From: <ha...@us...> - 2007-11-30 00:04:24
|
Revision: 8695 http://jmol.svn.sourceforge.net/jmol/?rev=8695&view=rev Author: hansonr Date: 2007-11-29 16:04:20 -0800 (Thu, 29 Nov 2007) Log Message: ----------- version=11.3.50 # new feature: MOL isotope column read; interpreted for D, T, 11C, 13C, 15N (for now) Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java 2007-11-29 23:01:28 UTC (rev 8694) +++ trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java 2007-11-30 00:04:20 UTC (rev 8695) @@ -40,6 +40,8 @@ * </a> *<p> * + * also: http://www.mdl.com/downloads/public/ctfile/ctfile.pdf + * * simple symmetry extension via load command: * 9/2006 ha...@st... * @@ -173,6 +175,8 @@ } } + private final String isotopeMap0 = "H1 H2 C-1 C1 N1 "; + private final String isotopeMap1 = "D T 11C 13C 15N "; void readAtoms(int atomCount) throws Exception { for (int i = 0; i < atomCount; ++i) { readLine(); @@ -188,9 +192,12 @@ float z = parseFloat(line, 20, 30); int charge = 0; if (line.length() >= 39) { - int chargeCode = parseInt(line, 36, 39); - if (chargeCode >= 1 && chargeCode <= 7) - charge = 4 - chargeCode; + int code = parseInt(line, 36, 39); + if (code >= 1 && code <= 7) + charge = 4 - code; + code = parseInt(line, 34, 36); + if (code >= -3 && code <= 4 && (code = isotopeMap0.indexOf(elementSymbol + code)) >= 0) + elementSymbol = isotopeMap1.substring(code, code + 3).trim(); } Atom atom = atomSetCollection.addNewAtom(); atom.elementSymbol = elementSymbol; Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2007-11-29 23:01:28 UTC (rev 8694) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2007-11-30 00:04:20 UTC (rev 8695) @@ -1,5 +1,6 @@ version=11.3.50 - + +# new feature: MOL isotope column read; interpreted for D, T, 11C, 13C, 15N (for now) # bug fix: WebExport not properly accessing files in more complicated situations (pmesh, isosurface, multiple files, etc.) # bug fix: WebExport not allowing variety of local location options Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2007-11-29 23:01:28 UTC (rev 8694) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2007-11-30 00:04:20 UTC (rev 8695) @@ -804,6 +804,7 @@ 55, (2 << 7) + 1, // D = 2*128 + 1 <-- firstIsotope (3 << 7) + 1, // T = 3*128 + 1 + (11 << 7) + 6, // 11C (13 << 7) + 6, // 13C (14 << 7) + 6, // 14C (15 << 7) + 7, // 15N @@ -817,6 +818,7 @@ "Cs", "D", "T", + "11C", "13C", "14C", "15N", @@ -832,6 +834,7 @@ "", "", "", + "", }; public final static int[] altArgbsCpk = { @@ -841,6 +844,7 @@ 0xFF57178F, // Cs 55 0xFFFFFFC0, // D 2H 0xFFFFFFA0, // T 3H + 0xFFD8D8D8, // 11C 6 - lighter 0xFF505050, // 13C 6 - darker 0xFF404040, // 14C 6 - darker still 0xFF105050, // 15N 7 - darker This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |