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

Functions the list the available database parameters for the atom database window. More...

#include "global.h"
#include "interface.h"
#include "glwindow.h"
#include "glview.h"
#include "dlp_field.h"
+ Include dependency graph for dlp_ff_match.c:

Go to the source code of this file.

Macros

#define NUCOL   8
 

Functions

GtkWidget * param_prop_param_box (int pid)
 prepare field parameter edition widgets
 
gchar * get_this_vdw_string ()
 get VdW formalism description string
 
G_MODULE_EXPORT void markup_action_renderer (GtkCellRendererCombo *cell, GtkCellEditable *editable, gchar *path_string, gpointer data)
 add pango markup to a combo box inserted in the cell of a tree view
 
int get_num_vdw_max ()
 Get the number of field shell interactions.
 
gchar * get_body_element_name (field_nth_body *body, int aid, int nbd)
 get field body potential element name
 
gboolean is_this_object_a_match (int fsid, int nat, int *ffc, int *fpar)
 check if object matches parameters from the database
 
field_dataget_ff_data (int i, int j)
 retrieve field property from database
 
gchar * get_this_prop_param (int sid, int key, int calc, int newp, float *val)
 prepare field property parameters description string
 
gchar * get_this_prop_string (int sid, int oid, int type, int calc)
 get property name
 
field_object_matchduplicate_match (field_object_match *old_m)
 create a copy of a field match
 
void update_result_list (int sid, field_object_match *new_match)
 update avialable parameter list
 
void fill_update_model (GtkTreeStore *store)
 fill the parameters database tree store
 
GtkTreeModel * global_render_tree ()
 create the field property combo box model that contains the list of available parameters
 
dint get_visible (gboolean result, gchar *the_name)
 get cell renderer visibility poitner
 
G_MODULE_EXPORT void changed_update_renderer (GtkCellRendererCombo *combo, gchar *path_string, GtkTreeIter *iter, gpointer data)
 change combo box in tree model callback
 
void get_update_tree_data (GtkWidget *tree, gpointer data, GtkTreePath *path)
 update force field parameters database tree model data
 
void ff_button_event (GdkEvent *event, double event_x, double event_y, guint event_button, guint event_type, guint32 event_time, gpointer data)
 handle mouse button event on the DL-POLY force field parameters database window GTK3
 
G_MODULE_EXPORT gboolean on_ff_button_event (GtkWidget *widget, GdkEvent *event, gpointer data)
 mouse button event on the DL-POLY force field parameters database window
 
G_MODULE_EXPORT void on_toggle_update (GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
 on select field parameter toggle callback
 
void field_set_markup_and_visible (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 field parameter set renderer markup and visibility in the parameter database selection tree model
 
GtkWidget * create_update_tree ()
 create the parameters database tree model
 
void win_update_tree (GtkWidget *vbx)
 update the parameters database tree model
 
void look_up_this_field_object (int fsid, int fpid, int ssid, int nat, int *fsp, int *fat)
 look up in database for this field property
 
void check_this_fprop (int fsid, int fpid, int ssid, int *fat, int *fsp)
 check if the database offers parameters for a field property
 
int this_body_has_atom (field_nth_body *body, char *name)
 check if non bonded potential has this field atom
 
G_MODULE_EXPORT void run_check_atom_for_updates (GtkDialog *dialog, gint response_id, gpointer data)
 check for parameters in the database to be used in the force field - running the dialog
 
void check_atom_for_updates ()
 check for parameters in the database to be used in the force field - creating the dialog
 
G_MODULE_EXPORT void changed_field_prop_combo (GtkComboBox *box, gpointer data)
 change the field parameter selection
 
GtkWidget * create_field_prop_combo (int f, int is_moy)
 create field parameter selection combo box
 

Variables

int * atoms_id
 
int ** atoms_id_list
 
int * field_objects
 
char *** ff_atoms
 
char * fvars_bond [2][FBONDS][FBONDS_P]
 
char * fvars_angle [2][FANGLES][FANGLES_P]
 
char * fvars_dihedral [2][FDIHEDRAL][FDIHEDRAL_P]
 
char * fvars_inversion [2][FINVERS][FINVERS_P]
 
char * fvars_vdw [2][FVDW][FVDW_P]
 
gchar * felemts [MAXDATA+1]
 
GtkWidget * afftype
 
GtkWidget * field_key_combo
 
GtkWidget * p_box
 
GtkWidget * param_box
 
field_object_matchup_match [9]
 
field_object_matchtmp_match
 
field_object_matchother_match
 
field_dataff_data
 
GtkTreeViewColumn * update_col [NUCOL]
 
GtkCellRenderer * update_renderer [NUCOL]
 
GtkWidget * update_tree
 
GtkWidget * ff_p_combo [2]
 
GtkTreeStore * update_model
 
dint up
 
GtkTreeModel * prop_to_up
 
field_object_matchtmp_res [9]
 
dint pup [2]
 
gboolean vdw_same_atom
 

Detailed Description

Functions the list the available database parameters for the atom database window.

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

Macro Definition Documentation

◆ NUCOL

#define NUCOL   8

Definition at line 103 of file dlp_ff_match.c.

Function Documentation

◆ changed_field_prop_combo()

G_MODULE_EXPORT void changed_field_prop_combo ( GtkComboBox * box,
gpointer data )

change the field parameter selection

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 1417 of file dlp_ff_match.c.

◆ changed_update_renderer()

G_MODULE_EXPORT void changed_update_renderer ( GtkCellRendererCombo * combo,
gchar * path_string,
GtkTreeIter * iter,
gpointer data )

change combo box in tree model callback

Parameters
combothe cell renderer combo box
path_stringthe path in the tree model
iterthe tree iter
datathe associated data pointer

Definition at line 689 of file dlp_ff_match.c.

◆ check_atom_for_updates()

void check_atom_for_updates ( )

check for parameters in the database to be used in the force field - creating the dialog

Definition at line 1306 of file dlp_ff_match.c.

◆ check_this_fprop()

void check_this_fprop ( int fsid,
int fpid,
int ssid,
int * fat,
int * fsp )

check if the database offers parameters for a field property

Parameters
fsidthe type of field property
fpidglobal propert (0) or atom specific (> 0)
ssidthe id of the field property to check
fatthe list of field atom(s)
fspthe list of the chemical species for the field atom(s)

Definition at line 1109 of file dlp_ff_match.c.

◆ create_field_prop_combo()

GtkWidget * create_field_prop_combo ( int f,
int is_moy )

create field parameter selection combo box

Parameters
fthe type of force field property
is_moyglobal parameter (1) or atom(s) specific parameter (0)

Definition at line 1531 of file dlp_ff_match.c.

◆ create_update_tree()

GtkWidget * create_update_tree ( )

create the parameters database tree model

Definition at line 925 of file dlp_ff_match.c.

◆ duplicate_match()

field_object_match * duplicate_match ( field_object_match * old_m)

create a copy of a field match

Parameters
old_mthe field match to duplicate

Definition at line 374 of file dlp_ff_match.c.

◆ ff_button_event()

void ff_button_event ( GdkEvent * event,
double event_x,
double event_y,
guint event_button,
guint event_type,
guint32 event_time,
gpointer data )

handle mouse button event on the DL-POLY force field parameters database window GTK3

Parameters
eventthe GdkEvent triggering the signal
event_xx position
event_yy position
event_buttonevent button
event_typeevent type
event_timeevent time
datathe associated data pointer

Definition at line 757 of file dlp_ff_match.c.

◆ field_set_markup_and_visible()

void field_set_markup_and_visible ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

field parameter set renderer markup and visibility in the parameter database selection tree model

Parameters
colthe target GtkTreeViewColumn
rendererthe target cell renderer
modthe target tree model
iterthe target tree iter
datathe associated data pointer

Definition at line 904 of file dlp_ff_match.c.

◆ fill_update_model()

void fill_update_model ( GtkTreeStore * store)

fill the parameters database tree store

Parameters
storethe GtkTreeStore to fill

Definition at line 445 of file dlp_ff_match.c.

◆ get_body_element_name()

gchar * get_body_element_name ( field_nth_body * body,
int aid,
int nbd )
extern

get field body potential element name

Parameters
bodythe field body potential
aidthe atom id, if any
nbdthe body potential id

Definition at line 1934 of file dlp_edit.c.

◆ get_ff_data()

field_data * get_ff_data ( int i,
int j )

retrieve field property from database

Parameters
ithe type of field property
jthe id of the force field database, if any

Definition at line 218 of file dlp_ff_match.c.

◆ get_num_vdw_max()

int get_num_vdw_max ( )
extern

Get the number of field shell interactions.

Definition at line 2002 of file dlp_edit.c.

◆ get_this_prop_param()

gchar * get_this_prop_param ( int sid,
int key,
int calc,
int newp,
float * val )

prepare field property parameters description string

Parameters
sidthe type of field property
keythe key, or formalism to use, for the field property
calcfrom the tree model (1) or from the selection combo box (0)
newp1 = from 'get_this_prop_string', 0 = else
valthe list of parameter(s)

Definition at line 259 of file dlp_ff_match.c.

◆ get_this_prop_string()

gchar * get_this_prop_string ( int sid,
int oid,
int type,
int calc )

get property name

Parameters
sidthe type of field property
oidthe number of atoms for this field property
typethe id of the force field database
calcfrom the tree model (1) or from the selection combo box (0)

Definition at line 324 of file dlp_ff_match.c.

◆ get_this_vdw_string()

gchar * get_this_vdw_string ( )
extern

get VdW formalism description string

Definition at line 490 of file dlp_edit.c.

◆ get_update_tree_data()

void get_update_tree_data ( GtkWidget * tree,
gpointer data,
GtkTreePath * path )

update force field parameters database tree model data

Parameters
treethe GtkWidget sending the signal
datathe associated data pointer
paththe path in the tree model

Definition at line 717 of file dlp_ff_match.c.

◆ get_visible()

dint get_visible ( gboolean result,
gchar * the_name )

get cell renderer visibility poitner

Parameters
resultis renderer visible or not ?
the_namethe target name

Definition at line 639 of file dlp_ff_match.c.

◆ global_render_tree()

GtkTreeModel * global_render_tree ( )

create the field property combo box model that contains the list of available parameters

Definition at line 604 of file dlp_ff_match.c.

◆ is_this_object_a_match()

gboolean is_this_object_a_match ( int fsid,
int nat,
int * ffc,
int * fpar )

check if object matches parameters from the database

Parameters
fsidthe type of field property
natthe number of atoms for this field property
ffcobject data
fparfield database data

Definition at line 126 of file dlp_ff_match.c.

◆ look_up_this_field_object()

void look_up_this_field_object ( int fsid,
int fpid,
int ssid,
int nat,
int * fsp,
int * fat )

look up in database for this field property

Parameters
fsidthe type of field property
fpidglobal propert (0) or atom specific (> 0)
ssidthe id of the field property to check
natthe number of atoms for this field property
fatthe list of field atom(s)
fspthe list of the chemical species for the field atom(s)

Definition at line 1064 of file dlp_ff_match.c.

◆ markup_action_renderer()

G_MODULE_EXPORT void markup_action_renderer ( GtkCellRendererCombo * cell,
GtkCellEditable * editable,
gchar * path_string,
gpointer data )
extern

add pango markup to a combo box inserted in the cell of a tree view

Parameters
cellthe GtkCellRendererCombo
editablethe editable
path_stringthe path in the tree model
datathe associated data pointer

Definition at line 3251 of file w_search.c.

◆ on_ff_button_event()

G_MODULE_EXPORT gboolean on_ff_button_event ( GtkWidget * widget,
GdkEvent * event,
gpointer data )

mouse button event on the DL-POLY force field parameters database window

Parameters
widgetthe GtkWidget sending the signal
eventthe GdkEvent triggering the signal
datathe associated data pointer

Definition at line 821 of file dlp_ff_match.c.

◆ on_toggle_update()

G_MODULE_EXPORT void on_toggle_update ( GtkCellRendererToggle * cell_renderer,
gchar * string_path,
gpointer data )

on select field parameter toggle callback

Parameters
cell_rendererthe GtkCellRendererToggle sending the signal
string_paththe path in the tree store
datathe associated data pointer

Definition at line 838 of file dlp_ff_match.c.

◆ param_prop_param_box()

GtkWidget * param_prop_param_box ( int pid)
extern

prepare field parameter edition widgets

Parameters
pidthe type of field parameter

Definition at line 687 of file dlp_edit.c.

◆ run_check_atom_for_updates()

G_MODULE_EXPORT void run_check_atom_for_updates ( GtkDialog * dialog,
gint response_id,
gpointer data )

check for parameters in the database to be used in the force field - running the dialog

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

Definition at line 1181 of file dlp_ff_match.c.

◆ this_body_has_atom()

int this_body_has_atom ( field_nth_body * body,
char * name )

check if non bonded potential has this field atom

Parameters
bodythe non bonded potential to check
namethe name of the target field atom

Definition at line 1156 of file dlp_ff_match.c.

◆ update_result_list()

void update_result_list ( int sid,
field_object_match * new_match )

update avialable parameter list

Parameters
sidthe type of field property
new_matchthe field match

Definition at line 393 of file dlp_ff_match.c.

◆ win_update_tree()

void win_update_tree ( GtkWidget * vbx)

update the parameters database tree model

Parameters
vbxthe GtkWidget sending the signal

Definition at line 997 of file dlp_ff_match.c.

Variable Documentation

◆ afftype

GtkWidget* afftype
extern

Definition at line 121 of file dlp_edit.c.

◆ atoms_id

int* atoms_id
extern

Definition at line 238 of file force_fields.c.

◆ atoms_id_list

int** atoms_id_list
extern

Definition at line 239 of file force_fields.c.

◆ felemts

gchar* felemts[MAXDATA+1]
extern

Definition at line 140 of file dlp_field.c.

◆ ff_atoms

char*** ff_atoms
extern

Definition at line 1942 of file force_fields.c.

◆ ff_data

field_data* ff_data

Definition at line 95 of file dlp_ff_match.c.

◆ ff_p_combo

GtkWidget* ff_p_combo[2]

Definition at line 108 of file dlp_ff_match.c.

◆ field_key_combo

GtkWidget* field_key_combo
extern

Definition at line 111 of file dlp_edit.c.

◆ field_objects

int* field_objects
extern

Definition at line 233 of file force_fields.c.

◆ fvars_angle

char* fvars_angle[2][FANGLES][FANGLES_P]
extern

Definition at line 372 of file dlp_field.c.

◆ fvars_bond

char* fvars_bond[2][FBONDS][FBONDS_P]
extern

Definition at line 306 of file dlp_field.c.

◆ fvars_dihedral

char* fvars_dihedral[2][FDIHEDRAL][FDIHEDRAL_P]
extern

Definition at line 450 of file dlp_field.c.

◆ fvars_inversion

char* fvars_inversion[2][FINVERS][FINVERS_P]
extern

Definition at line 522 of file dlp_field.c.

◆ fvars_vdw

char* fvars_vdw[2][FVDW][FVDW_P]
extern

Definition at line 602 of file dlp_field.c.

◆ other_match

field_object_match * other_match

Definition at line 94 of file dlp_ff_match.c.

◆ p_box

GtkWidget* p_box
extern

Definition at line 112 of file dlp_edit.c.

◆ param_box

GtkWidget* param_box
extern

Definition at line 114 of file dlp_edit.c.

◆ prop_to_up

GtkTreeModel* prop_to_up

Definition at line 111 of file dlp_ff_match.c.

◆ pup

dint pup[2]

Definition at line 113 of file dlp_ff_match.c.

◆ tmp_match

field_object_match* tmp_match

Definition at line 94 of file dlp_ff_match.c.

◆ tmp_res

field_object_match* tmp_res[9]

Definition at line 112 of file dlp_ff_match.c.

◆ up

dint up

Definition at line 110 of file dlp_ff_match.c.

◆ up_match

field_object_match* up_match[9]

Definition at line 93 of file dlp_ff_match.c.

◆ update_col

GtkTreeViewColumn* update_col[NUCOL]

Definition at line 105 of file dlp_ff_match.c.

◆ update_model

GtkTreeStore* update_model

Definition at line 109 of file dlp_ff_match.c.

◆ update_renderer

GtkCellRenderer* update_renderer[NUCOL]

Definition at line 106 of file dlp_ff_match.c.

◆ update_tree

GtkWidget* update_tree

Definition at line 107 of file dlp_ff_match.c.

◆ vdw_same_atom

gboolean vdw_same_atom

Definition at line 114 of file dlp_ff_match.c.