atomes 1.2.1
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-2025 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;
50 gboolean overlapping;
51 int ** sites;
52 gboolean shared_sites;
53 gboolean with_holes;
54 gboolean * holes;
58};
59
60extern int clean_xml_data (xmlDoc * doc, xmlTextReaderPtr reader);
61extern xmlNodePtr findnode (xmlNodePtr startnode, char * nname);
62extern gchar * groups[230];
63extern gchar * hmsymbols[230];
64extern dint t_box[9];
65extern double tmp_box[2][3];
66extern double tmp_vect[3][3];
67extern char * vect_name[3];
68extern char * vect_comp[3];
69extern char * box_p[2];
70extern char * box_prop[2][3];
71extern gchar * cif_occupancies[3];
72extern gchar * cif_occ[3];
73extern gchar * cif_sites[2];
75extern gboolean crystal_low_warning;
76extern gboolean crystal_crowded;
77extern gboolean crystal_dist_chk;
78extern gboolean test_vol (double box[2][3], double vect[3][3]);
79extern G_MODULE_EXPORT void update_vect (GtkEntry * entry, gpointer data);
80extern G_MODULE_EXPORT void update_box (GtkEntry * entry, gpointer data);
81extern double get_value_from_pos (gchar * pos);
82extern double get_val_from_wyckoff (gchar * pos, gchar * wval);
83extern crystal_data * allocate_crystal_data (int objects, int species);
85#ifdef GTK4
86extern G_MODULE_EXPORT void to_update_box (GtkEditable * widg, gpointer data);
87extern G_MODULE_EXPORT void to_update_vect (GtkEditable * widg, gpointer data);
88#else
89extern G_MODULE_EXPORT gboolean to_update_box (GtkWidget * widg, GdkEventFocus * event, gpointer data);
90extern G_MODULE_EXPORT gboolean to_update_vect (GtkWidget * widg, GdkEventFocus * event, gpointer data);
91#endif
92extern int occupancy (double occ, int cif_occ);
93extern gchar * replace_markup (char * init, char * key, char * rep);
94extern gchar * substitute_string (gchar * init, gchar * o_motif, gchar * n_motif);
95extern space_group * read_sg_xml_file (const char * filetoread);
96extern GtkWidget * create_atoms_tree (atom_search * asearch, project * this_proj, int na);
97extern atom_search * allocate_atom_search (int proj, int action, int searchid, int tsize);
98extern GtkWidget * create_action_combo (int id, project * this_proj);
99extern void prepare_atom_edition (gpointer data, gboolean visible);
100extern void clean_all_trees (atom_search * asearch, project * this_proj);
101extern void prepare_opengl_menu_bar (glwin * view);
102extern void allocatoms (project * this_proj);
103extern chemical_data * alloc_chem_data (int spec);
104extern void setup_default_lights (project * this_proj, image * img);
105extern void setup_image_spec_data (project * this_proj, image * img);
106extern void glwin_init_spec_data (project * this_proj, int nspec);
107extern G_MODULE_EXPORT void set_mode (GtkWidget * widg, gpointer data);
108extern void shift_it (vec3_t shift, int refresh, int proj);
109extern G_MODULE_EXPORT void close_edit (GtkWidget * widg, gpointer data);
110extern int insert_this_project_from_lib (int id, gboolean visible, project * this_proj, atom_search * asearch);
111extern void to_insert_in_project (int stat, int orig, project * this_proj, atom_search * asearch, gboolean visible);
112#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
gboolean crystal_low_warning
gchar * cif_occ[3]
Definition interface.c:478
char * box_prop[2][3]
Definition edit_menu.c:74
char * vect_comp[3]
Definition edit_menu.c:83
G_MODULE_EXPORT void update_box(GtkEntry *entry, gpointer data)
update lattice parameters
Definition edit_menu.c:108
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:92
G_MODULE_EXPORT void close_edit(GtkWidget *widg, gpointer data)
G_MODULE_EXPORT gboolean to_update_vect(GtkWidget *widg, GdkEventFocus *event, gpointer data)
gboolean crystal_crowded
int occupancy(double occ, int cif_occ)
handle occupancy integer rouding
gboolean test_vol(double box[2][3], double vect[3][3])
is the cell properly described to use PBC ?
Definition edit_menu.c:487
void setup_default_lights(project *this_proj, image *img)
initialize lightning for an image data structure
Definition glview.c:1305
gchar * cif_sites[2]
Definition interface.c:481
char * vect_name[3]
Definition edit_menu.c:82
void prepare_atom_edition(gpointer data, gboolean visible)
prepare atom edition
Definition atom_edit.c:453
chemical_data * alloc_chem_data(int spec)
allocate chemistry data
Definition open_p.c:189
double tmp_box[2][3]
void glwin_init_spec_data(project *this_proj, int nspec)
initialize the glwin chemical species related pointers
Definition glview.c:1637
atom_search * allocate_atom_search(int proj, int action, int searchid, int tsize)
allocate atom search data structure
Definition atom_edit.c:386
char * box_p[2]
Definition edit_menu.c:73
void prepare_opengl_menu_bar(glwin *view)
update the OpenGL window menu bar
Definition glwindow.c:615
void allocatoms(project *this_proj)
allocate project data
Definition open_p.c:163
dint t_box[9]
Definition edit_menu.c:95
void setup_image_spec_data(project *this_proj, image *img)
initialize the chemical species related pointers in an image data structure
Definition glview.c:1264
G_MODULE_EXPORT void update_vect(GtkEntry *entry, gpointer data)
update lattice vector component
Definition edit_menu.c:188
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:3582
void clean_all_trees(atom_search *asearch, project *this_proj)
clean all tree models in the 'model edition' window
gboolean crystal_dist_chk
G_MODULE_EXPORT gboolean to_update_box(GtkWidget *widg, GdkEventFocus *event, gpointer data)
int clean_xml_data(xmlDoc *doc, xmlTextReaderPtr reader)
free XML data
Definition w_library.c:322
gchar * cif_occupancies[3]
Definition interface.c:460
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:1160
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
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:2227
gchar * filetoread
Global variable declarations Global convenience function declarations Global data structure defin...
project * proj
action
Definition glview.h:198
int objects[3]
Definition selection.c:212
Definition glwin.h:351
vec3_t ** coord
Definition cbuild_edit.h:56
int * pos_by_object
Definition cbuild_edit.h:47
vec3_t * insert
Definition cbuild_edit.h:55
gboolean with_holes
Definition cbuild_edit.h:53
vec3_t ** position
Definition cbuild_edit.h:57
int ** at_type
Definition cbuild_edit.h:44
int * at_by_object
Definition cbuild_edit.h:46
gboolean shared_sites
Definition cbuild_edit.h:52
double * z
Definition cbuild_edit.h:42
gboolean * holes
Definition cbuild_edit.h:54
double * occupancy
Definition cbuild_edit.h:48
gboolean overlapping
Definition cbuild_edit.h:50
Definition global.h:99
Definition glwin.h:965
Definition glwin.h:365
GtkWidget * img
Definition workspace.c:70