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