InChI
 
Loading...
Searching...
No Matches
runichi.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <errno.h>
#include <limits.h>
#include <math.h>
#include <ctype.h>
#include <locale.h>
#include "mode.h"
#include "ichitime.h"
#include "ichimain.h"
#include "ichi_io.h"
#include "mol_fmt.h"
#include "inchi_api.h"
#include "readinch.h"
#include "ichicant.h"
#include "inchi_gui.h"
#include "ichirvrs.h"
#include "bcf_s.h"
+ Include dependency graph for runichi.c:

Functions

int DisplayTheWholeStructure (struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, struct tagStructData *sd, INPUT_PARMS *ip, char *szTitle, INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, ORIG_ATOM_DATA *orig_inp_data, long num_inp, int iINChI, int bShowStruct, int bINCHI_LIB_Flag)
 
int DisplayStructure (struct tagCANON_GLOBALS *pCG, inp_ATOM *at, int num_at, OAD_Polymer *polymer, int num_removed_H, int bAdd_DT_to_num_H, int nNumRemovedProtons, NUM_H *nNumRemovedProtonsIsotopic, int bIsotopic, int j, INChI **cur_INChI, INChI_Aux **cur_INChI_Aux, int bAbcNumbers, DRAW_PARMS *dp, INCHI_MODE nMode, char *szTitle)
 
int ReadInChICoord (INCHI_IOSTREAM *pInp, SEGM_LINE *pLine, int *pState, INChI *pInpInChI[INCHI_NUM][TAUT_NUM], int nNumComponents[INCHI_NUM][TAUT_NUM])
 
static int DoOneStructureEarlyPreprocessing (INCHI_CLOCK *ic, CANON_GLOBALS *pCG, long num_inp, STRUCT_DATA *sd, INPUT_PARMS *ip, INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data)
 
int ProcessOneStructureExCore (struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *CG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, INCHI_IOS_STRING *strbuf, unsigned char save_opt_bits)
 
static ORIG_STRUCTOrigAtData_StoreNativeInput (CANON_GLOBALS *pCG, int *nRet, STRUCT_DATA *sd, INPUT_PARMS *ip, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct)
 
static void PrepareSaveOptBits (unsigned char *save_opt_bits, INPUT_PARMS *ip)
 
