InChI
 
Loading...
Searching...
No Matches
ichiread.c File Reference
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <locale.h>
#include "mode.h"
#include "ichierr.h"
#include "ichi.h"
#include "ichitime.h"
#include "ichidrp.h"
#include "inpdef.h"
#include "util.h"
#include "strutil.h"
#include "ichi_io.h"
#include "ichimain.h"
#include "extr_ct.h"
#include "ichitaut.h"
#include "ichister.h"
#include "ichisize.h"
#include "ichiring.h"
#include "ichinorm.h"
#include "ichicant.h"
#include "ichirvrs.h"
#include "mol_fmt.h"
#include "bcf_s.h"
+ Include dependency graph for ichiread.c:

Data Structures

struct  tagOneLinkedBond
 
struct  tagLinkedBonds
 
struct  tagInchiReadErrMsg
 
struct  tagNumElem
 

Macros

#define SEGM_LINE_ADD   128
 
#define LINKED_BOND_ADD   128
 
#define SEG_END   '/'
 
#define INCHI_INP_EOL(X)   ((X)=='\n' || (X)=='\r' || (X)=='\t')
 
#define INCHI_TOKEN   "/\n\r\t\\"
 
#define IST_HAPPENED_IN_RECMET   100
 
#define NSTRLEN   524288
 
#define MAX_MSG_LEN   512
 
#define MAX_MSG_BUF_LEN   128
 
#define nNum_H(ICOMPONENT)   ((bMobileH==TAUT_YES)? pInChI[ICOMPONENT].nNum_H : pInChI[ICOMPONENT].nNum_H_fixed)
 
#define LAST_AT_LEN   256
 

Typedefs

typedef struct tagOneLinkedBond ONE_LINKED_BOND
 
typedef struct tagLinkedBonds LINKED_BONDS
 
typedef enum tagModeProtonIsoExchgH MODE_PIXH
 
typedef enum tagInChI_STATE INCHI_STATE
 
typedef struct tagInchiReadErrMsg INCHI_READ_ERR_MSG
 
typedef enum tagCopySegmentType COPY_SEG_TYPE
 
typedef struct tagNumElem NUM_ELEM
 
typedef enum tagAuxInfoState AUX_INFO_STATE
 

Enumerations

enum  tagModeProtonIsoExchgH {
  MODE_PIXH_UNDEFINED , MODE_PIXH_ADD_TO_FIRST , MODE_PIXH_ADD_TO_EACH , MODE_PIXH_ADD_A_PIXH_COMPONENT ,
  MODE_PIXH_KEEP_TOTALS
}
 
enum  tagInChI_STATE {
  IST_MOBILE_H_FORMULA , IST_MOBILE_H_CONNECTIONS , IST_MOBILE_H , IST_MOBILE_H_CHARGE ,
  IST_MOBILE_H_PROTONS , IST_MOBILE_H_SP2 , IST_MOBILE_H_SP3 , IST_MOBILE_H_SP3_M ,
  IST_MOBILE_H_SP3_S , IST_MOBILE_H_ISO_LAYER_FORK , IST_MOBILE_H_ISO_ATOMS , IST_MOBILE_H_ISO_EXCH_H ,
  IST_MOBILE_H_ISO_SP2 , IST_MOBILE_H_ISO_SP3 , IST_MOBILE_H_ISO_SP3_M , IST_MOBILE_H_ISO_SP3_S ,
  IST_FIXED_H_LAYER_FORK , IST_FIXED_H_FORMULA , IST_FIXED_H , IST_FIXED_H_CHARGE ,
  IST_FIXED_H_SP2 , IST_FIXED_H_SP3 , IST_FIXED_H_SP3_M , IST_FIXED_H_SP3_S ,
  IST_FIXED_H_PERMUTATION , IST_FIXED_H_ISO_LAYER_FORK , IST_FIXED_H_ISO_ATOMS , IST_FIXED_H_ISO_LAYER ,
  IST_FIXED_H_ISO_SP2 , IST_FIXED_H_ISO_SP3 , IST_FIXED_H_ISO_SP3_M , IST_FIXED_H_ISO_SP3_S ,
  IST_FIXED_H_ISO_PERMUTATION , IST_RECONNECTED_LAYER_FORK , IST_RECONNECTED_FORMULA , IST_MATERIAL_BALANCE_ERROR ,
  IST_MOBILE_H_POLYMER , IST_END = -1
}
 
enum  tagCopySegmentType {
  CPY_SP2 , CPY_SP3 , CPY_SP3_M , CPY_SP3_S ,
  CPY_ISO_AT
}
 
