atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
selection.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'selection.c'
24*
25* Contains:
26*
27
28 - The functions handling the atom and bond selection process in the OpenGL window
29
30*
31* List of functions:
32
33 int find_bond_in_bonds (project * this_proj, int i, int j, int b, int id);
34 int find_selected_bond (project * this_proj, int id);
35 int find_selected_atom (project * this_proj, int id);
36 int num_bonds (int i);
37 int num_angles (int i);
38 int num_dihedrals (int i);
39
40 void save_dihedral_selection (glwin * view, int pi);
41 void update_dihedral_selection (glwin * view, int pi);
42 void save_angle_selection (glwin * view, int pi);
43 void update_angle_selection (glwin * view, int pi);
44 void save_bond_selection (glwin * view, int pi);
45 void update_bond_selection (glwin * view, int pi);
46 void save_all_selections (glwin * view, int pi);
47 void update_all_selections (glwin * view, int pi);
48 void update_selection_list (atom_selection * at_list, atom * at, gboolean add);
49 void process_selected_atom (project * this_proj, glwin * view, int id, int ac, int se, int pi);
50 void process_selection (project * this_proj, glwin * view, int id, int ac, int pi);
51 void process_the_hits (glwin * view, gint event_button, double ptx, double pty);
52
53 atom_in_selection * new_atom_in_selection (int id, int sp);
54
55*/
56
57#include "global.h"
58#include "interface.h"
59#include "glview.h"
60#include "atom_edit.h"
61
62extern G_MODULE_EXPORT void window_measures (GtkWidget * widg, gpointer data);
63extern void dihedrals_loop (glwin * view, int id, int pi, GtkTreeStore * store);
64extern void angles_loop (glwin * view, int id, int pi, GtkTreeStore * store);
65extern void bonds_loop (glwin * view, int id, int pi, GtkTreeStore * store);
66extern void update_label_selection (glwin * view, int pi);
67extern int selected_aspec;
68extern int get_to_be_selected (glwin * view);
69
81int find_bond_in_bonds (project * this_proj, int i, int j, int b, int id)
82{
83 int k, l, m;
84 for (k=0; k < this_proj -> modelgl -> bonds[j][b]; k++)
85 {
86 l = this_proj -> modelgl -> bondid[j][b][k][0];
87 m = this_proj -> modelgl -> bondid[j][b][k][1];
88 if (this_proj -> atoms[j][l].show[b]) i ++;
89 if (i == id) return k;
90 if (b)
91 {
92 if (this_proj -> atoms[j][l].show[b]) i ++;
93 if (i == id) return k;
94 }
95 if (this_proj -> atoms[j][m].show[b]) i ++;
96 if (i == id) return k;
97 if (b)
98 {
99 if (this_proj -> atoms[j][m].show[b]) i ++;
100 if (i == id) return k;
101 }
102 }
103 return -i;
104}
105
114int find_selected_bond (project * this_proj, int id)
115{
116 int i, j, k;
117
118 i = this_proj -> modelgl -> clones_to_be_picked - 1;
119 j = this_proj -> modelgl -> anim -> last -> img -> step;
120 k = find_bond_in_bonds (this_proj, i, j, 0, id);
121 if (k < 0 && this_proj -> modelgl -> anim -> last -> img -> draw_clones)
122 {
123 k = find_bond_in_bonds (this_proj, -k, j, 1, id);
124 if (k < 0)
125 {
126 return -1;
127 }
128 else
129 {
130 return k;
131 }
132 }
133 else if (k < 0)
134 {
135 return -1;
136 }
137 else
138 {
139 return k;
140 }
141}
142
151int find_selected_atom (project * this_proj, int id)
152{
153 int i, j, k, l, m;
154 i = -1;
155 j = this_proj -> modelgl -> anim -> last -> img -> step;
156 for (k=0; k<this_proj -> natomes; k++)
157 {
158 if (this_proj -> atoms[j][k].show[0]) i++;
159 if (i == id) return k;
160 }
161 if (this_proj -> modelgl -> anim -> last -> img -> draw_clones)
162 {
163 for (k=0; k < this_proj -> modelgl -> bonds[j][1]; k++)
164 {
165 l = this_proj -> modelgl -> bondid[step][1][k][0];
166 m = this_proj -> modelgl -> bondid[step][1][k][1];
167 if (this_proj -> atoms[j][l].show[1]) i++;
168 if (i == id) return l;
169 if (this_proj -> atoms[j][m].show[1]) i++;
170 if (i == id) return m;
171 }
172 }
173 return -1;
174}
175
183int num_bonds (int i)
184{
185 return i*(i-1)/2;
186}
187
195int num_angles (int i)
196{
197 return i*(i-1)*(i-2)/2;
198}
199
207int num_dihedrals (int i)
208{
209 return i*(i-1)*(i-2)*(i-3)/2;
210}
211
212int objects[3] = {0, 0, 0};
213int * object_was_selected[3] = {NULL, NULL, NULL};
214int ** tmp_object_id[3] = {NULL, NULL, NULL};
215
225{
226 int i, j;
227 image * img = view -> anim -> last -> img;
228 if (img -> selected[pi] -> selected > 3 && img -> selected[pi] -> selected < MAX_IN_SELECTION-10)
229 {
230 objects[2] = i = num_dihedrals (img -> selected[pi] -> selected);
231 tmp_object_id[2] = allocdint (i, 4);
233 for (j=0; j<i; j++) object_was_selected[2][j] = img -> selected[pi] -> selected_dihedrals[j];
234 dihedrals_loop (view, -2, pi, NULL);
235 g_free (img -> selected[pi] -> selected_dihedrals);
236 }
237 else
238 {
239 objects[2] = 0;
240 }
241}
242
252{
253 int i;
254 image * img = view -> anim -> last -> img;
255 if (img -> selected[pi] -> selected > 3 && img -> selected[pi] -> selected < MAX_IN_SELECTION-10)
256 {
257 i = num_dihedrals (img -> selected[pi] -> selected);
258 img -> selected[pi] -> selected_dihedrals = allocint (i);
259 dihedrals_loop (view, -1, pi, NULL);
260 }
261}
262
271void save_angle_selection (glwin * view, int pi)
272{
273 int i, j;
274 image * img = view -> anim -> last -> img;
275 if (img -> selected[pi] -> selected > 2 && img -> selected[pi] -> selected < MAX_IN_SELECTION)
276 {
277 objects[1] = i = num_angles (img -> selected[pi] -> selected);
278 tmp_object_id[1] = allocdint (i, 3);
280 for (j=0; j<i; j++) object_was_selected[1][j] = img -> selected[pi] -> selected_angles[j];
281 angles_loop (view, -2, pi, NULL);
282 g_free (img -> selected[pi] -> selected_angles);
283 }
284 else
285 {
286 objects[1] = 0;
287 }
288}
289
299{
300 int i;
301 image * img = view -> anim -> last -> img;
302 if (img -> selected[pi] -> selected > 2 && img -> selected[pi] -> selected < MAX_IN_SELECTION)
303 {
304 i = num_angles (img -> selected[pi] -> selected);
305 img -> selected[pi] -> selected_angles = allocint (i);
306 angles_loop (view, -1, pi, NULL);
307 }
308}
309
318void save_bond_selection (glwin * view, int pi)
319{
320 int i, j;
321 image * img = view -> anim -> last -> img;
322 if (img -> selected[pi] -> selected > 1 && img -> selected[pi] -> selected < MAX_IN_SELECTION)
323 {
324 objects[0] = i = num_bonds (img -> selected[pi] -> selected);
325 tmp_object_id[0] = allocdint (i, 2);
327 for (j=0; j<i; j++) object_was_selected[0][j] = img -> selected[pi] -> selected_bonds[j];
328 bonds_loop (view, -2, pi, NULL);
329 g_free (img -> selected[pi] -> selected_bonds);
330 }
331 else
332 {
333 objects[0] = 0;
334 }
335}
336
346{
347 int i;
348 image * img = view -> anim -> last -> img;
349 if (img -> selected[pi] -> selected > 1 && img -> selected[pi] -> selected < MAX_IN_SELECTION)
350 {
351 i = num_bonds (img -> selected[pi] -> selected);
352 img -> selected[pi] -> selected_bonds = allocint (i);
353 bonds_loop (view, -1, pi, NULL);
354 }
355 if (view -> measure_win != NULL)
356 {
357 if (view -> measure_win -> selection_tree[0] != NULL)
358 {
359 update_selection_tree (view, pi, 0);
360 }
361 }
362}
363
372void save_all_selections (glwin * view, int pi)
373{
374 save_bond_selection (view, pi);
375 save_angle_selection (view, pi);
377}
378
388{
392 if (view -> measure_win != NULL) update_label_selection (view, pi);
393 int i;
394 for (i=0; i<3; i++)
395 {
396 if (objects[i] > 0)
397 {
398 if (object_was_selected[i])
399 {
400 g_free (object_was_selected[i]);
401 object_was_selected[i] = NULL;
402 }
403 if (tmp_object_id[i])
404 {
405 g_free (tmp_object_id[i]);
406 tmp_object_id[i] = NULL;
407 }
408 }
409 objects[i] = 0;
410 if (view -> measure_win != NULL)
411 {
412 if (view -> measure_win -> selection_tree[i] != NULL)
413 {
414 update_selection_tree (view, pi, i);
415 }
416 }
417 }
418}
419
429{
430 atom_in_selection * new_sel = g_malloc0 (sizeof*new_sel);
431 new_sel -> id = id;
432 new_sel -> sp = sp;
433 return new_sel;
434}
435
445void update_selection_list (atom_selection * at_list, atom * at, gboolean add)
446{
447 int i;
448 atom_in_selection * selection = at_list -> first;
449
450 if (add)
451 {
452 selection = at_list -> last;
453 if (at_list -> selected == 0)
454 {
455 at_list -> first = new_atom_in_selection (at -> id, at -> sp);
456 at_list -> last = at_list -> first;
457 }
458 else
459 {
460 selection -> next = new_atom_in_selection (at -> id, at -> sp);
461 selection -> next -> prev = selection;
462 at_list -> last = selection -> next;
463 }
464 }
465 else
466 {
467 selection = at_list -> first;
468 for (i=0; i<at_list -> selected; i++)
469 {
470 if (selection -> id == at -> id)
471 {
472 if (i == 0 && at_list -> selected == 1)
473 {
474 at_list -> last = NULL;
475 at_list -> first = NULL;
476 }
477 else if (i == 0)
478 {
479 at_list -> first = at_list -> first -> next;
480 at_list -> first -> prev = NULL;
481 }
482 else
483 {
484 if (i == at_list -> selected-1)
485 {
486 at_list -> last = selection -> prev;
487 at_list -> last -> next = NULL;
488 }
489 else
490 {
491 selection -> next -> prev = selection -> prev;
492 selection -> prev -> next = selection -> next;
493 }
494 }
495 break;
496 }
497 if (selection -> next != NULL) selection = selection -> next;
498 }
499 }
500}
501
514void process_selected_atom (project * this_proj, glwin * view, int id, int ac, int se, int pi)
515{
516 int i;
517 i = view -> anim -> last -> img -> step;
518 if (this_proj -> atoms[i][id].pick[pi])
519 {
520 if (! se)
521 {
522 this_proj -> atoms[i][id].pick[pi] = FALSE;
523 update_selection_list (view -> anim -> last -> img -> selected[pi], & this_proj -> atoms[i][id], FALSE);
524 view -> anim -> last -> img -> selected[pi] -> selected --;
525 view -> prepare_motion = TRUE;
526 }
527 else if (this_proj -> atoms[i][id].label[ac])
528 {
529 this_proj -> atoms[i][id].pick[pi] = FALSE;
530 this_proj -> atoms[i][id].label[ac] = FALSE;
531 view -> labelled = check_label_numbers (this_proj, 2);
532 update_selection_list (view -> anim -> last -> img -> selected[pi], & this_proj -> atoms[i][id], FALSE);
533 view -> anim -> last -> img -> selected[pi] -> selected --;
534 view -> prepare_motion = TRUE;
535 }
536 else
537 {
538 this_proj -> atoms[i][id].label[ac] = TRUE;
539 view -> labelled = check_label_numbers (this_proj, 2);
540 }
541 }
542 else
543 {
544 this_proj -> atoms[i][id].pick[pi] = TRUE;
545 update_selection_list (view -> anim -> last -> img -> selected[pi], & this_proj -> atoms[i][id], TRUE);
546 view -> anim -> last -> img -> selected[pi] -> selected ++;
547 view -> prepare_motion = TRUE;
548 }
549}
550
562void process_selection (project * this_proj, glwin * view, int id, int ac, int pi)
563{
564 int i, j, k;
565 j = view -> anim -> last -> img -> step;
566 k = this_proj -> atoms[j][id].pick[pi];
567 for (i=0; i<this_proj -> steps; i++)
568 {
569 if (i == j)
570 {
571 process_selected_atom (this_proj, view, id, ac, 1, pi);
572 }
573 else
574 {
575 this_proj -> atoms[i][id].pick[pi] = ! k;
576 }
577 }
578}
579
590void process_the_hits (glwin * view, gint event_button, double ptx, double pty)
591{
592 int i, j, k, l, m, n, o, p, q;
593 view -> picked = FALSE;
594 GLubyte pixel[4];
595 GLint viewport[4];
596 int scale = gtk_widget_get_scale_factor (view -> win);
597 glGetIntegerv (GL_VIEWPORT, viewport);
598 glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
599 glReadPixels (scale * view -> mouseX, viewport[3] - scale * view -> mouseY, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);
600
601 int picked_id = pixel[0] + 256*pixel[1] + 256*256*pixel[2];
602 for (i=0; i<view -> to_be_picked; i++)
603 {
604 if (picked_id == view -> color_to_pick[i])
605 {
606 j = i;
607 view -> picked = TRUE;
608 break;
609 }
610 }
611 to_pop.action = 0;
612 to_pop.x = 0.0;
613 to_pop.y = 0.0;
614 to_pop.pts[0] = to_pop.pts[1] = to_pop.pts[2] = to_pop.pts[3] = to_pop.pts[4] = -1;
615 if (view -> picked)
616 {
617 project * this_proj = get_project_by_id(view -> proj);
618 k = (is_atom_win_active(view) || (view -> mode == EDITION && view -> selection_mode == NSELECTION-1)) ? 1 : 0;
619 l = view -> anim -> last -> img -> step;
620 if (j < view -> clones_to_be_picked)
621 {
622 m = find_selected_atom (this_proj, j);
623 n = (j < view -> atoms_to_be_picked) ? 0 : 1;
624 o = m;
625 p = -1;
626 q = this_proj -> atoms[l][m].pick[k];
627 }
628 else
629 {
630 m = find_selected_bond (this_proj, j);
631 n = (j < view -> bonds_to_be_picked) ? 0 : 1;
632 o = view -> bondid[l][n][m][0];
633 p = view -> bondid[l][n][m][1];
634 q = 0;
635 if (this_proj -> atoms[l][o].pick[k] || this_proj -> atoms[l][p].pick[k]) q = 1;
636 }
637 if (m != -1)
638 {
639 if (event_button == 1)
640 {
641 if (view -> selection_mode == ATOMS || view -> selection_mode == NSELECTION-1 || is_atom_win_active(view))
642 {
643 save_all_selections (view, k);
644 if (j < view -> clones_to_be_picked)
645 {
646 process_selection (this_proj, view, m, n, k);
647 }
648 else
649 {
650 if (this_proj -> atoms[l][o].show[n]) process_selection (this_proj, view, o, n, k);
651 if (this_proj -> atoms[l][p].show[n]) process_selection (this_proj, view, p, n, k);
652 }
653 update_all_selections (view, k);
654 }
655 else if (view -> selection_mode == 1)
656 {
658 if (j < view -> clones_to_be_picked)
659 {
660 selected_status = ! this_proj -> atoms[l][m].pick[get_to_be_selected (view)];
661#ifdef GTK4
662 select_unselect_this_atom (NULL, NULL, GINT_TO_POINTER(m));
663#else
664 select_unselect_this_atom (NULL, GINT_TO_POINTER(m));
665#endif
666 }
667 else
668 {
669 selected_status = ! this_proj -> atoms[l][o].pick[get_to_be_selected (view)];
670#ifdef GTK4
671 select_unselect_this_atom (NULL, NULL, GINT_TO_POINTER(o));
672 select_unselect_this_atom (NULL, NULL, GINT_TO_POINTER(p));
673#else
674 select_unselect_this_atom (NULL, GINT_TO_POINTER(o));
675 select_unselect_this_atom (NULL, GINT_TO_POINTER(p));
676#endif
677 }
678 }
679 else
680 {
682 if (view -> selection_mode > 3)
683 {
684 p = view -> selection_mode-2;
685 }
686 else
687 {
688 p = view -> selection_mode;
689 }
690 if (j < view -> clones_to_be_picked)
691 {
692 n = this_proj -> atoms[l][m].coord[p];
693 o = this_proj -> atoms[l][m].pick[0];
694 }
695 else
696 {
697 n = this_proj -> atoms[l][o].coord[p];
698 o = this_proj -> atoms[l][o].pick[0];
699 }
700 if (view -> selection_mode > 3)
701 {
702 selected_aspec = -1;
703#ifdef GTK4
704 select_unselect_atoms (NULL, NULL, & view -> colorp[0][0]);
705#else
706 select_unselect_atoms (NULL, & view -> colorp[0][0]);
707#endif
708 }
709 tint pointer;
710 pointer.a = p;
711 pointer.b = n;
712 pointer.c = ! o;
713#ifdef GTK4
714 select_unselect_coord (NULL, NULL, & pointer);
715#else
716 select_unselect_coord (NULL, & pointer);
717#endif
718 }
719 if (view -> mode == EDITION)
720 {
721 init_coordinates (this_proj, 1, FALSE, TRUE);
722 view -> baryc[1] = get_bary (this_proj, 1);
723 }
724 int shaders[1] = {SELEC};
725 re_create_md_shaders (1, shaders, this_proj);
726 view -> create_shaders[LABEL] = TRUE;
727 view -> create_shaders[MEASU] = TRUE;
728 update (view);
729 // if (view -> anim -> last -> img -> m_is_pressed && gtk_accelerator_get_default_mod_mask() == GDK_CONTROL_MASK) window_measures (NULL, view);
730 }
731 else if (event_button == 3)
732 {
733 to_pop.action = 2;
734 to_pop.x = ptx;
735 to_pop.y = pty;
736 to_pop.pts[0] = q;
737 to_pop.pts[1] = k;
738 to_pop.pts[2] = o;
739 to_pop.pts[3] = p;
740 to_pop.pts[4] = n;
741 // popup_selection (view, ptx, pty, q, k, o, p, n);
742 }
743 }
744 }
745 else if (event_button == 3)
746 {
747 to_pop.action = 1;
748 to_pop.x = ptx;
749 to_pop.y = pty;
750 // popup_main_menu (view, ptx, pty);
751 }
752}
Function declarations for the mode edition window.
void init_coordinates(project *this_proj, int status, gboolean win, gboolean init)
preserve atomic coordinates
Definition atom_move.c:197
vec3_t get_bary(project *this_proj, int status)
get barycenter of atomic coordinates
Definition atom_move.c:170
color colorp[64]
double scale(double axe)
find appropriate major tick spacing based on axis length
Definition curve.c:204
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
Definition labels.c:56
int atoms[NUM_STYLES][2]
int bonds[NUM_STYLES][2]
int ** allocdint(int xal, int yal)
allocate an int ** pointer
Definition global.c:342
double pi
Definition global.c:195
gboolean selected_status
Definition global.c:187
int * allocint(int val)
allocate an int * pointer
Definition global.c:326
Global variable declarations Global convenience function declarations Global data structure defin...
gboolean is_atom_win_active(glwin *view)
is the model edition window visible ?
Definition atom_edit.c:71
project * proj
void opengl_project_changed(int id)
change the OpenGL project
Definition update_p.c:245
G_MODULE_EXPORT void select_unselect_this_atom(GtkWidget *widg, gpointer data)
select / unselect this atom callback GTK3
Definition popup.c:1176
G_MODULE_EXPORT void select_unselect_atoms(GtkWidget *widg, gpointer data)
select / unselect a type of atom(s) callback GTK3
Definition popup.c:1550
G_MODULE_EXPORT void select_unselect_coord(GtkWidget *widg, gpointer data)
select / unselect a type of coordination callback GTK3
Definition popup.c:1916
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
void update(glwin *view)
update the rendering of the OpenGL window
Definition glview.c:439
gl_pop_info to_pop
Definition glview.c:873
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
void re_create_md_shaders(int nshaders, int shaders[nshaders], project *this_proj)
re-initialize some MD dependent OpenGL shaders
#define MAX_IN_SELECTION
Maximum number of atoms in selection to display measure information.
Definition glview.h:135
gboolean pick
int check_label_numbers(project *this_proj, int types)
check how many atom label(s) are visible
Definition popup.c:1039
@ EDITION
Definition glview.h:158
int step
Definition ogl_draw.c:70
void update_selection_tree(glwin *view, int pi, int id)
update measurements tree view
Definition w_measures.c:380
shaders
The different types of shaders in the atomes program.
Definition glwin.h:88
@ LABEL
Definition glwin.h:98
@ SELEC
Definition glwin.h:91
@ MEASU
Definition glwin.h:99
@ ATOMS
Definition glwin.h:89
#define NSELECTION
Definition glwin.h:67
Messaging function declarations.
void update_dihedral_selection(glwin *view, int pi)
update the dihedral selection data
Definition selection.c:251
int num_bonds(int i)
number of distinct pair(s) of atoms in selection
Definition selection.c:183
void save_angle_selection(glwin *view, int pi)
save the angle selection data
Definition selection.c:271
int find_selected_bond(project *this_proj, int id)
find the selected bond based of the picked color id
Definition selection.c:114
int objects[3]
Definition selection.c:212
void update_angle_selection(glwin *view, int pi)
update the angle selection data
Definition selection.c:298
int num_dihedrals(int i)
number of distinct quadruplet(s) of atoms in selection
Definition selection.c:207
void dihedrals_loop(glwin *view, int id, int pi, GtkTreeStore *store)
do things for the measured dihedrals selection
Definition d_measures.c:319
int ** tmp_object_id[3]
Definition selection.c:214
void update_selection_list(atom_selection *at_list, atom *at, gboolean add)
update the selection list adding or removing an atom
Definition selection.c:445
void save_bond_selection(glwin *view, int pi)
save the bond selection data
Definition selection.c:318
void save_dihedral_selection(glwin *view, int pi)
save the dihedral selection data
Definition selection.c:224
int get_to_be_selected(glwin *view)
find which atom(s) are to be selected
Definition popup.c:196
int num_angles(int i)
number of distinct triplet(s) of atoms in selection
Definition selection.c:195
atom_in_selection * new_atom_in_selection(int id, int sp)
create a selected atom
Definition selection.c:428
void angles_loop(glwin *view, int id, int pi, GtkTreeStore *store)
do things for the measured angles selection
Definition d_measures.c:204
void update_label_selection(glwin *view, int pi)
update the text information for the number of atoms/measures in selection
Definition w_measures.c:647
int find_selected_atom(project *this_proj, int id)
find the selected atom based of the picked color id
Definition selection.c:151
void process_the_hits(glwin *view, gint event_button, double ptx, double pty)
process a mouse click
Definition selection.c:590
void bonds_loop(glwin *view, int id, int pi, GtkTreeStore *store)
do things for the measured distances selection
Definition d_measures.c:530
int find_bond_in_bonds(project *this_proj, int i, int j, int b, int id)
Find for a bond ID in the bond list using the atoms in the bond.
Definition selection.c:81
void process_selected_atom(project *this_proj, glwin *view, int id, int ac, int se, int pi)
process selected atom
Definition selection.c:514
G_MODULE_EXPORT void window_measures(GtkWidget *widg, gpointer data)
create the measurements window
Definition w_measures.c:738
void update_all_selections(glwin *view, int pi)
update the selection data: bonds, angles and dihedrals
Definition selection.c:387
int selected_aspec
Definition popup.c:179
void save_all_selections(glwin *view, int pi)
save all selection data
Definition selection.c:372
int * object_was_selected[3]
Definition selection.c:213
void process_selection(project *this_proj, glwin *view, int id, int ac, int pi)
process selection
Definition selection.c:562
void update_bond_selection(glwin *view, int pi)
update the bond selection data
Definition selection.c:345
Definition global.h:839
int action
Definition glview.h:369
double y
Definition glview.h:370
int pts[5]
Definition glview.h:371
double x
Definition glview.h:370
Definition glwin.h:875
Definition glwin.h:277
coord_info * coord
Definition global.h:908
Definition global.h:98
int b
Definition global.h:100
int c
Definition global.h:101
int a
Definition global.h:99
int b
Definition tab-1.c:95
GtkWidget * img
Definition workspace.c:70