#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <sys/timeb.h>
#include <limits.h>
#include "mode.h"
#include "ichicano.h"
#include "ichitime.h"
#include "ichi.h"
#include "ichicomn.h"
#include "bcf_s.h"
Macros | |
#define | tsort insertions_sort |
#define | INCHI_MSEC(X) (long)((1000.0/(double)CLOCKS_PER_SEC)*(X)) |
#define | INCHI_CLOCK_T(X) (clock_t)( (double)(X) / 1000.0 * (double)CLOCKS_PER_SEC ) |
#define | LOCAL_FREE(X) do{if(X){inchi_free( X); X=NULL;}}while(0) |
#define | pCS_CALLOC(PTR, TYPE, LEN) (pCS->PTR=(TYPE*)inchi_calloc( (size_t)(LEN),sizeof(*pCS->PTR))) |
#define | COMPARE_WITH_CT(CT, CTLEN, VALUE, CONDITION) |
#define | COMPARE_WITH_CTVAL(CTVAL, VALUE, CONDITION) |
#define | COMPARE_WITH_CT2(CT, CTLEN, VALUE, CONDITION, OPER) |
Functions | |
void | FillOutAtomInvariant (sp_ATOM *at, int num_atoms, int num_at_tg, ATOM_INVARIANT *pAtomInvariant, CANON_STAT *pCS) |
int | Canon_INChI1 (int num_atoms, int num_at_tg, sp_ATOM *at, CANON_STAT *pCS, INCHI_MODE nMode) |
int | Canon_INChI2 (int num_atoms, int num_at_tg, sp_ATOM *at, CANON_STAT *pCS, INCHI_MODE nMode) |
int | Canon_INChI3 (INCHI_CLOCK *ic, int num_atoms, int num_at_tg, sp_ATOM *at, CANON_STAT *pCS, CANON_GLOBALS *pCG, INCHI_MODE nMode, int bTautFtcn) |
static clock_t | InchiClock (void) |
static void | FillMaxMinClock (INCHI_CLOCK *ic) |
void | InchiTimeGet (inchiTime *TickEnd) |
long | InchiTimeMsecDiff (INCHI_CLOCK *ic, inchiTime *TickEnd, inchiTime *TickStart) |
long | InchiTimeElapsed (INCHI_CLOCK *ic, inchiTime *TickStart) |
void | InchiTimeAddMsec (INCHI_CLOCK *ic, inchiTime *TickEnd, unsigned long nNumMsec) |
int | bInchiTimeIsOver (INCHI_CLOCK *ic, inchiTime *TickStart) |
int | GetCanonLengths (int num_at, sp_ATOM *at, ATOM_SIZES *s, T_GROUP_INFO *t_group_info) |
int | DeAllocateCS (CANON_STAT *pCS) |
int | AllocateCS (CANON_STAT *pCS, int num_at, int num_at_tg, int nLenCT, int nLenCTAtOnly, int nLenLinearCTStereoDble, int nLenLinearCTIsotopicStereoDble, int nLenLinearCTStereoCarb, int nLenLinearCTIsotopicStereoCarb, int nLenLinearCTTautomer, int nLenLinearCTIsotopicTautomer, int nLenIsotopic, INCHI_MODE nMode, BCN *pBCN) |
int | FillIsotopicAtLinearCT (int num_atoms, sp_ATOM *at, const AT_RANK *nAtomNumber, AT_ISOTOPIC *LinearCTIsotopic, int nMaxLenLinearCTIsotopic, int *pnLenLinearCTIsotopic) |
int | FillTautLinearCT2 (CANON_GLOBALS *pCG, int num_atoms, int num_at_tg, int bIsoTaut, const AT_RANK *nRank, const AT_RANK *nAtomNumber, const AT_RANK *nSymmRank, const AT_RANK *nRankIso, const AT_RANK *nAtomNumberIso, const AT_RANK *nSymmRankIso, AT_TAUTOMER *LinearCTTautomer, int nMaxLenLinearCTTautomer, int *pnLenLinearCTTautomer, AT_ISO_TGROUP *LinearCTIsotopicTautomer, int nMaxLenLinearCTIsotopicTautomer, int *pnLenLinearCTIsotopicTautomer, T_GROUP_INFO *t_group_info) |
int | UpdateFullLinearCT (int num_atoms, int num_at_tg, sp_ATOM *at, AT_RANK *nRank, AT_RANK *nAtomNumber, CANON_STAT *pCS, CANON_GLOBALS *pCG, int bFirstTime) |
int | FixCanonEquivalenceInfo (CANON_GLOBALS *pCG, int num_at_tg, AT_RANK *nSymmRank, AT_RANK *nCurrRank, AT_RANK *nTempRank, AT_NUMB *nAtomNumber, int *bChanged) |
int | Canon_INChI (INCHI_CLOCK *ic, int num_atoms, int num_at_tg, sp_ATOM *at, CANON_STAT *pCS, CANON_GLOBALS *pCG, INCHI_MODE nMode, int bTautFtcn) |
Variables | |
const clock_t | FullMaxClock = (clock_t) ( -1 ) |
const clock_t | HalfMaxClock = (clock_t) ( -1 ) / 2 |
#define COMPARE_WITH_CT | ( | CT, | |
CTLEN, | |||
VALUE, | |||
CONDITION | |||
) |
#define COMPARE_WITH_CT2 | ( | CT, | |
CTLEN, | |||
VALUE, | |||
CONDITION, | |||
OPER | |||
) |
#define COMPARE_WITH_CTVAL | ( | CTVAL, | |
VALUE, | |||
CONDITION | |||
) |
#define INCHI_CLOCK_T | ( | X | ) | (clock_t)( (double)(X) / 1000.0 * (double)CLOCKS_PER_SEC ) |
#define INCHI_MSEC | ( | X | ) | (long)((1000.0/(double)CLOCKS_PER_SEC)*(X)) |
#define LOCAL_FREE | ( | X | ) | do{if(X){inchi_free( X); X=NULL;}}while(0) |
#define pCS_CALLOC | ( | PTR, | |
TYPE, | |||
LEN | |||
) | (pCS->PTR=(TYPE*)inchi_calloc( (size_t)(LEN),sizeof(*pCS->PTR))) |
#define tsort insertions_sort |
int AllocateCS | ( | CANON_STAT * | pCS, |
int | num_at, | ||
int | num_at_tg, | ||
int | nLenCT, | ||
int | nLenCTAtOnly, | ||
int | nLenLinearCTStereoDble, | ||
int | nLenLinearCTIsotopicStereoDble, | ||
int | nLenLinearCTStereoCarb, | ||
int | nLenLinearCTIsotopicStereoCarb, | ||
int | nLenLinearCTTautomer, | ||
int | nLenLinearCTIsotopicTautomer, | ||
int | nLenIsotopic, | ||
INCHI_MODE | nMode, | ||
BCN * | pBCN | ||
) |
int bInchiTimeIsOver | ( | INCHI_CLOCK * | ic, |
inchiTime * | TickStart | ||
) |
int Canon_INChI | ( | INCHI_CLOCK * | ic, |
int | num_atoms, | ||
int | num_at_tg, | ||
sp_ATOM * | at, | ||
CANON_STAT * | pCS, | ||
CANON_GLOBALS * | pCG, | ||
INCHI_MODE | nMode, | ||
int | bTautFtcn | ||
) |
int Canon_INChI1 | ( | int | num_atoms, |
int | num_at_tg, | ||
sp_ATOM * | at, | ||
CANON_STAT * | pCS, | ||
INCHI_MODE | nMode | ||
) |
int Canon_INChI2 | ( | int | num_atoms, |
int | num_at_tg, | ||
sp_ATOM * | at, | ||
CANON_STAT * | pCS, | ||
INCHI_MODE | nMode | ||
) |
int Canon_INChI3 | ( | INCHI_CLOCK * | ic, |
int | num_atoms, | ||
int | num_at_tg, | ||
sp_ATOM * | at, | ||
CANON_STAT * | pCS, | ||
CANON_GLOBALS * | pCG, | ||
INCHI_MODE | nMode, | ||
int | bTautFtcn | ||
) |
int DeAllocateCS | ( | CANON_STAT * | pCS | ) |
int FillIsotopicAtLinearCT | ( | int | num_atoms, |
sp_ATOM * | at, | ||
const AT_RANK * | nAtomNumber, | ||
AT_ISOTOPIC * | LinearCTIsotopic, | ||
int | nMaxLenLinearCTIsotopic, | ||
int * | pnLenLinearCTIsotopic | ||
) |
|
static |
void FillOutAtomInvariant | ( | sp_ATOM * | at, |
int | num_atoms, | ||
int | num_at_tg, | ||
ATOM_INVARIANT * | pAtomInvariant, | ||
CANON_STAT * | pCS | ||
) |
int FillTautLinearCT2 | ( | CANON_GLOBALS * | pCG, |
int | num_atoms, | ||
int | num_at_tg, | ||
int | bIsoTaut, | ||
const AT_RANK * | nRank, | ||
const AT_RANK * | nAtomNumber, | ||
const AT_RANK * | nSymmRank, | ||
const AT_RANK * | nRankIso, | ||
const AT_RANK * | nAtomNumberIso, | ||
const AT_RANK * | nSymmRankIso, | ||
AT_TAUTOMER * | LinearCTTautomer, | ||
int | nMaxLenLinearCTTautomer, | ||
int * | pnLenLinearCTTautomer, | ||
AT_ISO_TGROUP * | LinearCTIsotopicTautomer, | ||
int | nMaxLenLinearCTIsotopicTautomer, | ||
int * | pnLenLinearCTIsotopicTautomer, | ||
T_GROUP_INFO * | t_group_info | ||
) |
int FixCanonEquivalenceInfo | ( | CANON_GLOBALS * | pCG, |
int | num_at_tg, | ||
AT_RANK * | nSymmRank, | ||
AT_RANK * | nCurrRank, | ||
AT_RANK * | nTempRank, | ||
AT_NUMB * | nAtomNumber, | ||
int * | bChanged | ||
) |
int GetCanonLengths | ( | int | num_at, |
sp_ATOM * | at, | ||
ATOM_SIZES * | s, | ||
T_GROUP_INFO * | t_group_info | ||
) |
|
static |
void InchiTimeAddMsec | ( | INCHI_CLOCK * | ic, |
inchiTime * | TickEnd, | ||
unsigned long | nNumMsec | ||
) |
long InchiTimeElapsed | ( | INCHI_CLOCK * | ic, |
inchiTime * | TickStart | ||
) |
void InchiTimeGet | ( | inchiTime * | TickEnd | ) |
long InchiTimeMsecDiff | ( | INCHI_CLOCK * | ic, |
inchiTime * | TickEnd, | ||
inchiTime * | TickStart | ||
) |
int UpdateFullLinearCT | ( | int | num_atoms, |
int | num_at_tg, | ||
sp_ATOM * | at, | ||
AT_RANK * | nRank, | ||
AT_RANK * | nAtomNumber, | ||
CANON_STAT * | pCS, | ||
CANON_GLOBALS * | pCG, | ||
int | bFirstTime | ||
) |
const clock_t FullMaxClock = (clock_t) ( -1 ) |
const clock_t HalfMaxClock = (clock_t) ( -1 ) / 2 |