rino 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +44 -0
- data/Rakefile +123 -0
- data/ext/extconf.rb +26 -0
- data/ext/ruby_inchi_main.so +0 -0
- data/ext/src/aux2atom.h +2786 -0
- data/ext/src/comdef.h +148 -0
- data/ext/src/e_0dstereo.c +3014 -0
- data/ext/src/e_0dstereo.h +31 -0
- data/ext/src/e_comdef.h +57 -0
- data/ext/src/e_ctl_data.h +147 -0
- data/ext/src/e_ichi_io.c +498 -0
- data/ext/src/e_ichi_io.h +40 -0
- data/ext/src/e_ichi_parms.c +37 -0
- data/ext/src/e_ichi_parms.h +41 -0
- data/ext/src/e_ichicomp.h +50 -0
- data/ext/src/e_ichierr.h +40 -0
- data/ext/src/e_ichimain.c +593 -0
- data/ext/src/e_ichisize.h +43 -0
- data/ext/src/e_inchi_atom.c +75 -0
- data/ext/src/e_inchi_atom.h +33 -0
- data/ext/src/e_inpdef.h +41 -0
- data/ext/src/e_mode.h +706 -0
- data/ext/src/e_mol2atom.c +649 -0
- data/ext/src/e_readinch.c +58 -0
- data/ext/src/e_readmol.c +54 -0
- data/ext/src/e_readmol.h +180 -0
- data/ext/src/e_readstru.c +251 -0
- data/ext/src/e_readstru.h +33 -0
- data/ext/src/e_util.c +284 -0
- data/ext/src/e_util.h +61 -0
- data/ext/src/extr_ct.h +251 -0
- data/ext/src/ichi.h +206 -0
- data/ext/src/ichi_bns.c +7999 -0
- data/ext/src/ichi_bns.h +231 -0
- data/ext/src/ichican2.c +5000 -0
- data/ext/src/ichicano.c +2195 -0
- data/ext/src/ichicano.h +49 -0
- data/ext/src/ichicans.c +1625 -0
- data/ext/src/ichicant.h +379 -0
- data/ext/src/ichicomn.h +260 -0
- data/ext/src/ichicomp.h +50 -0
- data/ext/src/ichidrp.h +119 -0
- data/ext/src/ichierr.h +124 -0
- data/ext/src/ichiisot.c +101 -0
- data/ext/src/ichilnct.c +286 -0
- data/ext/src/ichimain.h +132 -0
- data/ext/src/ichimak2.c +1189 -0
- data/ext/src/ichimake.c +3812 -0
- data/ext/src/ichimake.h +205 -0
- data/ext/src/ichimap1.c +851 -0
- data/ext/src/ichimap2.c +2856 -0
- data/ext/src/ichimap4.c +1609 -0
- data/ext/src/ichinorm.c +741 -0
- data/ext/src/ichinorm.h +67 -0
- data/ext/src/ichiparm.c +45 -0
- data/ext/src/ichiparm.h +1441 -0
- data/ext/src/ichiprt1.c +3612 -0
- data/ext/src/ichiprt2.c +1511 -0
- data/ext/src/ichiprt3.c +3011 -0
- data/ext/src/ichiqueu.c +1003 -0
- data/ext/src/ichiring.c +326 -0
- data/ext/src/ichiring.h +49 -0
- data/ext/src/ichisize.h +35 -0
- data/ext/src/ichisort.c +539 -0
- data/ext/src/ichister.c +3538 -0
- data/ext/src/ichister.h +35 -0
- data/ext/src/ichitaut.c +3843 -0
- data/ext/src/ichitaut.h +387 -0
- data/ext/src/ichitime.h +74 -0
- data/ext/src/inchi_api.h +670 -0
- data/ext/src/inchi_dll.c +1480 -0
- data/ext/src/inchi_dll.h +34 -0
- data/ext/src/inchi_dll_main.c +23 -0
- data/ext/src/inchi_dll_main.h +31 -0
- data/ext/src/inpdef.h +328 -0
- data/ext/src/lreadmol.h +1246 -0
- data/ext/src/mode.h +706 -0
- data/ext/src/ruby_inchi_main.c +558 -0
- data/ext/src/runichi.c +4179 -0
- data/ext/src/strutil.c +3861 -0
- data/ext/src/strutil.h +182 -0
- data/ext/src/util.c +1130 -0
- data/ext/src/util.h +85 -0
- data/lib/clean_tempfile.rb +220 -0
- data/lib/rino.rb +111 -0
- data/test/test.rb +386 -0
- metadata +130 -0
data/ext/src/ichimain.h
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
/*
|
2
|
+
* International Union of Pure and Applied Chemistry (IUPAC)
|
3
|
+
* International Chemical Identifier (InChI)
|
4
|
+
* Version 1
|
5
|
+
* Software version 1.00
|
6
|
+
* April 13, 2005
|
7
|
+
* Developed at NIST
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __INCHIMAIN_H__
|
11
|
+
#define __INCHIMAIN_H__
|
12
|
+
|
13
|
+
#define ESC_KEY 27
|
14
|
+
|
15
|
+
/********************************************************************/
|
16
|
+
typedef struct tagStructData {
|
17
|
+
unsigned long ulStructTime;
|
18
|
+
int nErrorCode;
|
19
|
+
int nErrorType;
|
20
|
+
int nStructReadError;
|
21
|
+
char pStrErrStruct[STR_ERR_LEN];
|
22
|
+
long fPtrStart;
|
23
|
+
long fPtrEnd;
|
24
|
+
int bXmlStructStarted;
|
25
|
+
int bUserQuit;
|
26
|
+
int bUserQuitComponent;
|
27
|
+
int bUserQuitComponentDisplay;
|
28
|
+
int bChiralFlag;
|
29
|
+
/* information related to normal or disconnected layers */
|
30
|
+
int num_taut[INCHI_NUM];
|
31
|
+
int num_non_taut[INCHI_NUM];
|
32
|
+
INCHI_MODE bTautFlags[INCHI_NUM]; /* reconnected does not have TG_FLAG_DISCONNECT_COORD_DONE flag */
|
33
|
+
INCHI_MODE bTautFlagsDone[INCHI_NUM]; /* reconnected does not have TG_FLAG_DISCONNECT_COORD_DONE flag */
|
34
|
+
int num_components[INCHI_NUM]; /* number of allocated INChI, INChI_Aux data structures */
|
35
|
+
/* debugging info */
|
36
|
+
#if( bRELEASE_VERSION == 0 )
|
37
|
+
int bExtract;
|
38
|
+
#endif
|
39
|
+
|
40
|
+
} STRUCT_DATA;
|
41
|
+
|
42
|
+
#ifndef INCHI_ALL_CPP
|
43
|
+
#ifdef __cplusplus
|
44
|
+
extern "C" {
|
45
|
+
#endif
|
46
|
+
#endif
|
47
|
+
|
48
|
+
int ReadCommandLineParms( int argc, const char *argv[], INPUT_PARMS *ip, char *szSdfDataValue,
|
49
|
+
unsigned long *ulDisplTime, int bReleaseVersion, INCHI_FILE *log_file );
|
50
|
+
void HelpCommandLineParms( INCHI_FILE *f );
|
51
|
+
int OpenFiles( FILE **inp_file, FILE **output_file, FILE **log_file, FILE **prb_file, INPUT_PARMS *ip );
|
52
|
+
#ifndef INCHI_ANSI_ONLY
|
53
|
+
int DisplayStructure( inp_ATOM *at, int num_at, int num_removed_H, int nNumRemovedProtons, NUM_H nNumRemovedProtonsIsotopic[],
|
54
|
+
int bIsotopic, int j /*bTautomeric*/, INChI **cur_INChI, INChI_Aux **cur_INChI_Aux,
|
55
|
+
int bAbcNumbers, DRAW_PARMS *dp, INCHI_MODE nMode, char *szTitle );
|
56
|
+
void FillTableParms( SET_DRAW_PARMS *sdp, INChI **cur_INChI, INChI_Aux **cur_INChI_Aux, INCHI_MODE nMode, int bShowIsotopic, int bShowTaut );
|
57
|
+
void FillCompositeTableParms( SET_DRAW_PARMS *sdp, AT_NUMB StereoFlags,
|
58
|
+
INCHI_MODE nMode, int bShowIsotopic, int bShowTaut );
|
59
|
+
#endif
|
60
|
+
int PrintInputParms( INCHI_FILE *log_file, INPUT_PARMS *ip );
|
61
|
+
const char *ErrMsg( int nErrorCode );
|
62
|
+
int SortAndPrintINChI( INCHI_FILE *output_file, char *pStr, int nStrLen, INCHI_FILE *log_file,
|
63
|
+
INPUT_PARMS *ip, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data,
|
64
|
+
COMP_ATOM_DATA composite_norm_data[INCHI_NUM][TAUT_NUM+1],
|
65
|
+
ORIG_STRUCT *pOrigStruct, int num_components[INCHI_NUM],
|
66
|
+
int num_non_taut[INCHI_NUM], int num_taut[INCHI_NUM],
|
67
|
+
INCHI_MODE bTautFlags[INCHI_NUM], INCHI_MODE bTautFlagsDone[INCHI_NUM],
|
68
|
+
NORM_CANON_FLAGS *pncFlags, int num_inp,
|
69
|
+
PINChI2 *pINChI[INCHI_NUM], PINChI_Aux2 *pINChI_Aux[INCHI_NUM], int *bSortPrintINChIFlags );
|
70
|
+
void FreeAllINChIArrays( PINChI2 *pINChI[INCHI_NUM], PINChI_Aux2 *pINChI_Aux[INCHI_NUM], int num_components[2] );
|
71
|
+
void FreeINChIArrays( PINChI2 *pINChI, PINChI_Aux2 *pINChI_Aux, int num_components );
|
72
|
+
void SplitTime( unsigned long ulTotalTime, int *hours, int *minutes, int *seconds, int *mseconds );
|
73
|
+
|
74
|
+
int ReadTheStructure( STRUCT_DATA *sd, INPUT_PARMS *ip, FILE *inp_file, ORIG_ATOM_DATA *orig_inp_data,
|
75
|
+
int inp_index, int *out_index );
|
76
|
+
int TreatReadTheStructureErrors( STRUCT_DATA *sd, INPUT_PARMS *ip, int nLogMask,
|
77
|
+
FILE *inp_file, INCHI_FILE *log_file, INCHI_FILE *output_file, INCHI_FILE *prb_file,
|
78
|
+
ORIG_ATOM_DATA *orig_inp_data, int *num_inp, char *pStr, int nStrLen );
|
79
|
+
|
80
|
+
int GetOneComponent( STRUCT_DATA *sd, INPUT_PARMS *ip, INCHI_FILE *log_file, INCHI_FILE *output_file,
|
81
|
+
INP_ATOM_DATA *inp_cur_data,
|
82
|
+
ORIG_ATOM_DATA *orig_inp_data, int i, int num_inp, char *pStr, int nStrLen );
|
83
|
+
int CreateOneComponentINChI( STRUCT_DATA *sd, INPUT_PARMS *ip, INP_ATOM_DATA *inp_cur_data, ORIG_ATOM_DATA *orig_inp_data,
|
84
|
+
PINChI2 *pINChI, PINChI_Aux2 *pINChI_Aux, int iINChI,
|
85
|
+
int i, int num_inp, INP_ATOM_DATA **inp_norm_data,
|
86
|
+
NORM_CANON_FLAGS *pncFlags, INCHI_FILE *log_file );
|
87
|
+
int TreatCreateOneComponentINChIError(STRUCT_DATA *sd, INPUT_PARMS *ip, ORIG_ATOM_DATA *orig_inp_data,
|
88
|
+
int i, int num_inp,
|
89
|
+
FILE *inp_file, INCHI_FILE *log_file, INCHI_FILE *output_file, INCHI_FILE *prb_file,
|
90
|
+
char *pStr, int nStrLen );
|
91
|
+
int TreatCreateINChIWarning(STRUCT_DATA *sd, INPUT_PARMS *ip, ORIG_ATOM_DATA *orig_inp_data, int num_inp,
|
92
|
+
FILE *inp_file, INCHI_FILE *log_file, INCHI_FILE *output_file, INCHI_FILE *prb_file,
|
93
|
+
char *pStr, int nStrLen );
|
94
|
+
|
95
|
+
#if( TEST_RENUMB_ATOMS == 1 ) /* { */
|
96
|
+
int CompareINChI( INChI *i1, INChI *i2, INChI_Aux *a1, INChI_Aux *a2 );
|
97
|
+
#endif
|
98
|
+
|
99
|
+
void eat_keyboard_input( void );
|
100
|
+
int user_quit( const char *msg, unsigned long ulMaxTime );
|
101
|
+
|
102
|
+
int GetOneStructure( STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle,
|
103
|
+
FILE *inp_file, INCHI_FILE *log_file, INCHI_FILE *output_file, INCHI_FILE *prb_file,
|
104
|
+
ORIG_ATOM_DATA *orig_inp_data, int *num_inp, char *pStr, int nStrLen, STRUCT_FPTRS *struct_fptrs );
|
105
|
+
int ProcessOneStructure( STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle,
|
106
|
+
PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM],
|
107
|
+
FILE *inp_file, INCHI_FILE *log_file, INCHI_FILE *output_file, INCHI_FILE *prb_file,
|
108
|
+
ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data,
|
109
|
+
int num_inp, char *pStr, int nStrLen );
|
110
|
+
|
111
|
+
int CreateOneStructureINChI( STRUCT_DATA *sd, INPUT_PARMS *ip, char *szTitle,
|
112
|
+
PINChI2 *pINChI2[INCHI_NUM], PINChI_Aux2 *pINChI_Aux2[INCHI_NUM], int iINChI,
|
113
|
+
FILE *inp_file, INCHI_FILE *log_file, INCHI_FILE *output_file, INCHI_FILE *prb_file,
|
114
|
+
ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data,
|
115
|
+
COMP_ATOM_DATA composite_norm_data2[][TAUT_NUM+1],
|
116
|
+
int num_inp, char *pStr, int nStrLen, NORM_CANON_FLAGS *pncFlags );
|
117
|
+
|
118
|
+
int bIsStructChiral( PINChI2 *pINChI2[INCHI_NUM], int num_components[] );
|
119
|
+
|
120
|
+
int PreprocessOneStructure( STRUCT_DATA *sd, INPUT_PARMS *ip, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data );
|
121
|
+
|
122
|
+
int FillOutOrigStruct( ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, STRUCT_DATA *sd );
|
123
|
+
void FreeOrigStruct( ORIG_STRUCT *pOrigStruct);
|
124
|
+
|
125
|
+
#ifndef INCHI_ALL_CPP
|
126
|
+
#ifdef __cplusplus
|
127
|
+
}
|
128
|
+
#endif
|
129
|
+
#endif
|
130
|
+
|
131
|
+
|
132
|
+
#endif /* __INCHIMAIN_H__ */
|