InChI
 
Loading...
Searching...
No Matches
readinch.h
Go to the documentation of this file.
1/*
2 * International Chemical Identifier (InChI)
3 * Version 1
4 * Software version 1.07
5 * April 30, 2024
6 *
7 * MIT License
8 *
9 * Copyright (c) 2024 IUPAC and InChI Trust
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in all
19 * copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
28*
29* The InChI library and programs are free software developed under the
30 * auspices of the International Union of Pure and Applied Chemistry (IUPAC).
31 * Originally developed at NIST.
32 * Modifications and additions by IUPAC and the InChI Trust.
33 * Some portions of code were developed/changed by external contributors
34 * (either contractor or volunteer) which are listed in the file
35 * 'External-contributors' included in this distribution.
36 *
37 * info@inchi-trust.org
38 *
39*/
40
41#include "mode.h" /* djb-rwth: necessary header file */
42#include "inchi_api.h" /* djb-rwth: necessary header file */
43#include "inpdef.h" /* djb-rwth: necessary header file */
44
45#ifndef _READINCH_H_
46#define _READINCH_H_
47
48#define INPUT_FILE INCHI_IOSTREAM
49
50#define MIN_BOND_LENGTH (1.0e-6)
51#define INCHI_LINE_LEN 262144 /*32767*/ /*512*/ /*1024*/ /*256*/
52#define INCHI_LINE_ADD 32767 /*384*/ /*128*/ /*64*/
53
54
55/* Convenience storage for InChI read control data */
56typedef struct ReadINCHI_CtlData
57{
58 unsigned long ulongID;
63}
65
66
67/*
68Note:
69(INCHI_LINE_LEN - INCHI_LINE_ADD) > (length of the longest item: szCoord) = 33
70*/
71
72char *FindToken( INCHI_IOSTREAM *inp_molfile,
73 int *bTooLongLine,
74 const char *sToken,
75 int lToken,
76 char *szLine,
77 int nLenLine,
78 char *p,
79 int *res );
80char *LoadLine( INPUT_FILE *inp_molfile,
81 int *bTooLongLine,
82 int *bItemIsOver,
83 char **s,
84 char *szLine,
85 int nLenLine,
86 int nMinLen2Load,
87 char *p,
88 int *res );
89inchi_Stereo0D *CreateInchi_Stereo0D( int num_stereo0D );
90void FreeInchi_Stereo0D( inchi_Stereo0D **stereo0D );
92 int nNumAtoms,
93 inchi_Stereo0D *stereo0D,
94 int num_stereo0D,
95 char *pStrErr,
96 int *err,
97 int vABParityUnknown );
98int InchiToInpAtom( INCHI_IOSTREAM *inp_molfile,
99 MOL_COORD **szCoord,
100 int bDoNotAddH,
101 int vABParityUnknown,
102 INPUT_TYPE nInputType,
103 inp_ATOM **at,
104 int max_num_at,
105 int *num_dimensions,
106 int *num_bonds,
107 char *pSdfLabel,
108 char *pSdfValue,
109 unsigned long *Id,
110 INCHI_MODE *pInpAtomFlags,
111 int *err,
112 char *pStrErr );
113
114
115#endif /* _READINCH_H_ */
enum tagInputType INPUT_TYPE
unsigned long INCHI_MODE
Definition ichisize.h:60
char MOL_COORD[LEN_COORD *NUM_COORD+NUM_COORD - 1]
Definition ichisize.h:64
#define INPUT_FILE
Definition readinch.h:48
int Extract0DParities(inp_ATOM *at, int nNumAtoms, inchi_Stereo0D *stereo0D, int num_stereo0D, char *pStrErr, int *err, int vABParityUnknown)
Definition readinch.c:136
inchi_Stereo0D * CreateInchi_Stereo0D(int num_stereo0D)
Definition readinch.c:118
char * LoadLine(INPUT_FILE *inp_molfile, int *bTooLongLine, int *bItemIsOver, char **s, char *szLine, int nLenLine, int nMinLen2Load, char *p, int *res)
char * FindToken(INCHI_IOSTREAM *inp_molfile, int *bTooLongLine, const char *sToken, int lToken, char *szLine, int nLenLine, char *p, int *res)
Definition readinch.c:445
int InchiToInpAtom(INCHI_IOSTREAM *inp_molfile, MOL_COORD **szCoord, int bDoNotAddH, int vABParityUnknown, INPUT_TYPE nInputType, inp_ATOM **at, int max_num_at, int *num_dimensions, int *num_bonds, char *pSdfLabel, char *pSdfValue, unsigned long *Id, INCHI_MODE *pInpAtomFlags, int *err, char *pStrErr)
Definition readinch.c:549
void FreeInchi_Stereo0D(inchi_Stereo0D **stereo0D)
Definition readinch.c:125
Definition readinch.h:57
int bRestoreInfo
Definition readinch.h:62
int bTooLongLine
Definition readinch.h:59
unsigned long ulongID
Definition readinch.h:58
int bErrorMsg
Definition readinch.h:61
int bHeaderRead
Definition readinch.h:60
Definition inchi_api.h:434
Definition inpdef.h:110
Definition mode.h:1030