enum  tagAuxInfoState {
  AST_VERSION , AST_MOBILE_H_NUMBERS , AST_MOBILE_H_ATOM_EQ , AST_MOBILE_H_GROUP_EQ ,
  AST_MOBILE_H_SP3_INV , AST_MOBILE_H_SP3_INV_NUMBERS , AST_MOBILE_H_ISO_LAYER_FORK , AST_MOBILE_H_ISO_NUMBERS ,
  AST_MOBILE_H_ISO_ATOM_EQ , AST_MOBILE_H_ISO_GROUP_EQ , AST_MOBILE_H_ISO_SP3_INV , AST_MOBILE_H_ISO_SP3_INV_NUMBERS ,
  AST_FIXED_H_LAYER_FORK , AST_FIXED_H_NUMBERS , AST_FIXED_H_ATOM_EQ , AST_FIXED_H_SP3_INV ,
  AST_FIXED_H_SP3_INV_NUMBERS , AST_FIXED_H_ISO_LAYER_FORK , AST_FIXED_H_ISO_NUMBERS , AST_FIXED_H_ISO_ATOM_EQ ,
  AST_FIXED_H_ISO_SP3_INV , AST_FIXED_H_ISO_SP3_INV_NUMBERS , AST_REVERSE_INFO_CRV , AST_REVERSE_INFO_ATOMS ,
  AST_REVERSE_INFO_BONDS , AST_REVERSE_INFO_XYZ , AST_RECONNECTED_LAYER_FORK , AST_RECONNECTED_LAYER_NUMBERS
}
 

Functions

int InChILine2Data (INCHI_IOSTREAM *pInp, SEGM_LINE *pLine, char **pStr, int *pState, int *nErr, INChI *pInpInChI[INCHI_NUM][TAUT_NUM], int nNumComponents[INCHI_NUM][TAUT_NUM], REM_PROTONS nNumProtons[INCHI_NUM][TAUT_NUM], int s[INCHI_NUM][TAUT_NUM][2], int bReadCoord, int bInchi2Struct, INCHI_MODE nMode, int *bStdFormat, int *input_has_save_opt, unsigned char *input_save_opt_bits, OAD_Polymer **ppolymer, OAD_V3000 **pv3000)
 
static int GetInChIFormulaNumH (INChI *pInChI, int *nNumH)
 
static int GetInChINumH (INChI *pInChI, int *nNumH)
 
static int GetInChIIsoH (INChI *pInChI, int nNumIsotopicH[NUM_H_ISOTOPES])
 
static int getInChIChar (INCHI_IOSTREAM *pInp)
 
static int AddInChIChar (INCHI_IOSTREAM *pInp, SEGM_LINE *Line, const char *pszToken)
 
static int AddLinkedBond (AT_NUMB at1, AT_NUMB at2, AT_NUMB num_at, LINKED_BONDS *pLB)
 
static int bInChIHasReconnectedMetal (INChI *pInChI)
 
static int SetProtonsAndXchgIsoH (int bInChI2Structure, int bReqSplitOutputInChI, int bReqProtonsForEachComponent, int bReqNonTaut, int bReqStereo, int num_components[INCHI_NUM], MODE_PIXH nModeProtonIsoExchgH[INCHI_NUM], InpInChI *OneInput)
 
static int SetHillFormFromInChI (InpInChI *OneInput)
 
static int nGetInChISegment (INCHI_IOSTREAM *pInp, SEGM_LINE *Line, const char *pszToken)
 
static int CopySegment (INChI *pInChITo, INChI *pInChIFrom, int StereoType, int bIsotopicTo, int bIsotopicFrom)
 
static int nFillOutProtonMobileH (INChI *pInChI)
 
static int nProtonCopyIsotopicInfo (INChI *pInChI_to, INChI *pInChI_from)
 
static int CopyAtomNumbers (INChI *pInChI_To, int bIsoTo, INChI *pInChI_From, int bIsoFrom)
 
static int ParseSegmentFormula (const char *str, int bMobileH, INChI *pInpInChI[], int nNumComponents[], int *na_total)
 
static int ParseSegmentConnections (const char *str, int bMobileH, INChI **pInpInChI, int *pnNumComponents, int *pbAbc, int *nb_total)
 
static int ParseSegmentMobileH (const char *str, int bMobileH, INChI *pInpInChI[], int pnNumComponents[], int *pbAbc)
 
static int ParseSegmentCharge (const char *str, int bMobileH, INChI *pInpInChI[], int nNumComponents[])
 
static int ParseSegmentProtons (const char *str, int bMobileH, REM_PROTONS nNumProtons[], int nNumComponents[])
 
static int ParseSegmentPolymer (const char *str, int bMobileH, REM_PROTONS nNumProtons[], int nNumComponents[], int na_total, int nb_total, int bInchi2Struct, OAD_Polymer **ppPolymer, OAD_V3000 **ppV3000)
 
static int ParseSegmentSp2 (const char *str, int bMobileH, INChI *pInpInChI[], int nNumComponents[], int state, int *pbAbc)
 
static int ParseSegmentSp3 (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state, int *pbAbc)
 
static int SegmentSp3CreateEmpty (const char *str, int bMobileH, INChI *pInpInChI[], int nNumComponents, int state, int *pbAbc)
 
