1 
2 /*
3 A* -------------------------------------------------------------------
4 B* This file contains source code for the PyMOL computer program
5 C* Copyright (c) Schrodinger, LLC.
6 D* -------------------------------------------------------------------
7 E* It is unlawful to modify or remove this copyright notice.
8 F* -------------------------------------------------------------------
9 G* Please see the accompanying LICENSE file for further information.
10 H* -------------------------------------------------------------------
11 I* Additional authors of this source file include:
12 -*
13 -*
14 -*
15 Z* -------------------------------------------------------------------
16 */
17 
18 #ifndef _H_CPyMOL
19 #define _H_CPyMOL
20 
21 /* WARNING: DO NOT DEVELOP APPLICATIONS AGAINST THIS PyMOL_* API.
22  *
23  * This is a internal interface to PyMOL for the exclusive use of
24  * Schrodinger, LLC in development of PyMOL itself, for
25  * development of "wrapped" PyMOL products, and for use as foundation
26  * layer for support of stable public APIs.
27  *
28  * Schrodinger, LLC changes this interface regularly and without
29  * notice.  It may even vanish altogether.  Code you develop against
30  * this interface is likely to be fragile, time-consuming, and
31  * expensive to maintain.
32  *
33  * Our recommended public APIs for PyMOL development are Python-based:
34  * (#1) the old "from pymol import cmd" module-based interface, or
35  * (#2) the new "from pymol2 import PyMOL; cmd=PyMOL().cmd"
36  * instance-based interface.  If you need a C, C++, Java, or
37  * ActiveX/COM interface or widget for molecular visualization, then
38  * please contact sales@pymol.org about obtaining access to our
39  * independent developer and/or OEM product APIs (e.g. JyMOL).
40  *
41  * If you feel that you absolutely must rely upon this PyMOL_* API,
42  * then please be sure to create your own lightweight wrapper layer
43  * around it so that the rest of your code will be relatively
44  * insensitive to changes made here.  Failure to do so will almost
45  * certainly result in code that is impossible to maintain over time.
46  *
47  * You have been warned!
48  */
49 
50 #include "OVreturns.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 #define PYMOL_BUTTON_DOWN           0
57 #define PYMOL_BUTTON_UP             1
58 
59 #define PYMOL_KEY_F1         1
60 #define PYMOL_KEY_F2         2
61 #define PYMOL_KEY_F3         3
62 #define PYMOL_KEY_F4         4
63 #define PYMOL_KEY_F5         5
64 #define PYMOL_KEY_F6         6
65 #define PYMOL_KEY_F7         7
66 #define PYMOL_KEY_F8         8
67 #define PYMOL_KEY_F9         9
68 #define PYMOL_KEY_F10        10
69 #define PYMOL_KEY_F11        11
70 #define PYMOL_KEY_F12        12
71 #define PYMOL_KEY_LEFT       100
72 #define PYMOL_KEY_UP         101
73 #define PYMOL_KEY_RIGHT      102
74 #define PYMOL_KEY_DOWN       103
75 #define PYMOL_KEY_PAGE_UP    104
76 #define PYMOL_KEY_PAGE_DOWN  105
77 #define PYMOL_KEY_HOME       106
78 #define PYMOL_KEY_END        107
79 #define PYMOL_KEY_INSERT     108
80 
81 #define PYMOL_BUTTON_LEFT    0
82 #define PYMOL_BUTTON_MIDDLE  1
83 #define PYMOL_BUTTON_RIGHT   2
84 #define PYMOL_BUTTON_SCROLL_FORWARD 3
85 #define PYMOL_BUTTON_SCROLL_REVERSE 4
86 
87 #define PYMOL_MODIFIER_SHIFT   1
88 #define PYMOL_MODIFIER_CTRL    2
89 #define PYMOL_MODIFIER_ALT     4
90 
91 #define PYMOL_FALSE    0
92 #define PYMOL_TRUE     1
93 
94 #define PYMOL_DEFAULT  -1
95 
96 #define PYMOL_PROGRESS_SLOW 0
97 #define PYMOL_PROGRESS_MED  2
98 #define PYMOL_PROGRESS_FAST 4
99 
100 #define PYMOL_PROGRESS_SIZE 6
101 #define PYMOL_RESHAPE_SIZE 5
102 
103 
104 /* configuration */
105 
106 #ifndef CPyMOLOptions_DEFINED
107 typedef struct _CPyMOLOptions CPyMOLOptions;
108 #define CPyMOLOptions_DEFINED
109 #endif
110 
111 CPyMOLOptions *PyMOLOptions_New(void);
112 void PyMOLOptions_Free(CPyMOLOptions * option);
113 
114 CPyMOLOptions *PyMOLOptions_NewWithPython(int argc, char *argv[]);
115 
116 /* PyMOL instance type */
117 
118 #ifndef CPyMOL_DEFINED
119 typedef struct _CPyMOL CPyMOL;
120 #define CPyMOL_DEFINED
121 #endif
122 
123 #define ATOM_PROP_MODEL 0
124 #define ATOM_PROP_INDEX 1
125 #define ATOM_PROP_TYPE  2
126 #define ATOM_PROP_NAME  3
127 #define ATOM_PROP_RESN  4
128 #define ATOM_PROP_RESI  5
129 #define ATOM_PROP_RESV  6
130 #define ATOM_PROP_CHAIN 7
131 #define ATOM_PROP_ALT   8
132 #define ATOM_PROP_SEGI  9
133 #define ATOM_PROP_ELEM 10
134 #define ATOM_PROP_SS        11
135 #define ATOM_PROP_TEXT_TYPE 12
136 #define ATOM_PROP_CUSTOM    13
137 #define ATOM_PROP_LABEL     14
138 #define ATOM_PROP_NUMERIC_TYPE 15
139 #define ATOM_PROP_Q 16
140 #define ATOM_PROP_B 17
141 #define ATOM_PROP_VDW 18
142 #define ATOM_PROP_ELEC_RADIUS 19
143 #define ATOM_PROP_PARTIAL_CHARGE 20
144 #define ATOM_PROP_FORMAL_CHARGE 21
145 #define ATOM_PROP_STEREO 22
146 #define ATOM_PROP_CARTOON 23
147 #define ATOM_PROP_COLOR 24
148 #define ATOM_PROP_ID 25
149 #define ATOM_PROP_RANK 26
150 #define ATOM_PROP_FLAGS 27
151 #define ATOM_PROP_GEOM  28
152 #define ATOM_PROP_VALENCE 29
153 #define ATOM_PROP_X 30
154 #define ATOM_PROP_Y 31
155 #define ATOM_PROP_Z 32
156 #define ATOM_PROP_SETTINGS 33
157 #define ATOM_PROP_PROPERTIES 34
158 #define ATOM_PROP_ONELETTER 40
159 
160 /* return status values */
161 
162 #define PyMOLstatus_YES               1
163 #define PyMOLstatus_NO                0
164 
165 #define PyMOLstatus_SUCCESS           0
166 #define PyMOLstatus_FAILURE          -1
167 
168 
169 /* return types */
170 
171 typedef int PyMOLstatus;
172 
173 typedef struct {
174   PyMOLstatus status;
175 } PyMOLreturn_status;
176 
177 typedef struct {
178   PyMOLstatus status;
179   int value;
180 } PyMOLreturn_int;
181 
182 typedef struct {
183   PyMOLstatus status;
184   float value;
185 } PyMOLreturn_float;
186 
187 typedef struct {
188   PyMOLstatus status;
189   int size;
190   float *array;
191 } PyMOLreturn_float_array;
192 
193 typedef struct {
194   PyMOLstatus status;
195   int size;
196   int *array;
197 } PyMOLreturn_int_array;
198 
199 typedef struct {
200   PyMOLstatus status;
201   int size;
202   char **array;
203 } PyMOLreturn_string_array;
204 
205 #define PYMOL_RETURN_VALUE_IS_STRING       0x01
206 #define PYMOL_RETURN_VALUE_IS_INT          0x02
207 #define PYMOL_RETURN_VALUE_IS_FLOAT        0x04
208 #define PYMOL_RETURN_VALUE_IS_FLOAT_ARRAY  0x08
209 
210 typedef struct {
211   PyMOLstatus status;
212   short int type;
213   char *string;
214   int int_value;
215   float float_value;
216   int array_length;
217   float *float_array;
218 } PyMOLreturn_value;
219 
220 typedef void PyMOLModalDrawFn(void *G);
221 
222 
223 /* creation */
224 
225 CPyMOL *PyMOL_New(void);
226 CPyMOL *PyMOL_NewWithOptions(const CPyMOLOptions * option);
227 
228 
229 /* destruction */
230 
231 void PyMOL_Free(CPyMOL * I);
232 
233 
234 /* starting and stopping */
235 
236 void PyMOL_Start(CPyMOL * I);
237 void PyMOL_ConfigureShadersGL(CPyMOL * I);
238 void PyMOL_StartWithPython(CPyMOL * I);
239 void PyMOL_Stop(CPyMOL * I);
240 
241 
242 /* upstream invalidation and configuration events */
243 
244 void PyMOL_NeedFakeDrag(CPyMOL * I);
245 void PyMOL_NeedRedisplay(CPyMOL * I);
246 void PyMOL_NeedSwap(CPyMOL * I);
247 void PyMOL_SetClickReady(CPyMOL * I, const char *name, int index, int button, int mod, int x,
248                          int y, const float *pos, int state);
249 void PyMOL_SetPassive(CPyMOL * I, int onOff);
250 void PyMOL_NeedReshape(CPyMOL * I, int mode, int x, int y, int width, int height);
251 
252 
253 /* valid context management */
254 
255 void PyMOL_PushValidContext(CPyMOL * I);
256 void PyMOL_PopValidContext(CPyMOL * I);
257 
258 
259 /* methods requiring a valid OpenGL context*/
260 
261 void PyMOL_AdaptToHardware(CPyMOL * I);
262 void PyMOL_Draw(CPyMOL * I);
263 
264 
265 /* methods that do not require a valid OpenGL context */
266 
267 void PyMOL_Key(CPyMOL * I, unsigned char k, int x, int y, int modifiers);
268 void PyMOL_Special(CPyMOL * I, int k, int x, int y, int modifiers);
269 void PyMOL_Reshape(CPyMOL * I, int width, int height, int force);
270 void PyMOL_Drag(CPyMOL * I, int x, int y, int modifiers);
271 void PyMOL_Button(CPyMOL * I, int button, int state, int x, int y, int modifiers);
272 int PyMOL_Idle(CPyMOL * I);     /* return true if PyMOL is busy doing real
273                                    work (not simply racing the CPU) */
274 
275 void PyMOL_ExpireIfIdle(CPyMOL * I);    /* auto-termination for command-line mode */
276 
277 typedef void PyMOLSwapBuffersFn(void);
278 
279 void PyMOL_SetSwapBuffersFn(CPyMOL * I, PyMOLSwapBuffersFn * fn);
280 void PyMOL_SwapBuffers(CPyMOL * I);     /* only works if above function has been set */
281 void PyMOL_SetDefaultMouse(CPyMOL * I);
282 void PyMOL_SetStereoCapable(CPyMOL * I, int stereoCapable);
283 void PyMOL_InitializeCMol(CPyMOL * I);
284 
285 
286 /* host query methods */
287 
288 int PyMOL_GetRedisplay(CPyMOL * I, int reset);
289 int PyMOL_GetPassive(CPyMOL * I, int reset);
290 int PyMOL_GetSwap(CPyMOL * I, int reset);
291 int PyMOL_GetClickReady(CPyMOL * I, int reset);
292 
293 int PyMOL_GetImageReady(CPyMOL * I, int reset);
294 PyMOLreturn_int_array PyMOL_GetImageInfo(CPyMOL * I);
295 int PyMOL_GetImageData(CPyMOL * I, int width, int height, int row_bytes,
296                        void *buffer, int mode, int reset);
297 PyMOLreturn_int_array PyMOL_GetImageDataReturned(CPyMOL * I, int width, int height, int row_bytes,
298 						 int mode, int reset);
299 
300 int PyMOL_GetReshape(CPyMOL * I);
301 int PyMOL_GetIdleAndReady(CPyMOL * I);
302 
303 
304 /* int array results */
305 
306 PyMOLreturn_int_array PyMOL_GetReshapeInfo(CPyMOL * I, int reset);
307 
308 /* string results */
309 
310 char *PyMOL_GetClickString(CPyMOL * I, int reset);
311 int PyMOL_FreeResultString(CPyMOL * I, char *st);
312 
313 
314 /* asynchronous processing (only useful for Python-based multithreaded builds right now) */
315 
316 int PyMOL_GetBusy(CPyMOL * I, int reset);
317 void PyMOL_SetBusy(CPyMOL * I, int value);
318 
319 void PyMOL_ResetProgress(CPyMOL * I);
320 
321 void PyMOL_SetProgress(CPyMOL * I, int offset, int current, int range);
322 
323 int PyMOL_GetProgress(CPyMOL * I, int *progress, int reset);
324 int PyMOL_GetProgressChanged(CPyMOL * I, int reset);
325 
326 int PyMOL_GetInterrupt(CPyMOL * I, int reset);
327 void PyMOL_SetInterrupt(CPyMOL * I, int value);
328 
329 
330 /* modal updates -- PyMOL is busy with some complex task, but we have
331    to return control to the host in order to get a valid draw callback */
332 
333 int PyMOL_GetModalDraw(CPyMOL * I);
334 void PyMOL_SetModalDraw(CPyMOL * I, PyMOLModalDrawFn * fn);     /* for internal use only */
335 
336 
337 /* developer/transient privates */
338 
339 struct _PyMOLGlobals *PyMOL_GetGlobals(CPyMOL * I);
340 struct _PyMOLGlobals **PyMOL_GetGlobalsHandle(CPyMOL * I);
341 
342 void PyMOL_RunTest(CPyMOL * I, int group, int test);
343 
344 
345 /* for python integration */
346 
347 void PyMOL_LockAPIAndUnblock(CPyMOL * I);
348 void PyMOL_BlockAndUnlockAPI(CPyMOL * I);
349 
350 
351 /* for Jmol integration */
352 
353 int PyMOL_NewG3DStream(CPyMOL * I, int **array_ptr);
354 int PyMOL_DelG3DStream(CPyMOL * I, int *array_ptr);
355 
356 
357 /* Command API */
358 
359 PyMOLreturn_status PyMOL_CmdBackgroundColor(CPyMOL * I, const char *value);
360 
361 PyMOLreturn_status PyMOL_CmdReinitialize(CPyMOL * I,
362     const char *what,
363     const char *object_name);
364 
365 PyMOLreturn_status PyMOL_CmdLoad(CPyMOL * I,
366                                  const char *content,
367                                  const char *content_type,
368                                  const char *content_format,
369                                  const char *object_name,
370                                  int state, int discrete, int finish,
371                                  int quiet, int multiplex, int zoom);
372 
373 PyMOLreturn_status PyMOL_CmdLoadRaw(CPyMOL * I,
374                                     const char *content,
375                                     int content_length,
376                                     const char *content_format,
377                                     const char *object_name, int state,
378                                     int discrete, int finish,
379                                     int quiet, int multiplex, int zoom);
380 
381 PyMOLreturn_status PyMOL_CmdLoadCGO(CPyMOL * I,
382                                     const float *content,
383                                     int content_length,
384                                     const char *object_name, int state, int quiet, int zoom);
385 
386 PyMOLreturn_status PyMOL_CmdCreate(CPyMOL * I,
387                                    const char *name,
388                                    const char *selection, int source_state,
389                                    int target_state, int discrete,
390                                    int zoom, int quiet, int singletons,
391                                    const char *extract, int copy_properties);
392 
393 PyMOLreturn_status PyMOL_CmdZoom(CPyMOL * I, const char *selection, float buffer,
394                                  int state, int complete, float animate, int quiet);
395 
396 PyMOLreturn_status PyMOL_CmdCenter(CPyMOL * I, const char *selection, int state, int origin,
397                                    float animate, int quiet);
398 
399 PyMOLreturn_status PyMOL_CmdOrient(CPyMOL * I, const char *selection, float buffer, int state,
400                                    int complete, float animate, int quiet);
401 
402 PyMOLreturn_status PyMOL_CmdOrigin(CPyMOL * I, const char *selection, int state, int quiet);
403 
404 PyMOLreturn_status PyMOL_CmdOriginAt(CPyMOL * I, float x, float y, float z, int quiet);
405 
406 PyMOLreturn_status PyMOL_CmdClip(CPyMOL * I, const char *mode, float amount,
407                                  const char *selection,
408                                  int state, int quiet);
409 
410 PyMOLreturn_status PyMOL_CmdShow(CPyMOL * I,
411                                  const char *representation,
412                                  const char *selection,
413                                  int quiet);
414 
415 PyMOLreturn_status PyMOL_CmdHide(CPyMOL * I,
416                                  const char *representation,
417                                  const char *selection,
418                                  int quiet);
419 
420 PyMOLreturn_status PyMOL_CmdEnable(CPyMOL * I, const char *name, int quiet);
421 
422 PyMOLreturn_status PyMOL_CmdDisable(CPyMOL * I, const char *name, int quiet);
423 
424 PyMOLreturn_status PyMOL_CmdDelete(CPyMOL * I, const char *name, int quiet);
425 
426 PyMOLreturn_status PyMOL_CmdSet(CPyMOL * I,
427                                 const char *setting,
428                                 const char *value,
429                                 const char *selection,
430                                 int state, int quiet, int side_effects);
431 
432 PyMOLreturn_value PyMOL_CmdGet(CPyMOL * I, const char *setting,
433 			       const char *selection,
434 			       int state, int quiet);
435 
436 PyMOLreturn_status PyMOL_CmdUnset(CPyMOL * I, const char *setting, const char *selection,
437                                   int state, int quiet, int side_effects);
438 
439 PyMOLreturn_status PyMOL_CmdSetBond(CPyMOL * I, const char *setting, const char *value,
440                                     const char *selection1, const char *selection2,
441                                     int state, int quiet, int side_effects);
442 
443 PyMOLreturn_status PyMOL_CmdUnsetBond(CPyMOL * I, const char *setting,
444                                       const char *selection1, const char *selection2,
445                                       int state, int quiet, int side_effects);
446 
447 PyMOLreturn_status PyMOL_CmdColor(CPyMOL * I, const char *color, const char *selection, int flags,
448                                   int quiet);
449 
450 PyMOLreturn_status PyMOL_CmdLabel(CPyMOL * I, const char *selection, const char *text, int quiet);
451 
452 PyMOLreturn_status PyMOL_CmdSelect(CPyMOL * I, const char *name, const char *selection, int quiet);
453 
454 PyMOLreturn_status PyMOL_CmdSelectList(CPyMOL * I, const char *name, const char *object, int *list,
455                                        int list_len, int state, const char *mode, int quiet);
456 
457 PyMOLreturn_int PyMOL_CmdGetMovieLength(CPyMOL * I,int quiet);
458 
459 PyMOLreturn_float PyMOL_CmdGetDistance(CPyMOL * I,
460                                        const char *selection1,
461                                        const char *selection2, int state, int quiet);
462 
463 PyMOLreturn_float PyMOL_CmdDistance(CPyMOL * I,
464                                     const char *name,
465                                     const char *selection1,
466                                     const char *selection2,
467                                     int mode,
468                                     float cutoff,
469                                     int label, int reset, int zoom, int state, int quiet);
470 
471 PyMOLreturn_float PyMOL_CmdGetAngle(CPyMOL * I,
472                                     const char *selection1,
473                                     const char *selection2,
474                                     const char *selection3, int state, int quiet);
475 
476 PyMOLreturn_float PyMOL_CmdAngle(CPyMOL * I,
477                                  const char *name,
478                                  const char *selection1,
479                                  const char *selection2,
480                                  const char *selection3,
481                                  int mode,
482                                  int label, int reset, int zoom, int state, int quiet);
483 
484 PyMOLreturn_float PyMOL_CmdGetDihedral(CPyMOL * I,
485                                        const char *selection1,
486                                        const char *selection2,
487                                        const char *selection3,
488                                        const char *selection4, int state, int quiet);
489 
490 PyMOLreturn_float PyMOL_CmdDihedral(CPyMOL * I,
491                                     const char *name,
492                                     const char *selection1,
493                                     const char *selection2,
494                                     const char *selection3,
495                                     const char *selection4,
496                                     int mode,
497                                     int label, int reset, int zoom, int state, int quiet);
498 
499 PyMOLreturn_float_array PyMOL_CmdAlign(CPyMOL * I, const char *source, const char *target,
500                                        float cutoff, int cycles, float gap, float extend,
501                                        int max_gap, const char *object, const char *matrix,
502                                        int source_state, int target_state, int quiet,
503                                        int max_skip, int transform, int reset);
504 
505 PyMOLreturn_status PyMOL_CmdSetView(CPyMOL * I, float *view, int view_len, float animate,
506                                     int quiet);
507 PyMOLreturn_float_array PyMOL_CmdGetView(CPyMOL * I, int quiet);
508 
509 PyMOLreturn_status PyMOL_CmdDraw(CPyMOL * I, int width, int height,
510                                  int antialias, int quiet);
511 
512 PyMOLreturn_status PyMOL_CmdCapture(CPyMOL * I, int quiet);
513 
514 PyMOLreturn_status PyMOL_CmdRay(CPyMOL * I, int width, int height, int antialias,
515                                 float angle, float shift, int renderer, int defer,
516                                 int quiet);
517 
518 PyMOLreturn_status PyMOL_CmdIsodot(CPyMOL * I, const char *name, const char *map_name, float level,
519                                    const char *selection, float buffer, int state, float carve,
520                                    int source_state, int quiet);
521 
522 PyMOLreturn_status PyMOL_CmdIsomesh(CPyMOL * I, const char *name, const char *map_name, float level,
523                                     const char *selection, float buffer, int state, float carve,
524                                     int source_state, int quiet);
525 
526 PyMOLreturn_status PyMOL_CmdIsosurface(CPyMOL * I, const char *name, const char *map_name,
527                                        float level, const char *selection, float buffer,
528                                        int state, float carve, int source_state, int side,
529                                        int mode, int quiet);
530 
531 PyMOLreturn_status PyMOL_CmdGradient(CPyMOL * I, const char *name, const char *map_name,
532                                      float minimum, float maximum, const char *selection,
533                                      float buffer, int state, float carve,
534                                      int source_state, int quiet);
535 
536 PyMOLreturn_float PyMOL_CmdIsolevel(CPyMOL * I, const char *name, float level, int state,
537                                     int query, int quiet);
538 
539 PyMOLreturn_status PyMOL_CmdRampNew(CPyMOL * I, const char *name, const char *map, float *range,
540                                     int n_range, const char *color, int state, const char *selection,
541                                     float beyond, float within, float sigma,
542                                     int zero, int calc_mode, int quiet);
543 
544 PyMOLreturn_status PyMOL_CmdPseudoatom(CPyMOL * I, const char *object_name, const char *sele,
545 				       const char *name, const char *resn, const char *resi, const char *chain,
546 				       const char *segi, const char *elem, float vdw, int hetatm,
547 				       float b, float q, const char *color, const char *label,
548 				       int set_xyz, float x, float y, float z,
549 				       int state, int mode, int quiet);
550 
551 PyMOLreturn_status PyMOL_CmdTurn(CPyMOL * I, char axis, float angle);
552 
553 PyMOLreturn_status PyMOL_CmdMPlay(CPyMOL * I, int cmd);
554 
555 PyMOLreturn_status PyMOL_CmdSetFeedbackMask(CPyMOL * I, int action, int module, int mask);
556 
557 /* releasing returned values */
558 
559 int PyMOL_FreeResultArray(CPyMOL * I, void *array);
560 
561 PyMOLreturn_status PyMOL_CmdRock(CPyMOL * I, int mode);
562 
563 PyMOLreturn_string_array PyMOL_CmdGetNames(CPyMOL * I, int mode, const char *s0, int enabled_only);
564 
565 PyMOLreturn_status PyMOL_CmdMapNew(CPyMOL * I, const char *name, int type, float grid_spacing,
566 				   const char *selection, int state, int normalize,
567 				   int zoom, int quiet);
568 
569 #ifdef _PYMOL_LIB
570 PyMOLreturn_string_array PyMOL_GetObjectList(CPyMOL * I, const char *s0);
571 PyMOLreturn_status PyMOL_SetIsEnabledCallback(CPyMOL * I, void *CallbackObject, void (*enabledCallback)(void *, const char *, int ));
572 PyMOLreturn_int_array PyMOL_GetRepsInSceneForObject(CPyMOL * I, const char *name);
573 PyMOLreturn_int_array PyMOL_GetRepsForObject(CPyMOL * I, const char *name);
574 PyMOLreturn_status PyMOL_SetButton(CPyMOL * I, const char *button, const char *modifier, const char *action);
575 PyMOLreturn_status PyMOL_SetMouseButtonMode(CPyMOL * I, const char *modename);
576 PyMOLreturn_float_array PyMOL_Spectrum(CPyMOL * I, const char *expression, const char *palette, const char *selection, float minimum, float maximum, int byres, int quiet);
577 
578 #endif
579 
580 PyMOLreturn_status PyMOL_ZoomScene(CPyMOL * I, float scale);
581 PyMOLreturn_status PyMOL_TranslateScene(CPyMOL * I, float x, float y, float z);
582 
583 PyMOLreturn_value PyMOL_GetVersion(CPyMOL * I);
584 
585 typedef struct _P_AtomProperty {
586   int id;
587   short Ptype;
588   int offset;
589   int maxlen;
590 } AtomPropertyInfo;
591 
592 AtomPropertyInfo *PyMOL_GetAtomPropertyInfo(CPyMOL * I, const char *atompropname);
593 
594 #ifdef __cplusplus
595 }
596 #endif
597 #endif
598