66extern G_MODULE_EXPORT
void set_color_map (GtkWidget * widg, gpointer data);
81 for (i=0; i<2; i++) colm[i] = view -> anim -> last ->
img -> color_map[i];
102 if ((i == 3 || i == 4) && ! view -> adv_bonding[i-3])
110 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> color_styles[j], TRUE);
171 active_project -> curves[
AN][h] -> name = g_strdup_printf(
"Angles [%s-%s-%s]",
187 active_project -> curves[
AN][h] -> name = g_strdup_printf(
"Dihedral [%s-%s-%s-%s]",
210 for (i = 0; i < species; i++)
212 for (j = 0; j < species; j++)
214 if (chem -> cutoffs[i][j] == 0.0)
216 chem -> cutoffs[i][j] = chem -> chem_prop[
CHEM_R][i] + chem -> chem_prop[
CHEM_R][j];
217 chem -> cutoffs[i][j] =
max(
MINCUT, chem -> cutoffs[i][j]);
218 if (chem -> chem_prop[
CHEM_Z][i] == 1.0 && chem -> chem_prop[
CHEM_Z][j] == 6.0) chem -> cutoffs[i][j] = 1.2;
219 if (chem -> chem_prop[
CHEM_Z][j] == 1.0 && chem -> chem_prop[
CHEM_Z][i] == 6.0) chem -> cutoffs[j][i] = 1.2;
220 if (chem -> chem_prop[
CHEM_Z][i] == 1.0 && chem -> chem_prop[
CHEM_Z][j] == 8.0) chem -> cutoffs[i][j] = 1.2;
221 if (chem -> chem_prop[
CHEM_Z][j] == 1.0 && chem -> chem_prop[
CHEM_Z][i] == 8.0) chem -> cutoffs[j][i] = 1.2;
224 if (chem -> chem_prop[
CHEM_Z][i] == 1.0) chem -> cutoffs[i][i] = 0.5;
226 if (chem -> grtotcutoff == 0.0)
228 for (i = 0; i < species; i++)
230 chem -> grtotcutoff += chem -> chem_prop[
CHEM_R][i];
232 chem -> grtotcutoff *= 2.0;
233 chem -> grtotcutoff /= species;
234 chem -> grtotcutoff =
max(
MINCUT, chem -> grtotcutoff);
298 for (i=0; i<2; i++)
active_glwin -> adv_bonding[i] = FALSE;
336 if (calc > 3 && calc < 6) i = 1;
337 if (calc > 0 && calc < 6)
346 g_debug (
"Run dmtx Prim= %d, NOHP= %d, UPDATE= %d", i, j, k);
348 clock_gettime (CLOCK_MONOTONIC, &
start_time);
351 clock_gettime (CLOCK_MONOTONIC, &
stop_time);
366 if (this_proj -> text_buffer[
AN+
OT] == NULL) this_proj -> text_buffer[
AN+
OT] =
add_buffer (NULL, NULL, NULL);
368 print_info (
"\n\nAngles and diherdrals distribution(s)\n\n",
"heading", this_proj -> text_buffer[
AN+
OT]);
369 print_info (
"Calculation details:\n\n", NULL, this_proj -> text_buffer[
AN+
OT]);
370 print_info (
"\tAngular space discretization:\n\n", NULL, this_proj -> text_buffer[
AN+
OT]);
371 print_info (
"\t - Number of δ° steps: ",
"bold", this_proj -> text_buffer[
AN+
OT]);
372 str = g_strdup_printf (
"%d", this_proj -> num_delta[
AN]);
375 print_info (
"\n\n\t between 0.0 and 180.0", NULL, this_proj -> text_buffer[
AN+
OT]);
376 print_info (
" °\n\n\t - δ° = ",
"bold", this_proj -> text_buffer[
AN+
OT]);
377 str = g_strdup_printf (
"%f", this_proj -> delta[
AN]);
424 if (GTK_IS_WIDGET(
active_glwin -> search_widg[i] -> filter_box))
428 gtk_combo_box_text_remove ((GtkComboBoxText *)
active_glwin -> search_widg[i] -> filter_box, 4);
436 gtk_combo_box_text_remove ((GtkComboBoxText *)
active_glwin -> search_widg[i] -> filter_box, 3);
507 clock_gettime (CLOCK_MONOTONIC, &
start_time);
509 clock_gettime (CLOCK_MONOTONIC, &
stop_time);
515 show_error (
"Unexpected error when calculating bond properties", 0, (widg) ? widg :
MainWindow);
525 clock_gettime (CLOCK_MONOTONIC, &
start_time);
528 show_error (
"Unexpected error when looking for isolated fragment(s) and molecule(s)", 0, (widg) ? widg :
MainWindow);
557 clock_gettime (CLOCK_MONOTONIC, &
stop_time);
577 clock_gettime (CLOCK_MONOTONIC, &
start_time);
581 show_error (
"Unexpected error when calculating the bond angles distribution", 0, (widg) ? widg :
MainWindow);
586 clock_gettime (CLOCK_MONOTONIC, &
stop_time);
590 show_error (
"Unexpected error when calculating the dihedral angles distribution", 0, (widg) ? widg :
MainWindow);
603 show_error (
"The nearest neighbors table calculation has failed", 0, (widg) ? widg :
MainWindow);
642 print_info (
"Existence of a bond between two atoms i (α) and j (β)\n"
643 "if the two following conditions are verified:\n\n"
646 str = g_strdup_printf (
" < first minimum of the total RDF (%9.5f Å )\n\t2) D",
active_chem -> grtotcutoff);
660 spr = g_strdup_printf(
"%s",
textcolor(sp));
666 str = g_strdup_printf(
"%9.5lf\n", sac);
674 str = g_strdup_printf(
"%s",
textcolor(j));
685 str = g_strdup_printf (
"%9.5lf Å",
active_chem -> cutoffs[sp][j]);
689 str = g_strdup_printf (
"%9.5lf", ssac[j]);
695 str = g_strdup_printf (
"%7.3lf", ssac[j]*100.0/(sac));
699 str = g_strdup_printf (
"%7.3lf", 0.0);
789void env_info (
int sp,
int totgsa,
int numgsa[totgsa])
793 gchar * str, * spr, * snr;
796 spr = g_strdup_printf (
"%s",
textcolor(sp));
806 i = 6 - strlen (snr);
808 str = g_strdup_printf (
"N(%s)", snr);
809 spr = g_strdup_printf (
"%s",
textcolor(j));
818 for ( i=0 ; i < totgsa; i++ )
822 for ( i=0 ; i < totgsa; i++ )
834 k = 12 - strlen (spr);
838 str = g_strdup_printf (
"%3d ", natpg[i]);
843 str = g_strdup_printf(
" %7d", k);
844 spr = g_strdup_printf (
"%s",
textcolor(j));
849 str = g_strdup_printf(
" %16.5lf", (1.0*numgsa[i])/
active_project -> steps);
853 str = g_strdup_printf (
"%7.3lf ", 100.0*numgsa[i]/tgsa);
871 if (this_proj -> text_buffer[
AN+
OT] == NULL) this_proj -> text_buffer[
AN+
OT] =
add_buffer (NULL, NULL, NULL);
873 print_info (
"\n\nAngle distribution function(s)\n\n",
"heading", this_proj -> text_buffer[
AN+
OT]);
876 print_info (
"\tAngle space discretization:\n\n", NULL, this_proj -> text_buffer[
AN+
OT]);
877 print_info (
"\t - Number of δ° steps: ",
"bold", this_proj -> text_buffer[
AN+
OT]);
878 str = g_strdup_printf (
"%d", this_proj -> num_delta[
AN]);
881 print_info (
"\n\n\t between 0.0 and 180.0°\n", NULL, this_proj -> text_buffer[
AN+
OT]);
893void envout_ (
int * sid,
int * totgsa,
int numgsa[* totgsa])
914 if (eda[i] != 0.0 || cda[i] != 0.0) print=TRUE;
924 if (eda[i] != 0.0 || cda[i] != 0.0)
941 str = g_strdup_printf(
" +/- %8.5lf", tepa[i]);
946 str = g_strdup_printf(
"%7.3lf", 100*eda[i]/(eda[i]+cda[i]));
951 str = g_strdup_printf(
" +/- %7.3lf", 100*tepa[i]*
active_project -> steps/(eda[i]+cda[i]));
965 str = g_strdup_printf(
" +/- %8.5lf", tcpa[i]);
970 str = g_strdup_printf(
"%7.3lf", 100*cda[i]/(eda[i]+cda[i]));
975 str = g_strdup_printf(
" +/- %7.3lf", 100*tcpa[i]*
active_project -> steps/(eda[i]+cda[i]));
989 str = g_strdup_printf(
" +/- %8.5lf", tdda[i]);
994 str = g_strdup_printf(
"%7.3lf", 100*dda[i]/(eda[i]+cda[i]));
999 str = g_strdup_printf(
" +/- %7.3lf", 100*tdda[i]*
active_project -> steps/(eda[i]+cda[i]));
1022 str = g_strdup_printf(
"%11.5lf", atd[i]/
active_project -> steps);
1027 str = g_strdup_printf(
" +/- %8.5lf", etd[i]);
1035 str = g_strdup_printf(
"%11.5lf", 2.0*eda[i]/
active_project -> steps);
1040 str = g_strdup_printf(
" +/- %8.5lf", 2.0*tepa[i]);
1045 str = g_strdup_printf(
"%7.3lf", 2.0*100*eda[i]/(eda[i]+cda[i]));
1050 str = g_strdup_printf(
" +/- %7.3lf", 2.0*100*tepa[i]*
active_project -> steps/(eda[i]+cda[i]));
1060 str = g_strdup_printf(
"%11.5lf", (atd[i]-2*eda[i])/
active_project -> steps);
1065 str = g_strdup_printf(
" +/- %8.5lf", 2.0*tepa[i]);
1070 str = g_strdup_printf(
"%7.3lf", 100.0*(atd[i]-2.0*eda[i])/atd[i]);
1075 str = g_strdup_printf(
" +/- %7.3lf", 2.0*100.0*tepa[i]*
active_project -> steps/atd[i]);
void prep_ogl_bonds()
initialize bond pointers
void coordout_(int *sid, double *sac, double ssac[active_project -> nspec], int *totgsa)
void clean_coord_window(project *this_proj)
update the environment configuration window after edtion
void initang()
initialize the curve widgets for the angle distribution
void restore_color_map(glwin *view, int *colm)
restore saved color maps
int * save_color_map(glwin *view)
save atoms and polyhedra color maps
G_MODULE_EXPORT void set_filter_changed(GtkComboBox *box, gpointer data)
change the search filter
G_MODULE_EXPORT void on_calc_bonds_released(GtkWidget *widg, gpointer data)
compute bonding properties
void coordination_info(int sp, double sac, double ssac[active_project -> nspec])
void recup_dmin_dmax_(double *min, double *max)
retrieve min and max inter-atomic distances from Fortran
void envout_(int *sid, int *totgsa, int numgsa[*totgsa])
retrieve environment information for target chemical species from Fortran
void initbd()
initialize the curve widgets for the bond distribution
gboolean run_distance_matrix(GtkWidget *widg, int calc, int up_ngb)
compute distance matrix
void update_angle_view(project *this_proj)
update angle calculation information text buffer
void tetraout_(int *sid, double eda[active_project -> nspec], double cda[active_project -> nspec], double dda[active_project -> nspec], double tepa[active_project -> nspec], double tcpa[active_project -> nspec], double tdda[active_project -> nspec], double atd[active_project -> nspec], double etd[active_project -> nspec])
void update_glwin_after_bonds(int bonding, int *colm)
update glwin menus after bond calculation
void cutoffsend()
send cutoffs to Fortran90
void update_ang_view(project *this_proj)
update angle calculation text buffer
G_MODULE_EXPORT void set_color_map(GtkWidget *widg, gpointer data)
set color map callback
void env_info(int sp, int totgsa, int numgsa[totgsa])
output environment information for target chemical species in text buffer
void initcutoffs(chemical_data *chem, int species)
initialize bond cutoffs
Binding to the Fortran90 subroutines.
int molecules_(int *, int *)
int rundmtx_(int *, int *, int *)
int bond_diedrals_(int *)
void sendcuts_(int *, int *, double *)
int bonding_(int *, int *, int *, int *, double *, double *, char *)
integer(kind=c_int) function bonding(scf, sbf, adv, bdist, bmin, delt_ij, sfil)
GtkFileFilter * filter[NCFORMATS+1]
Callback declarations for main window.
void fill_tool_model()
fill the tool window tree model
Variable declarations for the curve widget Functions for interactions with the curve widget.
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
void addcurwidgets(int pid, int rid, int st)
add curve widgets to the project
void clean_curves_data(int calc, int start, int end)
clean curve data on a range of curve id
Variable declarations for the creation of the DL_POLY input file(s)
struct timespec start_time
double ** allocddouble(int xal, int yal)
allocate a double ** pointer
gchar * calculation_time(gboolean modelv, double ctime)
get calculation time, human readable
int * allocint(int val)
allocate an int * pointer
double get_calc_time(struct timespec start, struct timespec stop)
get calculation time in s
struct timespec stop_time
Global variable declarations Global convenience function declarations Global data structure defin...
GtkTextBuffer * add_buffer(GCallback handler, gpointer data, gchar *text)
create a GtkTextBuffer
coord_info * active_coord
chemical_data * active_chem
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
void clean_volumes_data(glwin *view)
clean volume data
void update(glwin *view)
update the rendering of the OpenGL window
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
shaders
The different types of shaders in the atomes program.
void prep_all_coord_menus(glwin *view)
void view_buffer(GtkTextBuffer *buffer)
set a text buffer in the main window or an image
void prepostcalc(GtkWidget *widg, gboolean status, int run, int adv, double opc)
to just before and just after running a calculation
Function declarations to handle the atomic coordination data.
void set_advanced_bonding_menus(glwin *view)
gchar * textcolor(int i)
setup text color keyword
void show_error(char *error, int val, GtkWidget *win)
show error message
gchar * env_name(project *this_proj, int g, int s, int f, GtkTextBuffer *buffer)
ouput the name of a coordination sphere
void print_info(gchar *str, gchar *stag, GtkTextBuffer *buffer)
print information in GtkTextBuffer
gchar * exact_name(gchar *name)
short cut to print string without spaces
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void active_project_changed(int id)
change the active project