atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
global.c File Reference

Global variables declaration
Global convenience function implementations. More...

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
+ Include dependency graph for global.c:

Go to the source code of this file.

Macros

#define BILLION   1000000000L;
 

Functions

gboolean * allocbool (int val)
 allocate a gboolean * pointer
 
gboolean ** allocdbool (int xal, int yal)
 allocate a gboolean ** pointer
 
gboolean *** alloctbool (int xal, int yal, int zal)
 allocate a gboolean *** pointer
 
int * allocint (int val)
 allocate an int * pointer
 
int ** allocdint (int xal, int yal)
 allocate an int ** pointer
 
int *** alloctint (int xal, int yal, int zal)
 allocate an int *** pointer
 
int **** allocqint (int wal, int xal, int yal, int zal)
 allocate an int **** pointer
 
float * allocfloat (int val)
 allocate a float * pointer
 
float ** allocdfloat (int xal, int yal)
 allocate a float ** pointer
 
float *** alloctfloat (int xal, int yal, int zal)
 allocate a float *** pointer
 
double * allocdouble (int val)
 allocate a double * pointer
 
double ** allocddouble (int xal, int yal)
 allocate a double ** pointer
 
double *** alloctdouble (int xal, int yal, int zal)
 allocate a double *** pointer
 
double **** allocqdouble (int wal, int xal, int yal, int zal)
 allocate a double **** pointer
 
gchar ** duplicate_strings (int num, gchar **old_val)
 copy a list of strings
 
int * duplicate_int (int num, int *old_val)
 copy a list of int
 
gboolean * duplicate_bool (int num, gboolean *old_val)
 copy a list of gboolean
 
float * duplicate_float (int num, float *old_val)
 copy a list of float
 
double * duplicate_double (int num, double *old_val)
 copy a list of double
 
double get_calc_time (struct timespec start, struct timespec stop)
 get calculation time in s
 
gchar * calculation_time (gboolean modelv, double ctime)
 get calculation time, human readable
 

Variables

gchar * ATOMES_CONFIG = NULL
 
gchar * ATOMES_URL = "https://atomes.ipcms.fr"
 
gchar * mode_name [2] ={"Analysis", "Edition"}
 
gchar * bravais_img [14]
 
gchar * ifield [8]
 
gchar * projfile = NULL
 
char * ifbug ="\nIf this is a bug please report it to:"
 
char * rings_type [5]
 
char * untime [6]
 
gchar * workspacefile = NULL
 
int nprojects = 0
 
int activep = 0
 
int activev = 0
 
int activef = 0
 
int inactep = 0
 
int activew = 0
 
int statusval
 
int atomes_visual = 1
 
int dialog_id = -1
 
int bonds_update = 0
 
int frag_update = 0
 
int mol_update = 0
 
int tmp_pixels [2]
 
int * pasted_todo = NULL
 
double * xsk = NULL
 
GMainLoop * Event_loop [5]
 
gboolean in_movie_encoding = FALSE
 
gboolean newspace = TRUE
 
gboolean reading_input
 
gboolean tmp_adv_bonding [2]
 
gboolean column_label = FALSE
 
gboolean check_label = TRUE
 
gboolean object_motion = FALSE
 
gboolean selected_status = FALSE
 
gboolean silent_input = FALSE
 
gboolean cif_use_symmetry_positions = FALSE
 
struct timespec start_time
 
struct timespec stop_time
 
double opac = 0.75
 
double pi = 3.141592653589793238462643383279502884197
 
gchar * edition_action_names [3]
 
gchar * analyze_action_names [9]
 
GSimpleAction * edition_actions [3]
 
GSimpleAction * analyze_actions [9]
 
GtkApplication * AtomesApp = NULL
 
GtkWidget * MainWindow = NULL
 
GtkWidget * MainView = NULL
 
GtkWidget * MainFrame [2]
 
GtkWidget * pop = NULL
 
GtkWidget * curvetoolbox = NULL
 
GtkWidget * progressbar = NULL
 
GtkWidget * MainScrol [2]
 