static int SegmentSp3StoreStereoCenters (int *pbAbc, const char *pStart, const char *pEnd, int pInChI_iComponent_nNumberOfAtoms, INChI_Stereo *PStereo_0)
 
static int SegmentSp3ProcessAbbreviation (int *mpy_component, int iComponent, int nNumComponents, int val, const char *q, int state, int *pbAbc, int bMobileH, int nCpyType, INChI *pInChI, INChI *pInpInChI_ALT_TAUT_bMobileH)
 
static int SegmentSp3CopyMultiplierCovered (int mpy_component, int iComponent, INChI *pInpInChI, int bIso, int nCpyType)
 
static int ParseSegmentSp3m (const char *str, int bMobileH, INChI *pInpInChI[], int nNumComponents[], int state)
 
static int bIsSp3LayerNotEmpty (INChI *pInpInChI[], int bMobileH, int bIso, int nNumComponents)
 
static int ParseSegmentSp3s (const char *str, int bMobileH, INChI *pInpInChI[], int s[TAUT_NUM][2], int ppnNumComponents[], int state)
 
static int ParseSegmentIsoAtoms (const char *str, int bMobileH, INChI *pInpInChI[], int nNumComponents[], int state, int *pbAbc)
 
static int ParseSegmentIsoExchgH (const char *str, int bMobileH, REM_PROTONS nNumProtons[], int nNumComponents[], int state, int *pbAbc)
 
static int ParseSegmentPerm (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state, int *pbAbc)
 
static int ReadInChILine (INCHI_IOSTREAM *pInp, SEGM_LINE *pLine, char **pStr, int *pState, INChI *pInpInChI[INCHI_NUM][TAUT_NUM], int nNumComponents[INCHI_NUM][TAUT_NUM], REM_PROTONS nNumProtons[INCHI_NUM][TAUT_NUM], int s[INCHI_NUM][TAUT_NUM][2], int *input_is_stdinchi, int *input_has_save_opt, unsigned char *input_save_opt_bits, int bInchi2Struct, OAD_Polymer **ppolymer, OAD_V3000 **pv3000)
 
int ReadInChICoord (INCHI_IOSTREAM *pInp, SEGM_LINE *pLine, int *pState, INChI *pInpInChI[INCHI_NUM][TAUT_NUM], int nNumComponents[INCHI_NUM][TAUT_NUM])
 
static int OutputInChIAsRequested (struct tagCANON_GLOBALS *pCG, INCHI_IOSTREAM *pOut, INCHI_IOSTREAM *pLog, ICHICONST INPUT_PARMS *ip_inp, STRUCT_DATA *sd_inp, InpInChI *OneInput, int num_components[INCHI_NUM], MODE_PIXH nModeProtonIsoExchgH[INCHI_NUM], long num_inp, unsigned char save_opt_bits)
 
static int ParseAuxSegmentVersion (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state)
 
static int ParseAuxSegmentNumbers (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state, int *pbAbc)
 
static int ParseAuxSegmentAtomEqu (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state)
 
static int ParseAuxSegmentGroupEqu (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state)
 
static int ParseAuxSegmentSp3Inv (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state)
 
static int ParseAuxSegmentSp3InvNumbers (const char *str, int bMobileH, INChI *pInpInChI[], int ppnNumComponents[], int state)
 
static int ParseAuxSegmentReverseCRV (const char *str, int state)
 
static int ParseAuxSegmentReverseAtoms (const char *str, int state)
 
static int ParseAuxSegmentReverseBonds (const char *str, int state)
 
static int ParseAuxSegmentReverseXYZ (const char *str, XYZ_COORD **ppXYZ, int state)
 
static int AddAuxSegmentCoord (int nRet, XYZ_COORD *pXYZ, int nLenXYZ, INChI *pInpInChI[INCHI_NUM][TAUT_NUM], int nNumComponents[INCHI_NUM][TAUT_NUM])
 
static void getInchiStateReadErr (int stat, char *szMsg)
 
static const char * getInchiErrName (int nErr)
 
static int extract_from_inchi_string (char *sinchi, InpInChI *OneInput)
 
const char * ParseSegmentReadDelimitedNumbers (const char *str, const char *pEnd, INT_ARRAY *numlist, char c_delim, char c_stop, int *ret)
 
void PrepareSaveOptBits (INPUT_PARMS *ip, INCHI_IOSTREAM *pLog, const long num_inp, const char *szCurHdr, int input_has_save_opt, unsigned char input_save_opt_bits, unsigned char *save_opt_bits)
 
void TreatErrorsInReadInChIString (int nReadStatus, int nErr, int pState, INPUT_PARMS *ip, INCHI_IOSTREAM *pOut, INCHI_IOSTREAM *pLog, long *num_inp, long *num_errors, long *num_processed, char **pstrHdr, char **pszCurHdr, InpInChI *pOneInput)
 
