17 #define _CRT_SECURE_NO_WARNINGS 19 #ifdef _DEBUG // check memory leaks 21 #define _CRTDBG_MAP_ALLOC 23 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__) 30 #include <sys/resource.h> 35 #define SEED_GROW_DEEP // fast and works much times faster (but it can depend on molecules) 39 #define FAST_SUBSTRUCT_CACHE // based on a hash of Morgan code 40 #define DUP_SUBSTRUCT_CACHE // based on list of query atoms and bonds. For rings where seeds growing in both directions throw the same ring. 42 #define FAST_INCREMENTAL_MATCH // fast and some time very usefull. request PRECOMPUTED_TABLES_MATCH 45 #define VERBOSE_STATISTICS_ON 49 #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL 56 static inline int gettimeofday(
struct timeval *tv,
struct timezone *tz) {
58 unsigned __int64 tmpres = 0;
62 GetSystemTimeAsFileTime(&ft);
64 tmpres |= ft.dwHighDateTime;
66 tmpres |= ft.dwLowDateTime;
69 tmpres -= DELTA_EPOCH_IN_MICROSECS;
71 tv->tv_sec = (long)(tmpres / 1000000UL);
72 tv->tv_usec = (long)(tmpres % 1000000UL);
80 tz->tz_minuteswest = _timezone / 60;
81 tz->tz_dsttime = _daylight;
89 gettimeofday(&t, (
struct timezone*)0);
90 return t.tv_usec + t.tv_sec * 1000000ULL;
96 #ifdef VERBOSE_STATISTICS_ON 106 unsigned Seed, RemainingSizeRejected;
119 , InitialSeed(0), MismatchedInitialSeed(0)
120 , Seed(0), RemainingSizeRejected(0)
121 , SeedCheck(0), SingleBondExcluded(0), MatchCall(0), MatchCallTrue(0)
122 , FastMatchCall(0), FastMatchCallTrue(0), SlowMatchCallTrue(0)
123 , ExactMatchCall(0), ExactMatchCallTrue(0)
124 , FindHashInCache(0), HashKeyFoundInCache(0)
125 , AtomCompareCalls(0), BondCompareCalls(0)
126 , AtomFunctorCalls(0), BondFunctorCalls(0)
127 , WrongCompositionRejected(0), WrongCompositionDetected(0)
128 , DupCacheFound(0), DupCacheFoundMatch(0)
unsigned SlowMatchCallTrue
unsigned BondCompareCalls
unsigned ExactMatchCallTrue
unsigned HashKeyFoundInCache
unsigned BondFunctorCalls
unsigned SingleBondExcluded
static unsigned long long nanoClock(void)
Includes a bunch of functionality for handling Atom and Bond queries.
unsigned long long MCSFoundTime
unsigned DupCacheFoundMatch
unsigned MismatchedInitialSeed
unsigned WrongCompositionRejected