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

Functions to add / remove molecule(s) to / from the force field. More...

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

Go to the source code of this file.

Functions

ColRGBA init_color (int id, int numid)
 initialize color based id number over total number of elements
 
void field_unselect_all ()
 unselect all atoms
 
gchar * set_field_atom_name (field_atom *ato, field_molecule *mol)
 get name string for field atom
 
void find_atom_id_in_field_molecule (field_molecule *fmol)
 
void viz_fragment (field_molecule *fmol, int id, int viz)
 show / hide fragment
 
void check_to_visualize_properties (int id)
 check if it is requried to update rendering
 
gchar * remove_text (int i, int j, gchar *str)
 get removal information text
 
void clean_up_molecules_info (gboolean usel)
 prepare molecule related widgets in the assistant
 
void set_sensitive_mol (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 set renderer sensitivity in the force field molecule selection tree store
 
G_MODULE_EXPORT void select_mol (GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
 on select field molecule toggle callback
 
void clear_field_atoms (field_molecule *fmol, field_atom *at, int mols, int *mol)
 clean the field atom from a list of atom(s)
 
void molecule_set_color (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 set renderer color in the force field molecule selection tree store
 
G_MODULE_EXPORT void run_add_molecule_to_field (GtkDialog *dialog, gint response_id, gpointer data)
 add molecule to force field - running the dialog
 
G_MODULE_EXPORT void add_molecule_to_field (GSimpleAction *action, GVariant *parameter, gpointer data)
 add molecule to force field - creating the dialog
 
void merge_all_atoms_to_mol (field_molecule *new_mol, int mstart)
 merge all field atoms to another field molecule
 
void prepare_atoms_to_merge (field_atom *at, field_molecule *new_mol, field_molecule *old_mol)
 update the data for the newly 'merged' field atom
 
field_atomnew_atom_to_merge (int id, field_molecule *fmol)
 merge field atoms from a field molecule
 
G_MODULE_EXPORT void run_remove_molecule_from_field (GtkDialog *rmol, gint response_id, gpointer data)
 remove molecule from force field - running the dialog
 
G_MODULE_EXPORT void remove_molecule_from_field (GSimpleAction *action, GVariant *parameter, gpointer data)
 remove molecule from force field - creating the dialog
 

Variables

int active_col
 
int a_mol
 
int b_mol
 
int * new_mol
 
field_moleculeto_remove
 
GtkWidget * remove_label
 
GtkCellRenderer * remove_renderer [5]
 
GtkTreeViewColumn * remove_col [5]
 
gboolean removing = FALSE
 
int old_viz_mol
 
dint ** atomd_id_save
 

Detailed Description

Functions to add / remove molecule(s) to / from the force field.

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

Function Documentation

◆ add_molecule_to_field()

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

add molecule to force field - creating the dialog

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

Definition at line 470 of file dlp_mol.c.

◆ check_to_visualize_properties()

void check_to_visualize_properties ( int pid)
extern

check if it is requried to update rendering

Parameters
pidthe page number in the assistant

Definition at line 768 of file dlp_viz.c.

◆ clean_up_molecules_info()

void clean_up_molecules_info ( gboolean usel)

prepare molecule related widgets in the assistant

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

Definition at line 124 of file dlp_mol.c.

◆ clear_field_atoms()

void clear_field_atoms ( field_molecule * fmol,
field_atom * at,
int mols,
int * mol )

clean the field atom from a list of atom(s)

Parameters
fmolthe target fied molecule
atthe field atom to clean, remove specific atom(s) from it
molsthe number of fragment(s) for this molecule
molthe list of fragment id

Definition at line 227 of file dlp_mol.c.

◆ field_unselect_all()

void field_unselect_all ( )
extern

unselect all atoms

Definition at line 130 of file dlp_viz.c.

◆ find_atom_id_in_field_molecule()

void find_atom_id_in_field_molecule ( field_molecule * fmol)
extern

◆ 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.

◆ merge_all_atoms_to_mol()

void merge_all_atoms_to_mol ( field_molecule * new_mol,
int mstart )

merge all field atoms to another field molecule

Parameters
new_molthe field molecule to merge the atom(s) with
mstartthe fragment id to start with

Definition at line 537 of file dlp_mol.c.

◆ molecule_set_color()

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

set renderer color in the force field molecule 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 301 of file dlp_mol.c.

◆ new_atom_to_merge()

field_atom * new_atom_to_merge ( int id,
field_molecule * fmol )

merge field atoms from a field molecule

Parameters
idthe id of the new field atom
fmolthe field molecule for of the atoms

Definition at line 613 of file dlp_mol.c.

◆ prepare_atoms_to_merge()

void prepare_atoms_to_merge ( field_atom * at,
field_molecule * new_mol,
field_molecule * old_mol )

update the data for the newly 'merged' field atom

Parameters
atthe target field atom
new_molthe target molecule to merge with
old_molthe molecule to remove

Definition at line 573 of file dlp_mol.c.

◆ remove_molecule_from_field()

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

remove molecule from force field - creating the dialog

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

Definition at line 752 of file dlp_mol.c.

◆ remove_text()

gchar * remove_text ( int i,
int j,
gchar * str )

get removal information text

Parameters
i-2 = remove field atom, -1 = remove field molecule
j-1 = remove field molecule, else remove field atom
strthe name of the object to remove

Definition at line 81 of file dlp_mol.c.

◆ run_add_molecule_to_field()

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

add molecule to force field - running the dialog

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

Definition at line 318 of file dlp_mol.c.

◆ run_remove_molecule_from_field()

G_MODULE_EXPORT void run_remove_molecule_from_field ( GtkDialog * rmol,
gint response_id,
gpointer data )

remove molecule from force field - running the dialog

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

Definition at line 647 of file dlp_mol.c.

◆ select_mol()

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

on select 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 178 of file dlp_mol.c.

◆ set_field_atom_name()

gchar * set_field_atom_name ( field_atom * ato,
field_molecule * mol )
extern

get name string for field atom

Parameters
atothe target field atom
molthe target field molecule

Definition at line 247 of file dlp_init.c.

◆ set_sensitive_mol()

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

set renderer sensitivity in the force field molecule 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 153 of file dlp_mol.c.

◆ viz_fragment()

void viz_fragment ( field_molecule * fmol,
int id,
int viz )
extern

show / hide fragment

Parameters
fmolthe target field molecule
idthe fragment id
vizvisualization status (0 = hide, 1 = show)

Definition at line 115 of file dlp_viz.c.

Variable Documentation

◆ a_mol

int a_mol

Definition at line 58 of file dlp_mol.c.

◆ active_col

int active_col

Definition at line 57 of file dlp_mol.c.

◆ atomd_id_save

dint** atomd_id_save

Definition at line 215 of file dlp_mol.c.

◆ b_mol

int b_mol

Definition at line 58 of file dlp_mol.c.

◆ new_mol

int* new_mol

Definition at line 59 of file dlp_mol.c.

◆ old_viz_mol

int old_viz_mol

Definition at line 167 of file dlp_mol.c.

◆ remove_col

GtkTreeViewColumn* remove_col[5]

Definition at line 64 of file dlp_mol.c.

◆ remove_label

GtkWidget* remove_label

Definition at line 62 of file dlp_mol.c.

◆ remove_renderer

GtkCellRenderer* remove_renderer[5]

Definition at line 63 of file dlp_mol.c.

◆ removing

gboolean removing = FALSE

Definition at line 65 of file dlp_mol.c.

◆ to_remove

field_molecule* to_remove

Definition at line 61 of file dlp_mol.c.