GtkWidget * atomes_logo = NULL
 
GtkWidget * calc_dialog = NULL
 
GtkWidget * register_button = NULL
 
GtkTextTag * tag = NULL
 
GtkStatusbar * statusbar
 
GdkPixbuf * THETD = NULL
 
GdkPixbuf * THEMO = NULL
 
GdkPixbuf * THEBD = NULL
 
GdkPixbuf * SETTING = NULL
 
GdkPixbuf * SETTINGS = NULL
 
GdkPixbuf * OGL = NULL
 
GdkPixbuf * OGLM = NULL
 
GdkPixbuf * OGLC = NULL
 
GdkPixbuf * RUN = NULL
 

Detailed Description

Global variables declaration
Global convenience function implementations.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file global.c.

Macro Definition Documentation

◆ BILLION

#define BILLION   1000000000L;

Definition at line 71 of file global.c.

Function Documentation

◆ allocbool()

gboolean * allocbool ( int val)

allocate a gboolean * pointer

Parameters
valsize of the pointer to allocate

Definition at line 266 of file global.c.

◆ allocdbool()

gboolean ** allocdbool ( int xal,
int yal )

allocate a gboolean ** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate

Definition at line 282 of file global.c.

◆ allocddouble()

double ** allocddouble ( int xal,
int yal )

allocate a double ** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate

Definition at line 487 of file global.c.

◆ allocdfloat()

float ** allocdfloat ( int xal,
int yal )

allocate a float ** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate

Definition at line 426 of file global.c.

◆ allocdint()

int ** allocdint ( int xal,
int yal )

allocate an int ** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate

Definition at line 342 of file global.c.

◆ allocdouble()

double * allocdouble ( int val)

allocate a double * pointer

Parameters
valsize of the pointer to allocate

Definition at line 471 of file global.c.

◆ allocfloat()

float * allocfloat ( int val)

allocate a float * pointer

Parameters
valsize of the pointer to allocate

Definition at line 410 of file global.c.

◆ allocint()

int * allocint ( int val)

allocate an int * pointer

Parameters
valsize of the pointer to allocate

Definition at line 326 of file global.c.

◆ allocqdouble()

double **** allocqdouble ( int wal,
int xal,
int yal,
int zal )

allocate a double **** pointer

Parameters
wal1st dimension size of the pointer to allocate
xal2nd dimension size of the pointer to allocate
yal3rd dimension size of the pointer to allocate
zal4th dimension size of the pointer to allocate

Definition at line 534 of file global.c.

◆ allocqint()

int **** allocqint ( int wal,
int xal,
int yal,
int zal )

allocate an int **** pointer

Parameters
wal1st dimension size of the pointer to allocate
xal2nd dimension size of the pointer to allocate
yal3rd dimension size of the pointer to allocate
zal4th dimension size of the pointer to allocate

Definition at line 389 of file global.c.

◆ alloctbool()

gboolean *** alloctbool ( int xal,
int yal,
int zal )

allocate a gboolean *** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate
zal3rd dimension size of the pointer to allocate

Definition at line 305 of file global.c.

◆ alloctdouble()

double *** alloctdouble ( int xal,
int yal,
int zal )

allocate a double *** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate
zal3rd dimension size of the pointer to allocate

Definition at line 510 of file global.c.

◆ alloctfloat()

float *** alloctfloat ( int xal,
int yal,
int zal )

allocate a float *** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate
zal3rd dimension size of the pointer to allocate

Definition at line 449 of file global.c.

◆ alloctint()

int *** alloctint ( int xal,
int yal,
int zal )

allocate an int *** pointer

Parameters
xal1st dimension size of the pointer to allocate
yal2nd dimension size of the pointer to allocate
zal3rd dimension size of the pointer to allocate

Definition at line 365 of file global.c.

◆ calculation_time()

gchar * calculation_time ( gboolean modelv,
double ctime )

get calculation time, human readable

Parameters
modelvwas an analysis performed ?
ctimethe calculation time

Definition at line 649 of file global.c.

◆ duplicate_bool()

