atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
cbuild_edit.h
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
22/*
23* This header file: 'cbuild_edit.h'
24*
25* Contains:
26
27 - Function declarations for the crystal builder
28
29*/
30
31#ifndef CBUILD_EDIT_H_
32#define CBUILD_EDIT_H_
33
34#include "global.h"
35#include <libxml/xmlreader.h>
36
39{
41 int spec;
42 double * z;
43 int ** lot;
44 int ** at_type;
45 int * nsps;
48 double * occupancy;
49 gboolean overlapping;
50 int ** sites;
51 gboolean shared_sites;
52 gboolean with_holes;
53 gboolean * holes;
57};
58
59extern int clean_xml_data (xmlDoc * doc, xmlTextReaderPtr reader);
60extern xmlNodePtr findnode (xmlNodePtr startnode, char * nname);
61extern gchar * groups[230];
62extern gchar * hmsymbols[230];
63extern dint t_box[9];
64extern double tmp_box[2][3];
65extern double tmp_vect[3][3];
66extern char * vect_name[3];
67extern char * vect_comp[3];
68extern char * box_p[2];
69extern char * box_prop[2][3];
71extern gboolean test_vol (double box[2][3], double vect[3][3]);
72extern G_MODULE_EXPORT void update_vect (GtkEntry * entry, gpointer data);
73extern G_MODULE_EXPORT void update_box (GtkEntry * entry, gpointer data);
74extern double get_value_from_pos (gchar * pos);
75extern double get_val_from_wyckoff (gchar * pos, gchar * wval);
76extern crystal_data * allocate_crystal_data (int objects, int species);
78extern gboolean adjust_object_occupancy (crystal_data * cryst, int occupying, int tot_cell);
79#ifdef GTK4
80extern G_MODULE_EXPORT void to_update_box (GtkEditable * widg, gpointer data);
81extern G_MODULE_EXPORT void to_update_vect (GtkEditable * widg, gpointer data);
82#else
83extern G_MODULE_EXPORT gboolean to_update_box (GtkWidget * widg, GdkEventFocus * event, gpointer data);
84extern G_MODULE_EXPORT gboolean to_update_vect (GtkWidget * widg, GdkEventFocus * event, gpointer data);
85#endif
86extern gchar * replace_markup (char * init, char * key, char * rep);
87extern gchar * substitute_string (gchar * init, gchar * o_motif, gchar * n_motif);
88extern space_group * read_sg_xml_file (const char * filetoread);
89extern GtkWidget * create_atoms_tree (atom_search * asearch, project * this_proj, int na);
90extern atom_search * allocate_atom_search (int proj, int action, int searchid, int tsize);
91extern GtkWidget * create_action_combo (int id, project * this_proj);
92extern void prepare_atom_edition (gpointer data, gboolean visible);
93extern void clean_all_trees (atom_search * asearch, project * this_proj);
94extern void prepare_opengl_menu_bar (glwin * view);
95extern void allocatoms (project * this_proj);
96extern chemical_data * alloc_chem_data (int spec);
97extern void set_img_lights (project * this_proj, image * img);
98extern void image_init_spec_data (image * img, project * this_proj, int nsp);
99extern void glwin_init_spec_data (project * this_proj, int nspec);
100extern G_MODULE_EXPORT void set_mode (GtkWidget * widg, gpointer data);
101extern void shift_it (vec3_t shift, int refresh, int proj);
102extern G_MODULE_EXPORT void close_edit (GtkWidget * widg, gpointer data);
103extern int insert_this_project_from_lib (int id, gboolean visible, project * this_proj, atom_search * asearch);
104extern void to_insert_in_project (int stat, int orig, project * this_proj, atom_search * asearch, gboolean visible);
105#endif
gchar * groups[230]
Definition cbuild_sg.c:43
double get_val_from_wyckoff(gchar *pos, gchar *wval)
get point value from wyckoff position
xmlNodePtr findnode(xmlNodePtr startnode, char *nname)
find XML node
char * box_prop[2][3]
Definition edit_menu.c:73
char * vect_comp[3]
Definition edit_menu.c:82
G_MODULE_EXPORT void update_box(GtkEntry *entry, gpointer data)
update lattice parameters
Definition edit_menu.c:107
gchar * substitute_string(gchar *init, gchar *o_motif, gchar *n_motif)
substitute all patterns in string
Definition w_library.c:372
double tmp_vect[3][3]
Definition edit_menu.c:91
G_MODULE_EXPORT void close_edit(GtkWidget *widg, gpointer data)
G_MODULE_EXPORT gboolean to_update_vect(GtkWidget *widg, GdkEventFocus *event, gpointer data)
gboolean test_vol(double box[2][3], double vect[3][3])
is the cell properly described to use PBC ?
Definition edit_menu.c:498
char * vect_name[3]
Definition edit_menu.c:81
void prepare_atom_edition(gpointer data, gboolean visible)
prepare atom edition
Definition atom_edit.c:459
chemical_data * alloc_chem_data(int spec)
allocate chemistry data
Definition open_p.c:186
double tmp_box[2][3]
Definition edit_menu.c:90
gboolean adjust_object_occupancy(crystal_data *cryst, int occupying, int tot_cell)
adjust the crystallograpĥic sites occupancy
void glwin_init_spec_data(project *this_proj, int nspec)
initialize the glwin chemical species related pointers
Definition glview.c:1584
atom_search * allocate_atom_search(int proj, int action, int searchid, int tsize)
allocate atom search data structure
Definition atom_edit.c:392
char * box_p[2]
Definition edit_menu.c:72
void prepare_opengl_menu_bar(glwin *view)
update the OpenGL window menu bar
Definition glwindow.c:457
void allocatoms(project *this_proj)
allocate project data
Definition open_p.c:160
dint t_box[9]
Definition edit_menu.c:94
G_MODULE_EXPORT void update_vect(GtkEntry *entry, gpointer data)
update lattice vector component
Definition edit_menu.c:195
GtkWidget * create_action_combo(int id, project *this_proj)
create action combo box
GtkWidget * create_atoms_tree(atom_search *asearch, project *this_proj, int na)
create atom search tree view
Definition w_search.c:3584
void clean_all_trees(atom_search *asearch, project *this_proj)
clean all tree models in the 'model edition' window
G_MODULE_EXPORT gboolean to_update_box(GtkWidget *widg, GdkEventFocus *event, gpointer data)
void set_img_lights(project *this_proj, image *img)
initialize lightning for an image data structure
Definition glview.c:1249
int clean_xml_data(xmlDoc *doc, xmlTextReaderPtr reader)
free XML data
Definition w_library.c:322
gchar * hmsymbols[230]
Definition cbuild_sg.c:274
crystal_data * free_crystal_data(crystal_data *cryst)
free crystal data pointer
int insert_this_project_from_lib(int id, gboolean visible, project *this_proj, atom_search *asearch)
insert object from the library
Definition w_library.c:1156
gchar * replace_markup(char *init, char *key, char *rep)
replace pattern in string
Definition w_library.c:339
void to_insert_in_project(int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible)
to insert object in project
crystal_data * allocate_crystal_data(int objects, int species)
allocate crystal data pointer
G_MODULE_EXPORT void set_mode(GtkWidget *widg, gpointer data)
set mouse mode callback
Definition m_tools.c:172
void shift_it(vec3_t shift, int refresh, int proj)
shift atomic coordinates
Definition cell_shift.c:206
atom_search * insert_search
Definition popup.c:175
double get_value_from_pos(gchar *pos)
get position double value from string description
void image_init_spec_data(image *img, project *this_proj, int nsp)
initialize the chemical species related pointers in an image data structure
Definition glview.c:1187
space_group * read_sg_xml_file(const char *filetoread)
read space group data from XML file
Definition cbuild_sg.c:652
int * shift
Definition d_measures.c:72
dint rep
Definition dlp_edit.c:2239
gchar * filetoread
Global variable declarations Global convenience function declarations Global data structure defin...
project * proj
action
Definition glview.h:189
int objects[3]
Definition selection.c:212
vec3_t ** coord
Definition cbuild_edit.h:55
int * pos_by_object
Definition cbuild_edit.h:47
vec3_t * insert
Definition cbuild_edit.h:54
gboolean with_holes
Definition cbuild_edit.h:52
vec3_t ** position
Definition cbuild_edit.h:56
int ** at_type
Definition cbuild_edit.h:44
int * at_by_object
Definition cbuild_edit.h:46
gboolean shared_sites
Definition cbuild_edit.h:51
double * z
Definition cbuild_edit.h:42
gboolean * holes
Definition cbuild_edit.h:53
double * occupancy
Definition cbuild_edit.h:48
gboolean overlapping
Definition cbuild_edit.h:49
Definition global.h:91
Definition glwin.h:875
Definition glwin.h:277
GtkWidget * img
Definition workspace.c:70