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

Functions to handle dummy atom(s) for the CPMD input file. More...

#include "global.h"
#include "interface.h"
#include "glview.h"
#include "calc.h"
#include "cpmd.h"
+ Include dependency graph for cpmd_atoms.c:

Go to the source code of this file.

Functions

void create_selection_combo (int id, int num, int type, GCallback handler)
 create thermostat selection combo box
 
void print_the_section (int s, int p, GtkTextBuffer *buffer)
 print CPMD input section
 
void create_selection_button (GtkWidget *box, int num, int id, gpointer data)
 create thermostat atom(s) selection button
 
G_MODULE_EXPORT void changed_opt_box (GtkComboBox *box, gpointer data)
 change CPMD QM option
 
ColRGBA init_color (int id, int numid)
 initialize color based id number over total number of elements
 
dummy_atomget_active_dummy (int id)
 get dummy atom by id
 
G_MODULE_EXPORT void update_dummy_coord (GtkEntry *res, gpointer data)
 udate dummy atom coordinate entry callback
 
void create_dummy_param_box (int dummy_id)
 crreate dummy atom parameter widgets
 
G_MODULE_EXPORT void dummy_type_changed (GtkComboBox *box, gpointer data)
 change the dummy atom type
 
G_MODULE_EXPORT void changed_dummy_id_box (GtkComboBox *box, gpointer data)
 change the dummy atom id
 
dummy_atominit_dummy (int type, int id)
 create dummy atom
 