static void DisplayOrigAndResultStructuresAndComponents (int nRet, INCHI_CLOCK *ic, CANON_GLOBALS *pCG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI[INCHI_NUM], PINChI_Aux2 *pINChI_Aux[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, int maxINChI, COMP_ATOM_DATA composite_norm_data[INCHI_NUM][TAUT_NUM+1])
 
static void SaveOkProcessedMolfile (int nRet, STRUCT_DATA *sd, INPUT_PARMS *ip, INCHI_IOSTREAM *prb_file, INCHI_IOSTREAM *inp_file)
 
static int mark_atoms_to_delete_or_renumber (ORIG_ATOM_DATA *orig_at_data, OAD_StructureEdits *ed, int *at_renum)
 
static int set_renumbered_or_delete (int *number, int *buf, int nelems, int *renum, int base)
 
static void swap_atoms_xyz (ORIG_ATOM_DATA *orig_at_data, int ia1, int ia2)
 
int ProcessOneStructure (INCHI_CLOCK *ic, CANON_GLOBALS *pCG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI[INCHI_NUM], PINChI_Aux2 *pINChI_Aux[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, INCHI_IOS_STRING *strbuf, unsigned char save_opt_bits)
 
int OrigAtData_SaveMolfile (ORIG_ATOM_DATA *orig_inp_data, STRUCT_DATA *sd, INPUT_PARMS *ip, long num_inp, INCHI_IOSTREAM *out_file)
 
int CreateOneStructureINChI (CANON_GLOBALS *pCG, INCHI_CLOCK *ic, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], int iINChI, INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, COMP_ATOM_DATA composite_norm_data2[][TAUT_NUM+1], long num_inp, INCHI_IOS_STRING *strbuf, NORM_CANON_FLAGS *pncFlags)
 
int CreateOneComponentINChI (CANON_GLOBALS *pCG, INCHI_CLOCK *ic, STRUCT_DATA *sd, INPUT_PARMS *ip, INP_ATOM_DATA *inp_cur_data, ORIG_ATOM_DATA *orig_inp_data, PINChI2 *pINChI, PINChI_Aux2 *pINChI_Aux, int iINChI, int i, long num_inp, INP_ATOM_DATA **inp_norm_data, NORM_CANON_FLAGS *pncFlags, INCHI_IOSTREAM *log_file)
 
int ProcessOneStructureEx (struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *CG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, INCHI_IOS_STRING *strbuf, unsigned char save_opt_bits)
 
int PreprocessPolymerCRUData (struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *CG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, INCHI_IOS_STRING *strbuf, unsigned char save_opt_bits, char **sinchi_noedits, char **saux_noedits)
 
int OAD_StructureEdits_Apply (STRUCT_DATA *sd, INPUT_PARMS *ip, ORIG_ATOM_DATA *orig_at_data, OAD_StructureEdits *ed, int *ret)
 
int ValidateAndPreparePolymerAndPseudoatoms (struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *CG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, INCHI_IOS_STRING *strbuf, unsigned char save_opt_bits, int *mind_polymers)
 
int OAD_ProcessOneStructureNoEdits (struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *CG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, INCHI_IOS_STRING *strbuf, unsigned char save_opt_bits, int *n_pzz, char **sinchi, char **saux)
 
int OAD_ProcessOneStructure105Plus (struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *CG, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, long num_inp, INCHI_IOS_STRING *strbuf, unsigned char save_opt_bits, char **sinchi, char **saux)
 

Variables

int(* ConsoleQuit )(void) = NULL
 
int(* UserAction )(void) = NULL
 
const char gsMissing [] = "is missing"
 
const char gsEmpty [] = ""
 
const char gsSpace [] = " "
 
const char gsEqual [] = "="
 

Function Documentation

◆ CreateOneComponentINChI()

int CreateOneComponentINChI ( CANON_GLOBALS pCG,
INCHI_CLOCK ic,
STRUCT_DATA sd,
INPUT_PARMS ip,
INP_ATOM_DATA inp_cur_data,
ORIG_ATOM_DATA orig_inp_data,
PINChI2 pINChI,
PINChI_Aux2 pINChI_Aux,
int  iINChI,
int  i,
long  num_inp,
INP_ATOM_DATA **  inp_norm_data,
NORM_CANON_FLAGS pncFlags,
INCHI_IOSTREAM log_file 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateOneStructureINChI()

int CreateOneStructureINChI ( CANON_GLOBALS pCG,
INCHI_CLOCK ic,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI2[INCHI_NUM],
PINChI_Aux2 pINChI_Aux2[INCHI_NUM],
int  iINChI,
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
COMP_ATOM_DATA  composite_norm_data2[][TAUT_NUM+1],
long  num_inp,
INCHI_IOS_STRING strbuf,
NORM_CANON_FLAGS pncFlags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DisplayOrigAndResultStructuresAndComponents()

void DisplayOrigAndResultStructuresAndComponents ( int  nRet,
INCHI_CLOCK ic,
CANON_GLOBALS pCG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI[INCHI_NUM],
PINChI_Aux2 pINChI_Aux[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
int  maxINChI,
COMP_ATOM_DATA  composite_norm_data[INCHI_NUM][TAUT_NUM+1] 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DisplayStructure()

int DisplayStructure ( struct tagCANON_GLOBALS pCG,
inp_ATOM at,
int  num_at,
OAD_Polymer polymer,
int  num_removed_H,
int  bAdd_DT_to_num_H,
int  nNumRemovedProtons,
NUM_H nNumRemovedProtonsIsotopic,
int  bIsotopic,
int  j,
INChI **  cur_INChI,
INChI_Aux **  cur_INChI_Aux,
int  bAbcNumbers,
DRAW_PARMS dp,
INCHI_MODE  nMode,
char *  szTitle 
)
extern
+ Here is the caller graph for this function:

◆ DisplayTheWholeStructure()

int DisplayTheWholeStructure ( struct tagCANON_GLOBALS pCG,
struct tagINCHI_CLOCK ic,
struct tagStructData sd,
INPUT_PARMS ip,
char *  szTitle,
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
ORIG_ATOM_DATA orig_inp_data,
long  num_inp,
int  iINChI,
int  bShowStruct,
int  bINCHI_LIB_Flag 
)
extern
+ Here is the caller graph for this function:

◆ DoOneStructureEarlyPreprocessing()

int DoOneStructureEarlyPreprocessing ( INCHI_CLOCK ic,
CANON_GLOBALS pCG,
long  num_inp,
STRUCT_DATA sd,
INPUT_PARMS ip,
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mark_atoms_to_delete_or_renumber()

int mark_atoms_to_delete_or_renumber ( ORIG_ATOM_DATA orig_at_data,
OAD_StructureEdits ed,
int *  at_renum 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OAD_ProcessOneStructure105Plus()

int OAD_ProcessOneStructure105Plus ( struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS CG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI2[INCHI_NUM],
PINChI_Aux2 pINChI_Aux2[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
INCHI_IOS_STRING strbuf,
unsigned char  save_opt_bits,
char **  sinchi,
char **  saux 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OAD_ProcessOneStructureNoEdits()

int OAD_ProcessOneStructureNoEdits ( struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS CG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI2[INCHI_NUM],
PINChI_Aux2 pINChI_Aux2[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
INCHI_IOS_STRING strbuf,
unsigned char  save_opt_bits,
int *  n_pzz,
char **  sinchi,
char **  saux 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OAD_StructureEdits_Apply()

int OAD_StructureEdits_Apply ( STRUCT_DATA sd,
INPUT_PARMS ip,
ORIG_ATOM_DATA orig_at_data,
OAD_StructureEdits ed,
int *  ret 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OrigAtData_SaveMolfile()

int OrigAtData_SaveMolfile ( ORIG_ATOM_DATA orig_inp_data,
STRUCT_DATA sd,
INPUT_PARMS ip,
long  num_inp,
INCHI_IOSTREAM out_file 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OrigAtData_StoreNativeInput()

ORIG_STRUCT * OrigAtData_StoreNativeInput ( CANON_GLOBALS pCG,
int *  nRet,
STRUCT_DATA sd,
INPUT_PARMS ip,
ORIG_ATOM_DATA orig_inp_data,
ORIG_STRUCT pOrigStruct 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrepareSaveOptBits()

void PrepareSaveOptBits ( unsigned char *  save_opt_bits,
INPUT_PARMS ip 
)
static
+ Here is the caller graph for this function:

◆ PreprocessPolymerCRUData()

int PreprocessPolymerCRUData ( struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS CG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI2[INCHI_NUM],
PINChI_Aux2 pINChI_Aux2[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
INCHI_IOS_STRING strbuf,
unsigned char  save_opt_bits,
char **  sinchi_noedits,
char **  saux_noedits 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessOneStructure()

int ProcessOneStructure ( INCHI_CLOCK ic,
CANON_GLOBALS pCG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI[INCHI_NUM],
PINChI_Aux2 pINChI_Aux[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
INCHI_IOS_STRING strbuf,
unsigned char  save_opt_bits 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessOneStructureEx()

int ProcessOneStructureEx ( struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS CG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI2[INCHI_NUM],
PINChI_Aux2 pINChI_Aux2[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
INCHI_IOS_STRING strbuf,
unsigned char  save_opt_bits 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessOneStructureExCore()

int ProcessOneStructureExCore ( struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS CG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI2[INCHI_NUM],
PINChI_Aux2 pINChI_Aux2[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
INCHI_IOS_STRING strbuf,
unsigned char  save_opt_bits 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadInChICoord()

int ReadInChICoord ( INCHI_IOSTREAM pInp,
SEGM_LINE pLine,
int *  pState,
INChI pInpInChI[INCHI_NUM][TAUT_NUM],
int  nNumComponents[INCHI_NUM][TAUT_NUM] 
)
extern
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveOkProcessedMolfile()

void SaveOkProcessedMolfile ( int  nRet,
STRUCT_DATA sd,
INPUT_PARMS ip,
INCHI_IOSTREAM prb_file,
INCHI_IOSTREAM inp_file 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_renumbered_or_delete()

int set_renumbered_or_delete ( int *  number,
int *  buf,
int  nelems,
int *  renum,
int  base 
)
static
+ Here is the caller graph for this function:

◆ swap_atoms_xyz()

void swap_atoms_xyz ( ORIG_ATOM_DATA orig_at_data,
int  ia1,
int  ia2 
)
static
+ Here is the caller graph for this function:

◆ ValidateAndPreparePolymerAndPseudoatoms()

int ValidateAndPreparePolymerAndPseudoatoms ( struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS CG,
STRUCT_DATA sd,
INPUT_PARMS ip,
char *  szTitle,
PINChI2 pINChI2[INCHI_NUM],
PINChI_Aux2 pINChI_Aux2[INCHI_NUM],
INCHI_IOSTREAM inp_file,
INCHI_IOSTREAM log_file,
INCHI_IOSTREAM out_file,
INCHI_IOSTREAM prb_file,
ORIG_ATOM_DATA orig_inp_data,
ORIG_ATOM_DATA prep_inp_data,
long  num_inp,
INCHI_IOS_STRING strbuf,
unsigned char  save_opt_bits,
int *  mind_polymers 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ConsoleQuit

int(* ConsoleQuit) (void) ( void  ) = NULL

◆ gsEmpty

const char gsEmpty[] = ""

◆ gsEqual

const char gsEqual[] = "="

◆ gsMissing

const char gsMissing[] = "is missing"

◆ gsSpace

const char gsSpace[] = " "

◆ UserAction

int(* UserAction) (void) ( void  ) = NULL