#include <stdlib.h>#include <string.h>#include <ctype.h>#include <math.h>#include "mode.h"#include "strutil.h"#include "ichister.h"#include "ichi_io.h"#include "ichimain.h"#include "bcf_s.h"
 Include dependency graph for strutil.c:Data Structures | |
| struct | tagTreeAtom | 
Macros | |
| #define | FIX_P_IV_Plus_O_Minus | 
| #define | FIRST_NEIGHB2 4 | 
| #define | FIRST_CENTER2 5 | 
| #define | MAX_NEIGH 6 | 
| #define | MIN_BOND_LENGTH (1.0e-6) | 
| #define | MIN_COS (1.0e-6) | 
| #define | MIN_BOND_LENGTH2 (MIN_BOND_LENGTH*MIN_BOND_LENGTH) | 
| #define | MAX_BOND_LENGTH (1.0e30) | 
| #define | NUM_SEGM 20 | 
Typedefs | |
| typedef struct tagTreeAtom | tre_ATOM | 
| typedef enum tagIonAtomType | ION_ATOM_TYPE | 
Enumerations | |
| enum | tagIonAtomType {  IAT_H = 0 , IAT_C , IAT_N , IAT_P , IAT_O , IAT_S , IAT_Se , IAT_Te , IAT_F , IAT_Cl , IAT_Br , IAT_I , IAT_MAX = 12 }  | 
Functions | |
| int | insertions_sort_AT_RANK (AT_RANK *base, int num) | 
| int | cmp_iso_atw_diff_component_no (const void *a1, const void *a2) | 
| int | cmp_components (const void *a1, const void *a2) | 
| INChI_Stereo * | Alloc_INChI_Stereo (int num_at, int num_bonds) | 
| int | RemoveInpAtBond (inp_ATOM *at, int iat, int k) | 
| int | DisconnectInpAtBond (inp_ATOM *at, AT_NUMB *nOldCompNumber, int iat, int neigh_ord) | 
| int | move_explicit_Hcation (inp_ATOM *at, int num_at, int iat, int iat_H, int bInAllComponents) | 
| int | DisconnectOneLigand (inp_ATOM *at, AT_NUMB *nOldCompNumber, S_CHAR *bMetal, char *elnumber_Heteroat, int num_halogens, int num_atoms, int iMetal, int jLigand, INCHI_MODE *bTautFlagsDone) | 
| int | bIsAmmoniumSalt (inp_ATOM *at, int i, int *piO, int *pk, S_CHAR *num_explicit_H) | 
| int | DisconnectAmmoniumSalt (inp_ATOM *at, int i, int iO, int k, S_CHAR *num_explicit_H) | 
| int | DisconnectMetalSalt (inp_ATOM *at, int i) | 
| int | bIsMetalToDisconnect (inp_ATOM *at, int i, int bCheckMetalValence) | 
| int | get_iat_number (int el_number) | 
| int | tot_unsat (int unsat[]) | 
| int | max_unsat (int unsat[]) | 
| double | dist3D (inp_ATOM *at1, inp_ATOM *at2) | 
| double | dist2D (inp_ATOM *at1, inp_ATOM *at2) | 
| double | dist_from_segm (double x, double y, double x1, double y1, double x2, double y2) | 
| int | segments_intersect (double x11, double y11, double x12, double y12, double x21, double y21, double x22, double y22) | 
| double | GetMinDistDistribution (inp_ATOM *at, int num_at, int iat, int iat_H, int bInAllComponents, double min_dist[], int num_segm) | 
| int | nFindOneOM (inp_ATOM *at, int at_no, int ord_OM[], int num_OM) | 
| int | the_only_doublet_neigh (inp_ATOM *at, int i1, int *ineigh1, int *ineigh2) | 
| int | fix_non_uniform_drawn_oxoanions (int num_atoms, inp_ATOM *at, int *num_changes) | 
| int | fix_non_uniform_drawn_amidiniums (int num_atoms, inp_ATOM *at, int *num_changes) | 
| void | add_bond_if_unseen (subgraf_pathfinder *spf, int node0, int node, int *nbonds, int **bonds) | 
| int | fix_odd_things (int num_atoms, inp_ATOM *at, int bFixBug, int bFixNonUniformDraw) | 
| Fix odd things in the input atoms.   | |
| int | post_fix_odd_things (int num_atoms, inp_ATOM *at) | 
| Post-fix odd things in the input atoms (does nothing, returns 0)   | |
| int | remove_ion_pairs (int num_atoms, inp_ATOM *at) | 
| Remove ion pairs from the input atoms.   | |
| int | bIsMetalSalt (inp_ATOM *at, int i) | 
| int | DisconnectSalts (ORIG_ATOM_DATA *orig_inp_data, int bDisconnect) | 
| Disconnect salts in the original atom data.   | |
| int | bMayDisconnectMetals (ORIG_ATOM_DATA *orig_inp_data, int bCheckMetalValence, INCHI_MODE *bTautFlagsDone) | 
| Check if metals may be disconnected in the original atom data.   | |
| int | DisconnectMetals (ORIG_ATOM_DATA *orig_inp_data, int bCheckMetalValence, INCHI_MODE *bTautFlagsDone) | 
| Disconnect metals in the original atom data.   | |
| int | add_DT_to_num_H (int num_atoms, inp_ATOM *at) | 
| int | remove_terminal_HDT (int num_atoms, inp_ATOM *at, int bFixTermHChrg) | 
| int | bHeteroAtomMayHaveXchgIsoH (inp_ATOM *atom, int iat) | 
| Checks whether a hetero atom may have exchangeable isotopic hydrogens.   | |
| int | bNumHeterAtomHasIsotopicH (inp_ATOM *atom, int num_atoms) | 
| int | MarkDisconnectedComponents (ORIG_ATOM_DATA *orig_at_data, int bProcessOldCompNumbers) | 
| Mark disconnected components in the original atom data.   | |
| int | ExtractConnectedComponent (inp_ATOM *at, int num_at, int component_number, inp_ATOM *component_at) | 
| int | SetConnectedComponentNumber (inp_ATOM *at, int num_at, int component_number) | 
| int | Free_INChI_Stereo (INChI_Stereo *pINChI_Stereo) | 
| int | Free_INChI (INChI **ppINChI) | 
| int | Free_INChI_Members (INChI *pINChI) | 
| INChI * | Alloc_INChI (inp_ATOM *at, int num_at, int *found_num_bonds, int *found_num_isotopic, int nAllocMode) | 
| int | Free_INChI_Aux (INChI_Aux **ppINChI_Aux) | 
| INChI_Aux * | Alloc_INChI_Aux (int num_at, int num_isotopic_atoms, int nAllocMode, int bOrigCoord) | 
| void | CompAtomData_GetNumMapping (COMP_ATOM_DATA *adata, int *orig_num, int *curr_num) | 
| int | imat_new (int m, int n, int ***a) | 
| void | imat_free (int m, int **a) | 
| subgraf * | subgraf_new (ORIG_ATOM_DATA *orig_inp_data, int nnodes, int *nodes) | 
| void | subgraf_free (subgraf *sg) | 
| void | subgraf_debug_trace (subgraf *sg) | 
| subgraf_pathfinder * | subgraf_pathfinder_new (subgraf *sg, ORIG_ATOM_DATA *orig_inp_data, int start, int end) | 
| void | subgraf_pathfinder_free (subgraf_pathfinder *spf) | 
| void | subgraf_pathfinder_run (subgraf_pathfinder *spf, int nforbidden, int *forbidden, int *nbonds, int **bonds, int *natoms, int *atoms) | 
| int | subgraf_pathfinder_collect_all (subgraf_pathfinder *spf, int nforbidden, int *forbidden, int *atnums) | 
| void | PrintFileName (const char *fmt, FILE *out_file, const char *szFname) | 
| Print the file name.   | |
| #define FIRST_CENTER2 5 | 
| #define FIRST_NEIGHB2 4 | 
| #define FIX_P_IV_Plus_O_Minus | 
| #define MAX_BOND_LENGTH (1.0e30) | 
| #define MAX_NEIGH 6 | 
| #define MIN_BOND_LENGTH (1.0e-6) | 
| #define MIN_BOND_LENGTH2 (MIN_BOND_LENGTH*MIN_BOND_LENGTH) | 
| #define MIN_COS (1.0e-6) | 
| #define NUM_SEGM 20 | 
| typedef enum tagIonAtomType ION_ATOM_TYPE | 
| typedef struct tagTreeAtom tre_ATOM | 
| enum tagIonAtomType | 
| void add_bond_if_unseen | ( | subgraf_pathfinder * | spf, | 
| int | node0, | ||
| int | node, | ||
| int * | nbonds, | ||
| int ** | bonds | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int add_DT_to_num_H | ( | int | num_atoms, | 
| inp_ATOM * | at | ||
| ) | 
 Here is the caller graph for this function:| INChI * Alloc_INChI | ( | inp_ATOM * | at, | 
| int | num_at, | ||
| int * | found_num_bonds, | ||
| int * | found_num_isotopic, | ||
| int | nAllocMode | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| INChI_Aux * Alloc_INChI_Aux | ( | int | num_at, | 
| int | num_isotopic_atoms, | ||
| int | nAllocMode, | ||
| int | bOrigCoord | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| INChI_Stereo * Alloc_INChI_Stereo | ( | int | num_at, | 
| int | num_bonds | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int bHeteroAtomMayHaveXchgIsoH | ( | inp_ATOM * | atom, | 
| int | iat | ||
| ) | 
Checks whether a hetero atom may have exchangeable isotopic hydrogens.
| atom | Pointer to atom list | 
| iat | Atom number | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
 Here is the caller graph for this function:| int bIsMetalSalt | ( | inp_ATOM * | at, | 
| int | i | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int bIsMetalToDisconnect | ( | inp_ATOM * | at, | 
| int | i, | ||
| int | bCheckMetalValence | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int bMayDisconnectMetals | ( | ORIG_ATOM_DATA * | orig_inp_data, | 
| int | bCheckMetalValence, | ||
| INCHI_MODE * | bTautFlagsDone | ||
| ) | 
Check if metals may be disconnected in the original atom data.
| orig_inp_data | Pointer to original atom data structure | 
| bCheckMetalValence | Flag indicating whether to check metal valence | 
| bTautFlagsDone | Pointer to tautomeric flags done | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int bNumHeterAtomHasIsotopicH | ( | inp_ATOM * | atom, | 
| int | num_atoms | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int cmp_components | ( | const void * | a1, | 
| const void * | a2 | ||
| ) | 
 Here is the caller graph for this function:| int cmp_iso_atw_diff_component_no | ( | const void * | a1, | 
| const void * | a2 | ||
| ) | 
 Here is the caller graph for this function:| void CompAtomData_GetNumMapping | ( | COMP_ATOM_DATA * | adata, | 
| int * | orig_num, | ||
| int * | curr_num | ||
| ) | 
 Here is the caller graph for this function:
 Here is the call graph for this function:
 Here is the caller graph for this function:
 Here is the call graph for this function:
 Here is the caller graph for this function:| int DisconnectMetals | ( | ORIG_ATOM_DATA * | orig_inp_data, | 
| int | bCheckMetalValence, | ||
| INCHI_MODE * | bTautFlagsDone | ||
| ) | 
Disconnect metals in the original atom data.
| orig_inp_data | Pointer to original atom data structure | 
| bCheckMetalValence | Flag indicating whether to check metal valence | 
| bTautFlagsDone | Pointer to tautomeric flags done | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int DisconnectMetalSalt | ( | inp_ATOM * | at, | 
| int | i | ||
| ) | 
 Here is the caller graph for this function:| int DisconnectOneLigand | ( | inp_ATOM * | at, | 
| AT_NUMB * | nOldCompNumber, | ||
| S_CHAR * | bMetal, | ||
| char * | elnumber_Heteroat, | ||
| int | num_halogens, | ||
| int | num_atoms, | ||
| int | iMetal, | ||
| int | jLigand, | ||
| INCHI_MODE * | bTautFlagsDone | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int DisconnectSalts | ( | ORIG_ATOM_DATA * | orig_inp_data, | 
| int | bDisconnect | ||
| ) | 
Disconnect salts in the original atom data.
| orig_inp_data | Pointer to original atom data structure | 
| bDisconnect | Flag indicating whether to disconnect salts | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| double dist_from_segm | ( | double | x, | 
| double | y, | ||
| double | x1, | ||
| double | y1, | ||
| double | x2, | ||
| double | y2 | ||
| ) | 
| int ExtractConnectedComponent | ( | inp_ATOM * | at, | 
| int | num_at, | ||
| int | component_number, | ||
| inp_ATOM * | component_at | ||
| ) | 
 Here is the caller graph for this function:| int fix_non_uniform_drawn_amidiniums | ( | int | num_atoms, | 
| inp_ATOM * | at, | ||
| int * | num_changes | ||
| ) | 
 Here is the caller graph for this function:| int fix_non_uniform_drawn_oxoanions | ( | int | num_atoms, | 
| inp_ATOM * | at, | ||
| int * | num_changes | ||
| ) | 
 Here is the caller graph for this function:| int fix_odd_things | ( | int | num_atoms, | 
| inp_ATOM * | at, | ||
| int | bFixBug, | ||
| int | bFixNonUniformDraw | ||
| ) | 
Fix odd things in the input atoms.
| num_atoms | Number of input atoms | 
| at | Array of input atoms | 
| bFixBug | Flag indicating whether to fix bugs | 
| bFixNonUniformDraw | Flag indicating whether to fix non-uniform drawing | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int Free_INChI | ( | INChI ** | ppINChI | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int Free_INChI_Aux | ( | INChI_Aux ** | ppINChI_Aux | ) | 
 Here is the caller graph for this function:| int Free_INChI_Members | ( | INChI * | pINChI | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int Free_INChI_Stereo | ( | INChI_Stereo * | pINChI_Stereo | ) | 
 Here is the caller graph for this function:| int get_iat_number | ( | int | el_number | ) | 
 Here is the caller graph for this function:| double GetMinDistDistribution | ( | inp_ATOM * | at, | 
| int | num_at, | ||
| int | iat, | ||
| int | iat_H, | ||
| int | bInAllComponents, | ||
| double | min_dist[], | ||
| int | num_segm | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void imat_free | ( | int | m, | 
| int ** | a | ||
| ) | 
 Here is the caller graph for this function:| int imat_new | ( | int | m, | 
| int | n, | ||
| int *** | a | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int insertions_sort_AT_RANK | ( | AT_RANK * | base, | 
| int | num | ||
| ) | 
 Here is the caller graph for this function:| int MarkDisconnectedComponents | ( | ORIG_ATOM_DATA * | orig_at_data, | 
| int | bProcessOldCompNumbers | ||
| ) | 
Mark disconnected components in the original atom data.
| orig_at_data | Pointer to original atom data structure | 
| bProcessOldCompNumbers | Flag indicating whether to process old component numbers | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int max_unsat | ( | int | unsat[] | ) | 
| int move_explicit_Hcation | ( | inp_ATOM * | at, | 
| int | num_at, | ||
| int | iat, | ||
| int | iat_H, | ||
| int | bInAllComponents | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int nFindOneOM | ( | inp_ATOM * | at, | 
| int | at_no, | ||
| int | ord_OM[], | ||
| int | num_OM | ||
| ) | 
 Here is the caller graph for this function:| int post_fix_odd_things | ( | int | num_atoms, | 
| inp_ATOM * | at | ||
| ) | 
Post-fix odd things in the input atoms (does nothing, returns 0)
| num_atoms | Number of input atoms | 
| at | Array of input atoms | 
 Here is the caller graph for this function:| void PrintFileName | ( | const char * | fmt, | 
| FILE * | out_file, | ||
| const char * | szFname | ||
| ) | 
Print the file name.
| fmt | Format string | 
| out_file | Output file pointer | 
| szFname | File name string | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int remove_ion_pairs | ( | int | num_atoms, | 
| inp_ATOM * | at | ||
| ) | 
Remove ion pairs from the input atoms.
| num_atoms | Number of input atoms | 
| at | Array of input atoms | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int remove_terminal_HDT | ( | int | num_atoms, | 
| inp_ATOM * | at, | ||
| int | bFixTermHChrg | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int RemoveInpAtBond | ( | inp_ATOM * | at, | 
| int | iat, | ||
| int | k | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int segments_intersect | ( | double | x11, | 
| double | y11, | ||
| double | x12, | ||
| double | y12, | ||
| double | x21, | ||
| double | y21, | ||
| double | x22, | ||
| double | y22 | ||
| ) | 
| int SetConnectedComponentNumber | ( | inp_ATOM * | at, | 
| int | num_at, | ||
| int | component_number | ||
| ) | 
 Here is the caller graph for this function:| void subgraf_debug_trace | ( | subgraf * | sg | ) | 
| void subgraf_free | ( | subgraf * | sg | ) | 
 Here is the caller graph for this function:| subgraf * subgraf_new | ( | ORIG_ATOM_DATA * | orig_inp_data, | 
| int | nnodes, | ||
| int * | nodes | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int subgraf_pathfinder_collect_all | ( | subgraf_pathfinder * | spf, | 
| int | nforbidden, | ||
| int * | forbidden, | ||
| int * | atnums | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void subgraf_pathfinder_free | ( | subgraf_pathfinder * | spf | ) | 
 Here is the caller graph for this function:| subgraf_pathfinder * subgraf_pathfinder_new | ( | subgraf * | sg, | 
| ORIG_ATOM_DATA * | orig_inp_data, | ||
| int | start, | ||
| int | end | ||
| ) | 
 Here is the caller graph for this function:| void subgraf_pathfinder_run | ( | subgraf_pathfinder * | spf, | 
| int | nforbidden, | ||
| int * | forbidden, | ||
| int * | nbonds, | ||
| int ** | bonds, | ||
| int * | natoms, | ||
| int * | atoms | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| int the_only_doublet_neigh | ( | inp_ATOM * | at, | 
| int | i1, | ||
| int * | ineigh1, | ||
| int * | ineigh2 | ||
| ) | 
 Here is the caller graph for this function:| int tot_unsat | ( | int | unsat[] | ) |