#include <stdlib.h>#include <string.h>#include <ctype.h>#include <math.h>#include "mode.h"#include "ichister.h"#include "ichimain.h"#include "ichimake.h"#include "ichi_io.h"#include "bcf_s.h"#include "logging.h"
 Include dependency graph for ichiprt1.c:Data Structures | |
| struct | tagInchiTag | 
Macros | |
| #define | SP(N) (x_space+sizeof(x_space)-1-(N)) | 
| #define | NOT_YET_I2I_FOR_POLYMERS 40 | 
| #define | OUT_NONTAUT OUT_NN /* was OUT_NT until 2004-04-07 */ | 
| #define | MIN_BOND_LENGTH (1.0e-6) | 
| #define | ORIG_STR_BUFLEN (7*MAXVAL+2) /* > 7*MAXVAL+2 = 142 */ | 
Typedefs | |
| typedef struct tagInchiTag | INCHI_TAG | 
| typedef enum tagIdentLblOrd | IDENT_LBL_ORD | 
| typedef enum tagIdentLblBit | IDENT_LBL_BIT | 
| typedef enum tagAuxLblOrd | AUX_LBL_ORD | 
| typedef enum tagAuxLblBit | AUX_LBL_BIT | 
Enumerations | |
| enum | tagIdentLblOrd {  IL_FIXH_ORD , IL_ISOT_ORD , IL_STER_ORD , IL_VERS_ORD , IL_FML__ORD , IL_CONN_ORD , IL_ALLH_ORD , IL_CHRG_ORD , IL_PROT_ORD , IL_DBND_ORD , IL_SP3S_ORD , IL_INVS_ORD , IL_TYPS_ORD , IL_ATMS_ORD , IL_XCGA_ORD , IL_FMLF_ORD , IL_HFIX_ORD , IL_TRNS_ORD , IL_REC__ORD , IL_MAX_ORD }  | 
| enum | tagIdentLblBit {  IL_FIXH = 1 << IL_FIXH_ORD , IL_ISOT = 1 << IL_ISOT_ORD , IL_STER = 1 << IL_STER_ORD , IL_VERS = 1 << IL_VERS_ORD , IL_FML_ = 1 << IL_FML__ORD , IL_CONN = 1 << IL_CONN_ORD , IL_ALLH = 1 << IL_ALLH_ORD , IL_CHRG = 1 << IL_CHRG_ORD , IL_PROT = 1 << IL_PROT_ORD , IL_DBND = 1 << IL_DBND_ORD , IL_SP3S = 1 << IL_SP3S_ORD , IL_INVS = 1 << IL_INVS_ORD , IL_TYPS = 1 << IL_TYPS_ORD , IL_ATMS = 1 << IL_ATMS_ORD , IL_XCGA = 1 << IL_XCGA_ORD , IL_FMLF = 1 << IL_FMLF_ORD , IL_HFIX = 1 << IL_HFIX_ORD , IL_TRNS = 1 << IL_TRNS_ORD , IL_REC_ = 1 << IL_REC__ORD }  | 
| enum | tagAuxLblOrd {  AL_FIXH_ORD , AL_ISOT_ORD , AL_STER_ORD , AL_REVR_ORD , AL_VERS_ORD , AL_NORM_ORD , AL_ANBR_ORD , AL_AEQU_ORD , AL_GEQU_ORD , AL_SP3I_ORD , AL_SP3N_ORD , AL_CRV__ORD , AL_ATMR_ORD , AL_BNDR_ORD , AL_XYZR_ORD , AL_FIXN_ORD , AL_ISON_ORD , AL_REC__ORD , AL_MAX_ORD }  | 
| enum | tagAuxLblBit {  AL_FIXH = 1 << AL_FIXH_ORD , AL_ISOT = 1 << AL_ISOT_ORD , AL_STER = 1 << AL_STER_ORD , AL_REVR = 1 << AL_REVR_ORD , AL_VERS = 1 << AL_VERS_ORD , AL_NORM = 1 << AL_NORM_ORD , AL_ANBR = 1 << AL_ANBR_ORD , AL_AEQU = 1 << AL_AEQU_ORD , AL_GEQU = 1 << AL_GEQU_ORD , AL_SP3I = 1 << AL_SP3I_ORD , AL_SP3N = 1 << AL_SP3N_ORD , AL_CRV_ = 1 << AL_CRV__ORD , AL_ATMR = 1 << AL_ATMR_ORD , AL_BNDR = 1 << AL_BNDR_ORD , AL_XYZR = 1 << AL_XYZR_ORD , AL_FIXN = 1 << AL_FIXN_ORD , AL_ISON = 1 << AL_ISON_ORD , AL_REC_ = 1 << AL_REC__ORD }  | 
Functions | |
| static int | str_LineEnd (const char *tag, int *bOverflow, INCHI_IOS_STRING *buf, int ind, int bPlainTextTags) | 
| static int | CleanOrigCoord (MOL_COORD szCoord, int delim) | 
| static int | WriteOrigCoord (int num_inp_atoms, MOL_COORD *szMolCoord, int *i, char *szBuf, int buf_len) | 
| static int | WriteOrigAtoms (CANON_GLOBALS *pCG, int num_inp_atoms, inp_ATOM *at, int *i, char *szBuf, int buf_len, STRUCT_DATA *sd) | 
| static int | WriteOrigBonds (CANON_GLOBALS *pCG, int num_inp_atoms, inp_ATOM *at, int *i, char *szBuf, int buf_len, STRUCT_DATA *sd) | 
| static void | GetSaveOptLetters (unsigned char save_opt_bits, char *let1, char *let2) | 
| static int | OutputINCHI_VersionAndKind (INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int bINChIOutputOptions, int is_beta, char *pLF, char *pTAB) | 
| static int | OutputINCHI_MainLayerFormula (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int num_components2[], int *INCHI_basic_or_INCHI_reconnected, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputINCHI_MainLayerConnections (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int num_components2[], int *INCHI_basic_or_INCHI_reconnected, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputINCHI_MainLayerHydrogens (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int num_components2[], int *INCHI_basic_or_INCHI_reconnected, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputINCHI_ChargeAndRemovedAddedProtonsLayers (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputINCHI_StereoLayer (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputINCHI_IsotopicLayer (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int *INCHI_basic_or_INCHI_reconnected, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputINCHI_FixedHLayerWithSublayers (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int *INCHI_basic_or_INCHI_reconnected, INCHI_OUT_CTL *io, char *pLF, char *pTAB, int *then_goto_repeat) | 
| static int | OutputINCHI_PolymerLayer (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int *INCHI_basic_or_INCHI_reconnected, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputINCHI_PolymerLayer_SingleUnit (OAD_PolymerUnit *u, int bPolymers, int total_star_atoms, int *n_used_stars, OAD_AtProps *aprops, int *cano_nums, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, INCHI_IOS_STRING *strbuf) | 
| static int | OutputAUXINFO_HeaderAndNormalization_type (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int bINChIOutputOptions, int *INCHI_basic_or_INCHI_reconnected, int num_components2[], INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputAUXINFO_OriginalNumbersAndEquivalenceClasses (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int num_components2[], INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputAUXINFO_TautomericGroupsEquivalence (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, INCHI_OUT_CTL *io) | 
| static int | OutputAUXINFO_Stereo (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputAUXINFO_IsotopicInfo (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, int *INCHI_basic_or_INCHI_reconnected, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputAUXINFO_ChargesRadicalsAndUnusualValences (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputAUXINFO_ReversibilityInfo (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, ORIG_STRUCT *pOrigStruct, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | OutputAUXINFO_PolymerInfo (CANON_GLOBALS *pCG, INCHI_IOSTREAM *out_file, INCHI_IOS_STRING *strbuf, ORIG_STRUCT *pOrigStruct, INCHI_OUT_CTL *io, char *pLF, char *pTAB) | 
| static int | InternallyGetCanoNumsAndComponentNums (CANON_GLOBALS *pCG, INCHI_IOS_STRING *strbuf, INCHI_OUT_CTL *io, int nat, int *cano_nums, int *compnt_nums) | 
| static int | CountPseudoElementInFormula (const char *pseudo, char *s) | 
| static int | IsBondAtomNumsLesser (int *bond1, int *bond2) | 
| static void | inchi_sort_int_pair_ascending (int *a, int *b) | 
| static void | MergeZzInStrHillFormulaComponent (char *s) | 
| char * | szGetTag (const INCHI_TAG *Tag, int nTag, int bTag, char *szTag, int *bAlways, short tag_flag) | 
| int | OutputINChIPlainError (INCHI_IOSTREAM *out_file, char *pErrorText, int bError) | 
| const char * | EquString (int EquVal) | 
| int | OutputINChI2 (CANON_GLOBALS *pCG, INCHI_IOS_STRING *strbuf, INCHI_SORT *pINChISortTautAndNonTaut2[][TAUT_NUM], int INCHI_basic_or_INCHI_reconnected, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, INPUT_PARMS *ip, int bDisconnectedCoord, int bOutputType, int bINChIOutputOptions, int num_components2[], int num_non_taut2[], int num_taut2[], INCHI_IOSTREAM *output_file, INCHI_IOSTREAM *log_file, int num_input_struct, int *pSortPrintINChIFlags, unsigned char save_opt_bits) | 
| int | OutputINChI1 (CANON_GLOBALS *pCG, INCHI_IOS_STRING *strbuf, INCHI_SORT *pINChISortTautAndNonTaut2[][TAUT_NUM], int INCHI_basic_or_INCHI_reconnected, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, INPUT_PARMS *ip, int bDisconnectedCoord, int bOutputType, int bINChIOutputOptions, int num_components2[], int num_non_taut2[], int num_taut2[], INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *log_file, int num_input_struct, int *pSortPrintINChIFlags, unsigned char save_opt_bits) | 
| int | OrigStruct_FillOut (CANON_GLOBALS *pCG, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, STRUCT_DATA *sd) | 
| void | OrigStruct_Free (ORIG_STRUCT *pOrigStruct) | 
| void | set_line_separators (int bINChIOutputOptions, char **pLF, char **pTAB) | 
| void | EditINCHI_HidePolymerZz (INCHI_IOSTREAM *out, int n_pzz, int n_zy) | 
| int | MergeZzInHillFormula (INCHI_IOS_STRING *strbuf) | 
Variables | |
| const char | sCompDelim [] = ";" | 
| const char | sIdenticalValues [] = "*" | 
| const char | x_space [] = " " | 
| const char | x_inchi [] = INCHI_NAME | 
| const char | x_inchi_ver [] = "version" | 
| const char | x_curr_ver [] = INCHI_VERSION | 
| const char | x_structure [] = "structure" | 
| const char | x_number [] = "number" | 
| const char | x_header [] = "id.name" | 
| const char | x_value [] = "id.value" | 
| const char | x_empty [] = "" | 
| const char | x_type [] = "type" | 
| const char | x_message [] = "message" | 
| const char | x_text [] = "value" | 
| const char | x_ferr [] = "fatal (aborted)" | 
| const char | x_err [] = "error (no InChI)" | 
| const char | x_warn [] = "warning" | 
| const char | x_basic [] = "identifier" | 
| const char | x_tautomeric [] = "mobile-H" | 
| const char | x_reconnected [] = "reconnected" | 
| const char | x_ver [] = "version" | 
| const char | x_type_alpha [] = "alpha" | 
| const char | x_type_numer [] = "numeric" | 
| const char | x_type_predec [] = "sct" | 
| const char | x_type_normal [] = "normal" | 
| const char | x_type_short [] = "compressed" | 
| const char | x_basic_layer [] = "basic" | 
| const char | x_aux_basic [] = "identifier.auxiliary-info" | 
| const char | x_aux_comm [] = "!-- This section is NOT a part of the identifier, it is not unique --" | 
| const char | x_ign_uu_sp2 [] = "omit_undef_dbond" | 
| const char | x_ign_uu_sp3 [] = "omit_undef_sp3" | 
| const char | x_line_opening [] = "<" | 
| const char | x_line_closing [] = "</" | 
| const char | x_close_line [] = ">" | 
| const char | x_abs [] = "1" | 
| const char | x_rel [] = "2" | 
| const char | x_rac [] = "3" | 
| const INCHI_TAG | IdentLbl [] | 
| const INCHI_TAG | AuxLbl [] | 
| #define MIN_BOND_LENGTH (1.0e-6) | 
| #define NOT_YET_I2I_FOR_POLYMERS 40 | 
| typedef enum tagAuxLblBit AUX_LBL_BIT | 
| typedef enum tagAuxLblOrd AUX_LBL_ORD | 
| typedef enum tagIdentLblBit IDENT_LBL_BIT | 
| typedef enum tagIdentLblOrd IDENT_LBL_ORD | 
| typedef struct tagInchiTag INCHI_TAG | 
| enum tagAuxLblBit | 
| enum tagAuxLblOrd | 
| enum tagIdentLblBit | 
| enum tagIdentLblOrd | 
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void EditINCHI_HidePolymerZz | ( | INCHI_IOSTREAM * | out, | 
| int | n_pzz, | ||
| int | n_zy | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| const char * EquString | ( | int | EquVal | ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:| int MergeZzInHillFormula | ( | INCHI_IOS_STRING * | strbuf | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int OrigStruct_FillOut | ( | CANON_GLOBALS * | pCG, | 
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| ORIG_STRUCT * | pOrigStruct, | ||
| STRUCT_DATA * | sd | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void OrigStruct_Free | ( | ORIG_STRUCT * | pOrigStruct | ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int OutputINChI1 | ( | CANON_GLOBALS * | pCG, | 
| INCHI_IOS_STRING * | strbuf, | ||
| INCHI_SORT * | pINChISortTautAndNonTaut2[][TAUT_NUM], | ||
| int | INCHI_basic_or_INCHI_reconnected, | ||
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| ORIG_STRUCT * | pOrigStruct, | ||
| INPUT_PARMS * | ip, | ||
| int | bDisconnectedCoord, | ||
| int | bOutputType, | ||
| int | bINChIOutputOptions, | ||
| int | num_components2[], | ||
| int | num_non_taut2[], | ||
| int | num_taut2[], | ||
| INCHI_IOSTREAM * | out_file, | ||
| INCHI_IOSTREAM * | log_file, | ||
| int | num_input_struct, | ||
| int * | pSortPrintINChIFlags, | ||
| unsigned char | save_opt_bits | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int OutputINChI2 | ( | CANON_GLOBALS * | pCG, | 
| INCHI_IOS_STRING * | strbuf, | ||
| INCHI_SORT * | pINChISortTautAndNonTaut2[][TAUT_NUM], | ||
| int | INCHI_basic_or_INCHI_reconnected, | ||
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| ORIG_STRUCT * | pOrigStruct, | ||
| INPUT_PARMS * | ip, | ||
| int | bDisconnectedCoord, | ||
| int | bOutputType, | ||
| int | bINChIOutputOptions, | ||
| int | num_components2[], | ||
| int | num_non_taut2[], | ||
| int | num_taut2[], | ||
| INCHI_IOSTREAM * | output_file, | ||
| INCHI_IOSTREAM * | log_file, | ||
| int | num_input_struct, | ||
| int * | pSortPrintINChIFlags, | ||
| unsigned char | save_opt_bits | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int OutputINChIPlainError | ( | INCHI_IOSTREAM * | out_file, | 
| char * | pErrorText, | ||
| int | bError | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void set_line_separators | ( | int | bINChIOutputOptions, | 
| char ** | pLF, | ||
| char ** | pTAB | ||
| ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| char * szGetTag | ( | const INCHI_TAG * | Tag, | 
| int | nTag, | ||
| int | bTag, | ||
| char * | szTag, | ||
| int * | bAlways, | ||
| short | tag_flag | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| const INCHI_TAG AuxLbl[] | 
| const INCHI_TAG IdentLbl[] | 
| const char sCompDelim[] = ";" | 
| const char sIdenticalValues[] = "*" | 
| const char x_abs[] = "1" | 
| const char x_aux_basic[] = "identifier.auxiliary-info" | 
| const char x_aux_comm[] = "!-- This section is NOT a part of the identifier, it is not unique --" | 
| const char x_basic[] = "identifier" | 
| const char x_basic_layer[] = "basic" | 
| const char x_close_line[] = ">" | 
| const char x_curr_ver[] = INCHI_VERSION | 
| const char x_empty[] = "" | 
| const char x_err[] = "error (no InChI)" | 
| const char x_ferr[] = "fatal (aborted)" | 
| const char x_header[] = "id.name" | 
| const char x_ign_uu_sp2[] = "omit_undef_dbond" | 
| const char x_ign_uu_sp3[] = "omit_undef_sp3" | 
| const char x_inchi[] = INCHI_NAME | 
| const char x_inchi_ver[] = "version" | 
| const char x_line_closing[] = "</" | 
| const char x_line_opening[] = "<" | 
| const char x_message[] = "message" | 
| const char x_number[] = "number" | 
| const char x_rac[] = "3" | 
| const char x_reconnected[] = "reconnected" | 
| const char x_rel[] = "2" | 
| const char x_space[] = " " | 
| const char x_structure[] = "structure" | 
| const char x_tautomeric[] = "mobile-H" | 
| const char x_text[] = "value" | 
| const char x_type[] = "type" | 
| const char x_type_alpha[] = "alpha" | 
| const char x_type_normal[] = "normal" | 
| const char x_type_numer[] = "numeric" | 
| const char x_type_predec[] = "sct" | 
| const char x_type_short[] = "compressed" | 
| const char x_value[] = "id.value" | 
| const char x_ver[] = "version" | 
| const char x_warn[] = "warning" |