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

Function declarations for the crystal builder. More...

#include "global.h"
#include <libxml/xmlreader.h>
+ Include dependency graph for cbuild_edit.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  crystal_data
 

Typedefs

typedef struct crystal_data crystal_data
 

Functions

int clean_xml_data (xmlDoc *doc, xmlTextReaderPtr reader)
 free XML data
 
xmlNodePtr findnode (xmlNodePtr startnode, char *nname)
 find XML node
 
gboolean test_vol (double box[2][3], double vect[3][3])
 is the cell properly described to use PBC ?
 
G_MODULE_EXPORT void update_vect (GtkEntry *entry, gpointer data)
 update lattice vector component
 
G_MODULE_EXPORT void update_box (GtkEntry *entry, gpointer data)
 update lattice parameters
 
double get_value_from_pos (gchar *pos)
 get position double value from string description
 
double get_val_from_wyckoff (gchar *pos, gchar *wval)
 get point value from wyckoff position
 
crystal_dataallocate_crystal_data (int objects, int species)
 allocate crystal data pointer
 
crystal_datafree_crystal_data (crystal_data *cryst)
 free crystal data pointer
 
gboolean adjust_object_occupancy (crystal_data *cryst, int occupying, int tot_cell)
 adjust the crystallograpĥic sites occupancy
 
G_MODULE_EXPORT gboolean to_update_box (GtkWidget *widg, GdkEventFocus *event, gpointer data)
 
G_MODULE_EXPORT gboolean to_update_vect (GtkWidget *widg, GdkEventFocus *event, gpointer data)
 
gchar * replace_markup (char *init, char *key, char *rep)
 replace pattern in string
 
gchar * substitute_string (gchar *init, gchar *o_motif, gchar *n_motif)
 substitute all patterns in string
 
space_groupread_sg_xml_file (const char *filetoread)
 read space group data from XML file
 
GtkWidget * create_atoms_tree (atom_search *asearch, project *this_proj, int na)
 create atom search tree view
 
atom_searchallocate_atom_search (int proj, int action, int searchid, int tsize)
 allocate atom search data structure
 
GtkWidget * create_action_combo (int id, project *this_proj)
 create action combo box
 
void prepare_atom_edition (gpointer data, gboolean visible)
 prepare atom edition
 
void clean_all_trees (atom_search *asearch, project *this_proj)
 clean all tree models in the 'model edition' window
 
void prepare_opengl_menu_bar (glwin *view)
 update the OpenGL window menu bar
 
void allocatoms (project *this_proj)
 allocate project data
 
chemical_dataalloc_chem_data (int spec)
 allocate chemistry data
 
void set_img_lights (project *this_proj, image *img)
 initialize lightning for an image data structure
 
void image_init_spec_data (image *img, project *this_proj, int nsp)
 initialize the chemical species related pointers in an image data structure
 
void glwin_init_spec_data (project *this_proj, int nspec)
 initialize the glwin chemical species related pointers
 
G_MODULE_EXPORT void set_mode (GtkWidget *widg, gpointer data)
 set mouse mode callback
 
void shift_it (vec3_t shift, int refresh, int proj)
 shift atomic coordinates
 
G_MODULE_EXPORT void close_edit (GtkWidget *widg, gpointer data)
 
int insert_this_project_from_lib (int id, gboolean visible, project *this_proj, atom_search *asearch)
 insert object from the library
 
void to_insert_in_project (int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible)
 to insert object in project
 

Variables

gchar * groups [230]
 
gchar * hmsymbols [230]
 
dint t_box [9]
 
double tmp_box [2][3]
 
double tmp_vect [3][3]
 
char * vect_name [3]
 
char * vect_comp [3]
 
char * box_p [2]
 
char * box_prop [2][3]
 
atom_searchinsert_search
 

Detailed Description

Function declarations for the crystal builder.

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 cbuild_edit.h.

Typedef Documentation

◆ crystal_data

typedef struct crystal_data crystal_data

Definition at line 37 of file cbuild_edit.h.

Function Documentation

◆ adjust_object_occupancy()

gboolean adjust_object_occupancy ( crystal_data * cryst,
int occupying,
int tot_cell )
extern

adjust the crystallograpĥic sites occupancy

Parameters
crystthe crystal
occupyinghow to adjust occupancy: 0 = Random for the initial cell only, 1 = Random cell by cell, 2 = Completely random 3 = Successively 4 = Alternatively
tot_cellthe total number of cell to build

Definition at line 665 of file cbuild_action.c.

◆ alloc_chem_data()

chemical_data * alloc_chem_data ( int spec)
extern

allocate chemistry data

Parameters
specthe number of chemical species

Definition at line 186 of file open_p.c.

◆ allocate_atom_search()

atom_search * allocate_atom_search ( int proj,
int action,
int searchid,
int tsize )
extern

allocate atom search data structure

Parameters
projthe target project id
actionthe edition action
searchidthe atom search id
tsizethe atom search object list size

Definition at line 392 of file atom_edit.c.

◆ allocate_crystal_data()

crystal_data * allocate_crystal_data ( int objects,
int species )
extern

allocate crystal data pointer

Parameters
objectsthe number of object(s)
speciesthe number of chemical species

Definition at line 590 of file cbuild_action.c.

◆ allocatoms()

void allocatoms ( project * this_proj)
extern

allocate project data

Parameters
this_projthe target project

Definition at line 160 of file open_p.c.

◆ clean_all_trees()

void clean_all_trees ( atom_search * asearch,
project * this_proj )
extern

clean all tree models in the 'model edition' window

Parameters
asearchthe target atom search
this_projthe target project

Definition at line 1018 of file atom_action.c.

◆ clean_xml_data()

int clean_xml_data ( xmlDoc * doc,
xmlTextReaderPtr reader )
extern

free XML data

Parameters
docthe XML doc pointer to free
readerthe XML reader to free

Definition at line 322 of file w_library.c.

◆ close_edit()

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

◆ create_action_combo()

GtkWidget * create_action_combo ( int id,
project * this_proj )
extern

create action combo box

Parameters
idthe action id
this_projthe target project

Definition at line 216 of file atom_search.c.

◆ create_atoms_tree()

GtkWidget * create_atoms_tree ( atom_search * asearch,
project * this_proj,
int nats )
extern

create atom search tree view

Parameters
asearchthe target atom search
this_projthe target project
natsthe total number of atom(s)

Definition at line 3584 of file w_search.c.

◆ findnode()

xmlNodePtr findnode ( xmlNodePtr startnode,
char * nname )
extern

find XML node

Parameters
startnodeStarting node
nnameNode name to find

Definition at line 548 of file read_isaacs.c.

◆ free_crystal_data()

crystal_data * free_crystal_data ( crystal_data * cryst)
extern

free crystal data pointer

Parameters
crystthe data pointer to free

Definition at line 617 of file cbuild_action.c.

◆ get_val_from_wyckoff()

double get_val_from_wyckoff ( gchar * pos,
gchar * wval )
extern

get point value from wyckoff position

Parameters
pos"x", "y" or "z"
wvalwyckoff position vector

Definition at line 446 of file cbuild_action.c.

◆ get_value_from_pos()

double get_value_from_pos ( gchar * pos)
extern

get position double value from string description

Parameters
posthe string description

Definition at line 121 of file cbuild_action.c.

◆ glwin_init_spec_data()

void glwin_init_spec_data ( project * this_proj,
int nspec )
extern

initialize the glwin chemical species related pointers

Parameters
this_projthe target project
nspecthe number of chemical species

Definition at line 1588 of file glview.c.

◆ image_init_spec_data()

void image_init_spec_data ( image * img,
project * this_proj,
int nsp )
extern

initialize the chemical species related pointers in an image data structure

Parameters
imgthe target image
this_projthe target project
nspthe number of chemical species

Definition at line 1190 of file glview.c.

◆ insert_this_project_from_lib()

int insert_this_project_from_lib ( int id,
gboolean visible,
project * this_proj,
atom_search * asearch )
extern

insert object from the library

Parameters
idobject id to insert
visibleis the 'model edition window' visible
this_projthe target project
asearchthe target atom search

Definition at line 1158 of file w_library.c.

◆ prepare_atom_edition()

void prepare_atom_edition ( gpointer data,
gboolean visible )
extern

