From: <eg...@us...> - 2006-11-22 22:48:14
|
Revision: 7339 http://svn.sourceforge.net/cdk/?rev=7339&view=rev Author: egonw Date: 2006-11-22 14:48:12 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Adding a PubChem Compound ASN reader. Added Paths: ----------- trunk/cdk/src/data/pc-asn/ trunk/cdk/src/data/pc-asn/cid1.asn trunk/cdk/src/org/openscience/cdk/io/formats/PubChemASNFormat.java Added: trunk/cdk/src/data/pc-asn/cid1.asn =================================================================== --- trunk/cdk/src/data/pc-asn/cid1.asn (rev 0) +++ trunk/cdk/src/data/pc-asn/cid1.asn 2006-11-22 22:48:12 UTC (rev 7339) @@ -0,0 +1,545 @@ +PC-Compound ::= { + id { + id cid 1 + }, + atoms { + aid { + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31 + }, + element { + o, + o, + o, + o, + n, + c, + c, + c, + c, + c, + c, + c, + c, + c, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h, + h + }, + charge { + { + aid 2, + value -1 + }, + { + aid 5, + value 1 + } + } + }, + bonds { + aid1 { + 1, + 1, + 2, + 3, + 4, + 5, + 5, + 5, + 5, + 6, + 6, + 6, + 7, + 7, + 8, + 8, + 8, + 9, + 9, + 9, + 10, + 10, + 10, + 11, + 11, + 11, + 13, + 14, + 14, + 14 + }, + aid2 { + 7, + 13, + 12, + 12, + 13, + 6, + 8, + 9, + 10, + 7, + 15, + 16, + 11, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 12, + 27, + 28, + 14, + 29, + 30, + 31 + }, + order { + single, + single, + single, + double, + double, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single, + single + } + }, + stereo { + tetrahedral { + center 7, + above 1, + top 6, + bottom 11, + below 17, + parity any, + type tetrahedral + } + }, + coords { + { + type { + twod, + computed, + units-unknown + }, + aid { + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31 + }, + conformers { + { + x { + { 37320508956909, 10, -13 }, + { 2, 10, 0 }, + { 37320508956909, 10, -13 }, + { 2, 10, 0 }, + { 54641017913818, 10, -13 }, + { 45980763435364, 10, -13 }, + { 37320508956909, 10, -13 }, + { 63301272392273, 10, -13 }, + { 59641017913818, 10, -13 }, + { 49641017913818, 10, -13 }, + { 28660254478455, 10, -13 }, + { 28660254478455, 10, -13 }, + { 28660254478455, 10, -13 }, + { 28660254478455, 10, -13 }, + { 41995482444763, 10, -13 }, + { 49966044425964, 10, -13 }, + { 42689867019653, 10, -13 }, + { 60201272964478, 10, -13 }, + { 68670630455017, 10, -13 }, + { 66401271820068, 10, -13 }, + { 65010375976562, 10, -13 }, + { 62741017341614, 10, -13 }, + { 54271659851074, 10, -13 }, + { 44271659851074, 10, -13 }, + { 46541018486023, 10, -13 }, + { 55010375976562, 10, -13 }, + { 22554445266724, 10, -13 }, + { 2653972864151, 10, -12 }, + { 22460255622864, 10, -13 }, + { 28660254478455, 10, -13 }, + { 34860253334045, 10, -13 } + }, + y { + { -75, 10, -2 }, + { 225, 10, -2 }, + { 225, 10, -2 }, + { -75, 10, -2 }, + { 25, 10, -2 }, + { 75, 10, -2 }, + { 25, 10, -2 }, + { -25, 10, -2 }, + { 11160254478455, 10, -13 }, + { -616025388240814, 10, -15 }, + { 75, 10, -2 }, + { 175, 10, -2 }, + { -125, 10, -2 }, + { -225, 10, -2 }, + { 12249475717545, 10, -13 }, + { 12249475717545, 10, -13 }, + { -600000061094761, 10, -16 }, + { -786935746669769, 10, -15 }, + { -560000002384186, 10, -15 }, + { 286935746669769, 10, -15 }, + { 806025445461273, 10, -15 }, + { 16529612541199, 10, -13 }, + { 1426025390625, 10, -12 }, + { -306025385856628, 10, -15 }, + { -11529611349106, 10, -13 }, + { -926025390625, 10, -12 }, + { 857661843299866, 10, -15 }, + { 167390570044518, 10, -15 }, + { -225, 10, -2 }, + { -28699998855591, 10, -13 }, + { -225, 10, -2 } + }, + style { + annotation { + wavy + }, + aid1 { + 7 + }, + aid2 { + 6 + } + } + } + } + } + }, + charge 0, + props { + { + urn { + label "Count", + name "Hydrogen Bond Acceptor", + datatype uint, + implementation "E_NHACCEPTORS", + version "3.328", + software "Cactvs", + source "xemistry.com", + release "2006.10.23" + }, + value ival 4 + }, + { + urn { + label "Count", + name "Hydrogen Bond Donor", + datatype uint, + implementation "E_NHDONORS", + version "3.328", + software "Cactvs", + source "xemistry.com", + release "2006.10.23" + }, + value ival 0 + }, + { + urn { + label "Count", + name "Rotatable Bond", + datatype uint, + implementation "E_NROTBONDS", + version "3.328", + software "Cactvs", + source "xemistry.com", + release "2006.10.23" + }, + value ival 5 + }, + { + urn { + label "Fingerprint", + name "SubStructure Keys", + datatype fingerprint, + parameters "extended 2", + implementation "E_SCREEN", + version "3.328", + software "Cactvs", + source "xemistry.com", + release "2006.10.23" + }, + value binary '00000371E0723800000000000000000000000000000000000000000000 +000000000000000000001E00000000000814E18006020803000400080000900800000000000000 +000001080000020014008000070000052000100000240000000000000000000000000000000000 +0000000000000000'H + }, + { + urn { + label "IUPAC Name", + name "Allowed", + datatype string, + version "1.3", + software "LexiChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "3-acetoxy-4-trimethylammonio-butanoate" + }, + { + urn { + label "IUPAC Name", + name "CAS-like Style", + datatype string, + version "1.3", + software "LexiChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "3-acetoxy-4-trimethylammonio-butanoate" + }, + { + urn { + label "IUPAC Name", + name "Preferred", + datatype string, + version "1.3", + software "LexiChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "3-acetyloxy-4-trimethylammonio-butanoate" + }, + { + urn { + label "IUPAC Name", + name "Systematic", + datatype string, + version "1.3", + software "LexiChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "3-acetyloxy-4-trimethylammonio-butanoate" + }, + { + urn { + label "IUPAC Name", + name "Traditional", + datatype string, + version "1.3", + software "LexiChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "3-acetoxy-4-trimethylammonio-butanoate" + }, + { + urn { + label "InChI", + datatype string, + parameters "options {auxnonr donotaddh w0 fixedh recmet newps}", + implementation "E_INCHI", + version "1.0.1", + software "InChI", + source "nist.gov", + release "2006.10.23" + }, + value sval "InChI=1/C9H17NO4/c1-7(11)14-8(5-9(12)13)6-10(2,3)4/h8H,5-6H2 +,1-4H3" + }, + { + urn { + label "Mass", + name "Exact", + datatype double, + implementation "E_EXACT_MASS", + version "3.328", + software "Cactvs", + source "xemistry.com", + release "2006.10.23" + }, + value fval { 203116, 10, -3 } + }, + { + urn { + label "Molecular Formula", + datatype string, + version "1.3.4", + software "OEChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "C9H17NO4" + }, + { + urn { + label "Molecular Weight", + datatype double, + version "1.3.4", + software "OEChem", + source "openeye.com", + release "2006.10.23" + }, + value fval { 203236, 10, -3 } + }, + { + urn { + label "SMILES", + name "Canonical", + datatype string, + version "1.3.4", + software "OEChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "CC(=O)OC(CC(=O)[O-])C[N+](C)(C)C" + }, + { + urn { + label "SMILES", + name "Isomeric", + datatype string, + version "1.3.4", + software "OEChem", + source "openeye.com", + release "2006.10.23" + }, + value sval "CC(=O)OC(CC(=O)[O-])C[N+](C)(C)C" + }, + { + urn { + label "Topological", + name "Polar Surface Area", + datatype double, + implementation "E_TPSA", + version "3.328", + software "Cactvs", + source "xemistry.com", + release "2006.10.23" + }, + value fval { 6643, 10, -2 } + }, + { + urn { + label "Weight", + name "MonoIsotopic", + datatype double, + version "1.3.4", + software "OEChem", + source "openeye.com", + release "2006.10.23" + }, + value fval { 203116, 10, -3 } + } + }, + count { + heavy-atom 14, + atom-chiral 1, + atom-chiral-def 0, + atom-chiral-undef 1, + bond-chiral 0, + bond-chiral-def 0, + bond-chiral-undef 0, + isotope-atom 0, + covalent-unit 1, + tautomers 1 + } +} + Added: trunk/cdk/src/org/openscience/cdk/io/formats/PubChemASNFormat.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/io/formats/PubChemASNFormat.java (rev 0) +++ trunk/cdk/src/org/openscience/cdk/io/formats/PubChemASNFormat.java 2006-11-22 22:48:12 UTC (rev 7339) @@ -0,0 +1,75 @@ +/* $RCSfile$ + * $Author: egonw $ + * $Date: 2006-03-29 10:27:08 +0200 (Mi, 29 Mrz 2006) $ + * $Revision: 5855 $ + * + * Copyright (C) 2004-2006 The Chemistry Development Kit (CDK) project + * + * Contact: cdk...@li... + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + */ +package org.openscience.cdk.io.formats; + +import org.openscience.cdk.tools.DataFeatures; + +/** + * @cdk.module io + * @cdk.set io-formats + */ +public class PubChemASNFormat implements IChemFormat { + + private static IResourceFormat myself = null; + + private PubChemASNFormat() {} + + public static IResourceFormat getInstance() { + if (myself == null) myself = new PubChemASNFormat(); + return myself; + } + + public String getFormatName() { + return "PubChem Compound ASN"; + } + + public String getMIMEType() { + return null; + } + public String getPreferredNameExtension() { + return getNameExtensions()[0]; + } + public String[] getNameExtensions() { + return new String[]{"asn"}; + } + + public String getReaderClassName() { + return null; + } + public String getWriterClassName() { + return null; + } + + public boolean isXMLBased() { + return false; + } + + public int getSupportedDataFeatures() { + return DataFeatures.NONE; + } + + public int getRequiredDataFeatures() { + return DataFeatures.NONE; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |