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/ichinorm.h
ADDED
@@ -0,0 +1,67 @@
|
|
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 __INCHINORM_H__
|
11
|
+
#define __INCHINORM_H__
|
12
|
+
|
13
|
+
#include "mode.h"
|
14
|
+
#include "ichi_bns.h"
|
15
|
+
|
16
|
+
#ifndef INCHI_ALL_CPP
|
17
|
+
#ifdef __cplusplus
|
18
|
+
extern "C" {
|
19
|
+
#endif
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/* main normalization procedure */
|
23
|
+
int mark_alt_bonds_and_taut_groups ( inp_ATOM *at, inp_ATOM *at_fixed_bonds_out, int num_atoms,
|
24
|
+
T_GROUP_INFO *t_group_info, INCHI_MODE *inpbTautFlags, INCHI_MODE *inpbTautFlagsDone );
|
25
|
+
|
26
|
+
int MarkTautomerGroups( inp_ATOM *at, int num_atoms, T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info,
|
27
|
+
struct BalancedNetworkStructure *pBNS, struct BalancedNetworkData *pBD);
|
28
|
+
int MarkChargeGroups ( inp_ATOM *at, int num_atoms, C_GROUP_INFO *c_group_info, T_GROUP_INFO *t_group_info,
|
29
|
+
struct BalancedNetworkStructure *pBNS, struct BalancedNetworkData *pBD );
|
30
|
+
int MarkSaltChargeGroups ( inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info,
|
31
|
+
T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info,
|
32
|
+
struct BalancedNetworkStructure *pBNS, struct BalancedNetworkData *pBD );
|
33
|
+
int MarkSaltChargeGroups2 ( inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info,
|
34
|
+
T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info,
|
35
|
+
struct BalancedNetworkStructure *pBNS, struct BalancedNetworkData *pBD );
|
36
|
+
int MergeSaltTautGroups( inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info,
|
37
|
+
T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info,
|
38
|
+
struct BalancedNetworkStructure *pBNS );
|
39
|
+
int MakeIsotopicHGroup( inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info,
|
40
|
+
T_GROUP_INFO *t_group_info );
|
41
|
+
|
42
|
+
int remove_terminal_HDT( int num_atoms, inp_ATOM *at );
|
43
|
+
int RemoveExcessiveImplicitH( int num_atoms, int num_removed_H, inp_ATOM *at );
|
44
|
+
int add_DT_to_num_H( int num_atoms, inp_ATOM *at );
|
45
|
+
int MarkRingSystemsInp( inp_ATOM *at, int num_atoms );
|
46
|
+
int free_t_group_info( T_GROUP_INFO *t_group_info );
|
47
|
+
int make_a_copy_of_t_group_info( T_GROUP_INFO *t_group_info, T_GROUP_INFO *t_group_info_orig );
|
48
|
+
int set_tautomer_iso_sort_keys( T_GROUP_INFO *t_group_info );
|
49
|
+
int CountTautomerGroups( sp_ATOM *at, int num_atoms, T_GROUP_INFO *t_group_info );
|
50
|
+
int SortTautomerGroupsAndEndpoints( T_GROUP_INFO *t_group_info, int num_atoms, int num_at_tg, AT_RANK *nRank );
|
51
|
+
int FillIsotopicAtLinearCT( int num_atoms, sp_ATOM* at, const AT_RANK *nAtomNumber,
|
52
|
+
AT_ISOTOPIC *LinearCTIsotopic, int nMaxLenLinearCTIsotopic, int *pnLenLinearCTIsotopic );
|
53
|
+
|
54
|
+
int FillTautLinearCT2( int num_atoms, int num_at_tg, int bIsoTaut,
|
55
|
+
const AT_RANK *nRank, const AT_RANK *nAtomNumber, const AT_RANK *nSymmRank,
|
56
|
+
const AT_RANK *nRankIso, const AT_RANK *nAtomNumberIso, const AT_RANK *nSymmRankIso,
|
57
|
+
AT_TAUTOMER *LinearCTTautomer, int nMaxLenLinearCTTautomer, int *pnLenLinearCTTautomer,
|
58
|
+
AT_ISO_TGROUP *LinearCTIsotopicTautomer, int nMaxLenLinearCTIsotopicTautomer, int *pnLenLinearCTIsotopicTautomer,
|
59
|
+
T_GROUP_INFO *t_group_info );
|
60
|
+
|
61
|
+
#ifndef INCHI_ALL_CPP
|
62
|
+
#ifdef __cplusplus
|
63
|
+
}
|
64
|
+
#endif
|
65
|
+
#endif
|
66
|
+
|
67
|
+
#endif /* __INCHINORM_H__ */
|
data/ext/src/ichiparm.c
ADDED
@@ -0,0 +1,45 @@
|
|
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
|
+
#include <stdio.h>
|
11
|
+
#include <stdlib.h>
|
12
|
+
#include <string.h>
|
13
|
+
#include <ctype.h>
|
14
|
+
#include <stdarg.h>
|
15
|
+
/* #include <varargs.h> */
|
16
|
+
#include <errno.h>
|
17
|
+
#include <limits.h>
|
18
|
+
|
19
|
+
#include "mode.h" /* moved from below, suggestion by David Mosenkis */
|
20
|
+
|
21
|
+
#ifndef INCHI_ANSI_ONLY
|
22
|
+
#include <conio.h>
|
23
|
+
#endif
|
24
|
+
|
25
|
+
#include "inpdef.h"
|
26
|
+
#include "ichi.h"
|
27
|
+
#include "strutil.h"
|
28
|
+
#include "util.h"
|
29
|
+
#include "ichidrp.h"
|
30
|
+
#include "ichierr.h"
|
31
|
+
#include "ichimain.h"
|
32
|
+
#include "extr_ct.h"
|
33
|
+
|
34
|
+
#ifdef INCHI_LIB
|
35
|
+
#include "ichi_lib.h"
|
36
|
+
#endif
|
37
|
+
|
38
|
+
#include "ichicomp.h"
|
39
|
+
|
40
|
+
#if( ADD_CMLPP == 1 )
|
41
|
+
#include "readcml.hpp"
|
42
|
+
#include "debug.h"
|
43
|
+
#endif
|
44
|
+
|
45
|
+
#include "ichiparm.h"
|