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

Functions to edit DL-POLY force field parameters. More...

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

Go to the source code of this file.

Functions

void clean_up_molecules_info (gboolean usel)
 prepare molecule related widgets in the assistant
 
void select_object (int id, int jd, int kd)
 select structural element
 
G_MODULE_EXPORT void run_add_atom_dialog (GtkDialog *add_dialog, gint response_id, gpointer data)
 DL-POLY force field atom selection - running the dialog.
 
void field_selection (int i, int viz, int lab, int aid)
 select / unselect atom
 
void field_unselect_all ()
 unselect all atoms
 
void compare_non_bonded (gchar *fatom)
 compare non bond interaction parameters
 
void visualize_single_struct (int id, int jd, int kd, int *ids)
 visualize single structural element
 
void visualize_body (int viz, int bd, field_nth_body *body)
 show / hide non bonded interaction
 
void init_default_shaders (glwin *view)
 re-initialize the default OpenGL shaders
 
GtkWidget * create_field_prop_combo (int f, int is_moy)
 create field parameter selection combo box
 
void check_atom_for_updates ()
 check for parameters in the database to be used in the force field - creating the dialog
 
void check_to_visualize_properties_for_this_field_mol (int pid, int mol)
 check if rendering is required for object in molecule
 
gboolean are_identical_prop (int ti, int ai, field_prop *pro_a, field_prop *pro_b)
 are the 2 field property identicals ?
 
void adjust_field_prop (int fil, int sti, field_prop *tmp, int *ids, int key)
 adjust field property
 
G_MODULE_EXPORT void update_atom_parameter (GtkEntry *res, gpointer data)
 update field atom parameter entry callback
 
G_MODULE_EXPORT void update_field_parameter (GtkEntry *res, gpointer data)
 update field parameter entry callback
 
G_MODULE_EXPORT void update_cross_parameter (GtkEntry *res, gpointer data)
 update field cross parameter entry callback
 
G_MODULE_EXPORT void changed_cross_combo (GtkComboBox *box, gpointer data)
 change field cross combo
 
GtkWidget * combo_cross (field_nth_body *body)
 create field cross configuration widgets
 
gchar * get_this_vdw_string ()
 get VdW formalism description string
 
GtkWidget * parameters_box (int obj, int key, gchar **words, float *data)
 pepare field property edition parameters
 
gchar * field_str (int a)
 get field external name
 
gboolean tersoff_question ()
 change Tersoff potential ?
 
GtkWidget * param_prop_param_box (int pid)
 prepare field parameter edition widgets
 
G_MODULE_EXPORT void changed_field_key_combo (GtkComboBox *box, gpointer data)
 change field key
 
G_MODULE_EXPORT void visualize_it (GtkToggleButton *but, gpointer data)
 visualize object toggle callback GTK3
 
G_MODULE_EXPORT void select_it (GtkToggleButton *but, gpointer data)
 select object toggle callback GTK3
 
ColRGBA init_color (int id, int numid)
 initialize color based id number over total number of elements
 
void run_select_atom_dialog (GtkDialog *select_dialog, gint response_id, gpointer data)
 DL-POLY force field atom selection - creating the dialog.
 
