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_SLNATTRIBS_H__ 00035 #define __RD_SLNATTRIBS_H__ 00036 00037 #include <string> 00038 #include <vector> 00039 #include <boost/smart_ptr.hpp> 00040 00041 namespace RDKit{ 00042 class Atom; 00043 class Bond; 00044 00045 namespace SLNParse { 00046 typedef enum { 00047 AttribLowPriAnd=0, 00048 AttribOr, 00049 AttribAnd, 00050 AttribNot 00051 } AttribCombineOp; 00052 00053 class AttribType { 00054 public: 00055 AttribType() :first(""),second(""),op(""),negated(false),structQuery(0) {}; 00056 std::string first; 00057 std::string second; 00058 std::string op; 00059 bool negated; 00060 void *structQuery; 00061 }; 00062 00063 typedef std::vector< std::pair<AttribCombineOp,boost::shared_ptr<AttribType> > > AttribListType; 00064 00065 //! parses the attributes provided for an atom and sets 00066 // the appropriate RD properties/queries. 00067 // NOTES: 00068 // 1) Some SLN query values cannot be properly set until the molecule is fully/ 00069 // initialized. These are handled by parseFinalAtomAttribs() 00070 // 00071 void parseAtomAttribs(Atom *atom,AttribListType attribs,bool doingQuery); 00072 void parseFinalAtomAttribs(Atom *atom,bool doingQuery); 00073 00074 //! parses the attributes provided for a bond and sets 00075 // the appropriate RD properties/queries. 00076 // NOTES: 00077 // 1) Some SLN query values cannot be properly set until the molecule is fully/ 00078 // initialized. These are handled by parseFinalBondAttribs() 00079 void parseBondAttribs(Bond *bond,AttribListType attribs,bool doingQuery); 00080 void parseFinalBondAttribs(Bond *bond,bool doingQuery); 00081 00082 //! parses the attributes provided for a ctab and sets 00083 // the appropriate RD properties/queries. 00084 void parseMolAttribs(ROMol *mol,AttribListType attribs); 00085 00086 void adjustAtomChiralities(RWMol *mol); 00087 } 00088 } 00089 #endif
1.5.6