int ConvertInChI2Struct (ICHICONST INPUT_PARMS *ip_inp, INPUT_PARMS *ip, InpInChI *pOneInput, inp_ATOM **at, int *num_at, OAD_Polymer **polymer, OAD_V3000 **v3000, INCHI_IOSTREAM *pOut, INCHI_IOSTREAM *pLog, STRUCT_DATA *sd, int num_components[INCHI_NUM], MODE_PIXH nModeProtonIsoExchgH[INCHI_NUM], char **pszCurHdr, char *szMsg, int nMsgLen, char szMessage[MAX_MSG_LEN], int nInitLenMessage, int nMessageLen, int input_is_stdinchi, int bHasSomeReconnected, int bHasSomeFixedH, int bHasMetal, int nModeFlagsStereo, int bTautFlags, int bReqNonTaut, unsigned long WarningFlags[2][2], long num_inp, long *num_errors, unsigned char save_opt_bits, inchiTime *pulTStart, long *ulProcessingTime, struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG)
 
int ConvertInChI2InChI (INPUT_PARMS *ip, InpInChI *pOneInput, INCHI_IOSTREAM *pOut, INCHI_IOSTREAM *pLog, STRUCT_DATA *sd, int num_components[INCHI_NUM], MODE_PIXH nModeProtonIsoExchgH[INCHI_NUM], char **pszCurHdr, long num_inp, long *num_errors, unsigned char save_opt_bits, inchiTime *pulTStart, long *ulProcessingTime, struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG)
 
int DetectAndExposePolymerInternals (INCHI_IOSTREAM *is)
 
int DetectHiddenPolymerStuff (char *tmpstr, int tmpstrlen, int *ninsert, int *insert_pos, int insert_lead_offset, int *nstars)
 
int ReadWriteInChI (INCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, INCHI_IOSTREAM *pInp, INCHI_IOSTREAM *pOut, INCHI_IOSTREAM *pLog, INPUT_PARMS *ip_inp, STRUCT_DATA *sd_inp, inp_ATOM **at, int *num_at, int *num_bonds, OAD_Polymer **polymer, OAD_V3000 **v3000, char *szMsg, int nMsgLen, unsigned long WarningFlags[2][2])
 
int GetNumNeighborsFromInchi (INChI *pInChI, AT_NUMB nAtNumber)
 
int CountStereoTypes (INChI *pInChI, int *num_known_SB, int *num_known_SC, int *num_unk_und_SB, int *num_unk_und_SC, int *num_SC_PIII, int *num_SC_AsIII)
 
int bInpInchiComponentExists (InpInChI *pOneInput, int iInChI, int bMobileH, int k)
 
int bInpInchiComponentDeleted (InpInChI *pOneInput, int iInChI, int bMobileH, int k)
 
int bRevInchiComponentExists (StrFromINChI *pStruct, int iInChI, int bMobileH, int k)
 
int bRevInchiComponentDeleted (StrFromINChI *pStruct, int iInChI, int bMobileH, int k)
 
int DetectInpInchiCreationOptions (InpInChI *pOneInput, int *bHasReconnected, int *bHasMetal, int *bHasFixedH, int *nModeFlagsStereo, int *bTautFlagsStereo)
 
int insertions_sort_AT_NUMB (AT_NUMB *base, int num)
 
int extract_stereo_info_from_inchi_string (char *sinchi, int nat, int *orig, int *at_stereo_mark_orig)
 
int extract_all_backbone_bonds_from_inchi_string (char *sinchi, int *n_all_bkb_orig, int *orig, int *all_bkb_orig)
 

Variables

ICHICONST INCHI_READ_ERR_MSG irErrMsg []
 

Macro Definition Documentation

◆ INCHI_INP_EOL

#define INCHI_INP_EOL (   X)    ((X)=='\n' || (X)=='\r' || (X)=='\t')

◆ INCHI_TOKEN

#define INCHI_TOKEN   "/\n\r\t\\"

◆ IST_HAPPENED_IN_RECMET

#define IST_HAPPENED_IN_RECMET   100

◆ LAST_AT_LEN

#define LAST_AT_LEN   256

◆ LINKED_BOND_ADD

#define LINKED_BOND_ADD   128

◆ MAX_MSG_BUF_LEN

#define MAX_MSG_BUF_LEN   128

◆ MAX_MSG_LEN

#define MAX_MSG_LEN   512

◆ nNum_H

#define nNum_H (   ICOMPONENT)    ((bMobileH==TAUT_YES)? pInChI[ICOMPONENT].nNum_H : pInChI[ICOMPONENT].nNum_H_fixed)

◆ NSTRLEN

#define NSTRLEN   524288

◆ SEG_END

#define SEG_END   '/'

◆ SEGM_LINE_ADD

#define SEGM_LINE_ADD   128

Typedef Documentation

◆ AUX_INFO_STATE

◆ COPY_SEG_TYPE

◆ INCHI_READ_ERR_MSG

◆ INCHI_STATE

◆ LINKED_BONDS

typedef struct tagLinkedBonds LINKED_BONDS

◆ MODE_PIXH

◆ NUM_ELEM

typedef struct tagNumElem NUM_ELEM