G_MODULE_EXPORT void field_molecule_select_atom_id (GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
 on select atom in field molecule toggle callback
 
void select_atom_set_color (GtkCellRenderer *renderer, int i)
 set cell renderer color
 
void select_atom_set_cmv (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 field atom set renderer color, markup and visibility in the property edition atom(s) selection tree store
 
G_MODULE_EXPORT void edit_unit_weight (GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer data)
 
G_MODULE_EXPORT void select_atom_id_from_fied_molecule (GtkButton *but, gpointer data)
 select atom id from field molecule - creating the dialog
 
void update_field_dist (float v)
 update field distance widget
 
gchar * body_str (int a)
 get body potential string name
 
G_MODULE_EXPORT void selection_button (GtkButton *but, gpointer data)
 select field object callback
 
G_MODULE_EXPORT void changed_atom_combo (GtkComboBox *box, gpointer data)
 change atom
 
gchar * get_body_element_name (field_nth_body *body, int aid, int nbd)
 get field body potential element name
 
gboolean body_identicals (field_nth_body *body, int nbd, int *na, int **ma, int **ba)
 are these non bonded potentials identicals ?
 
int get_num_vdw_max ()
 Get the number of field shell interactions.
 
void adjust_vdw_interactions (gboolean add_shell)
 adjust VdW interactions
 
G_MODULE_EXPORT void shell_in_vdw (GtkToggleButton *but, gpointer data)
 VdW in shell toggle callback GTK3.
 
G_MODULE_EXPORT void run_edit_parameters (GtkDialog *dialog, gint response_id, gpointer data)
 edit field parameter - running the dialog
 
void edit_parameters (int f, int id)
 edit field parameter - creating the dialog
 
void update_tersoffs (int id, int key)
 update non bonded potential
 
void check_tersoffs (int id, int key)
 check non bonded potential
 
G_MODULE_EXPORT void edit_field_prop (GSimpleAction *action, GVariant *parameter, gpointer data)
 edit field property callback
 
G_MODULE_EXPORT void add_field_prop (GSimpleAction *action, GVariant *parameter, gpointer data)
 add field property callback
 
G_MODULE_EXPORT void remove_field_prop (GSimpleAction *action, GVariant *parameter, gpointer data)
 remove field property callback
 

Variables

int * atoms_id
 
int ** atoms_id_list
 
char *** ff_atoms
 
gchar * felemts [MAXDATA+1]
 
gchar * elemts [MAXDATA]
 
gchar * mo_title [8]
 
int fetypes [2][16]
 
GtkWidget * ff_p_combo [2]
 
GtkWidget * field_key_combo
 
GtkWidget * p_box
 
GtkWidget * cross_vbox
 
GtkWidget * cross_hbox
 
GtkWidget * param_box
 
GtkWidget * img_but [4]
 
GtkWidget * shell_but
 
GtkWidget * shell_hbox [3]
 
GtkWidget * shell_cbox [2]
 
GtkWidget * body_lab
 
GtkWidget * afftype
 
int is_moy
 
int * edit_atids
 
int object_is
 
GtkWidget * centry [3]
 
GtkWidget * cross_box
 
double *** cross = NULL
 
int num_body_d
 
gboolean change_tersoff
 
int active_sel
 
int a_ato
 
int ** sel_at
 
GtkWidget * add_tree
 
int vdw_id
 
float * val_at
 
GtkWidget * av_lgt
 
dint rep
 
gchar * rep_atom_name
 

Detailed Description

Functions to edit DL-POLY force field parameters.

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

Function Documentation

◆ add_field_prop()

G_MODULE_EXPORT void add_field_prop ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

add field property callback

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction, if any
datathe associated data pointer

Definition at line 3058 of file dlp_edit.c.

◆ adjust_field_prop()

void adjust_field_prop ( int fil,
int sti,
field_prop * tmp,
int * ids,
int key )

adjust field property

Parameters
filthe type of field property
stithe number of field atoms for this type of field property
tmpthe pointer of the field property list
idsthe list of field atoms
keythe key value to adjust

Definition at line 163 of file dlp_edit.c.

◆ adjust_vdw_interactions()

void adjust_vdw_interactions ( gboolean add_shell)

adjust VdW interactions

Parameters
add_shellupdate field shells

Definition at line 2030 of file dlp_edit.c.

◆ are_identical_prop()

gboolean are_identical_prop ( int ti,
int ai,
field_prop * pro_a,
field_prop * pro_b )

are the 2 field property identicals ?

Parameters
tithe type of field property
aithe number of field atoms for this field property
pro_a1st field property
pro_b2nd field property

Definition at line 135 of file dlp_edit.c.

◆ body_identicals()

gboolean body_identicals ( field_nth_body * body,
int nbd,
int * na,
int ** ma,
int ** ba )

are these non bonded potentials identicals ?

Parameters
bodythe field non bonded property
nbdnumber of distinct interactions
nanumber of atoms (0 = 1st pot, 1 = 2nd pot)
ma1st potential data
ba2nd potential data

Definition at line 1960 of file dlp_edit.c.

◆ body_str()

gchar * body_str ( int a)

get body potential string name

Parameters
athe type of potential

Definition at line 1638 of file dlp_edit.c.

◆ changed_atom_combo()

G_MODULE_EXPORT void changed_atom_combo ( GtkComboBox * box,
gpointer data )

change atom

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 1883 of file dlp_edit.c.

◆ changed_cross_combo()

G_MODULE_EXPORT void changed_cross_combo ( GtkComboBox * box,
gpointer data )

change field cross combo

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 449 of file dlp_edit.c.

◆ changed_field_key_combo()

G_MODULE_EXPORT void changed_field_key_combo ( GtkComboBox * box,
gpointer data )

change field key

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 740 of file dlp_edit.c.

◆ check_atom_for_updates()

void check_atom_for_updates ( )
extern

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_tersoffs()

void check_tersoffs ( int id,
int key )

check non bonded potential

Parameters
idpotential id
keypotential type

Definition at line 2957 of file dlp_edit.c.

◆ check_to_visualize_properties_for_this_field_mol()

void check_to_visualize_properties_for_this_field_mol ( int pid,
int mol )
extern

check if rendering is required for object in molecule

Parameters
pidthe type of field object
molthe target field molecule

Definition at line 737 of file dlp_viz.c.

◆ clean_up_molecules_info()

void clean_up_molecules_info ( gboolean usel)
extern

prepare molecule related widgets in the assistant

Parameters
uselunselect all atom(s) (yes / no)

Definition at line 124 of file dlp_mol.c.

◆ combo_cross()

GtkWidget * combo_cross ( field_nth_body * body)

create field cross configuration widgets

Parameters
bodythe pointer on the first non bonded field structure

Definition at line 467 of file dlp_edit.c.

◆ compare_non_bonded()

void compare_non_bonded ( gchar * fatom)
extern

compare non bond interaction parameters

Parameters
fatomthe name of the target field atom

Definition at line 184 of file dlp_comp.c.

◆ create_field_prop_combo()

GtkWidget * create_field_prop_combo ( int f,
int is_moy )
extern

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.

◆ edit_field_prop()

G_MODULE_EXPORT void edit_field_prop ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

edit field property callback

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction, if any
datathe associated data pointer

Definition at line 2993 of file dlp_edit.c.

◆ edit_parameters()

void edit_parameters ( int f,
int id )

edit field parameter - creating the dialog

Parameters
fthe type of parameter to edit
idthe field molecule id, if any

Definition at line 2278 of file dlp_edit.c.

◆ edit_unit_weight()

G_MODULE_EXPORT void edit_unit_weight ( GtkCellRendererText * cell,
gchar * path_string,
gchar * new_text,
gpointer data )

Definition at line 1152 of file dlp_edit.c.

◆ field_molecule_select_atom_id()

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

on select atom in field molecule toggle callback

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

Definition at line 930 of file dlp_edit.c.

◆ field_selection()

void field_selection ( int i,
int viz,
int lab,
int aid )
extern

select / unselect atom

Parameters
ithe atom id in the model
vizvisualization status (0= hide, 1 = show)
labthe value to display for the label
aidthe value to use for the color

Definition at line 91 of file dlp_viz.c.

◆ field_str()

gchar * field_str ( int a)

get field external name

Parameters
athe field external id

Definition at line 648 of file dlp_edit.c.

◆ field_unselect_all()

void field_unselect_all ( )
extern

unselect all atoms

Definition at line 130 of file dlp_viz.c.

◆ get_body_element_name()

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

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_num_vdw_max()

int get_num_vdw_max ( )

Get the number of field shell interactions.

Definition at line 2002 of file dlp_edit.c.

◆ get_this_vdw_string()

gchar * get_this_vdw_string ( )

get VdW formalism description string

Definition at line 490 of file dlp_edit.c.

◆ init_color()

ColRGBA init_color ( int id,
int numid )
extern

initialize color based id number over total number of elements

Parameters
idthe id number
numidthe total number of elements

Definition at line 81 of file initcoord.c.

◆ init_default_shaders()

void init_default_shaders ( glwin * view)
extern

re-initialize the default OpenGL shaders

Parameters
viewthe target glwin

Definition at line 729 of file ogl_shading.c.

◆ param_prop_param_box()

GtkWidget * param_prop_param_box ( int pid)

prepare field parameter edition widgets

Parameters
pidthe type of field parameter

Definition at line 687 of file dlp_edit.c.

◆ parameters_box()

GtkWidget * parameters_box ( int obj,
int key,
gchar ** words,
float * data )

pepare field property edition parameters

Parameters
objthe type of field property
keythe key type for this field property, if any
wordsthe parameter(s) labels
datathe actual value(s) for the parameter(s)

Definition at line 524 of file dlp_edit.c.

◆ remove_field_prop()

G_MODULE_EXPORT void remove_field_prop ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

remove field property callback

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction, if any
datathe associated data pointer

Definition at line 3298 of file dlp_edit.c.

◆ run_add_atom_dialog()

G_MODULE_EXPORT void run_add_atom_dialog ( GtkDialog * add_dialog,
gint response_id,
gpointer data )
extern

DL-POLY force field atom selection - running the dialog.

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

Definition at line 295 of file dlp_atom.c.

◆ run_edit_parameters()

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

edit field parameter - running the dialog

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

Definition at line 2251 of file dlp_edit.c.

◆ run_select_atom_dialog()

void run_select_atom_dialog ( GtkDialog * select_dialog,
gint response_id,
gpointer data )
extern

DL-POLY force field atom selection - creating the dialog.

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

Definition at line 381 of file dlp_atom.c.

◆ select_atom_id_from_fied_molecule()

G_MODULE_EXPORT void select_atom_id_from_fied_molecule ( GtkButton * but,
gpointer data )

select atom id from field molecule - creating the dialog

Parameters
butthe GtkButton sending the signal
datathe associated data pointer

Definition at line 1171 of file dlp_edit.c.

◆ select_atom_set_cmv()

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

field atom set renderer color, markup and visibility in the property edition atom(s) selection tree store

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

Definition at line 1046 of file dlp_edit.c.

◆ select_atom_set_color()

void select_atom_set_color ( GtkCellRenderer * renderer,
int i )

set cell renderer color

Parameters
rendererthe target GtkCellRen
ithe color id

Definition at line 1030 of file dlp_edit.c.

◆ select_it()

G_MODULE_EXPORT void select_it ( GtkToggleButton * but,
gpointer data )

select object toggle callback GTK3

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 892 of file dlp_edit.c.

◆ select_object()

void select_object ( int id,
int jd,
int kd )
extern

select structural element

Parameters
idthe type of structural element
jdthe object id, if any
kdthe field molecule id

Definition at line 425 of file dlp_viz.c.

◆ selection_button()

G_MODULE_EXPORT void selection_button ( GtkButton * but,
gpointer data )

select field object callback

Parameters
butthe GtkButton sending the signal
datathe associated data pointer

Definition at line 1663 of file dlp_edit.c.

◆ shell_in_vdw()

G_MODULE_EXPORT void shell_in_vdw ( GtkToggleButton * but,
gpointer data )

VdW in shell toggle callback GTK3.

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 2228 of file dlp_edit.c.

◆ tersoff_question()

gboolean tersoff_question ( )

change Tersoff potential ?

Definition at line 663 of file dlp_edit.c.

◆ update_atom_parameter()

G_MODULE_EXPORT void update_atom_parameter ( GtkEntry * res,
gpointer data )

update field atom parameter entry callback

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 337 of file dlp_edit.c.

◆ update_cross_parameter()

G_MODULE_EXPORT void update_cross_parameter ( GtkEntry * res,
gpointer data )

update field cross parameter entry callback

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 430 of file dlp_edit.c.

◆ update_field_dist()

void update_field_dist ( float v)

update field distance widget

Parameters
vthe new value

Definition at line 1616 of file dlp_edit.c.

◆ update_field_parameter()

G_MODULE_EXPORT void update_field_parameter ( GtkEntry * res,
gpointer data )

update field parameter entry callback

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 389 of file dlp_edit.c.

◆ update_tersoffs()

void update_tersoffs ( int id,
int key )

update non bonded potential

Parameters
idpotential id
keypotenntial type

Definition at line 2925 of file dlp_edit.c.

◆ visualize_body()

void visualize_body ( int viz,
int bd,
field_nth_body * body )
extern

show / hide non bonded interaction

Parameters
vizvisualization status (0 = hide, 1 = show)
bdthe type of non bonded interaction
bodythe target non bonded interaction

Definition at line 341 of file dlp_viz.c.

◆ visualize_it()

G_MODULE_EXPORT void visualize_it ( GtkToggleButton * but,
gpointer data )

visualize object toggle callback GTK3

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 839 of file dlp_edit.c.

◆ visualize_single_struct()

void visualize_single_struct ( int id,
int jd,
int kd,
int * ids )
extern

visualize single structural element

Parameters
idthe type of structural element
jdthe object id, if any
kdthe field molecule id
idsthe list of atom id in the fragment

Definition at line 488 of file dlp_viz.c.

Variable Documentation

◆ a_ato

int a_ato
extern

Definition at line 57 of file dlp_atom.c.

◆ active_sel

int active_sel
extern

Definition at line 54 of file dlp_atom.c.

◆ add_tree

GtkWidget* add_tree

Definition at line 918 of file dlp_edit.c.

◆ afftype

GtkWidget* afftype

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.

◆ av_lgt

GtkWidget* av_lgt

Definition at line 1607 of file dlp_edit.c.

◆ body_lab

GtkWidget* body_lab

Definition at line 120 of file dlp_edit.c.

◆ centry

GtkWidget* centry[3]

Definition at line 416 of file dlp_edit.c.

◆ change_tersoff

gboolean change_tersoff

Definition at line 420 of file dlp_edit.c.

◆ cross

double*** cross = NULL

Definition at line 418 of file dlp_edit.c.

◆ cross_box

GtkWidget* cross_box

Definition at line 417 of file dlp_edit.c.

◆ cross_hbox

GtkWidget * cross_hbox

Definition at line 113 of file dlp_edit.c.

◆ cross_vbox

GtkWidget* cross_vbox

Definition at line 113 of file dlp_edit.c.

◆ edit_atids

int* edit_atids

Definition at line 123 of file dlp_edit.c.

◆ elemts

gchar* elemts[MAXDATA]
extern

Definition at line 163 of file dlp_field.c.

◆ felemts

gchar* felemts[MAXDATA+1]
extern

Definition at line 140 of file dlp_field.c.

◆ fetypes

int fetypes[2][16]
extern

Definition at line 286 of file dlp_field.c.

◆ ff_atoms

char*** ff_atoms
extern

Definition at line 1942 of file force_fields.c.

◆ ff_p_combo

GtkWidget* ff_p_combo[2]
extern

Definition at line 108 of file dlp_ff_match.c.

◆ field_key_combo

GtkWidget* field_key_combo

Definition at line 111 of file dlp_edit.c.

◆ img_but

GtkWidget* img_but[4]

Definition at line 115 of file dlp_edit.c.

◆ is_moy

int is_moy

Definition at line 122 of file dlp_edit.c.

◆ mo_title

gchar* mo_title[8]
extern

Definition at line 935 of file dlp_field.c.

◆ num_body_d

int num_body_d

Definition at line 419 of file dlp_edit.c.

◆ object_is

int object_is

Definition at line 379 of file dlp_edit.c.

◆ p_box

GtkWidget* p_box

Definition at line 112 of file dlp_edit.c.

◆ param_box

GtkWidget* param_box

Definition at line 114 of file dlp_edit.c.

◆ rep

dint rep

Definition at line 2239 of file dlp_edit.c.

◆ rep_atom_name

gchar* rep_atom_name

Definition at line 2240 of file dlp_edit.c.

◆ sel_at

int** sel_at
extern

Definition at line 56 of file dlp_atom.c.

◆ shell_but

GtkWidget* shell_but

Definition at line 116 of file dlp_edit.c.

◆ shell_cbox

GtkWidget* shell_cbox[2]

Definition at line 119 of file dlp_edit.c.

◆ shell_hbox

GtkWidget* shell_hbox[3]

Definition at line 118 of file dlp_edit.c.

◆ val_at

float* val_at

Definition at line 1140 of file dlp_edit.c.

◆ vdw_id

int vdw_id

Definition at line 919 of file dlp_edit.c.