Mychem  0.9.3
 All Classes Files Functions Variables Macros
conversion.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2009-2011 by CNRS *
3  * jerome.pansanel@iphc.cnrs.fr -- Project founder and lead developer *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA. *
19  ***************************************************************************/
20 
29 #ifndef __CONVERSION_H
30 #define __CONVERSION_H
31 
32 #ifdef STANDARD
33 /* STANDARD is defined, don't use any mysql functions */
34 #include <stdlib.h>
35 #include <stdio.h>
36 #include <string.h>
37 #ifdef __WIN__
38 typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
39 typedef __int64 longlong;
40 #else
41 typedef unsigned long long ulonglong;
42 typedef long long longlong;
43 #endif /*__WIN__*/
44 #else
45 #include <my_global.h>
46 #include <my_sys.h>
47 #endif /* STANDARD */
48 #include <mysql.h>
49 #include <m_ctype.h>
50 #include <m_string.h> /* To get strmov() */
51 
52 /* static pthread_mutex_t obmtx; */
53 
54 #ifdef HAVE_DLOPEN
55 
63 my_bool molfile_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
64 
69 void molfile_to_molecule_deinit(UDF_INIT *initid);
70 
81 char *molfile_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
82 
90 my_bool molecule_to_molfile_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
91 
96 void molecule_to_molfile_deinit(UDF_INIT *initid);
97 
108 char *molecule_to_molfile(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
109 
117 my_bool V3000_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
118 
123 void V3000_to_molecule_deinit(UDF_INIT *initid);
124 
135 char *V3000_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
136 
144 my_bool molecule_to_V3000_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
145 
150 void molecule_to_V3000_deinit(UDF_INIT *initid);
151 
162 char *molecule_to_V3000(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
163 
171 my_bool smiles_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
172 
177 void smiles_to_molecule_deinit(UDF_INIT *initid);
178 
189 char *smiles_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
190 
198 my_bool molecule_to_smiles_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
199 
204 void molecule_to_smiles_deinit(UDF_INIT *initid);
205 
216 char *molecule_to_smiles(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
217 
225 my_bool molecule_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
226 
231 void molecule_to_molecule_deinit(UDF_INIT *initid);
232 
243 char *molecule_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
244 
252 my_bool cml_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
253 
258 void cml_to_molecule_deinit(UDF_INIT *initid);
259 
270 char *cml_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
271 
279 my_bool molecule_to_cml_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
280 
285 void molecule_to_cml_deinit(UDF_INIT *initid);
286 
297 char *molecule_to_cml(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
298 
306 my_bool fingerprint_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
307 
312 void fingerprint_deinit(UDF_INIT *initid);
313 
324 char *fingerprint(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
325 
333 my_bool fingerprint2_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
334 
339 void fingerprint2_deinit(UDF_INIT *initid);
340 
351 char *fingerprint2(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
352 
360 my_bool fingerprint3_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
361 
366 void fingerprint3_deinit(UDF_INIT *initid);
367 
378 char *fingerprint3(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
379 
387 my_bool fingerprint4_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
388 
393 void fingerprint4_deinit(UDF_INIT *initid);
394 
405 char *fingerprint4(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
406 
414 my_bool molecule_to_canonical_smiles_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
415 
420 void molecule_to_canonical_smiles_deinit(UDF_INIT *initid);
421 
432 char *molecule_to_canonical_smiles(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
433 
441 my_bool inchi_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
442 
447 void inchi_to_molecule_deinit(UDF_INIT *initid);
448 
459 char *inchi_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
460 
468 my_bool molecule_to_inchi_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
469 
474 void molecule_to_inchi_deinit(UDF_INIT *initid);
475 
486 char *molecule_to_inchi(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
487 
495 my_bool molecule_to_serializedOBMol_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
496 
501 void molecule_to_serializedOBMol_deinit(UDF_INIT *initid);
502 
513 char *molecule_to_serializedOBMol(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
514 
522 my_bool pdb_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
523 
528 void pdb_to_molecule_deinit(UDF_INIT *initid);
529 
540 char *pdb_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
541 
549 my_bool mol2_to_molecule_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
550 
555 void mol2_to_molecule_deinit(UDF_INIT *initid);
556 
567 char *mol2_to_molecule(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
575 my_bool molecule_to_mol2_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
576 
581 void molecule_to_mol2_deinit(UDF_INIT *initid);
582 
593 char *molecule_to_mol2(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
594 
595 #endif /* HAVE_DLOPEN */
596 
597 #endif /* __CONVERSION_H */
598