00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __RD_ATOMPAIRS_H__
00013 #define __RD_ATOMPAIRS_H__
00014
00015 #include <DataStructs/SparseIntVect.h>
00016 #include <boost/cstdint.hpp>
00017 namespace RDKit {
00018 class Atom;
00019
00020 namespace Descriptors {
00021 namespace AtomPairs {
00022 const std::string atomPairsVersion="1.0.0";
00023 const unsigned int numTypeBits=4;
00024 const unsigned int atomNumberTypes[1<<numTypeBits]={5,6,7,8,9,14,15,16,17,33,34,35,51,52,43};
00025 const unsigned int numPiBits=2;
00026 const unsigned int maxNumPi=(1<<numPiBits)-1;
00027 const unsigned int numBranchBits=3;
00028 const unsigned int maxNumBranches=(1<<numBranchBits)-1;
00029 const unsigned int codeSize=numTypeBits+numPiBits+numBranchBits;
00030 const unsigned int numPathBits=5;
00031 const unsigned int maxPathLen=(1<<numPathBits)-1;
00032 const unsigned int numAtomPairFingerprintBits=numPathBits+2*codeSize;
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 boost::uint32_t getAtomCode(const Atom *atom,unsigned int branchSubtract=0);
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 boost::uint32_t getAtomPairCode(boost::uint32_t codeI,boost::uint32_t codeJ,
00054 unsigned int dist);
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 SparseIntVect<boost::int32_t> *getAtomPairFingerprint(const ROMol &mol);
00070
00071
00072
00073
00074
00075
00076 boost::uint64_t getTopologicalTorsionCode(const std::vector<boost::uint32_t> &atomCodes);
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 SparseIntVect<boost::int64_t > *getTopologicalTorsionFingerprint(const ROMol &mol,
00093 unsigned int targetSize=4);
00094 }
00095 }
00096 }
00097
00098 #endif