gboolean * duplicate_bool ( int num,
gboolean * old_val )

copy a list of gboolean

Parameters
numnumber of elements in the list
old_valthe list to copy

Definition at line 588 of file global.c.

◆ duplicate_double()

double * duplicate_double ( int num,
double * old_val )

copy a list of double

Parameters
numnumber of elements in the list
old_valthe list to copy

Definition at line 620 of file global.c.

◆ duplicate_float()

float * duplicate_float ( int num,
float * old_val )

copy a list of float

Parameters
numnumber of elements in the list
old_valthe list to copy

Definition at line 604 of file global.c.

◆ duplicate_int()

int * duplicate_int ( int num,
int * old_val )

copy a list of int

Parameters
numnumber of elements in the list
old_valthe list to copy

Definition at line 572 of file global.c.

◆ duplicate_strings()

gchar ** duplicate_strings ( int num,
gchar ** old_val )

copy a list of strings

Parameters
numnumber of elements in the list
old_valthe list to copy

Definition at line 556 of file global.c.

◆ get_calc_time()

double get_calc_time ( struct timespec start,
struct timespec stop )

get calculation time in s

Parameters
startthe initial time
stopthe final time

Definition at line 636 of file global.c.

Variable Documentation

◆ activef

int activef = 0

Definition at line 161 of file global.c.

◆ activep

int activep = 0

Definition at line 159 of file global.c.

◆ activev

int activev = 0

Definition at line 160 of file global.c.

◆ activew

int activew = 0

Definition at line 163 of file global.c.

◆ analyze_action_names

gchar* analyze_action_names[9]
Initial value:
= {"analyze.gr",
"analyze.sq",
"analyze.sk",
"analyze.gk",
"analyze.bonds",
"analyze.rings",
"analyze.chains",
"analyze.sp",
"analyze.msd"}

Definition at line 201 of file global.c.

◆ analyze_actions

GSimpleAction* analyze_actions[9]

Definition at line 211 of file global.c.

◆ ATOMES_CONFIG

gchar* ATOMES_CONFIG = NULL

Definition at line 135 of file global.c.

◆ atomes_logo

GtkWidget* atomes_logo = NULL

Definition at line 221 of file global.c.

◆ ATOMES_URL

gchar* ATOMES_URL = "https://atomes.ipcms.fr"

Definition at line 136 of file global.c.

◆ atomes_visual

int atomes_visual = 1

Definition at line 165 of file global.c.

◆ AtomesApp

GtkApplication* AtomesApp = NULL

Definition at line 213 of file global.c.

◆ bonds_update

int bonds_update = 0

Definition at line 169 of file global.c.

◆ bravais_img

gchar* bravais_img[14]

Definition at line 138 of file global.c.

◆ calc_dialog

GtkWidget* calc_dialog = NULL

Definition at line 222 of file global.c.

◆ check_label

gboolean check_label = TRUE

Definition at line 185 of file global.c.

◆ cif_use_symmetry_positions

gboolean cif_use_symmetry_positions = FALSE

Definition at line 189 of file global.c.

◆ column_label

gboolean column_label = FALSE

Definition at line 184 of file global.c.

◆ curvetoolbox

GtkWidget* curvetoolbox = NULL

Definition at line 218 of file global.c.

◆ dialog_id

int dialog_id = -1

Definition at line 167 of file global.c.

◆ edition_action_names

gchar* edition_action_names[3]
Initial value:
= {"edit.chemistry",
"edit.periodicity",
"edit.cutoffs"}

Definition at line 197 of file global.c.

◆ edition_actions

GSimpleAction* edition_actions[3]

Definition at line 210 of file global.c.

◆ Event_loop

GMainLoop* Event_loop[5]

Definition at line 178 of file global.c.

◆ frag_update

int frag_update = 0

Definition at line 170 of file global.c.

◆ ifbug

char* ifbug ="\nIf this is a bug please report it to:"

Definition at line 141 of file global.c.

◆ ifield

gchar* ifield[8]

Definition at line 139 of file global.c.

