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

Creation of the calculation dialogs. More...

#include "global.h"
#include "callbacks.h"
#include "interface.h"
#include "preferences.h"
#include "bind.h"
#include "project.h"
#include "workspace.h"
Include dependency graph for calc_menu.c:

Go to the source code of this file.

Functions

G_MODULE_EXPORT void on_calc_gr_released (GtkWidget *widg, gpointer data)
 compute g(r)
G_MODULE_EXPORT void on_calc_gq_released (GtkWidget *widg, gpointer data)
 compute g(k)
G_MODULE_EXPORT void on_calc_sq_released (GtkWidget *widg, gpointer data)
 compute s(q) / s(k)
G_MODULE_EXPORT void on_calc_sk_released (GtkWidget *widg, gpointer data)
 compute s(q) / s(k)
G_MODULE_EXPORT void on_calc_skt_released (GtkWidget *widg, gpointer data)
 callback to compute the dynamic structure factor analysis
G_MODULE_EXPORT void on_calc_rings_released (GtkWidget *widg, gpointer data)
 compute ring statistics
G_MODULE_EXPORT void on_calc_chains_released (GtkWidget *widg, gpointer data)
 compute chains statistics
G_MODULE_EXPORT void on_calc_msd_released (GtkWidget *widg, gpointer data)
 compute MSD
G_MODULE_EXPORT void on_calc_sph_released (GtkWidget *widg, gpointer data)
 compute spherical harmonics
void dyna_parameters (GtkWidget *vbox, int cid)
 create time related configuration widgets
GtkWidget * calc_window (int i)
 create a calculation window
void add_remove_t_steps_q_vectors (int val, int calc)
 add or remove t steps results to save
G_MODULE_EXPORT void set_max (GtkEntry *entry, gpointer data)
 set a maximum value
void update_omega_max ()
 update omega max information string
G_MODULE_EXPORT void set_delta (GtkEntry *entry, gpointer data)
 set the number of delta between data points
G_MODULE_EXPORT void combox_tunit_changed (GtkComboBox *box, gpointer data)
 change time units
void calc_sph (GtkWidget *vbox)
 creation of the spherical harmonics calculation widgets
void calc_msd (GtkWidget *vbox, int cid)
 creation of the MSD calculation widgets
G_MODULE_EXPORT void set_numa (GtkEntry *entry, gpointer data)
 set the rings/chains statistics parameter NUMA
GtkWidget * combox_rings (gchar *str, int num, gchar *list_item[num], int id)
 create a combo box for the ring statistics calculation
G_MODULE_EXPORT void combox_rings_changed (GtkComboBox *box, gpointer data)
 change ring statistics calculation parameter
G_MODULE_EXPORT void toggle_rings (GtkToggleButton *but, gpointer data)
 toggle a rings statistics calculation parameter
void calc_rings (GtkWidget *vbox)
 creation of the rings statistics calculation widgets
G_MODULE_EXPORT void run_toggle_bond (GtkDialog *info, gint response_id, gpointer data)
 bond properties detailed saving: run the dialog
G_MODULE_EXPORT void toggle_bond (GtkToggleButton *Button, gpointer data)
 activate bond properties detailed saving and prepare the dialog
gboolean test_gr (int rdf)
 is it safe to compute g(r) ?
gboolean test_sq (int fdq)
 is it safe to compute s(q) ?
gboolean test_bonds ()
 is it safe to compute bond properties ?
gboolean test_rings ()
 is it safe to compute ring statistics ?
gboolean test_sph ()
 is it safe to compute spherical harmonics ?
gboolean test_msd ()
 is it safe to compute MSD ?
gboolean test_skt ()
 is it safe to compute dynamic structure factors ?
void calc_bonds (GtkWidget *vbox)
 creation of the bond calculation widgets
GtkWidget * hbox_note (int i, double val)
 foot note message box with some parameters
G_MODULE_EXPORT void expand_opt (GtkWidget *exp, gpointer data)
 open expander actions
