#include <stdlib.h>#include <string.h>#include <ctype.h>#include <limits.h>#include "mode.h"#include "ichimain.h"#include "ichimake.h"#include "ichi_io.h"#include "bcf_s.h"
Include dependency graph for ichiprt2.c:Macros | |
| #define | INIT_MIN_NUM_H (-4) |
| #define | INIT_MAX_NUM_H 16 |
| #define | INIT_LEN_NUM_H (INIT_MAX_NUM_H - INIT_MIN_NUM_H + 1) |
| #define | ALPHA_MINUS '-' |
| #define | ALPHA_ZERO_VAL '.' |
| #define | ALPHA_ONE 'a' |
| #define | ALPHA_ZERO '@' |
| #define | __MYTOLOWER(c) ( ((c) >= 'A') && ((c) <= 'Z') ? ((c) - 'A' + 'a') : (c) ) |
| #define | DECIMAL_BASE 10 |
| #define | DECIMAL_MINUS '-' |
| #define | DECIMAL_ZERO_VAL '0' |
| #define | DECIMAL_ONE '1' |
| #define | DECIMAL_ZERO '0' |
Functions | |
| int | Eql_INChI_Stereo (INChI_Stereo *s1, int eql1, INChI_Stereo *s2, int eql2, int bRelRac) |
| Compares stereo information of two structures. | |
| int | Eql_INChI_Isotopic (INChI *i1, INChI *i2) |
| Compares isotopic information of two InChIs. | |
| int | Eql_INChI_Aux_Equ (INChI_Aux *a1, int eql1, INChI_Aux *a2, int eql2) |
| Compares two InChI AuxInfo objects. | |
| int | Eql_INChI_Aux_Num (INChI_Aux *a1, int eql1, INChI_Aux *a2, int eql2) |
| Compares two InChI AuxInfo objects in terms of numbering. | |
| int | bHasOrigInfo (ORIG_INFO *OrigInfo, int num_atoms) |
| int | EqlOrigInfo (INChI_Aux *a1, INChI_Aux *a2) |
| int | bHasEquString (AT_NUMB *LinearCT, int nLenCT) |
| Checks if a given array of equivalence numbers (LinearCT) contains any repetitions. | |
| int | MakeMult (int mult, const char *szTailingDelim, INCHI_IOS_STRING *buf, int nCtMode, int *bOverflow) |
| int | MakeNumber_EnhStereo (int number, const char *szTailingDelim, INCHI_IOS_STRING *buf, int nCtMode, int *bOverflow) |
| Adds the number to the string buffer. | |
| int | MakeDelim (const char *szTailingDelim, INCHI_IOS_STRING *buf, int *bOverflow) |
| Adds the delimiter to the string buffer if it is not empty and there is no overflow. | |
| int | MakeEqStr (const char *szTailingDelim, int mult, INCHI_IOS_STRING *buf, int *bOverflow) |
| int | MakeCtStringNew (CANON_GLOBALS *pCG, AT_NUMB *LinearCT, int nLenCT, int bAddDelim, S_CHAR *nNum_H, int num_atoms, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeCtStringOld (AT_NUMB *LinearCT, int nLenCT, int bAddDelim, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeHString (int bAddDelim, S_CHAR *LinearCT, int nLenCT, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeCtString (CANON_GLOBALS *pCG, AT_NUMB *LinearCT, int nLenCT, int bAddDelim, S_CHAR *nNum_H, int num_atoms, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeTautString (AT_NUMB *LinearCT, int nLenCT, int bAddDelim, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeCRVString (ORIG_INFO *OrigInfo, int nLenCT, int bAddDelim, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeEquString (AT_NUMB *LinearCT, int nLenCT, int bAddDelim, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeIsoAtomString (INChI_IsotopicAtom *IsotopicAtom, int nNumberOfIsotopicAtoms, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeIsoTautString (INChI_IsotopicTGroup *IsotopicTGroup, int nNumberOfIsotopicTGroups, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeIsoHString (int num_iso_H[], INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | MakeStereoString (AT_NUMB *at1, AT_NUMB *at2, S_CHAR *parity, int bAddDelim, int nLenCT, INCHI_IOS_STRING *strbuf, int nCtMode, int *bOverflow) |
| int | compare_ints (const void *a, const void *b) |
| Compares two integers for qsort. | |
| int | compare_third_value (const void *a, const void *b) |
| Compares the third value of two integer arrays for qsort. Used to sort enhanced stereochemistry groups based on the canonical atom number of the first atom in the group. | |
| int | MakeEnhStereoString (INChI_Aux *pAux, INCHI_IOS_STRING *strbuf, const char *conf_stereo_string, int **enh_stereo, int nof_stereo_groups, int nCtMode, int *bOverflow) |
| Creates the enhanced stereochemistry string for the s - layer. | |
| int | MakeSlayerString (ORIG_ATOM_DATA *orig_inp_data, INCHI_SORT *pINChISort, INCHI_IOS_STRING *strbuf, int bOutType, int num_components, int nCtMode, int *bOverflow) |
| Creates the string for the s - layer based on the enhanced stereochemistry information. | |
| int | MakeAbcNumber (char *szString, int nStringLen, const char *szLeadingDelim, int nValue) |
| static long | abctol (const char *szString, char **q) |
| long | inchi_strtol (const char *str, const char **p, int base) |
| Convert string to long integer. | |
| double | inchi_strtod (const char *str, const char **p) |
| Convert string to double. | |
| int | MakeDecNumber (char *szString, int nStringLen, const char *szLeadingDelim, int nValue) |
| void | print_sequence_of_nums_compressing_ranges (int n, int *num, INCHI_IOS_STRING *strbuf) |
| #define __MYTOLOWER | ( | c | ) | ( ((c) >= 'A') && ((c) <= 'Z') ? ((c) - 'A' + 'a') : (c) ) |
| #define ALPHA_MINUS '-' |
| #define ALPHA_ONE 'a' |
| #define ALPHA_ZERO '@' |
| #define ALPHA_ZERO_VAL '.' |
| #define DECIMAL_BASE 10 |
| #define DECIMAL_MINUS '-' |
| #define DECIMAL_ONE '1' |
| #define DECIMAL_ZERO '0' |
| #define DECIMAL_ZERO_VAL '0' |
| #define INIT_LEN_NUM_H (INIT_MAX_NUM_H - INIT_MIN_NUM_H + 1) |
| #define INIT_MAX_NUM_H 16 |
| #define INIT_MIN_NUM_H (-4) |
|
static |
Here is the caller graph for this function:| int bHasEquString | ( | AT_NUMB * | LinearCT, |
| int | nLenCT | ||
| ) |
Checks if a given array of equivalence numbers (LinearCT) contains any repetitions.
| LinearCT | Pointer to equivalence numbers |
| nLenCT | Length of the array |
Here is the caller graph for this function:| int bHasOrigInfo | ( | ORIG_INFO * | OrigInfo, |
| int | num_atoms | ||
| ) |
Here is the caller graph for this function:| int compare_ints | ( | const void * | a, |
| const void * | b | ||
| ) |
Compares two integers for qsort.
| a | First integer pointer. |
| b | Second integer pointer. |
Here is the caller graph for this function:| int compare_third_value | ( | const void * | a, |
| const void * | b | ||
| ) |
Compares the third value of two integer arrays for qsort. Used to sort enhanced stereochemistry groups based on the canonical atom number of the first atom in the group.
| a | First integer array pointer. |
| b | Second integer array pointer. |
Here is the caller graph for this function:Compares two InChI AuxInfo objects.
| a1 | Pointer to first AuxInfo |
| eql1 | Flag to compare type 1 |
| a2 | Pointer to second AuxInfo |
| eql2 | Flag to compare type 2 |
Here is the call graph for this function:
Here is the caller graph for this function:Compares two InChI AuxInfo objects in terms of numbering.
| a1 | Pointer to first AuxInfo |
| eql1 | Flag to compare type 1 |
| a2 | Pointer to second AuxInfo |
| eql2 | Flag to compare type 2 |
Here is the caller graph for this function:Compares isotopic information of two InChIs.
| i1 | Pointer to first InChI |
| i2 | Pointer to second InChI |
Here is the caller graph for this function:| int Eql_INChI_Stereo | ( | INChI_Stereo * | s1, |
| int | eql1, | ||
| INChI_Stereo * | s2, | ||
| int | eql2, | ||
| int | bRelRac | ||
| ) |
Compares stereo information of two structures.
| s1 | Pointer to stereo information of first structure |
| eql1 | Flag for stereo information check (EQL_EXISTS, EQL_SP3, EQL_SP3_INV, EQL_SP2) |
| s2 | Pointer to stereo information of second structure |
| eql2 | Flag for stereo information check (EQL_EXISTS, EQL_SP3, EQL_SP3_INV, EQL_SP2) |
| bRelRac | Flag to compare racemic stereo information |
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| double inchi_strtod | ( | const char * | str, |
| const char ** | p | ||
| ) |
Convert string to double.
| str | Pointer to the input string |
| p | Pointer to the position where conversion stopped |
Here is the caller graph for this function:| long inchi_strtol | ( | const char * | str, |
| const char ** | p, | ||
| int | base | ||
| ) |
Convert string to long integer.
| str | Pointer to the input string |
| p | Pointer to the position where conversion stopped |
| base | Base for conversion |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeAbcNumber | ( | char * | szString, |
| int | nStringLen, | ||
| const char * | szLeadingDelim, | ||
| int | nValue | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeCRVString | ( | ORIG_INFO * | OrigInfo, |
| int | nLenCT, | ||
| int | bAddDelim, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeCtString | ( | CANON_GLOBALS * | pCG, |
| AT_NUMB * | LinearCT, | ||
| int | nLenCT, | ||
| int | bAddDelim, | ||
| S_CHAR * | nNum_H, | ||
| int | num_atoms, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeCtStringNew | ( | CANON_GLOBALS * | pCG, |
| AT_NUMB * | LinearCT, | ||
| int | nLenCT, | ||
| int | bAddDelim, | ||
| S_CHAR * | nNum_H, | ||
| int | num_atoms, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeCtStringOld | ( | AT_NUMB * | LinearCT, |
| int | nLenCT, | ||
| int | bAddDelim, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeDecNumber | ( | char * | szString, |
| int | nStringLen, | ||
| const char * | szLeadingDelim, | ||
| int | nValue | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeDelim | ( | const char * | szTailingDelim, |
| INCHI_IOS_STRING * | buf, | ||
| int * | bOverflow | ||
| ) |
Adds the delimiter to the string buffer if it is not empty and there is no overflow.
| szTailingDelim | Pointer to the trailing delimiter string |
| buf | Pointer to the output string buffer |
| bOverflow | Pointer to overflow flag |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeEnhStereoString | ( | INChI_Aux * | pAux, |
| INCHI_IOS_STRING * | strbuf, | ||
| const char * | conf_stereo_string, | ||
| int ** | enh_stereo, | ||
| int | nof_stereo_groups, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Creates the enhanced stereochemistry string for the s - layer.
| pAux | Pointer to the INCHI_AUX structure. |
| conf_stereo_string | Pointer to the configuration stereochemistry string (abs, rel, rac). |
| enh_stereo | Pointer to list of enhanced stereochemistry groups. |
| nof_stereo_groups | Number of enhanced stereochemistry groups. |
| strbuf | Pointer to the output string buffer. |
| nCtMode | Mode flag for string representation. |
| bOverflow | Pointer to overflow flag. |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeEqStr | ( | const char * | szTailingDelim, |
| int | mult, | ||
| INCHI_IOS_STRING * | buf, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeEquString | ( | AT_NUMB * | LinearCT, |
| int | nLenCT, | ||
| int | bAddDelim, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeHString | ( | int | bAddDelim, |
| S_CHAR * | LinearCT, | ||
| int | nLenCT, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeIsoAtomString | ( | INChI_IsotopicAtom * | IsotopicAtom, |
| int | nNumberOfIsotopicAtoms, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeIsoHString | ( | int | num_iso_H[], |
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeIsoTautString | ( | INChI_IsotopicTGroup * | IsotopicTGroup, |
| int | nNumberOfIsotopicTGroups, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeMult | ( | int | mult, |
| const char * | szTailingDelim, | ||
| INCHI_IOS_STRING * | buf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeNumber_EnhStereo | ( | int | number, |
| const char * | szTailingDelim, | ||
| INCHI_IOS_STRING * | buf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Adds the number to the string buffer.
| number | Input number to be added |
| szTailingDelim | Pointer to the trailing delimiter string |
| buf | Pointer to the output string buffer |
| nCtMode | Mode flag for string representation |
| bOverflow | Pointer to overflow flag |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeSlayerString | ( | ORIG_ATOM_DATA * | orig_inp_data, |
| INCHI_SORT * | pINChISort, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | bOutType, | ||
| int | num_components, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Creates the string for the s - layer based on the enhanced stereochemistry information.
| orig_inp_data | Pointer to the original atom data. |
| pINChISort | Pointer to the INCHI_SORT structure. |
| bOutType | Output type flag. |
| num_components | Number of components in the molecule. |
| strbuf | Pointer to the output string buffer. |
| nCtMode | Mode flag for string representation. |
| bOverflow | Pointer to overflow flag. |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeStereoString | ( | AT_NUMB * | at1, |
| AT_NUMB * | at2, | ||
| S_CHAR * | parity, | ||
| int | bAddDelim, | ||
| int | nLenCT, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MakeTautString | ( | AT_NUMB * | LinearCT, |
| int | nLenCT, | ||
| int | bAddDelim, | ||
| INCHI_IOS_STRING * | strbuf, | ||
| int | nCtMode, | ||
| int * | bOverflow | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| void print_sequence_of_nums_compressing_ranges | ( | int | n, |
| int * | num, | ||
| INCHI_IOS_STRING * | strbuf | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function: