#include <stdlib.h>#include <string.h>#include <stdarg.h>#include <errno.h>#include <limits.h>#include <math.h>#include <ctype.h>#include "mode.h"#include "ichitime.h"#include "ichister.h"#include "ichimain.h"#include "ichi_io.h"#include "mol_fmt.h"#include "inchi_api.h"#include "readinch.h"#include "inchi_gui.h"#include "ichirvrs.h"#include "bcf_s.h"
Include dependency graph for runichi2.c:Data Structures | |
| struct | tagModSCenterInfo |
| struct | tagDiylFrag |
Typedefs | |
| typedef struct tagModSCenterInfo | ModSCenterInfo |
| typedef struct tagDiylFrag | DiylFrag |
Functions | |
| static DiylFrag * | DiylFrag_New (int na, int e1nd, int end2, char *s) |
| static void | DiylFrag_Free (DiylFrag *pfrag) |
| static void | DiylFrag_MakeSignature (DiylFrag *pfrag, int nxc, int *xc, int *tmp) |
| static int | DiylFrag_Diff (DiylFrag *pfrag1, DiylFrag *pfrag2) |
| static void | DiylFrag_DebugTrace (DiylFrag *pfrag) |
| static int | NDefStereoBonds (inp_ATOM *at, int iatom, int bOnlyPointedEndMatters) |
| static void | ModSCenter_Init (ModSCenterInfo *scinfo, inp_ATOM *at, int iatom) |
| static void | ModSCenter_AddTo (ModSCenterInfo *scinfo, int iadd) |
| static void | ModSCenter_DelFrom (ModSCenterInfo *scinfo, int idel) |
| static int | ModSCenter_IsChanged (ModSCenterInfo *scinfo, inp_ATOM *at) |
| static int | GetFrameShiftInfoFrom105PlusInChI (char *sinchi, int *alist, int max_crossing) |
| static int | analyze_CRU_folding (ORIG_ATOM_DATA *orig_at_data, int iunit, int n_all_bkb, int *all_bkb, int nxclasses, int *xc, OAD_StructureEdits *ed) |
| static int | count_colors_in_sequence (int *entries, int n_entries, int max_distinct, int *counts) |
| static int | len_repeating_subsequence (int *color, int *color2, int n) |
| int | GetOneStructure (INCHI_CLOCK *ic, STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle, INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, long *num_inp, STRUCT_FPTRS *struct_fptrs) |
| static int | BuildPolymerCrossingBondEndpointMask (INP_ATOM_DATA *inp_cur_data, const ORIG_ATOM_DATA *orig_inp_data, const INPUT_PARMS *ip, int component_number) |
| int | GetOneComponent (INCHI_CLOCK *ic, STRUCT_DATA *sd, INPUT_PARMS *ip, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INP_ATOM_DATA *inp_cur_data, ORIG_ATOM_DATA *orig_inp_data, int i, long num_inp) |
| int | ReadTheStructure (struct tagINCHI_CLOCK *ic, STRUCT_DATA *sd, INPUT_PARMS *ip, INCHI_IOSTREAM *inp_file, ORIG_ATOM_DATA *orig_inp_data, int inp_index, int *out_index) |
| int | TreatErrorsInReadTheStructure (STRUCT_DATA *sd, INPUT_PARMS *ip, int nLogMask, INCHI_IOSTREAM *inp_file, INCHI_IOSTREAM *log_file, INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *prb_file, ORIG_ATOM_DATA *orig_inp_data, long *num_inp) |
| int | InchiToOrigAtom (INCHI_IOSTREAM *inp_molfile, ORIG_ATOM_DATA *orig_at_data, int bMergeAllInputStructures, int bGetOrigCoord, int bDoNotAddH, int vABParityUnknown, INPUT_TYPE nInputType, char *pSdfLabel, char *pSdfValue, unsigned long *lSdfId, INCHI_MODE *pInpAtomFlags, int *err, char *pStrErr) |
| Convert InChI representation to original atom data. | |
| int | bIsSameBond (int a1, int a2, int b1, int b2) |
| Check if two bonds are the same. | |
| int | extract_orig_nums_from_auxinfo_string (char *saux, int *orig) |
| Parse AuxInfostring and get a list of original atom numbers orig[cano_num]. | |
| int | extract_nonstereo_eq_classes_from_auxinfo_string (char *saux, int nat, int *orig, int *nclasses, int *eclass, int *eclass_by_origs) |
| Parse AuxInfostring and get non-stereo equivalence classes. | |
| int | POSEContext_Init (POSEContext *context, 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) |
| void | POSEContext_Free (POSEContext *context) |
| void | POSEContext_DebugPrint (POSEContext *context) |
| int | OAD_StructureEdits_Init (OAD_StructureEdits *ed) |
| Initialize structure edits. | |
| void | OAD_StructureEdits_Clear (OAD_StructureEdits *ed) |
| Clear structure edits. | |
| void | OAD_StructureEdits_DebugPrint (OAD_StructureEdits *ed) |
| Debug print structure edits. | |
| int | OAD_Polymer_PrepareFoldCRUEdits (ORIG_ATOM_DATA *orig_at_data, char *sinchi_noedits, char *saux_noedits, char *sinchi, char *saux, OAD_StructureEdits *ed) |
| Prepare CRU edits for polymer data structure (prepare CRU fold edits as suggested by the strings with preliminary generated interim (1.05+ flavoured) InChI and AuxInfo) | |
| int | OAD_Polymer_PrepareFrameShiftEdits (ORIG_ATOM_DATA *orig_at_data, char *sinchi, char *saux, OAD_StructureEdits *ed) |
| Prepare frame shift edits for polymer data structure (prepare frame shift edits as suggested by the strings with preliminary generated interim (1.05+ flavoured) InChI and AuxInfo) | |
Variables | |
| int | ec_opp [MAX_ATOMS] |
| int | ec_cano_opp [MAX_ATOMS] |
| int | at_stereo_mark_orig_opp [MAX_ATOMS] |
| int | xc_opp [MAX_ATOMS] |
| typedef struct tagDiylFrag DiylFrag |
| typedef struct tagModSCenterInfo ModSCenterInfo |
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:| int bIsSameBond | ( | int | a1, |
| int | a2, | ||
| int | b1, | ||
| int | b2 | ||
| ) |
Check if two bonds are the same.
| a1 | Atom a1 index |
| a2 | Atom a2 index |
| b1 | Atom b1 index |
| b2 | Atom b2 index |
Here is the caller graph for this function:
|
static |
@nnuk
Build a component-local mask of polymer crossing-bond endpoints.
The polymer crossing-bond list (OAD_PolymerUnit.blist) uses whole-structure, 1-based atom numbering, whereas inp_cur_data contains only atoms from the selected connected component. ExtractConnectedComponent() preserves the original atom order within the component, allowing the corresponding local atom index to be reconstructed.
The mask is later consulted by remove_terminal_HDT() to preserve explicit H/D/T atoms that participate in polymer crossing bonds.
| inp_cur_data | chemical structure information for the current component |
| orig_inp_data | chemical structure information for the whole structure |
| ip | input parameters |
| component_number | number of component in the chemical structure |
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:
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 extract_nonstereo_eq_classes_from_auxinfo_string | ( | char * | saux, |
| int | nat, | ||
| int * | orig, | ||
| int * | have_eclass_info, | ||
| int * | eclass, | ||
| int * | eclass_by_origs | ||
| ) |
Parse AuxInfostring and get non-stereo equivalence classes.
| saux | Pointer to AuxInfo string |
| nat | Number of atoms |
| orig | Pointer to array of original atom numbers |
| have_eclass_info | Pointer to output flag indicating if equivalence class info is present |
| eclass | Pointer to output array of equivalence classes by canonical atom number |
| eclass_by_origs | Pointer to output array of equivalence classes by original atom number |
Here is the call graph for this function:
Here is the caller graph for this function:| int extract_orig_nums_from_auxinfo_string | ( | char * | saux, |
| int * | orig | ||
| ) |
Parse AuxInfostring and get a list of original atom numbers orig[cano_num].
| saux | Pointer to AuxInfo string |
| orig | Pointer to output array of original atom numbers |
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 GetOneComponent | ( | INCHI_CLOCK * | ic, |
| STRUCT_DATA * | sd, | ||
| INPUT_PARMS * | ip, | ||
| INCHI_IOSTREAM * | log_file, | ||
| INCHI_IOSTREAM * | out_file, | ||
| INP_ATOM_DATA * | inp_cur_data, | ||
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| int | i, | ||
| long | num_inp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int GetOneStructure | ( | INCHI_CLOCK * | ic, |
| STRUCT_DATA * | sd, | ||
| INPUT_PARMS * | ip, | ||
| char * | szTitle, | ||
| INCHI_IOSTREAM * | inp_file, | ||
| INCHI_IOSTREAM * | log_file, | ||
| INCHI_IOSTREAM * | out_file, | ||
| INCHI_IOSTREAM * | prb_file, | ||
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| long * | num_inp, | ||
| STRUCT_FPTRS * | struct_fptrs | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int InchiToOrigAtom | ( | INCHI_IOSTREAM * | infile, |
| ORIG_ATOM_DATA * | orig_at_data, | ||
| int | bMergeAllInputStructures, | ||
| int | bGetOrigCoord, | ||
| int | bDoNotAddH, | ||
| int | vABParityUnknown, | ||
| INPUT_TYPE | nInputType, | ||
| char * | pSdfLabel, | ||
| char * | pSdfValue, | ||
| unsigned long * | lSdfId, | ||
| INCHI_MODE * | pInpAtomFlags, | ||
| int * | err, | ||
| char * | pStrErr | ||
| ) |
Convert InChI representation to original atom data.
| infile | Input file stream |
| orig_at_data | Pointer to original atom data structure to be filled |
| bMergeAllInputStructures | Flag indicating whether to merge all input structures |
| bGetOrigCoord | Flag indicating whether to get original coordinates |
| bDoNotAddH | Flag indicating whether to avoid adding hydrogens |
| vABParityUnknown | Flag indicating whether to treat vAB parity as unknown |
| nInputType | Input type |
| pSdfLabel | Pointer to SDF label |
| pSdfValue | Pointer to SDF value |
| lSdfId | Pointer to SDF ID |
| pInpAtomFlags | Pointer to input atom flags |
| err | Pointer to error code |
| pStrErr | Pointer to error string |
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:
|
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:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
!! TUT NADO NE TAK base2 tot, kogo net v new_nbr new_base2 - tot, kogo net v nbr
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 OAD_Polymer_PrepareFoldCRUEdits | ( | ORIG_ATOM_DATA * | orig_at_data, |
| char * | sinchi_noedits, | ||
| char * | saux_noedits, | ||
| char * | sinchi, | ||
| char * | saux, | ||
| OAD_StructureEdits * | ed | ||
| ) |
Prepare CRU edits for polymer data structure (prepare CRU fold edits as suggested by the strings with preliminary generated interim (1.05+ flavoured) InChI and AuxInfo)
| orig_at_data | Pointer to original atom data structure |
| sinchi_noedits | Pointer to InChI string without edits |
| saux_noedits | Pointer to auxiliary InChI string without edits |
| sinchi | Pointer to InChI string with edits |
| saux | Pointer to auxiliary InChI string with edits |
| ed | Pointer to structure edits to be filled |
Here is the call graph for this function:
Here is the caller graph for this function:| int OAD_Polymer_PrepareFrameShiftEdits | ( | ORIG_ATOM_DATA * | orig_at_data, |
| char * | sinchi, | ||
| char * | saux, | ||
| OAD_StructureEdits * | ed | ||
| ) |
Prepare frame shift edits for polymer data structure (prepare frame shift edits as suggested by the strings with preliminary generated interim (1.05+ flavoured) InChI and AuxInfo)
| orig_at_data | Pointer to original atom data structure |
| sinchi | Pointer to InChI string with edits |
| saux | Pointer to auxiliary InChI string with edits |
| ed | Pointer to structure edits to be filled |
Here is the call graph for this function:
Here is the caller graph for this function:| void OAD_StructureEdits_Clear | ( | OAD_StructureEdits * | ed | ) |
Clear structure edits.
| ed | Pointer to structure edits |
Here is the call graph for this function:
Here is the caller graph for this function:| void OAD_StructureEdits_DebugPrint | ( | OAD_StructureEdits * | ed | ) |
Debug print structure edits.
| ed | Pointer to structure edits |
Here is the call graph for this function:
Here is the caller graph for this function:| int OAD_StructureEdits_Init | ( | OAD_StructureEdits * | ed | ) |
Initialize structure edits.
| ed | Pointer to structure edits |
Here is the call graph for this function:
Here is the caller graph for this function:| void POSEContext_DebugPrint | ( | POSEContext * | context | ) |
| void POSEContext_Free | ( | POSEContext * | context | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int POSEContext_Init | ( | POSEContext * | context, |
| 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:| int ReadTheStructure | ( | struct tagINCHI_CLOCK * | ic, |
| STRUCT_DATA * | sd, | ||
| INPUT_PARMS * | ip, | ||
| INCHI_IOSTREAM * | inp_file, | ||
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| int | inp_index, | ||
| int * | out_index | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int TreatErrorsInReadTheStructure | ( | STRUCT_DATA * | sd, |
| INPUT_PARMS * | ip, | ||
| int | nLogMask, | ||
| INCHI_IOSTREAM * | inp_file, | ||
| INCHI_IOSTREAM * | log_file, | ||
| INCHI_IOSTREAM * | out_file, | ||
| INCHI_IOSTREAM * | prb_file, | ||
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| long * | num_inp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int at_stereo_mark_orig_opp[MAX_ATOMS] |
| int ec_cano_opp[MAX_ATOMS] |
| int ec_opp[MAX_ATOMS] |
| int xc_opp[MAX_ATOMS] |