G_MODULE_EXPORT void set_advanced_sq (GtkEntry *entry, gpointer data)
 set a s(k) calculation parameter
G_MODULE_EXPORT void set_sfact (GtkEntry *entry, gpointer data)
 set the Gaussian smoothing factor
G_MODULE_EXPORT void on_show_curve_toolbox (GtkWidget *widg, gpointer data)
 show the curve toolboxes
G_MODULE_EXPORT void on_smoother_released (GtkButton *button, gpointer data)
 smooth g(r), s(q), s(k) or g(k)
void add_advanced_options (int skq, dint skadv[2], GtkWidget *vbox)
 add k-point selection advanced options
void add_smoothing_options (int grsqk, GtkWidget *vbox)
 add gaussian smoothing options
void calc_gr_sq (GtkWidget *box, int id)
 creation of the g(r) / s(q) / s(k) / g(k) calculation widgets
G_MODULE_EXPORT void set_skt_step_id (GtkEntry *res, gpointer data)
 set "to be saved" step id
G_MODULE_EXPORT void set_sqw_q_id (GtkEntry *res, gpointer data)
 set "to be saved" q vector
G_MODULE_EXPORT void set_t_q_spin (GtkSpinButton *res, gpointer data)
 set the number of t steps results to save - spin button
void add_correlations_options (int cid)
 add correlation(s) options to the S(k,t) calculation dialog
G_MODULE_EXPORT void set_correlations (GtkEntry *entry, gpointer data)
 set the minimum number of correlated configuration to compute S(k,t)
G_MODULE_EXPORT void toggle_skt_all (GtkToggleButton *but, gpointer data)
 toggle the output of all s(k,t) data sets
void calc_sk_t (GtkWidget *box)
 creation of the s(k,t) calculation widgets
G_MODULE_EXPORT void run_on_calc_activate (GtkDialog *dial, gint response_id, gpointer data)
 create a calculation dialog: run the dialog
G_MODULE_EXPORT void on_calc_activate (GtkWidget *widg, gpointer data)
 create a calculation dialog - prepare the dialog

Variables

GtkWidget * calc_win = NULL
GtkWidget * ba_entry [2]
int search_type
GtkWidget * rings_box [2]
GtkWidget * omega_max_hbox = NULL
GtkWidget * omega_max_info = NULL
GtkWidget * rings_entry [2]
GtkWidget * rings_check [4]
GtkWidget * avbox = NULL
GtkWidget * smbox = NULL
dint skadv [2]
int avsize
GtkWidget * skt_all_info = NULL
GtkWidget * sktqw_vbox [2]
GtkWidget * sktqw_delta [2]
GtkWidget * t_q_vbox [2]
GtkWidget * skt_res_info

Detailed Description

Creation of the calculation dialogs.

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 calc_menu.c.

Function Documentation

◆ add_advanced_options()

void add_advanced_options ( int skq,
dint skadv[2],
GtkWidget * vbox )

add k-point selection advanced options

Parameters
skqcalculation ID (SKD or SKT)
skadvassociated pointers
vboxtarget box widget

Definition at line 1362 of file calc_menu.c.

◆ add_correlations_options()

void add_correlations_options ( int cid)

add correlation(s) options to the S(k,t) calculation dialog

Parameters
cidcalculation ID: 0 = S(k,t), 1 = S(q,w)

Definition at line 1662 of file calc_menu.c.

◆ add_remove_t_steps_q_vectors()

void add_remove_t_steps_q_vectors ( int val,
int calc )

add or remove t steps results to save

Parameters
valtotal number of t steps
calc0 = S(k,t), 1 = S(q,w)

Definition at line 1575 of file calc_menu.c.

◆ add_smoothing_options()

void add_smoothing_options ( int grsqk,
GtkWidget * vbox )

add gaussian smoothing options

Parameters
calculationID (GDR, SQD, SKD, GDK or SKT)
vboxtarget box widget

Definition at line 1400 of file calc_menu.c.