G_MODULE_EXPORT void select_dummy (GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
 on select dummy atom toggle callback
 
void dummy_set_color (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 set renderer color in the CPMD dummy atom(s) tree store
 
void dummy_set_visible (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 show / hide cell renderer in the CPMD dummy atom(s) tree store
 
GtkWidget * create_dummy_box ()
 create the dummy atom(s) widgets
 
void clean_dummy_widgets ()
 destroy dummy atom(s) widgets
 
G_MODULE_EXPORT void run_remove_dummy (GtkDialog *dialog, gint response_id, gpointer data)
 remove dummy atom(s) - running the dialog
 
void remove_dummy (int num_to_remove)
 remove dummy atom(s) - creating the dialog
 
void add_dummy (int extra)
 add dummy atom(s)
 
G_MODULE_EXPORT void add_or_remove_dummy (GtkSpinButton *res, gpointer data)
 add or remove dummy atom spin callback
 
G_MODULE_EXPORT void atom_button (GtkWidget *but, gpointer data)
 CPMD input file, add constraint(s) or dummy atom(s) - creating the dialog.
 

Variables

GtkWidget * combo_id [2]
 
GtkWidget * combo_id_box [2]
 
int num_cpmd_objects
 
GtkWidget * dummy_box [2]
 
GtkWidget * the_dummy_box
 
GtkWidget * dummy_param_box
 
dummy_atomdummy
 
int n_dummy
 
int * old_dummy
 
GtkCellRenderer * dummy_renderer [5]
 
GtkTreeViewColumn * dummy_col [5]
 

Detailed Description

Functions to handle dummy atom(s) for the CPMD input file.

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

Function Documentation

◆ add_dummy()

void add_dummy ( int extra)

add dummy atom(s)

Parameters
extrathe number of dummy atom(s) to add

Definition at line 510 of file cpmd_atoms.c.

◆ add_or_remove_dummy()

G_MODULE_EXPORT void add_or_remove_dummy ( GtkSpinButton * res,
gpointer data )

add or remove dummy atom spin callback

Parameters
resthe GtkSpinButton sending the signal
datathe associated data pointer

Definition at line 541 of file cpmd_atoms.c.

◆ atom_button()

G_MODULE_EXPORT void atom_button ( GtkWidget * but,
gpointer data )

CPMD input file, add constraint(s) or dummy atom(s) - creating the dialog.

Parameters
butthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 602 of file cpmd_atoms.c.

◆ changed_dummy_id_box()

G_MODULE_EXPORT void changed_dummy_id_box ( GtkComboBox * box,
gpointer data )

change the dummy atom id

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 207 of file cpmd_atoms.c.

◆ changed_opt_box()

G_MODULE_EXPORT void changed_opt_box ( GtkComboBox * box,
gpointer data )
extern

change CPMD QM option

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 375 of file cpmd_init.c.

◆ clean_dummy_widgets()

void clean_dummy_widgets ( )

destroy dummy atom(s) widgets

Definition at line 333 of file cpmd_atoms.c.

◆ create_dummy_box()

GtkWidget * create_dummy_box ( )

create the dummy atom(s) widgets

Definition at line 578 of file cpmd_atoms.c.

◆ create_dummy_param_box()

void create_dummy_param_box ( int dummy_id)

crreate dummy atom parameter widgets

Parameters
dummy_iddummy atom id

Definition at line 144 of file cpmd_atoms.c.

◆ create_selection_button()

void create_selection_button ( GtkWidget * box,
int num,
int id,
gpointer data )
extern

create thermostat atom(s) selection button

Parameters
boxthe GtkWidget sending the signal
numthe number of atom(s) already selected
id0 = ionic, 1 = fictitious electronic
datathe associated data pointer

Definition at line 1430 of file cpmd_nose.c.

◆ create_selection_combo()

void create_selection_combo ( int id,
int num,
int type,
GCallback handler )
extern

create thermostat selection combo box

Parameters
id0 = ionic, 1 = fictitious electronic
numthe number of thermostat
typethe type of thermostat
handlerthe associated callback

Definition at line 1503 of file cpmd_nose.c.

◆ dummy_set_color()

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

set renderer color in the CPMD dummy atom(s) 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 282 of file cpmd_atoms.c.

◆ dummy_set_visible()

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

show / hide cell renderer in the CPMD dummy atom(s) 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 cpmd_atoms.c.

◆ dummy_type_changed()

G_MODULE_EXPORT void dummy_type_changed ( GtkComboBox * box,
gpointer data )

change the dummy atom type

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 125 of file cpmd_atoms.c.

◆ get_active_dummy()

dummy_atom * get_active_dummy ( int id)

get dummy atom by id

Parameters
idthe target dummy atom id

Definition at line 86 of file cpmd_atoms.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_dummy()

dummy_atom * init_dummy ( int type,
int id )

create dummy atom

Parameters
typethe type of dummy atom to create
idthe id of the new dummy atom

Definition at line 222 of file cpmd_atoms.c.

◆ print_the_section()

void print_the_section ( int s,
int p,
GtkTextBuffer * buffer )
extern

print CPMD input section

Parameters
sthe section id
p0 = section preview, 1 = complete input file
bufferthe GtkTextBuffer to print into

Definition at line 695 of file cpmd_print.c.

◆ remove_dummy()

void remove_dummy ( int num_to_remove)

remove dummy atom(s) - creating the dialog

Parameters
num_to_removethe number of dummy atom(s) to remove

Definition at line 438 of file cpmd_atoms.c.

◆ run_remove_dummy()

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

remove dummy atom(s) - running the dialog

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

Definition at line 351 of file cpmd_atoms.c.

◆ select_dummy()

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

on select dummy atom toggle callback

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

Definition at line 245 of file cpmd_atoms.c.

◆ update_dummy_coord()

G_MODULE_EXPORT void update_dummy_coord ( GtkEntry * res,
gpointer data )

udate dummy atom coordinate entry callback

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 104 of file cpmd_atoms.c.

Variable Documentation

◆ combo_id

GtkWidget* combo_id[2]
extern

Definition at line 145 of file cpmd_nose.c.

◆ combo_id_box

GtkWidget* combo_id_box[2]
extern

Definition at line 146 of file cpmd_nose.c.

◆ dummy

dummy_atom* dummy

Definition at line 73 of file cpmd_atoms.c.

◆ dummy_box

GtkWidget* dummy_box[2]

Definition at line 70 of file cpmd_atoms.c.

◆ dummy_col

GtkTreeViewColumn* dummy_col[5]

Definition at line 77 of file cpmd_atoms.c.

◆ dummy_param_box

GtkWidget* dummy_param_box

Definition at line 72 of file cpmd_atoms.c.

◆ dummy_renderer

GtkCellRenderer* dummy_renderer[5]

Definition at line 76 of file cpmd_atoms.c.

◆ n_dummy

int n_dummy

Definition at line 74 of file cpmd_atoms.c.

◆ num_cpmd_objects

int num_cpmd_objects
extern

Definition at line 154 of file cpmd_nose.c.

◆ old_dummy

int* old_dummy

Definition at line 75 of file cpmd_atoms.c.

◆ the_dummy_box

GtkWidget* the_dummy_box

Definition at line 71 of file cpmd_atoms.c.