◆ ONE_LINKED_BOND

Enumeration Type Documentation

◆ tagAuxInfoState

Enumerator
AST_VERSION 
AST_MOBILE_H_NUMBERS 
AST_MOBILE_H_ATOM_EQ 
AST_MOBILE_H_GROUP_EQ 
AST_MOBILE_H_SP3_INV 
AST_MOBILE_H_SP3_INV_NUMBERS 
AST_MOBILE_H_ISO_LAYER_FORK 
AST_MOBILE_H_ISO_NUMBERS 
AST_MOBILE_H_ISO_ATOM_EQ 
AST_MOBILE_H_ISO_GROUP_EQ 
AST_MOBILE_H_ISO_SP3_INV 
AST_MOBILE_H_ISO_SP3_INV_NUMBERS 
AST_FIXED_H_LAYER_FORK 
AST_FIXED_H_NUMBERS 
AST_FIXED_H_ATOM_EQ 
AST_FIXED_H_SP3_INV 
AST_FIXED_H_SP3_INV_NUMBERS 
AST_FIXED_H_ISO_LAYER_FORK 
AST_FIXED_H_ISO_NUMBERS 
AST_FIXED_H_ISO_ATOM_EQ 
AST_FIXED_H_ISO_SP3_INV 
AST_FIXED_H_ISO_SP3_INV_NUMBERS 
AST_REVERSE_INFO_CRV 
AST_REVERSE_INFO_ATOMS 
AST_REVERSE_INFO_BONDS 
AST_REVERSE_INFO_XYZ 
AST_RECONNECTED_LAYER_FORK 
AST_RECONNECTED_LAYER_NUMBERS 

◆ tagCopySegmentType

Enumerator
CPY_SP2 
CPY_SP3 
CPY_SP3_M 
CPY_SP3_S 
CPY_ISO_AT 

◆ tagInChI_STATE

Enumerator
IST_MOBILE_H_FORMULA 
IST_MOBILE_H_CONNECTIONS 
IST_MOBILE_H 
IST_MOBILE_H_CHARGE 
IST_MOBILE_H_PROTONS 
IST_MOBILE_H_SP2 
IST_MOBILE_H_SP3 
IST_MOBILE_H_SP3_M 
IST_MOBILE_H_SP3_S 
IST_MOBILE_H_ISO_LAYER_FORK 
IST_MOBILE_H_ISO_ATOMS 
IST_MOBILE_H_ISO_EXCH_H 
IST_MOBILE_H_ISO_SP2 
IST_MOBILE_H_ISO_SP3 
IST_MOBILE_H_ISO_SP3_M 
IST_MOBILE_H_ISO_SP3_S 
IST_FIXED_H_LAYER_FORK 
IST_FIXED_H_FORMULA 
IST_FIXED_H 
IST_FIXED_H_CHARGE 
IST_FIXED_H_SP2 
IST_FIXED_H_SP3 
IST_FIXED_H_SP3_M 
IST_FIXED_H_SP3_S 
IST_FIXED_H_PERMUTATION 
IST_FIXED_H_ISO_LAYER_FORK 
IST_FIXED_H_ISO_ATOMS 
IST_FIXED_H_ISO_LAYER 
IST_FIXED_H_ISO_SP2 
IST_FIXED_H_ISO_SP3 
IST_FIXED_H_ISO_SP3_M 
IST_FIXED_H_ISO_SP3_S 
IST_FIXED_H_ISO_PERMUTATION 
IST_RECONNECTED_LAYER_FORK 
IST_RECONNECTED_FORMULA 
IST_MATERIAL_BALANCE_ERROR 
IST_MOBILE_H_POLYMER 
IST_END 

◆ tagModeProtonIsoExchgH

Enumerator
MODE_PIXH_UNDEFINED 
MODE_PIXH_ADD_TO_FIRST 
MODE_PIXH_ADD_TO_EACH 
MODE_PIXH_ADD_A_PIXH_COMPONENT 
MODE_PIXH_KEEP_TOTALS 

Function Documentation

◆ AddAuxSegmentCoord()