◆ calc_bonds()

void calc_bonds ( GtkWidget * vbox)

creation of the bond calculation widgets

Parameters
vboxGtkWidget that will receive the data

Definition at line 1009 of file calc_menu.c.

◆ calc_gr_sq()

void calc_gr_sq ( GtkWidget * box,
int id )

creation of the g(r) / s(q) / s(k) / g(k) calculation widgets

Parameters
boxGtkWidget that will receive the data
idthe calculation id

Definition at line 1428 of file calc_menu.c.

◆ calc_msd()

void calc_msd ( GtkWidget * vbox,
int cid )

creation of the MSD calculation widgets

Parameters
vboxGtkWidget that will receive the data
cidcalculation id, MSD or SKT

Definition at line 311 of file calc_menu.c.

◆ calc_rings()

void calc_rings ( GtkWidget * vbox)

creation of the rings statistics calculation widgets

Parameters
vboxGtkWidget that will receive the data

Definition at line 578 of file calc_menu.c.

◆ calc_sk_t()

void calc_sk_t ( GtkWidget * box)

creation of the s(k,t) calculation widgets

Parameters
boxGtkWidget that will receive the data

Definition at line 1807 of file calc_menu.c.

◆ calc_sph()

void calc_sph ( GtkWidget * vbox)

creation of the spherical harmonics calculation widgets

Parameters
vboxGtkWidget that will receive the data

Definition at line 291 of file calc_menu.c.

◆ calc_window()

GtkWidget * calc_window ( int i)

create a calculation window

Parameters
ithe calculation id

Definition at line 114 of file calc_menu.c.

◆ combox_rings()

GtkWidget * combox_rings ( gchar * str,
int num,
gchar * list_item[num],
int id )

create a combo box for the ring statistics calculation

Parameters
strlabel of the combo box
numnumber of values to insert in the combo box
list_itemtext data to insert in the combo boc
idid of the box to create

Definition at line 421 of file calc_menu.c.

◆ combox_rings_changed()

G_MODULE_EXPORT void combox_rings_changed ( GtkComboBox * box,
gpointer data )

change ring statistics calculation parameter

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 448 of file calc_menu.c.

◆ combox_tunit_changed()

G_MODULE_EXPORT void combox_tunit_changed ( GtkComboBox * box,
gpointer data )

change time units

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 278 of file calc_menu.c.

◆ dyna_parameters()

void dyna_parameters ( GtkWidget * vbox,
int cid )
extern

create time related configuration widgets

