Coot Scripting Interface  7000
c-interface-refmac.h
Go to the documentation of this file.
1 /* src/c-interface-refmac.h
2  *
3  * Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 The University of York
4  * Copyright 2007 by Paul Emsley
5  * Copyright 2007, 2008, 2009, 2010, 2011, 2012 by The University of Oxford
6  * Copyright 2015 by Medical Research Council
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301, USA
22  */
23 
24 /* svn $Id: c-interface.h 1458 2007-01-26 20:20:18Z emsley $ */
25 
31 #ifndef C_INTERFACE_REFMAC_H
32 #define C_INTERFACE_REFMAC_H
33 
34 /*
35  The following extern stuff here because we want to return the
36  filename from the file entry box. That code (e.g.)
37  on_ok_button_coordinates_clicked (callback.c), is written and
38  compiled in c.
39 
40  But, we need that function to set the filename in mol_info, which
41  is a c++ class.
42 
43  So we need to have this function external for c++ linking.
44 
45 */
46 
47 /* Francois says move this up here so that things don't get wrapped
48  twice in C-declarations inside gmp library. Hmm! */
49 #ifdef __cplusplus
50 #ifdef USE_GUILE
51 #include <cstdio> /* for std::FILE in gmp.h for libguile.h */
52 #include <libguile.h> /* for SCM type (returned by safe_scheme_command) */
53 #else
54 #include <string> /* for std::string; included (sic!) in above for guile */
55 #endif /* USE_GUILE */
56 #endif /* c++ */
57 
58 #ifndef BEGIN_C_DECLS
59 
60 #ifdef __cplusplus
61 #define BEGIN_C_DECLS extern "C" {
62 #define END_C_DECLS }
63 
64 #else
65 #define BEGIN_C_DECLS
66 #define END_C_DECLS
67 #endif
68 #endif /* BEGIN_C_DECLS */
69 
70 BEGIN_C_DECLS
71 
72 #define COOT_SCHEME_DIR "COOT_SCHEME_DIR"
73 #define COOT_PYTHON_DIR "COOT_PYTHON_DIR"
74 
75 /* this is the option menu callback - does nothing. */
76 int set_refmac_molecule(int imol); /* used by callback.c */
77 
78 /* some methods to get refmac run parameters */
79 int get_refmac_refinement_method(void);
80 void set_refmac_refinement_method(int method);
81 int get_refmac_phase_input(void);
82 void set_refmac_phase_input(int phase_flag);
83 void set_refmac_use_tls(int state);
84 int refmac_use_tls_state(void);
85 void set_refmac_use_twin(int state);
86 int refmac_use_twin_state(void);
87 void set_refmac_use_sad(int state);
88 int refmac_use_sad_state(void);
89 int get_refmac_ncycles(void);
90 void set_refmac_ncycles(int no_cycles);
91 void add_refmac_ncycle_no(int cycle);
92 void set_refmac_use_ncs(int state);
93 int refmac_use_ncs_state(void);
94 void set_refmac_use_intensities(int state);
95 int refmac_use_intensities_state(void);
96 int refmac_imol_coords(void);
97 void add_refmac_sad_atom(const char *atom_name, float fp, float fpp, float lambda);
98 void add_refmac_sad_atom_fp(const char *atom_name, float fp, float fpp);
99 void add_refmac_sad_atom_lambda(const char *atom_name, float lambda);
100 void clear_refmac_sad_atoms();
101 short int get_refmac_used_mtz_file_state();
102 void set_refmac_used_mtz_file(int state);
103 const gchar *get_saved_refmac_file_filename(void);
104 void set_stored_refmac_file_mtz_filename(int imol, const char *mtz_filename);
105 void save_refmac_params_to_map(int imol_map,
106  const char *mtz_filename,
107  const char *fobs_col,
108  const char *sigfobs_col,
109  const char *r_free_col,
110  int r_free_flag_sensible);
111 void save_refmac_phase_params_to_map(int imol_map,
112  const char *phi,
113  const char *fom,
114  const char *hla,
115  const char *hlb,
116  const char *hlc,
117  const char *hld);
118 
119 END_C_DECLS
120 #endif /* C_INTERFACE_REFMAC_H */