72#define BILLION 1000000000L;
75gchar * PACKAGE_PREFIX = NULL;
76gchar * PACKAGE_LIBEXEC = NULL;
141char *
ifbug=
"\nIf this is a bug please report it to:";
195double pi = 3.141592653589793238462643383279502884197;
256 gboolean * var = NULL;
258 var = g_malloc0 (
val*
sizeof*var);
272 gboolean ** var = NULL;
275 var = g_malloc (xal*
sizeof*var);
276 for ( i = 0 ; i < xal ; i ++ )
295 gboolean *** var = NULL;
298 var = g_malloc (xal*
sizeof*var);
299 for ( i = 0 ; i < xal ; i ++ )
318 var = g_malloc0 (
val*
sizeof*var);
335 var = g_malloc (xal*
sizeof*var);
336 for ( i = 0 ; i < xal ; i ++ )
358 var = g_malloc (xal*
sizeof*var);
359 for ( i = 0 ; i < xal ; i ++ )
382 var = g_malloc (wal*
sizeof*var);
383 for ( i = 0 ; i < wal ; i ++ )
402 var = g_malloc0 (
val*
sizeof*var);
419 var = g_malloc (xal*
sizeof*var);
420 for ( i = 0 ; i < xal ; i ++ )
439 float *** var = NULL;
442 var = g_malloc (xal*
sizeof*var);
443 for ( i = 0 ; i < xal ; i ++ )
463 var = g_malloc0 (
val*
sizeof*var);
477 double ** var = NULL;
480 var = g_malloc (xal*
sizeof*var);
481 for ( i = 0 ; i < xal ; i ++ )
500 double *** var = NULL;
503 var = g_malloc (xal*
sizeof*var);
504 for ( i = 0 ; i < xal ; i ++ )
524 double **** var = NULL;
527 var = g_malloc (wal*
sizeof*var);
528 for ( i = 0 ; i < wal ; i ++ )
546 gchar ** new_val = g_malloc0 (num*
sizeof*new_val);
548 for (i=0; i<num; i++) new_val[i] = g_strdup_printf (
"%s", old_val[i]);
564 for (i=0; i<num; i++) new_val[i] = old_val[i];
580 for (i=0; i<num; i++) new_val[i] = old_val[i];
596 for (i=0; i<num; i++) new_val[i] = old_val[i];
612 for (i=0; i<num; i++) new_val[i] = old_val[i];
626 char * endPtr = NULL;
627 double value = strtod ((
char *)
string, & endPtr);
628 if (endPtr == (
char *)
string)
630 g_print (
"Error in string format: %s - value == %lf\n", endPtr, value);
645 return (
double)(stop.tv_sec - start.tv_sec) + (
double)(stop.tv_nsec - start.tv_nsec)/
BILLION;
659 gchar * t_string = (modelv) ?
"\n \tAnalysis was performed in: ":
"";
662 return g_strdup_printf (
"%s%f s", t_string, ctime);
664 else if (ctime < 3600.0)
667 return g_strdup_printf (
"%s%d m %f s", t_string, i, ctime-i*60.0);
669 else if (ctime < 86400.0)
673 j = (ctime - i*3600.0)/60.0;
674 return g_strdup_printf (
"%s%d h %d m %f s", t_string, i, j, ctime-i*3600.0-j*60.0);
680 j = (ctime - i*86400.0)/3600.0;
681 k = (ctime - i*86400.0 - j*3600.0)/60.0;
682 return g_strdup_printf (
"%s%d d %d h %d m %f s", t_string, i, j, k, ctime-i*86400.0-j*3600.0-k*60.0);
int ** allocdint(int xal, int yal)
allocate an int ** pointer
double **** allocqdouble(int wal, int xal, int yal, int zal)
allocate a double **** pointer
float ** allocdfloat(int xal, int yal)
allocate a float ** pointer
GtkWidget * register_button
double * duplicate_double(int num, double *old_val)
copy a list of double
int * duplicate_int(int num, int *old_val)
copy a list of int
int *** alloctint(int xal, int yal, int zal)
allocate an int *** pointer
struct timespec start_time
GSimpleAction * edition_actions[3]
gboolean in_movie_encoding
gboolean * allocbool(int val)
allocate a gboolean * pointer
gboolean tmp_adv_bonding[2]
GMainLoop * Event_loop[5]
double ** allocddouble(int xal, int yal)
allocate a double ** pointer
GtkApplication * AtomesApp
GtkWidget * atomes_shortcuts
double * allocdouble(int val)
allocate a double * pointer
gchar * calculation_time(gboolean modelv, double ctime)
get calculation time, human readable
gchar ** duplicate_strings(int num, gchar **old_val)
copy a list of strings
float * duplicate_float(int num, float *old_val)
copy a list of float
gboolean * duplicate_bool(int num, gboolean *old_val)
copy a list of gboolean
double *** alloctdouble(int xal, int yal, int zal)
allocate a double *** pointer
int * allocint(int val)
allocate an int * pointer
gboolean *** alloctbool(int xal, int yal, int zal)
allocate a gboolean *** pointer
gboolean ** allocdbool(int xal, int yal)
allocate a gboolean ** pointer
double get_calc_time(struct timespec start, struct timespec stop)
get calculation time in s
int **** allocqint(int wal, int xal, int yal, int zal)
allocate an int **** pointer
float * allocfloat(int val)
allocate a float * pointer
struct timespec stop_time
gboolean cif_use_symmetry_positions
GSimpleAction * analyze_actions[9]
double string_to_double(gpointer string)
convert string to double
float *** alloctfloat(int xal, int yal, int zal)
allocate a float *** pointer