65 this_proj -> analysis[
SPH] -> numc = this_proj -> nspec;
66 for (i=0; i<this_proj -> nspec; i++)
68 this_proj -> analysis[
SPH] -> numc += this_proj -> coord -> ntg[1][i];
75 for (i = 0 ; i < this_proj -> nspec ; i++)
77 this_proj -> analysis[
SPH] -> curves[i+j] -> name = g_strdup_printf(
"Q(l) [%s] (l=0 -> %d)",
79 this_proj -> analysis[
SPH] -> num_delta);
80 j += this_proj -> coord -> ntg[1][i];
83 for (i=0 ; i < this_proj -> nspec; i++)
85 for (j=0 ; j < this_proj -> coord -> ntg[1][i]; j++)
87 env =
env_name (this_proj, j, i, 1, NULL);
88 this_proj -> analysis[
SPH] -> curves[j+k] -> name = g_strdup_printf(
"Q(l) %s (l=0 -> %d)",
90 this_proj -> analysis[
SPH] -> num_delta);
93 k += this_proj -> coord -> ntg[1][i]+1;
97 this_proj -> analysis[
SPH] -> init_ok = (opening) ? FALSE : TRUE;
113 if (this_proj -> analysis[
SPH] -> calc_buffer == NULL) this_proj -> analysis[
SPH] -> calc_buffer =
add_buffer (NULL, NULL, NULL);
116 print_info (_(
"\n\nSpherical harmonics\n\n"),
"heading", this_proj -> analysis[
SPH] -> calc_buffer);
118 for (i=0; i<this_proj -> nspec; i++)
120 print_info (_(
"\nResults for the "), NULL, this_proj -> analysis[
SPH] -> calc_buffer);
122 print_info (_(
" atoms: \n\n"), NULL, this_proj -> analysis[
SPH] -> calc_buffer);
125 print_info (
"\tl\t",
"bold_italic", this_proj -> analysis[
SPH] -> calc_buffer);
126 print_info (
"Q(",
"bold", this_proj -> analysis[
SPH] -> calc_buffer);
127 print_info (
"l",
"bold_italic", this_proj -> analysis[
SPH] -> calc_buffer);
128 print_info (
")",
"bold", this_proj -> analysis[
SPH] -> calc_buffer);
130 print_info (_(
"[All]"),
"bold", this_proj -> analysis[
SPH] -> calc_buffer);
133 print_info (
"\tQ(",
"bold", this_proj -> analysis[
SPH] -> calc_buffer);
134 print_info (
"l",
"bold_italic", this_proj -> analysis[
SPH] -> calc_buffer);
135 print_info (
")",
"bold", this_proj -> analysis[
SPH] -> calc_buffer);
136 env_name (this_proj, j, i, 1, this_proj -> analysis[
SPH] -> calc_buffer);
138 print_info (
"\n", NULL, this_proj -> analysis[
SPH] -> calc_buffer);
142 for (j=0; j<this_proj -> analysis[
SPH] -> num_delta/2+1 ; j++)
145 if (k - 2*(k/2) == 0)
147 tab = g_strdup_printf (
"grey_back");
148 cid = g_strdup_printf (
"bold_grey_back");
153 cid = g_strdup_printf (
"bold");
155 print_info (
"\t", NULL, this_proj -> analysis[
SPH] -> calc_buffer);
158 print_info (
" ",cid, this_proj -> analysis[
SPH] -> calc_buffer);
160 str = g_strdup_printf(
"%d", 2*j);
161 print_info (str, cid, this_proj -> analysis[
SPH] -> calc_buffer);
165 str = g_strdup_printf(
"\t%f", this_proj -> analysis[
SPH] -> curves[l+m] -> data[1][j]);
166 print_info (str, tab, this_proj -> analysis[
SPH] -> calc_buffer);
169 print_info (
"\n", NULL, this_proj -> analysis[
SPH] -> calc_buffer);
211 show_error (_(
"The nearest neighbors table calculation has failed"), 0, widg);
240 show_error (_(
"Unexpected error when analyzing the spherical harmonics"), 0, widg);
Binding to the Fortran90 subroutines.
int sphericals_(int *, int *, int *, int *, int *)
Callback declarations for main window.
void fill_tool_model()
fill the tool window tree model
integer(kind=c_int) function chemistry()
Variable declarations for the curve widget Functions for interactions with the curve widget.
void add_curve_widgets(project *this_proj, int rid)
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
gchar * calculation_time(gboolean modelv, double ctime)
get calculation time, human readable
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 show_the_widgets(GtkWidget *widg)
show GtkWidget
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
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)
output 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 init_sph(project *this_proj, int opening)
initialize the curve widgets for the spherical harmonics
G_MODULE_EXPORT void on_calc_sph_released(GtkWidget *widg, gpointer data)
compute spherical harmonics
void alloc_analysis_curves(int pid, atomes_analysis *this_analysis)
allocating analysis curve data
int update_voisj_and_contj()
update FORTRAN CONTJ and VOISJ for the active project
gboolean run_distance_matrix(GtkWidget *widg, int calc, int up_ngb)
compute distance matrix
void update_spherical_view(project *this_proj)
update the text view for spherical harmonics