atomes 1.1.15
atomes: an atomic scale modeling tool box
|
Variable declarations related to the OpenGL window
Function declarations related to the OpenGL window.
More...
Go to the source code of this file.
Data Structures | |
struct | gl_pop_info |
Macros | |
#define | QUALITY 30 |
Default OpenGL quality (number of polygons) | |
#define | DEFAULT_STYLE 1 |
Default OpenGL style: ball and stick. | |
#define | DEFAULT_SIZE 1 |
#define | DEFAULT_LIGHTNING 1.00 |
Default OpenGL material ligthning. | |
#define | DEFAULT_METALLIC 0.35 |
Default OpenGL material metallic. | |
#define | DEFAULT_ROUGHNESS 0.15 |
Default OpenGL material roughness. | |
#define | DEFAULT_AMBIANT_OCCLUSION 1.00 |
Default OpenGL material ambiant occlusion. | |
#define | DEFAULT_GAMMA_CORRECTION 1.50 |
Default OpenGL material gamma correction. | |
#define | DEFAULT_OPACITY 1.00 |
Default OpenGL opacity. | |
#define | MAX_LIGHTS 10 |
Maximum number of light sources. | |
#define | DEFAULT_INTENSITY 10.0 |
Default light intensity. | |
#define | NEAR_PLANE 1.0 |
Default value for the OpenGL near plane. | |
#define | FAR_PLANE 10.0 |
Default value for the OpenGL far plane. | |
#define | CAMERA_ANGLE_X 5.0 |
Default value for the OpenGL camera pitch in ° | |
#define | CAMERA_ANGLE_Y -25.0 |
Default value for the OpenGL camera heading in ° | |
#define | CAMERA_ANGLE_Z 0.0 |
Default value for the OpenGL camera toll in ° | |
#define | ZOOM 1.5 |
Default value for the OpenGL zoom. | |
#define | ZOOM_FACTOR 0.05 |
Default value for the OpenGL zoom factor. | |
#define | ZOOM_MAX 0.001 |
Maximum value for the OpenGL zoom factor. | |
#define | REFRESH 10 |
Refresh time for spinning the OpenGL window in milliseconds. | |
#define | MAX_IN_SELECTION 21 |
Maximum number of atoms in selection to display measure information. | |
#define | COORD_MAX_MENU 20 |
Maximum number of fragments or molecules to build the related menu items. | |
#define | NUM_STYLES 7 |
Typedefs | |
typedef struct gl_pop_info | gl_pop_info |
Enumerations | |
enum | radii { VDW = 0 , INC = 1 , COV = 2 , ION = 3 } |
enum | representation { ORTHOGRAPHIC = 0 , PERSPECTIVE = 1 } |
enum | modes { ANALYZE = 0 , EDITION = 1 , MOTION = 2 , DL_POLY = 3 , LAAMPS = 4 , CPMD_AI = 5 , CP2K_AI = 6 , CP2K_QMMM = 7 , CP2K_MM = 8 } |
enum | styles { NONE = -1 , BALL_AND_STICK = 0 , WIREFRAME = 1 , SPACEFILL = 2 , SPHERES = 3 , CYLINDERS = 4 , PUNT = 5 } |
enum | render { FILL = 0 , LINE = 1 , PTS = 2 } |
enum | action { ROTATE = 0 , MOVE = 1 , SELECT = 2 , ZOOM_IN_OUT = 3 , SPIN = 4 } |
enum | mouse_status { CLICKED = 0 , RELEASED = 1 } |
enum | axisposition { TOP_RIGHT = 0 , TOP_LEFT = 1 , BOTTOM_RIGHT = 2 , BOTTOM_LEFT = 3 , CENTER = 4 , CUSTOM = 5 } |
enum | labels { ELEMENT_NAME = 0 , SYMBOL = 1 , SYMBOL_AND_NUM = 2 , NUM = 3 , ID_IN_MOLECULE = 4 } |
enum | actions { DISPL = 2 , REPLACE = 3 , REMOVE = 4 , INSERT = 5 , RANMOVE = 6 } |
enum | texts { SIMPLE_TEXT = 0 , BETTER_TEXT = 1 } |
Functions | |
GLfloat ** | allocdGLfloat (int xal, int yal) |
allocate a GLfloat ** pointer | |
gboolean | create_bond (int ac, int bid, int ba, int bb, int sel, double length) |
void | draw_cylinder_bond (atom a, atom b, int bid, int ci, int bi) |
void | draw_cylinder_bond_to_pick (atom a, atom b, int bid) |
void | draw_wireframe_bond (atom a, atom b, int ci, int bi) |
gboolean | create_atom (GLUquadricObj *quadric, int aid, int ac, int sp, int sel) |
void | draw_vertices (int id) |
Draw OpenGL shader program. | |
void | draw_atom_to_pick (atom at) |
void | draw_atom (atom at, double al) |
void | draw_rings_gl (int se, int ge, int ta, int id) |
void | draw_box () |
void | prepare_cuboid (vec3_t position, int id) |
OpenGL 3D light object rendering. | |
void | prepare_axis () |
void | draw (glwin *view) |
main drawing subroutine for the OpenGL window | |
void | render_all_strings (int glsl, int id) |
render all string to be rendered for a label list | |
void | prepare_string (char *text, int id, ColRGBA col, vec3_t pos, float lshift[3], atom *at, atom *bt, atom *ct) |
prepare a screen string to be rendered | |
ColRGBA | init_color (int id, int numid) |
initialize color based id number over total number of elements | |
ColRGBA | set_default_color (int z) |
pick the default color for an atom | |
void | sort (int dim, int *tab) |
sort, nim to max, a table by integer value | |
vec3_t | get_insertion_coordinates (glwin *view) |
get the insertion coordinates to insert object in the 3D window | |
void | setup_bonds (glwin *view) |
void | update (glwin *view) |
update the rendering of the OpenGL window | |
void | center_this_molecule (glwin *view) |
center atomic coordinates around (0,0,0) and refresh shaders | |
G_MODULE_EXPORT void | to_center_this_molecule (GtkWidget *widg, gpointer data) |
center this molecule menu item callback GTK4 | |
G_MODULE_EXPORT void | on_lib_button_pressed (GtkGesture *gesture, int n_press, double x, double y, gpointer data) |
handle mouse button press event on the molecular library OpenGL window (limited interaction) | |
G_MODULE_EXPORT void | on_lib_button_released (GtkGesture *gesture, int n_press, double x, double y, gpointer data) |
handle mouse button release event on the molecular library OpenGL window (limited interaction) | |
G_MODULE_EXPORT void | on_glwin_button_pressed (GtkGesture *gesture, int n_press, double x, double y, gpointer data) |
mouse button pressed signal on the OpenGL window | |
G_MODULE_EXPORT void | on_glwin_button_released (GtkGesture *gesture, int n_press, double x, double y, gpointer data) |
mouse button released signal on the OpenGL window | |
G_MODULE_EXPORT void | on_glwin_pointer_motion (GtkEventControllerMotion *motion, gdouble x, gdouble y, gpointer data) |
handle mouse motion event in the OpenGL window GTK4 | |
G_MODULE_EXPORT gboolean | on_glwin_pointer_scoll (GtkEventControllerScroll *event, gdouble dx, gdouble dy, gpointer data) |
handle mouse scroll event on the OpenGL window | |
void | reshape (glwin *view, int width, int height, gboolean use_ratio) |
reshape (resize) the OpenGL window | |
void | zoom (glwin *view, int delta) |
zoom in or zoom out in the OpenGL window | |
void | init_opengl () |
initialize OpenGL rendering parameters | |
void | init_camera (project *this_proj, gboolean get_depth) |
G_MODULE_EXPORT void | on_realize (GtkWidget *area, gpointer data) |
realize event for the OpenGL widget | |
G_MODULE_EXPORT gboolean | on_expose (GtkWidget *widg, cairo_t *cr, gpointer data) |
OpenGL rendering widget expose event callback GTK3. | |
void | debug_image (image img, int i) |
distance | distance_2d (atom *at, atom *bt) |
distance between atom a and b in 2D | |
distance | distance_3d (cell_info *cell, int mdstep, atom *at, atom *bt) |
distance between atom a and b in 3D | |
angle | angle_2d (atom *at, atom *bt, atom *ct) |
angle between atom a, b and c in 2D | |
angle | angle_3d (cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct) |
angle between atom a, b and c in 3D | |
angle | dihedral_3d (cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct, atom *dt) |
dihedral between atom a, b, c and d in 3D | |
atom * | duplicate_atom (atom *at) |
copy (partially) an atom data structure | |
void | at_shift (atom *at, float *shift) |
modify atomic coordinates to display image in cell replica | |
void | at_unshift (atom *at, float *shift) |
correct atomic coordinates modified to display image in cell replica | |
int | check_label_numbers (project *this_proj, int types) |
check how many atom label(s) are visible | |
mat4_t | create_axis_matrices (int type) |
create axis OpenGL rendering matrices | |
mat4_t | create_label_matrices () |
create label projection matrices | |
void | re_create_all_md_shaders (glwin *view) |
re-initialize all MD dependent OpenGL shaders | |
void | re_create_md_shaders (int nshaders, int shaders[nshaders], project *this_proj) |
re-initialize some MD dependent OpenGL shaders | |
void | cleaning_shaders (glwin *view, int shader) |
re-initialize an OpenGL shader | |
void | init_default_shaders (glwin *view) |
re-initialize the default OpenGL shaders | |
void | init_shaders (glwin *view) |
initialize all the OpenGL shaders | |
glsl_program * | init_shader_program (int object, int object_id, const GLchar *vertex, const GLchar *geometry, const GLchar *fragment, GLenum type_of_vertices, int narray, int nunif, gboolean lightning, object_3d *obj) |
create an OpenGL shader program | |
void | update_selection_list (atom_selection *at_list, atom *at, gboolean add) |
update the selection list adding or removing an atom | |
void | update_all_selections (glwin *view, int pi) |
update the selection data: bonds, angles and dihedrals | |
void | save_all_selections (glwin *view, int pi) |
save all selection data | |
void | process_selected_atom (project *this_proj, glwin *view, int id, int ac, int se, int pi) |
process selected atom | |
void | update_selection_tree (glwin *view, int pi, int id) |
update measurements tree view | |
void | update_all_menus (glwin *view, int nats) |
update all menus of the OpenGL window | |
gboolean | is_coord_in_menu (int id, project *this_proj) |
is this coordination in a menu ? | |
atom_search * | free_this_search_data (atom_search *this_search) |
free atom search data structure | |
G_MODULE_EXPORT void | show_hide_clones (GSimpleAction *action, GVariant *state, gpointer data) |
show/hide clones menu item callback | |
void | popup_selection (glwin *view, double ptx, double pty, int se, int pe, int ai, int bi, int ac) |
create the contextual popup menu, right click on atom or bond | |
void | popup_main_menu (glwin *view, double ptx, double pty) |
create the OpenGL window popup menu | |
Variables | |
GLfloat | initlights [4][4] |
gboolean | pick |
glwin * | wingl |
project * | proj_gl |
coord_info * | coord_gl |
box_info * | box_gl |
cell_info * | cell_gl |
int | proj_sp |
int | proj_at |
image * | plot |
int | qual |
int | acolorm |
int | pcolorm |
int | step |
int | gColorID [3] |
int | field_object |
GLenum | ogl_texture |
int | nbs |
int | nbl |
int | nba |
gl_pop_info | to_pop |
Variable declarations related to the OpenGL window
Function declarations related to the OpenGL window.
Definition in file glview.h.
#define CAMERA_ANGLE_X 5.0 |
#define CAMERA_ANGLE_Y -25.0 |
#define CAMERA_ANGLE_Z 0.0 |
#define COORD_MAX_MENU 20 |
#define DEFAULT_AMBIANT_OCCLUSION 1.00 |
#define DEFAULT_GAMMA_CORRECTION 1.50 |
#define DEFAULT_LIGHTNING 1.00 |
#define DEFAULT_METALLIC 0.35 |
#define DEFAULT_ROUGHNESS 0.15 |
#define DEFAULT_STYLE 1 |
#define FAR_PLANE 10.0 |
#define MAX_IN_SELECTION 21 |
#define NEAR_PLANE 1.0 |
#define QUALITY 30 |
#define REFRESH 10 |
#define ZOOM_FACTOR 0.05 |
#define ZOOM_MAX 0.001 |
enum action |
enum actions |
enum axisposition |
enum labels |
enum modes |
enum mouse_status |
enum representation |
enum styles |
|
extern |
angle between atom a, b and c in 2D
at | atom a |
bt | atom b |
ct | atom c |
Definition at line 156 of file ogl_utils.c.
angle between atom a, b and c in 3D
cell | unit cell |
mdstep | the MD step |
at | atom a |
bt | atom b |
ct | atom c |
Definition at line 179 of file ogl_utils.c.
|
extern |
modify atomic coordinates to display image in cell replica
at | the atom |
shift | the shift to apply |
Definition at line 432 of file ogl_draw.c.
|
extern |
correct atomic coordinates modified to display image in cell replica
at | the atom |
shift | the shift to correct |
Definition at line 447 of file ogl_draw.c.
void center_this_molecule | ( | glwin * | view | ) |
|
extern |
|
extern |
re-initialize an OpenGL shader
view | the target glwin |
shader | the shader to initialize |
Definition at line 695 of file ogl_shading.c.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
dihedral between atom a, b, c and d in 3D
cell | unit cell |
mdstep | the MD step |
at | atom a |
bt | atom b |
ct | atom c |
dt | atom d |
Definition at line 204 of file ogl_utils.c.
distance between atom a and b in 2D
at | atom a |
bt | atom b |
Definition at line 60 of file ogl_utils.c.
distance between atom a and b in 3D
cell | unit cell |
mdstep | the MD step |
at | atom a |
bt | atom b |
Definition at line 81 of file ogl_utils.c.
|
extern |
main drawing subroutine for the OpenGL window
view | the target glwin |
Definition at line 461 of file ogl_draw.c.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Draw OpenGL shader program.
id | the ID of the program to render |
Definition at line 1028 of file ogl_shading.c.
copy (partially) an atom data structure
at | the atom to copy |
Definition at line 396 of file ogl_draw.c.
|
extern |
get the insertion coordinates to insert object in the 3D window
view | the target glwin |
Definition at line 794 of file glwindow.c.
void init_camera | ( | project * | this_proj, |
gboolean | get_depth ) |
ColRGBA init_color | ( | int | id, |
int | numid ) |
initialize color based id number over total number of elements
id | the id number |
numid | the total number of elements |
Definition at line 81 of file initcoord.c.
|
extern |
re-initialize the default OpenGL shaders
view | the target glwin |
Definition at line 729 of file ogl_shading.c.
void init_opengl | ( | ) |
|
extern |
create an OpenGL shader program
object | shader id (in enum shaders) |
object_id | shader type in: GLSL_SPHERES, GLSL_POINTS, GLSL_LINES, GLSL_CYLINDERS, GLSL_CAPS, GLSL_POLYEDRA, GLSL_STRING |
vertex | general shader: in the shaders defined in 'ogl_shaders.c' |
geometry | geometry shader, if any: in the shaders defined in 'ogl_shaders.c' |
fragment | color shader, if any: in the shaders defined in 'ogl_shaders.c' |
type_of_vertices | type of vertices in: GL_POINTS, GL_LINES, GL_TRIANGLE GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP |
narray | number of vertices to allocate |
nunif | number of uniform location(s) to allocate |
lightning | use lightning (1/0) |
obj | the object 3D to bind to the shader |
Definition at line 533 of file ogl_shading.c.
|
extern |
initialize all the OpenGL shaders
view | the target glwin |
Definition at line 757 of file ogl_shading.c.
|
extern |
G_MODULE_EXPORT gboolean on_expose | ( | GtkWidget * | widg, |
cairo_t * | cr, | ||
gpointer | data ) |
G_MODULE_EXPORT void on_glwin_button_pressed | ( | GtkGesture * | gesture, |
int | n_press, | ||
double | x, | ||
double | y, | ||
gpointer | data ) |
G_MODULE_EXPORT void on_glwin_button_released | ( | GtkGesture * | gesture, |
int | n_press, | ||
double | x, | ||
double | y, | ||
gpointer | data ) |
G_MODULE_EXPORT void on_glwin_pointer_motion | ( | GtkEventControllerMotion * | motc, |
gdouble | x, | ||
gdouble | y, | ||
gpointer | data ) |
G_MODULE_EXPORT gboolean on_glwin_pointer_scoll | ( | GtkEventControllerScroll * | event, |
gdouble | dx, | ||
gdouble | dy, | ||
gpointer | data ) |
G_MODULE_EXPORT void on_lib_button_pressed | ( | GtkGesture * | gesture, |
int | n_press, | ||
double | x, | ||
double | y, | ||
gpointer | data ) |
G_MODULE_EXPORT void on_lib_button_released | ( | GtkGesture * | gesture, |
int | n_press, | ||
double | x, | ||
double | y, | ||
gpointer | data ) |
G_MODULE_EXPORT void on_realize | ( | GtkWidget * | widg, |
gpointer | data ) |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
prepare a screen string to be rendered
text | the text to render |
id | the label id |
col | the color |
pos | the position |
lshift | label position shift on x, y and z, if any |
at | the 1st atom, if any (bond or angle measure string) |
bt | the 2nd atom, if any (bond or angle measure string) |
ct | the 3rd atom, if any (angle measure string) |
Definition at line 691 of file ogl_text.c.
|
extern |
process selected atom
this_proj | the target project |
view | the target glwin |
id | the atom id |
ac | atom or clone (0/1) |
se | set to 0 to ensure to remove a selected atom from the list and not to add label |
pi | selection mode (0 = normal mode, 1 = edition mode) |
Definition at line 514 of file selection.c.
|
extern |
re-initialize all MD dependent OpenGL shaders
view | the target glwin |
Definition at line 651 of file ogl_shading.c.
|
extern |
re-initialize some MD dependent OpenGL shaders
nshaders | the number of shader(s) to initialize |
shaders | the list of shaders |
this_proj | the target project |
Definition at line 673 of file ogl_shading.c.
|
extern |
render all string to be rendered for a label list
glsl | shader id |
id | label id |
Definition at line 549 of file ogl_text.c.
void reshape | ( | glwin * | view, |
int | width, | ||
int | height, | ||
gboolean | use_ratio ) |
|
extern |
save all selection data
view | the target glwin |
pi | selection mode (0 = normal mode, 1 = edition mode) |
Definition at line 372 of file selection.c.
ColRGBA set_default_color | ( | int | z | ) |
void setup_bonds | ( | glwin * | view | ) |
|
extern |
show/hide clones menu item callback
action | the GAction sending the signal |
parameter | GVariant parameter of the GAction, if any |
data | the associated data pointer |
Definition at line 139 of file m_clones.c.
|
extern |
G_MODULE_EXPORT void to_center_this_molecule | ( | GtkWidget * | widg, |
gpointer | data ) |
void update | ( | glwin * | view | ) |
|
extern |
update all menus of the OpenGL window
view | the target glwin |
nats | the total number of atoms |
Definition at line 337 of file glwindow.c.
|
extern |
update the selection data: bonds, angles and dihedrals
view | the target glwin |
pi | selection mode (0 = normal mode, 1 = edition mode) |
Definition at line 387 of file selection.c.
|
extern |
update the selection list adding or removing an atom
at_list | target atom selection |
at | atom |
add | add or remove (1/0) |
Definition at line 445 of file selection.c.
|
extern |
update measurements tree view
view | the target glwin |
sid | the type of selection (0 = analysis mode, 1 = edition mode) |
mid | the type of measurement (0 = bonds, 1 = angles, 2 = dihedrals) |
Definition at line 381 of file w_measures.c.
void zoom | ( | glwin * | view, |
int | delta ) |
|
extern |
Definition at line 68 of file ogl_draw.c.
|
extern |
Definition at line 64 of file ogl_draw.c.
|
extern |
Definition at line 65 of file ogl_draw.c.
|
extern |
Definition at line 63 of file ogl_draw.c.
|
extern |
Definition at line 979 of file dlp_field.c.
|
extern |
|
extern |
Definition at line 69 of file ogl_draw.c.
|
extern |
|
extern |
Definition at line 66 of file ogl_draw.c.
|
extern |
Definition at line 62 of file ogl_draw.c.
|
extern |
Definition at line 60 of file ogl_draw.c.
|
extern |
Definition at line 61 of file ogl_draw.c.
|
extern |
Definition at line 67 of file ogl_draw.c.
|
extern |
Definition at line 70 of file ogl_draw.c.
|
extern |
|
extern |
Definition at line 59 of file ogl_draw.c.