SLNParse.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2008, Novartis Institutes for BioMedical Research Inc.
00003 //  All rights reserved.
00004 // 
00005 // Redistribution and use in source and binary forms, with or without
00006 // modification, are permitted provided that the following conditions are
00007 // met: 
00008 //
00009 //     * Redistributions of source code must retain the above copyright 
00010 //       notice, this list of conditions and the following disclaimer.
00011 //     * Redistributions in binary form must reproduce the above
00012 //       copyright notice, this list of conditions and the following 
00013 //       disclaimer in the documentation and/or other materials provided 
00014 //       with the distribution.
00015 //     * Neither the name of Novartis Institutes for BioMedical Research Inc. 
00016 //       nor the names of its contributors may be used to endorse or promote 
00017 //       products derived from this software without specific prior
00018 //       written permission.
00019 //
00020 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00021 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00023 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00024 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00025 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00026 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00027 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00028 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00029 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00030 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 //
00032 // Created by Greg Landrum, September 2006
00033 //
00034 #ifndef __RD_SLNPARSE_H__
00035 #define __RD_SLNPARSE_H__
00036 
00037 #include <string>
00038 #include <exception>
00039 
00040 namespace RDKit{
00041   class RWMol;
00042   class ROMol;
00043 
00044   namespace SLNParse {
00045     RWMol *finalizeQueryMol(ROMol *mol,bool mergeHs);
00046   }
00047 
00048   RWMol *SLNToMol(std::string smi,bool sanitize=true,int debugParse=0);
00049 
00050   RWMol *SLNQueryToMol(std::string smi,bool mergeHs=true,int debugParse=0);
00051 
00052   class SLNParseException : public std::exception {
00053   public:
00054     SLNParseException(const char *msg) : _msg(msg) {};
00055     SLNParseException(const std::string msg) : _msg(msg) {};
00056     const char *message () const { return _msg.c_str(); };
00057     ~SLNParseException () throw () {};
00058   private:
00059     std::string _msg;
00060   };
00061 
00062 }
00063 #endif

Generated on Fri Apr 3 06:03:02 2009 for RDCode by  doxygen 1.5.6