Parameters
vboxthe target box to insert the new widgets
cidthe calculation ID (7 = MSD, 8 = S(q,w)

Definition at line 4227 of file preferences.c.

◆ expand_opt()

G_MODULE_EXPORT void expand_opt ( GtkWidget * exp,
gpointer data )

open expander actions

Parameters
expthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 1076 of file calc_menu.c.

◆ hbox_note()

GtkWidget * hbox_note ( int i,
double val )

foot note message box with some parameters

Parameters
imessage id
valvalue to display

Definition at line 1049 of file calc_menu.c.

◆ on_calc_activate()

G_MODULE_EXPORT void on_calc_activate ( GtkWidget * widg,
gpointer data )

create a calculation dialog - prepare the dialog

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 2049 of file calc_menu.c.

◆ on_calc_chains_released()

G_MODULE_EXPORT void on_calc_chains_released ( GtkWidget * widg,
gpointer data )
extern

compute chains statistics

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 304 of file chainscall.c.

◆ on_calc_gq_released()

G_MODULE_EXPORT void on_calc_gq_released ( GtkWidget * widg,
gpointer data )
extern

compute g(k)

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 316 of file grcall.c.

◆ on_calc_gr_released()

G_MODULE_EXPORT void on_calc_gr_released ( GtkWidget * widg,
gpointer data )
extern

compute g(r)

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 199 of file grcall.c.

◆ on_calc_msd_released()

G_MODULE_EXPORT void on_calc_msd_released ( GtkWidget * widg,
gpointer data )
extern

compute MSD

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 168 of file msdcall.c.

◆ on_calc_rings_released()

G_MODULE_EXPORT void on_calc_rings_released ( GtkWidget * widg,
gpointer data )
extern

compute ring statistics

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 426 of file ringscall.c.

◆ on_calc_sk_released()

G_MODULE_EXPORT void on_calc_sk_released ( GtkWidget * widg,
gpointer data )
extern

compute s(q) / s(k)

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 255 of file sqcall.c.

◆ on_calc_skt_released()

G_MODULE_EXPORT void on_calc_skt_released ( GtkWidget * widg,
gpointer data )
extern

callback to compute the dynamic structure factor analysis

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 326 of file sktcall.c.

◆ on_calc_sph_released()

G_MODULE_EXPORT void on_calc_sph_released ( GtkWidget * widg,
gpointer data )
extern

compute spherical harmonics

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 192 of file spcall.c.

◆ on_calc_sq_released()

G_MODULE_EXPORT void on_calc_sq_released ( GtkWidget * widg,
gpointer data )
extern

compute s(q) / s(k)

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 207 of file sqcall.c.

◆ on_show_curve_toolbox()

G_MODULE_EXPORT void on_show_curve_toolbox ( GtkWidget * widg,
gpointer data )

show the curve toolboxes

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 1177 of file calc_menu.c.

◆ on_smoother_released()

G_MODULE_EXPORT void on_smoother_released ( GtkButton * button,
gpointer data )

smooth g(r), s(q), s(k) or g(k)

Parameters
buttonthe button sending the signal
datathe associated data pointer

Definition at line 1197 of file calc_menu.c.

◆ run_on_calc_activate()

G_MODULE_EXPORT void run_on_calc_activate ( GtkDialog * dial,
gint response_id,
gpointer data )

create a calculation dialog: run the dialog

Parameters
dialthe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 1969 of file calc_menu.c.

◆ run_toggle_bond()

G_MODULE_EXPORT void run_toggle_bond ( GtkDialog * info,
gint response_id,
gpointer data )

bond properties detailed saving: run the dialog

Parameters
infothe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 721 of file calc_menu.c.

◆ set_advanced_sq()

G_MODULE_EXPORT void set_advanced_sq ( GtkEntry * entry,
gpointer data )

set a s(k) calculation parameter

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 1118 of file calc_menu.c.

◆ set_correlations()

G_MODULE_EXPORT void set_correlations ( GtkEntry * entry,
gpointer data )

set the minimum number of correlated configuration to compute S(k,t)

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 1697 of file calc_menu.c.

◆ set_delta()

G_MODULE_EXPORT void set_delta ( GtkEntry * entry,
gpointer data )

set the number of delta between data points

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 195 of file calc_menu.c.

◆ set_max()

G_MODULE_EXPORT void set_max ( GtkEntry * entry,
gpointer data )

set a maximum value

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 130 of file calc_menu.c.

◆ set_numa()

G_MODULE_EXPORT void set_numa ( GtkEntry * entry,
gpointer data )

set the rings/chains statistics parameter NUMA

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 364 of file calc_menu.c.

◆ set_sfact()

G_MODULE_EXPORT void set_sfact ( GtkEntry * entry,
gpointer data )

set the Gaussian smoothing factor

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 1152 of file calc_menu.c.

◆ set_skt_step_id()

G_MODULE_EXPORT void set_skt_step_id ( GtkEntry * res,
gpointer data )

set "to be saved" step id

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 1519 of file calc_menu.c.

◆ set_sqw_q_id()

G_MODULE_EXPORT void set_sqw_q_id ( GtkEntry * res,
gpointer data )

set "to be saved" q vector

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 1547 of file calc_menu.c.

◆ set_t_q_spin()

G_MODULE_EXPORT void set_t_q_spin ( GtkSpinButton * res,
gpointer data )

set the number of t steps results to save - spin button

Parameters
resthe GtkSpinButton sending the signal
datathe associated data pointer

Definition at line 1650 of file calc_menu.c.

◆ test_bonds()

gboolean test_bonds ( )

is it safe to compute bond properties ?

Definition at line 864 of file calc_menu.c.

◆ test_gr()

gboolean test_gr ( int gr)

is it safe to compute g(r) ?

Parameters
rdftype of g(r): real space (GR) or FFT (GK)

Definition at line 812 of file calc_menu.c.

◆ test_msd()

gboolean test_msd ( )

is it safe to compute MSD ?

Definition at line 943 of file calc_menu.c.

◆ test_rings()

gboolean test_rings ( )

is it safe to compute ring statistics ?

Definition at line 887 of file calc_menu.c.

◆ test_skt()

gboolean test_skt ( )

is it safe to compute dynamic structure factors ?

Definition at line 987 of file calc_menu.c.

◆ test_sph()

gboolean test_sph ( )

is it safe to compute spherical harmonics ?

Definition at line 925 of file calc_menu.c.

◆ test_sq()

gboolean test_sq ( int fdq)

is it safe to compute s(q) ?

Parameters
fdqtype of s(q): 0 = FFT g(r), 1 = Debye, 2 = Dynamic

Definition at line 839 of file calc_menu.c.

◆ toggle_bond()

G_MODULE_EXPORT void toggle_bond ( GtkToggleButton * Button,
gpointer data )

activate bond properties detailed saving and prepare the dialog

Parameters
Buttonthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 759 of file calc_menu.c.

◆ toggle_rings()

G_MODULE_EXPORT void toggle_rings ( GtkToggleButton * but,
gpointer data )

toggle a rings statistics calculation parameter

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 520 of file calc_menu.c.

◆ toggle_skt_all()

G_MODULE_EXPORT void toggle_skt_all ( GtkToggleButton * but,
gpointer data )

toggle the output of all s(k,t) data sets

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 1764 of file calc_menu.c.

◆ update_omega_max()

void update_omega_max ( )

update omega max information string

Definition at line 159 of file calc_menu.c.

Variable Documentation

◆ avbox

GtkWidget* avbox = NULL

Definition at line 1063 of file calc_menu.c.

◆ avsize

int avsize

Definition at line 1066 of file calc_menu.c.

◆ ba_entry

GtkWidget* ba_entry[2]

Definition at line 104 of file calc_menu.c.

◆ calc_win

GtkWidget* calc_win = NULL

Definition at line 103 of file calc_menu.c.

◆ omega_max_hbox

GtkWidget* omega_max_hbox = NULL

Definition at line 151 of file calc_menu.c.

◆ omega_max_info

GtkWidget* omega_max_info = NULL

Definition at line 152 of file calc_menu.c.

◆ rings_box

GtkWidget* rings_box[2]

Definition at line 150 of file calc_menu.c.

◆ rings_check

GtkWidget* rings_check[4]

Definition at line 438 of file calc_menu.c.

◆ rings_entry

GtkWidget* rings_entry[2]

Definition at line 437 of file calc_menu.c.

◆ search_type

int search_type

Definition at line 105 of file calc_menu.c.

◆ skadv

dint skadv[2]

Definition at line 1065 of file calc_menu.c.

◆ skt_all_info

GtkWidget* skt_all_info = NULL

Definition at line 1505 of file calc_menu.c.

◆ skt_res_info

GtkWidget* skt_res_info

Definition at line 1509 of file calc_menu.c.

◆ sktqw_delta

GtkWidget* sktqw_delta[2]

Definition at line 1507 of file calc_menu.c.

◆ sktqw_vbox

GtkWidget* sktqw_vbox[2]

Definition at line 1506 of file calc_menu.c.

◆ smbox

GtkWidget* smbox = NULL

Definition at line 1064 of file calc_menu.c.

◆ t_q_vbox

GtkWidget* t_q_vbox[2]

Definition at line 1508 of file calc_menu.c.