◆ in_movie_encoding

gboolean in_movie_encoding = FALSE

Definition at line 180 of file global.c.

◆ inactep

int inactep = 0

Definition at line 162 of file global.c.

◆ MainFrame

GtkWidget* MainFrame[2]

Definition at line 216 of file global.c.

◆ MainScrol

GtkWidget* MainScrol[2]

Definition at line 220 of file global.c.

◆ MainView

GtkWidget* MainView = NULL

Definition at line 215 of file global.c.

◆ MainWindow

GtkWidget* MainWindow = NULL

Definition at line 214 of file global.c.

◆ mode_name

gchar* mode_name[2] ={"Analysis", "Edition"}

Definition at line 137 of file global.c.

◆ mol_update

int mol_update = 0

Definition at line 171 of file global.c.

◆ newspace

gboolean newspace = TRUE

Definition at line 181 of file global.c.

◆ nprojects

int nprojects = 0

Definition at line 158 of file global.c.

◆ object_motion

gboolean object_motion = FALSE

Definition at line 186 of file global.c.

◆ OGL

GdkPixbuf* OGL = NULL

Definition at line 233 of file global.c.

◆ OGLC

GdkPixbuf* OGLC = NULL

Definition at line 235 of file global.c.

◆ OGLM

GdkPixbuf* OGLM = NULL

Definition at line 234 of file global.c.

◆ opac

double opac = 0.75

Definition at line 194 of file global.c.

◆ pasted_todo

int* pasted_todo = NULL

Definition at line 174 of file global.c.

◆ pi

double pi = 3.141592653589793238462643383279502884197

Definition at line 195 of file global.c.

◆ pop

GtkWidget* pop = NULL

Definition at line 217 of file global.c.

◆ progressbar

GtkWidget* progressbar = NULL

Definition at line 219 of file global.c.

◆ projfile

gchar* projfile = NULL

Definition at line 140 of file global.c.

◆ reading_input

gboolean reading_input

Definition at line 182 of file global.c.

◆ register_button

GtkWidget* register_button = NULL

Definition at line 223 of file global.c.

◆ rings_type

char* rings_type[5]
Initial value:
= {"All (No rules)",
"King's",
"Guttman's",
"Primitive",
"Strong"}

Definition at line 143 of file global.c.

◆ RUN

GdkPixbuf* RUN = NULL

Definition at line 236 of file global.c.

◆ selected_status

gboolean selected_status = FALSE

Definition at line 187 of file global.c.

◆ SETTING

GdkPixbuf* SETTING = NULL

Definition at line 231 of file global.c.

◆ SETTINGS

GdkPixbuf* SETTINGS = NULL

Definition at line 232 of file global.c.

◆ silent_input

gboolean silent_input = FALSE

Definition at line 188 of file global.c.

◆ start_time

struct timespec start_time

Definition at line 191 of file global.c.

◆ statusbar

GtkStatusbar* statusbar

Definition at line 226 of file global.c.

◆ statusval

int statusval

Definition at line 164 of file global.c.

◆ stop_time

struct timespec stop_time

Definition at line 192 of file global.c.

◆ tag

GtkTextTag* tag = NULL

Definition at line 225 of file global.c.

◆ THEBD

GdkPixbuf* THEBD = NULL

Definition at line 230 of file global.c.

◆ THEMO

GdkPixbuf* THEMO = NULL

Definition at line 229 of file global.c.

◆ THETD

GdkPixbuf* THETD = NULL

Definition at line 228 of file global.c.

◆ tmp_adv_bonding

gboolean tmp_adv_bonding[2]

Definition at line 183 of file global.c.

◆ tmp_pixels

int tmp_pixels[2]

Definition at line 173 of file global.c.

◆ untime

char* untime[6]
Initial value:
= {"fs",
"ps",
"ns",
"µs",
"ms",
" "}

Definition at line 149 of file global.c.

◆ workspacefile

gchar* workspacefile = NULL

Definition at line 156 of file global.c.

◆ xsk

double* xsk = NULL

Definition at line 176 of file global.c.