int AddAuxSegmentCoord ( int  nRet,
XYZ_COORD pXYZ,
int  nLenXYZ,
INChI pInpInChI[INCHI_NUM][TAUT_NUM],
int  nNumComponents[INCHI_NUM][TAUT_NUM] 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddInChIChar()

int AddInChIChar ( INCHI_IOSTREAM pInp,
SEGM_LINE Line,
const char *  pszToken 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddLinkedBond()

int AddLinkedBond ( AT_NUMB  at1,
AT_NUMB  at2,
AT_NUMB  num_at,
LINKED_BONDS pLB 
)
static
+ Here is the caller graph for this function:

◆ bInChIHasReconnectedMetal()

int bInChIHasReconnectedMetal ( INChI pInChI)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bInpInchiComponentDeleted()

int bInpInchiComponentDeleted ( InpInChI pOneInput,
int  iInChI,
int  bMobileH,
int  k 
)
+ Here is the caller graph for this function:

◆ bInpInchiComponentExists()

int bInpInchiComponentExists ( InpInChI pOneInput,
int  iInChI,
int  bMobileH,
int  k 
)
+ Here is the caller graph for this function:

◆ bIsSp3LayerNotEmpty()

int bIsSp3LayerNotEmpty ( INChI pInpInChI[],
int  bMobileH,
int  bIso,
int  nNumComponents 
)
static
+ Here is the caller graph for this function:

◆ bRevInchiComponentDeleted()

int bRevInchiComponentDeleted ( StrFromINChI pStruct,
int  iInChI,
int  bMobileH,
int  k 
)

pStruct->at2 ||

+ Here is the caller graph for this function:

◆ bRevInchiComponentExists()

int bRevInchiComponentExists ( StrFromINChI pStruct,
int  iInChI,
int  bMobileH,
int  k 
)

pStruct->at2 ||

+ Here is the caller graph for this function:

◆ ConvertInChI2InChI()

int ConvertInChI2InChI ( INPUT_PARMS ip,
InpInChI pOneInput,
INCHI_IOSTREAM pOut,
INCHI_IOSTREAM pLog,
STRUCT_DATA sd,
int  num_components[INCHI_NUM],
MODE_PIXH  nModeProtonIsoExchgH[INCHI_NUM],
char **  pszCurHdr,
long  num_inp,
long *  num_errors,
unsigned char  save_opt_bits,
inchiTime pulTStart,
long *  ulProcessingTime,
struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS pCG 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConvertInChI2Struct()

int ConvertInChI2Struct ( ICHICONST INPUT_PARMS ip_inp,
INPUT_PARMS ip,
InpInChI pOneInput,
inp_ATOM **  at,
int *  num_at,
OAD_Polymer **  polymer,
OAD_V3000 **  v3000,
INCHI_IOSTREAM pOut,
INCHI_IOSTREAM pLog,
STRUCT_DATA sd,
int  num_components[INCHI_NUM],
MODE_PIXH  nModeProtonIsoExchgH[INCHI_NUM],
char **  pszCurHdr,
char *  szMsg,
int  nMsgLen,
char  szMessage[MAX_MSG_LEN],
int  nInitLenMessage,
int  nMessageLen,
int  input_is_stdinchi,
int  bHasSomeReconnected,
int  bHasSomeFixedH,
int  bHasMetal,
int  nModeFlagsStereo,
int  bTautFlags,
int  bReqNonTaut,
unsigned long  WarningFlags[2][2],
long  num_inp,
long *  num_errors,
unsigned char  save_opt_bits,
inchiTime pulTStart,
long *  ulProcessingTime,
struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS pCG 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyAtomNumbers()

int CopyAtomNumbers ( INChI pInChI_To,
int  bIsoTo,
INChI pInChI_From,
int  bIsoFrom 
)
static
+ Here is the caller graph for this function:

◆ CopySegment()

int CopySegment ( INChI pInChITo,
INChI pInChIFrom,
int  StereoType,
int  bIsotopicTo,
int  bIsotopicFrom 
)
static
+ Here is the caller graph for this function:

◆ CountStereoTypes()

int CountStereoTypes ( INChI pInChI,
int *  num_known_SB,
int *  num_known_SC,
int *  num_unk_und_SB,
int *  num_unk_und_SC,
int *  num_SC_PIII,
int *  num_SC_AsIII 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DetectAndExposePolymerInternals()

int DetectAndExposePolymerInternals ( INCHI_IOSTREAM is)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DetectHiddenPolymerStuff()

int DetectHiddenPolymerStuff ( char *  tmpstr,
int  tmpstrlen,
int *  ninsert,
int *  insert_pos,
int  insert_lead_offset,
int *  nstars 
)
+ Here is the caller graph for this function:

◆ DetectInpInchiCreationOptions()

int DetectInpInchiCreationOptions ( InpInChI pOneInput,
int *  bHasReconnected,
int *  bHasMetal,
int *  bHasFixedH,
int *  nModeFlagsStereo,
int *  bTautFlagsStereo 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extract_all_backbone_bonds_from_inchi_string()

int extract_all_backbone_bonds_from_inchi_string ( char *  sinchi,
int *  n_all_bkb_orig,
int *  orig,
int *  all_bkb_orig 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extract_from_inchi_string()

int extract_from_inchi_string ( char *  sinchi,
InpInChI OneInput 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extract_stereo_info_from_inchi_string()

int extract_stereo_info_from_inchi_string ( char *  sinchi,
int  nat,
int *  orig,
int *  at_stereo_mark_orig 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInChIChar()

int getInChIChar ( INCHI_IOSTREAM pInp)
static
+ Here is the caller graph for this function:

◆ getInchiErrName()

const char * getInchiErrName ( int  nErr)
static
+ Here is the caller graph for this function:

◆ GetInChIFormulaNumH()

int GetInChIFormulaNumH ( INChI pInChI,
int *  nNumH 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInChIIsoH()

int GetInChIIsoH ( INChI pInChI,
int  nNumIsotopicH[NUM_H_ISOTOPES] 
)
static
+ Here is the caller graph for this function:

◆ GetInChINumH()

int GetInChINumH ( INChI pInChI,
int *  nNumH 
)
static
+ Here is the caller graph for this function:

◆ getInchiStateReadErr()

void getInchiStateReadErr ( int  stat,
char *  szMsg 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNumNeighborsFromInchi()

int GetNumNeighborsFromInchi ( INChI pInChI,
AT_NUMB  nAtNumber 
)
+ Here is the caller graph for this function:

◆ InChILine2Data()

int InChILine2Data ( INCHI_IOSTREAM pInp,
SEGM_LINE pLine,
char **  pStr,
int *  pState,
int *  nErr,
INChI pInpInChI[INCHI_NUM][TAUT_NUM],
int  nNumComponents[INCHI_NUM][TAUT_NUM],
REM_PROTONS  nNumProtons[INCHI_NUM][TAUT_NUM],
int  s[INCHI_NUM][TAUT_NUM][2],
int  bReadCoord,
int  bInchi2Struct,
INCHI_MODE  nMode,
int *  bStdFormat,
int *  input_has_save_opt,
unsigned char *  input_save_opt_bits,
OAD_Polymer **  ppolymer,
OAD_V3000 **  pv3000 
)

(pInChI_Alt && pInChI_Alt->Stereo && pInChI_Alt->Stereo->nNumberOfStereoCenters) &&

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertions_sort_AT_NUMB()

int insertions_sort_AT_NUMB ( AT_NUMB base,
int  num 
)
+ Here is the caller graph for this function:

◆ nFillOutProtonMobileH()

int nFillOutProtonMobileH ( INChI pInChI)
static
+ Here is the caller graph for this function:

◆ nGetInChISegment()

int nGetInChISegment ( INCHI_IOSTREAM pInp,
SEGM_LINE Line,
const char *  pszToken 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nProtonCopyIsotopicInfo()

int nProtonCopyIsotopicInfo ( INChI pInChI_to,
INChI pInChI_from 
)
static
+ Here is the caller graph for this function:

◆ OutputInChIAsRequested()

int OutputInChIAsRequested ( struct tagCANON_GLOBALS pCG,
INCHI_IOSTREAM pOut,
INCHI_IOSTREAM pLog,
ICHICONST INPUT_PARMS ip_inp,
STRUCT_DATA sd_inp,
InpInChI OneInput,
int  num_components[INCHI_NUM],
MODE_PIXH  nModeProtonIsoExchgH[INCHI_NUM],
long  num_inp,
unsigned char  save_opt_bits 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseAuxSegmentAtomEqu()

int ParseAuxSegmentAtomEqu ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state 
)
static
+ Here is the caller graph for this function:

◆ ParseAuxSegmentGroupEqu()

int ParseAuxSegmentGroupEqu ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state 
)
static
+ Here is the caller graph for this function:

◆ ParseAuxSegmentNumbers()

int ParseAuxSegmentNumbers ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state,
int *  pbAbc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseAuxSegmentReverseAtoms()

int ParseAuxSegmentReverseAtoms ( const char *  str,
int  state 
)
static
+ Here is the caller graph for this function:

◆ ParseAuxSegmentReverseBonds()

int ParseAuxSegmentReverseBonds ( const char *  str,
int  state 
)
static
+ Here is the caller graph for this function:

◆ ParseAuxSegmentReverseCRV()

int ParseAuxSegmentReverseCRV ( const char *  str,
int  state 
)
static
+ Here is the caller graph for this function:

◆ ParseAuxSegmentReverseXYZ()

int ParseAuxSegmentReverseXYZ ( const char *  str,
XYZ_COORD **  ppXYZ,
int  state 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseAuxSegmentSp3Inv()

int ParseAuxSegmentSp3Inv ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state 
)
static
+ Here is the caller graph for this function:

◆ ParseAuxSegmentSp3InvNumbers()

int ParseAuxSegmentSp3InvNumbers ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state 
)
static
+ Here is the caller graph for this function:

◆ ParseAuxSegmentVersion()

int ParseAuxSegmentVersion ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentCharge()

int ParseSegmentCharge ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  nNumComponents[] 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentConnections()

int ParseSegmentConnections ( const char *  str,
int  bMobileH,
INChI **  pInpInChI,
int *  pnNumComponents,
int *  pbAbc,
int *  nb_total 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentFormula()

int ParseSegmentFormula ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  nNumComponents[],
int *  na_total 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentIsoAtoms()

int ParseSegmentIsoAtoms ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  nNumComponents[],
int  state,
int *  pbAbc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentIsoExchgH()

int ParseSegmentIsoExchgH ( const char *  str,
int  bMobileH,
REM_PROTONS  nNumProtons[],
int  nNumComponents[],
int  state,
int *  pbAbc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentMobileH()

int ParseSegmentMobileH ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  pnNumComponents[],
int *  pbAbc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentPerm()

int ParseSegmentPerm ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state,
int *  pbAbc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentPolymer()

int ParseSegmentPolymer ( const char *  str,
int  bMobileH,
REM_PROTONS  nNumProtons[],
int  nNumComponents[],
int  na_total,
int  nb_total,
int  bInchi2Struct,
OAD_Polymer **  ppPolymer,
OAD_V3000 **  ppV3000 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentProtons()

int ParseSegmentProtons ( const char *  str,
int  bMobileH,
REM_PROTONS  nNumProtons[],
int  nNumComponents[] 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentReadDelimitedNumbers()

const char * ParseSegmentReadDelimitedNumbers ( const char *  str,
const char *  pEnd,
INT_ARRAY numlist,
char  c_delim,
char  c_stop,
int *  ret 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentSp2()

int ParseSegmentSp2 ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  nNumComponents[],
int  state,
int *  pbAbc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentSp3()

int ParseSegmentSp3 ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  ppnNumComponents[],
int  state,
int *  pbAbc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentSp3m()

int ParseSegmentSp3m ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  nNumComponents[],
int  state 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSegmentSp3s()

int ParseSegmentSp3s ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  s[TAUT_NUM][2],
int  ppnNumComponents[],
int  state 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrepareSaveOptBits()

void PrepareSaveOptBits ( INPUT_PARMS ip,
INCHI_IOSTREAM pLog,
const long  num_inp,
const char *  szCurHdr,
int  input_has_save_opt,
unsigned char  input_save_opt_bits,
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] 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadInChILine()

int ReadInChILine ( INCHI_IOSTREAM pInp,
SEGM_LINE pLine,
char **  pStr,
int *  pState,
INChI pInpInChI[INCHI_NUM][TAUT_NUM],
int  nNumComponents[INCHI_NUM][TAUT_NUM],
REM_PROTONS  nNumProtons[INCHI_NUM][TAUT_NUM],
int  s[INCHI_NUM][TAUT_NUM][2],
int *  input_is_stdinchi,
int *  input_has_save_opt,
unsigned char *  input_save_opt_bits,
int  bInchi2Struct,
OAD_Polymer **  ppolymer,
OAD_V3000 **  pv3000 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadWriteInChI()

int ReadWriteInChI ( INCHI_CLOCK ic,
struct tagCANON_GLOBALS pCG,
INCHI_IOSTREAM pInp,
INCHI_IOSTREAM pOut,
INCHI_IOSTREAM pLog,
INPUT_PARMS ip_inp,
STRUCT_DATA sd_inp,
inp_ATOM **  at,
int *  num_at,
int *  num_bonds,
OAD_Polymer **  polymer,
OAD_V3000 **  v3000,
char *  szMsg,
int  nMsgLen,
unsigned long  WarningFlags[2][2] 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SegmentSp3CopyMultiplierCovered()

static int SegmentSp3CopyMultiplierCovered ( int  mpy_component,
int  iComponent,
INChI pInpInChI,
int  bIso,
int  nCpyType 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SegmentSp3CreateEmpty()

static int SegmentSp3CreateEmpty ( const char *  str,
int  bMobileH,
INChI pInpInChI[],
int  nNumComponents,
int  state,
int *  pbAbc 
)
static
+ Here is the caller graph for this function:

◆ SegmentSp3ProcessAbbreviation()

static int SegmentSp3ProcessAbbreviation ( int *  mpy_component,
int  iComponent,
int  nNumComponents,
int  val,
const char *  q,
int  state,
int *  pbAbc,
int  bMobileH,
int  nCpyType,
INChI pInChI,
INChI pInpInChI_ALT_TAUT_bMobileH 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SegmentSp3StoreStereoCenters()

static int SegmentSp3StoreStereoCenters ( int *  pbAbc,
const char *  pStart,
const char *  pEnd,
int  pInChI_iComponent_nNumberOfAtoms,
INChI_Stereo PStereo_0 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetHillFormFromInChI()

int SetHillFormFromInChI ( InpInChI OneInput)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetProtonsAndXchgIsoH()

int SetProtonsAndXchgIsoH ( int  bInChI2Structure,
int  bReqSplitOutputInChI,
int  bReqProtonsForEachComponent,
int  bReqNonTaut,
int  bReqStereo,
int  num_components[INCHI_NUM],
MODE_PIXH  nModeProtonIsoExchgH[INCHI_NUM],
InpInChI OneInput 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TreatErrorsInReadInChIString()

void TreatErrorsInReadInChIString ( int  nReadStatus,
int  nErr,
int  pState,
INPUT_PARMS ip,
INCHI_IOSTREAM pOut,
INCHI_IOSTREAM pLog,
long *  num_inp,
long *  num_errors,
long *  num_processed,
char **  pstrHdr,
char **  pszCurHdr,
InpInChI pOneInput 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ irErrMsg