prepare atom edition

Parameters
datathe associated data pointer
visibleis the window visible (1/0)

Definition at line 459 of file atom_edit.c.

◆ prepare_opengl_menu_bar()

void prepare_opengl_menu_bar ( glwin * view)
extern

update the OpenGL window menu bar

Parameters
viewthe target glwin

Definition at line 600 of file glwindow.c.

◆ read_sg_xml_file()

space_group * read_sg_xml_file ( const char * filetoread)
extern

read space group data from XML file

Parameters
filetoreadthe file to read

Definition at line 652 of file cbuild_sg.c.

◆ replace_markup()

gchar * replace_markup ( char * init,
char * key,
char * rep )
extern

replace pattern in string

Parameters
initthe string
keythe pattern to replace
repthe new pattern

Definition at line 339 of file w_library.c.

◆ set_img_lights()

void set_img_lights ( project * this_proj,
image * img )
extern

initialize lightning for an image data structure

Parameters
this_projthe target project
imgthe target image

Definition at line 1252 of file glview.c.

◆ set_mode()

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

set mouse mode callback

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 172 of file m_tools.c.

◆ shift_it()

void shift_it ( vec3_t shift,
int refresh,
int proj )
extern

shift atomic coordinates

Parameters
shiftthe shift vector
refreshrefresh rendering data
projthe target project id

Definition at line 206 of file cell_shift.c.

◆ substitute_string()

gchar * substitute_string ( gchar * init,
gchar * o_motif,
gchar * n_motif )
extern

substitute all patterns in string

Parameters
initthe initial string
o_motifthe pattern to replace
n_motifthe new pattern

Definition at line 372 of file w_library.c.

◆ test_vol()

gboolean test_vol ( double box[2][3],
double vect[3][3] )
extern

is the cell properly described to use PBC ?

Parameters
boxlattice parameters
vectlattice vectors

Definition at line 498 of file edit_menu.c.

◆ to_insert_in_project()

void to_insert_in_project ( int stat,
int orig,
project * this_proj,
atom_search * asearch,
gboolean visible )
extern

to insert object in project

Parameters
statin enum object_types
orig- (fragmol id/species id +1), -1, or, orgin atom id
this_projthe target project
asearchthe target atom search
visibleis the model edition window visible ?

Definition at line 1214 of file atom_object.c.

◆ to_update_box()

G_MODULE_EXPORT gboolean to_update_box ( GtkWidget * widg,
GdkEventFocus * event,
gpointer data )
extern

◆ to_update_vect()

G_MODULE_EXPORT gboolean to_update_vect ( GtkWidget * widg,
GdkEventFocus * event,
gpointer data )
extern

◆ update_box()

G_MODULE_EXPORT void update_box ( GtkEntry * entry,
gpointer data )
extern

update lattice parameters

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 107 of file edit_menu.c.

◆ update_vect()

G_MODULE_EXPORT void update_vect ( GtkEntry * entry,
gpointer data )
extern

update lattice vector component

Parameters
entrythe GtkEntry sending the signal
datathe associated data pointer

Definition at line 195 of file edit_menu.c.

Variable Documentation

◆ box_p

char* box_p[2]
extern

Definition at line 72 of file edit_menu.c.

◆ box_prop

char* box_prop[2][3]
extern

Definition at line 73 of file edit_menu.c.

◆ groups

gchar* groups[230]
extern

Definition at line 43 of file cbuild_sg.c.

◆ hmsymbols

gchar* hmsymbols[230]
extern

Definition at line 274 of file cbuild_sg.c.

◆ insert_search

atom_search* insert_search
extern

Definition at line 176 of file popup.c.

◆ t_box

dint t_box[9]
extern

Definition at line 94 of file edit_menu.c.

◆ tmp_box

double tmp_box[2][3]
extern

Definition at line 90 of file edit_menu.c.

◆ tmp_vect

double tmp_vect[3][3]
extern

Definition at line 91 of file edit_menu.c.

◆ vect_comp

char* vect_comp[3]
extern

Definition at line 82 of file edit_menu.c.

◆ vect_name

char* vect_name[3]
extern

Definition at line 81 of file edit_menu.c.