69#include <libxml/xmlreader.h>
72 {
"X",
"Unknown", 0, 0},
73 {
"H",
"Hydrogen", 1, 1.008},
74 {
"He",
"Helium", 2, 4.003},
75 {
"Li",
"Lithium", 3, 6.94},
76 {
"Be",
"Beryllium", 4, 9.012},
77 {
"B",
"Boron", 5, 10.81},
78 {
"C",
"Carbon", 6, 12.011},
79 {
"N",
"Nitrogen", 7, 14.007},
80 {
"O",
"Oxygen", 8, 15.999},
81 {
"F",
"Fluorine", 9, 18.998},
82 {
"Ne",
"Neon", 10, 20.18},
83 {
"Na",
"Sodium", 11, 22.99},
84 {
"Mg",
"Magnesium", 12, 24.305},
85 {
"Al",
"Aluminium", 13, 26.982},
86 {
"Si",
"Silicon", 14, 28.085},
87 {
"P",
"Phosphorus", 15, 30.974},
88 {
"S",
"Sulfur", 16, 32.06},
89 {
"Cl",
"Chlorine", 17, 35.45},
90 {
"Ar",
"Argon", 18, 39.948},
91 {
"K",
"Potassium", 19, 39.098},
92 {
"Ca",
"Calcium", 20, 40.078},
93 {
"Sc",
"Scandium", 21, 44.956},
94 {
"Ti",
"Titanium", 22, 47.867},
95 {
"V",
"Vanadium", 23, 50.942},
96 {
"Cr",
"Chromium", 24, 51.996},
97 {
"Mn",
"Manganese", 25, 54.938},
98 {
"Fe",
"Iron", 26, 55.845},
99 {
"Co",
"Cobalt", 27, 58.933},
100 {
"Ni",
"Nickel", 28, 58.693},
101 {
"Cu",
"Copper", 29, 63.546},
102 {
"Zn",
"Zinc", 30, 65.38},
103 {
"Ga",
"Gallium", 31, 69.723},
104 {
"Ge",
"Germanium", 32, 72.63},
105 {
"As",
"Arsenic", 33, 74.922},
106 {
"Se",
"Selenium", 34, 78.971},
107 {
"Br",
"Bromine", 35, 79.904},
108 {
"Kr",
"Krypton", 36, 83.798},
109 {
"Rb",
"Rubidium", 37, 85.468},
110 {
"Sr",
"Strontium", 38, 87.62},
111 {
"Y",
"Yttrium", 39, 88.906},
112 {
"Zr",
"Zirconium", 40, 91.224},
113 {
"Nb",
"Niobium", 41, 92.906},
114 {
"Mo",
"Molybdenum", 42, 95.95},
115 {
"Tc",
"Technetium", 43, 98},
116 {
"Ru",
"Ruthenium", 44, 101.07},
117 {
"Rh",
"Rhodium", 45, 102.906},
118 {
"Pd",
"Palladium", 46, 106.42},
119 {
"Ag",
"Silver", 47, 107.868},
120 {
"Cd",
"Cadmium", 48, 112.414},
121 {
"In",
"Indium", 49, 114.818},
122 {
"Sn",
"Tin", 50, 118.71},
123 {
"Sb",
"Antimony", 51, 121.76},
124 {
"Te",
"Tellurium", 52, 127.6},
125 {
"I",
"Iodine", 53, 126.904},
126 {
"Xe",
"Xenon", 54, 131.293},
127 {
"Cs",
"Caesium", 55, 132.905},
128 {
"Ba",
"Barium", 56, 137.327},
129 {
"La",
"Lanthanum", 57, 138.905},
130 {
"Ce",
"Cerium", 58, 140.116},
131 {
"Pr",
"Praseodymium", 59, 140.908},
132 {
"Nd",
"Neodymium", 60, 144.242},
133 {
"Pm",
"Promethium", 61, 145},
134 {
"Sm",
"Samarium", 62, 150.36},
135 {
"Eu",
"Europium", 63, 151.964},
136 {
"Gd",
"Gadolinium", 64, 157.25},
137 {
"Tb",
"Terbium", 65, 158.925},
138 {
"Dy",
"Dysprosium", 66, 162.5},
139 {
"Ho",
"Holmium", 67, 164.93},
140 {
"Er",
"Erbium", 68, 167.259},
141 {
"Tm",
"Thulium", 69, 168.934},
142 {
"Yb",
"Ytterbium", 70, 173.045},
143 {
"Lu",
"Lutetium", 71, 174.967},
144 {
"Hf",
"Hafnium", 72, 178.49},
145 {
"Ta",
"Tantalum", 73, 180.948},
146 {
"W",
"Tungsten", 74, 183.84},
147 {
"Re",
"Rhenium", 75, 186.207},
148 {
"Os",
"Osmium", 76, 190.23},
149 {
"Ir",
"Iridium", 77, 192.217},
150 {
"Pt",
"Platinum", 78, 195.084},
151 {
"Au",
"Gold", 79, 196.967},
152 {
"Hg",
"Mercury", 80, 200.592},
153 {
"Tl",
"Thallium", 81, 204.38},
154 {
"Pb",
"Lead", 82, 207.2},
155 {
"Bi",
"Bismuth", 83, 208.98},
156 {
"Po",
"Polonium", 84, 209},
157 {
"At",
"Astatine", 85, 210},
158 {
"Rn",
"Radon", 86, 222},
159 {
"Fr",
"Francium", 87, 223},
160 {
"Ra",
"Radium", 88, 226},
161 {
"Ac",
"Actinium", 89, 227},
162 {
"Th",
"Thorium", 90, 232.038},
163 {
"Pa",
"Protactinium", 91, 231.036},
164 {
"U",
"Uranium", 92, 238.029},
165 {
"Np",
"Neptunium", 93, 237},
166 {
"Pu",
"Plutonium", 94, 244},
167 {
"Am",
"Americium", 95, 243},
168 {
"Cm",
"Curium", 96, 247},
169 {
"Bk",
"Berkelium", 97, 247},
170 {
"Cf",
"Californium", 98, 251},
171 {
"Es",
"Einsteinium", 99, 252},
172 {
"Fm",
"Fermium", 100, 257},
173 {
"Md",
"Mendelevium", 101, 258},
174 {
"No",
"Nobelium", 102, 258},
175 {
"Lr",
"Lawrencium", 103, 262},
176 {
"Rf",
"Rutherfordium", 104, 267},
177 {
"Db",
"Dubnium", 105, 268},
178 {
"Sg",
"Seaborgium", 106, 269},
179 {
"Bh",
"Bohrium", 107, 270},
180 {
"Hs",
"Hassium", 108, 277},
181 {
"Mt",
"Meitnerium", 109, 278},
182 {
"Ds",
"Darmstadtium", 110, 281},
183 {
"Rg",
"Roentgenium", 111, 282},
184 {
"Cn",
"Copernicium", 112, 285},
185 {
"Nh",
"Nihonium", 113, 286},
186 {
"Fl",
"Flerovium", 114, 289},
187 {
"Mc",
"Moscovium", 115, 289},
188 {
"Lv",
"Livermorium", 116, 293},
189 {
"Ts",
"Tennessine", 117, 294},
190 {
"Og",
"Oganesson", 118, 294},
191 {
"D",
"Deuterium", 1, 2.014000}};
194 {
"Atom", NULL, -1, 0 },
201 { NULL,
"S", 16, 1 },
202 { NULL,
"Cl", 17, 1 },
203 { NULL,
"Other ...", -1, 1 },
204 {
"Library", NULL, -1, 0 },
205 { NULL,
"H<sub>2</sub>O", -1, 3 },
206 { NULL,
"CH<sub>4</sub>", -1, 5 },
207 { NULL,
"Toluene", -1, 15 },
208 { NULL,
"Cp", -1, 10 },
209 { NULL,
"C<sub>60</sub>", -1, 60},
210 { NULL,
"Ni-Phthalocyanine", -1, 57 },
211 { NULL,
"More ...", -1, -1 },
212 { NULL, NULL, -1, 0 }};
271extern void gtk_window_change_gdk_visual (GtkWidget * win);
275extern G_MODULE_EXPORT
void on_realize (GtkGLArea * area, gpointer data);
276extern xmlNodePtr
findnode (xmlNodePtr startnode,
char * nname);
307 for (i=0; i<120; i++)
325 xmlFreeTextReader(reader);
341 char * buffer = NULL;
343 int inilen = strlen(init);
344 int oldlen = strlen(key);
346 if (
rep) newlen = strlen(
rep);
349 if (!(p = strstr(init, key)))
return init;
350 buffer = g_malloc0((inilen+newlen-oldlen+1)*
sizeof*buffer);
352 strncpy (buffer + strlen(buffer), init, p - init);
355 sprintf (buffer + strlen(buffer),
"%s",
rep);
358 sprintf (buffer + strlen(buffer),
"%s", p + oldlen);
360 return g_strdup_printf (
"%s", buffer);
374 gchar * str_a, * str_b;
375 str_a = g_strdup_printf (
"%s",
replace_markup (init, o_motif, n_motif));
376 str_b = g_strdup_printf (
"%s", init);
377 while (g_strcmp0 (str_a, str_b))
379 str_b = g_strdup_printf (
"%s", str_a);
380 str_a = g_strdup_printf (
"%s",
replace_markup (str_a, o_motif, n_motif));
416 xmlTextReaderPtr reader;
417 xmlNodePtr racine, name_node, chem_node;
418 xmlNodePtr n_node, at_node, sp_node, coord_node;
419 xmlNodePtr spec_node, lab_node, lot_node, pbc_node;
426 reader = xmlReaderForFile(
filetoread, NULL, 0);
428 racine = xmlDocGetRootElement(doc);
430 name_node =
findnode (racine -> children,
"names");
432 n_node =
findnode (name_node -> children,
"library-name");
434 lib_proj -> name = g_strdup_printf (
"%s", (gchar *)xmlNodeGetContent(n_node));
436 n_node =
findnode (name_node -> children,
"iupac-name");
439 other_name[0] = g_strdup_printf (
"%s", (gchar *)xmlNodeGetContent(n_node));
441 n_node =
findnode (name_node -> children,
"other-names");
443 n_node = n_node -> children;
444 for (name_node = n_node; name_node &&
o_names < 5; name_node = name_node->next)
446 if (name_node -> type == XML_ELEMENT_NODE)
448 other_name[
o_names] = g_strdup_printf (
"%s", (gchar *)xmlNodeGetContent(name_node));
452 chem_node =
findnode(racine -> children,
"chemistry");
454 at_node =
findnode (chem_node -> children,
"atoms");
458 sp_node =
findnode (chem_node -> children,
"species");
460 spec_node = sp_node -> properties -> children;
465 lab_node = sp_node -> children;
470 lab_node =
findnode (lab_node,
"label");
473 xspec = lab_node -> properties;
477 lot_node = xspec -> children;
479 if (g_strcmp0 (
"num",(
char *)xspec -> name) == 0)
487 xspec = xspec -> next;
489 lab_node = lab_node -> next;
493 at_node =
findnode (racine -> children,
"coordinates");
495 coord_node = at_node -> children;
497 for (i=0; i<
lib_proj -> natomes; i++)
499 coord_node =
findnode (coord_node,
"atom");
501 xspec = coord_node -> properties;
505 lot_node = xspec -> children;
507 if (g_strcmp0 (
"x",(
char *)xspec -> name) == 0)
511 else if (g_strcmp0 (
"y",(
char *)xspec -> name) == 0)
515 else if (g_strcmp0 (
"z",(
char *)xspec -> name) == 0)
519 else if (g_strcmp0 (
"sp",(
char *)xspec -> name) == 0)
524 xspec = xspec -> next;
526 coord_node = coord_node -> next;
528 pbc_node =
findnode (racine -> children,
"lattice");
529 if (pbc_node != NULL)
534 xmlFreeTextReader(reader);
550 xmlTextReaderPtr reader;
551 const xmlChar sml[8]=
"scl-xml";
553 xmlNodePtr racine, node;
557 reader = xmlReaderForFile(
filetoread, NULL, 0);
565 if (doc == NULL)
return NULL;
566 racine = xmlDocGetRootElement(doc);
567 if (g_strcmp0 ((
char *)(racine -> name), (
char *)sml) != 0)
572 node = racine -> children;
574 cdata = xmlNodeGetContent(node);
575 if (g_strcmp0 ((gchar *)cdata,
family_list[fam]) != 0)
580 node =
findnode (racine -> children,
"names");
586 node =
findnode (node -> children,
"library-name");
592 cdata = xmlNodeGetContent(node);
594 xmlFreeTextReader(reader);
596 return (gchar *)cdata;
630 for(j=i+1;j<num_f;j++)
634 str = g_strdup_printf (
"%s",
mol_name[i]);
636 mol_name[j] = g_strdup_printf (
"%s", str);
663 HANDLE hFind = FindFirstFile (libwin32, & ffd);
664 if (hFind != INVALID_HANDLE_VALUE)
666 if (ffd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY)
668 str = g_strdup_printf (
"%s\\%s", libdir, (
char *)ffd.cFileName);
672 while (FindNextFile(hFind, &ffd) != 0)
674 if (ffd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY)
676 str = g_strdup_printf (
"%s\\%s", libdir, (
char *)ffd.cFileName);
690 while ((dir = readdir(
d)) != NULL)
692 if (dir -> d_type == DT_REG)
694 str = g_strdup_printf (
"%s/%s", libdir, dir -> d_name);
708 hFind = FindFirstFile (libwin32, & ffd);
709 if (hFind != INVALID_HANDLE_VALUE)
711 if (ffd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY)
713 str = g_strdup_printf (
"%s\\%s", libdir, (
char *)ffd.cFileName);
724 while (FindNextFile(hFind, &ffd) != 0)
726 if (ffd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY)
728 str = g_strdup_printf (
"%s\\%s", libdir, (
char *)ffd.cFileName);
743 d = opendir (libdir);
746 while ((dir = readdir(
d)) != NULL)
748 if (dir -> d_type == DT_REG)
750 str = g_strdup_printf (
"%s/%s", libdir, dir -> d_name);
779 GtkTreeIter mol_level;
790 gtk_list_store_append (store, & mol_level);
791 gtk_list_store_set (store, & mol_level, 0, -(i+1), 1,
mol_name[i], -1);
805 GtkTreeIter family_level;
816 gtk_list_store_append (store, & family_level);
817 gtk_list_store_set (store, & family_level, 0, i, 1,
family_list[i], -1);
832 GtkWidget * grid = gtk_grid_new ();
834 gtk_widget_set_size_request (grid, -1, 200);
835 gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
836 gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);
837 gtk_grid_set_row_spacing (GTK_GRID (grid), 1);
838 gtk_grid_set_column_spacing (GTK_GRID (grid), 1);
840 gtk_grid_attach (GTK_GRID (grid),
lib_proj -> modelgl ->
plot, 0, 0, 4, 4);
841 gtk_grid_attach (GTK_GRID (grid),
markup_label(
"<i>Formula:</i>", 100, -1, 0.0, 0.5), 5, 1, 3, 1);
855 str = g_strdup_printf (
"%s<sub>%d</sub>", str,
lib_proj ->
chemistry -> nsps[i]);
857 str = g_strdup_printf (
"%s</b>", str);
859 gtk_grid_attach (GTK_GRID (grid),
markup_label(str, 100, -1, 0.0, 0.5), 8, 1, 3, 1);
860 gtk_grid_attach (GTK_GRID (grid),
markup_label(
"<i>Molecular mass:</i>", 100, -1, 0.0, 0.5), 5, 2, 3, 1);
867 str = g_strdup_printf (
"<b>%.3f g/mol</b>", mass);
868 gtk_grid_attach (GTK_GRID (grid),
markup_label(str, 100, -1, 0.0, 0.5), 8, 2, 3, 1);
871 gtk_grid_attach (GTK_GRID (grid),
markup_label(
"<i>IUPAC name:</i>", 100, -1, 0.0, 0.5), 0, 5, 3, 1);
873 gtk_grid_attach (GTK_GRID (grid),
markup_label(str, 100, 30, 0.0, 0.5), 3, 5, 11, 1);
934 lib_proj -> modelgl -> anim -> last ->
img -> quality = 30;
940 gtk_widget_set_size_request (
lib_proj -> modelgl ->
plot, 150, 150);
958G_MODULE_EXPORT
void select_library_data (GtkTreeView * tree_view, GtkTreePath *
path, GtkTreeViewColumn * column, gpointer data)
961 GtkTreeModel *
model = gtk_tree_view_get_model(tree_view);
967 gtk_tree_model_get_value (
model, &
row, 1, & vbl);
968 int i = (int)g_value_get_int (&
val);
979 the_molecule = g_strdup_printf (
"%s", (
char *)g_value_get_string (& vbl));
996G_MODULE_EXPORT
void set_library_markup (GtkTreeViewColumn *
col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
999 gtk_tree_model_get (mod, iter, 1, & str, -1);
1000 g_object_set (renderer,
"markup", str, NULL, NULL);
1015 GtkWidget * scrol =
create_scroll (NULL, 150, 300, GTK_SHADOW_ETCHED_IN);
1016 GtkTreeViewColumn * datacol;
1017 GtkCellRenderer * datacel;
1018 GtkWidget * dataview = gtk_tree_view_new_with_model (GTK_TREE_MODEL(store));
1019 datacel = gtk_cell_renderer_text_new ();
1020 datacol = gtk_tree_view_column_new_with_attributes (name, datacel,
"text", 1, NULL);
1021 gtk_tree_view_column_set_cell_data_func (datacol, datacel,
set_library_markup, NULL, NULL);
1022 gtk_tree_view_append_column(GTK_TREE_VIEW(dataview), datacol);
1023 gtk_tree_view_column_set_alignment (datacol, 0.5);
1024 gtk_tree_view_set_activate_on_single_click (GTK_TREE_VIEW(dataview), TRUE);
1025 g_signal_connect (G_OBJECT(dataview),
"row-activated", G_CALLBACK(
select_library_data), NULL);
1026 g_object_unref (store);
1027 libselect[id] = gtk_tree_view_get_selection (GTK_TREE_VIEW(dataview));
1028 gtk_tree_selection_set_mode (
libselect[
id], GTK_SELECTION_SINGLE);
1047 gboolean done = FALSE;
1051 switch (response_id)
1053 case GTK_RESPONSE_APPLY:
1056 if (this_proj -> modelgl) this_proj -> modelgl -> other_status = 2;
1065 if (this_proj -> modelgl)
1067 vis = (this_proj -> modelgl -> atom_win) ? this_proj -> modelgl -> atom_win -> visible : FALSE;
1075 if (this_proj -> modelgl) this_proj -> modelgl -> nth_copy ++;
1082 if (this_proj -> modelgl)
1084 if (this_proj -> modelgl -> mode ==
EDITION) asearch -> todo[0] = 0;
1106 GtkWidget * lib =
dialogmodal (
"Library", GTK_WINDOW((this_proj -> modelgl) ? this_proj -> modelgl -> win :
MainWindow));
1116 gtk_dialog_add_button (GTK_DIALOG(lib), (asearch ->
action ==
REPLACE) ?
"Replace" :
"Insert", GTK_RESPONSE_APPLY);
1121 family_store = gtk_list_store_new (2, G_TYPE_INT, G_TYPE_STRING);
1124 molecule_store = gtk_list_store_new (2, G_TYPE_INT, G_TYPE_STRING);
1136 if (this_proj -> modelgl) this_proj -> modelgl -> nth_copy = 0;
1161 int family[6] = {0, 3, 9, 9, 15, 17};
1162 int molec[6] = {0, 8, 36, 21, 11, 0};
1168 if (this_proj -> modelgl) this_proj -> modelgl -> other_status = 2;
Binding to the Fortran90 subroutines.
double set_radius_(int *, int *)
integer(kind=c_int) function chemistry()
void close_project(project *to_close)
close a project
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
double string_to_double(gpointer string)
convert string to double
Global variable declarations Global convenience function declarations Global data structure defin...
void run_this_gtk_dialog(GtkWidget *dial, GCallback handler, gpointer data)
run a GTK (3 and 4) basic GtkDialog
GtkWidget * create_scroll(GtkWidget *box, int dimx, int dimy, int shadow)
create a scroll window
GtkWidget * dialogmodal(gchar *str, GtkWindow *parent)
Create a new dialog modal window.
chemical_data * active_chem
G_MODULE_EXPORT void on_calc_bonds_released(GtkWidget *widg, gpointer data)
compute bonding properties
GtkWidget * dialog_get_content_area(GtkWidget *widg)
prepare GtkWidget to insert content in a GtkDialog window
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
void add_box_child_start(int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the initial position.
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
void initcutoffs(chemical_data *chem, int species)
initialize bond cutoffs
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
void update(glwin *view)
update the rendering of the OpenGL window
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
Function declarations for the creation of the OpenGL window.
void init_project(gboolean alloc_box)
initialize a new project
Messaging function declarations.
void alloc_proj_data(project *this_proj, int cid)
allocate data
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void active_project_changed(int id)
change the active project
int action_atoms_from_project(project *this_proj, atom_search *asearch, gboolean visible)
apply atom edition action to project (motion, remove, replace, insert, random move)
GtkWidget * lib_preview_box
G_MODULE_EXPORT void on_realize(GtkGLArea *area, gpointer data)
gchar * check_xml_string(gchar *init)
check for, and correct tags in XML string
gchar * family_list[FAMILY]
GtkListStore * family_store
GtkListStore * molecule_store
xmlNodePtr findnode(xmlNodePtr startnode, char *nname)
find XML node
atom_search * remove_search
int get_sml_files()
get the library 'Simple chemical library XML' files
gchar * substitute_string(gchar *init, gchar *o_motif, gchar *n_motif)
substitute all patterns in string
double get_z_from_periodic_table(gchar *lab)
get Z from atom label
element_data periodic_table_info[]
void fill_molecule_tree(GtkListStore *store)
fill molecule list store
int get_family(gchar *str)
get molecular family id
G_MODULE_EXPORT void set_library_markup(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
set font markup in the molecular library tree store
void sort_files(int num_f)
sort file(s) by molecular family and name
int sml_preview(const char *filetoread)
retrieve preview information from 'Simple chemical library XML' file
GtkTreeIter first_family_iter
GtkTreeIter first_mol_iter
GtkTreeSelection * libselect[2]
void fill_family_tree(GtkListStore *store)
fill molecular family list store
void prepare_preview(int active, int id, gboolean visible)
prepare library molecule preview
void create_object_from_library(int p)
create object using the molecular library
GtkWidget * lib_preview_plot
gboolean create_3d_model(int p, gboolean load)
int clean_xml_data(xmlDoc *doc, xmlTextReaderPtr reader)
free XML data
GtkWidget * library_tree(GtkListStore *store, int id, gchar *name)
create library tree store widget
int insert_this_project_from_lib(int id, gboolean visible, project *this_proj, atom_search *asearch)
insert object from the library
gchar * replace_markup(char *init, char *key, char *rep)
replace pattern in string
void to_insert_in_project(int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible)
to insert object in project
void insert_preview()
insert preview in library window and visualize
G_MODULE_EXPORT void run_select_from_library(GtkDialog *lib, gint response_id, gpointer data)
select from library - running the dialog
gchar * family_dir[FAMILY]
gchar * open_sml_file(const char *filetoread, int fam)
open 'Simple chemical library XML' file
G_MODULE_EXPORT void select_library_data(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer data)
select library element callback
int select_from_library(gboolean visible, project *this_proj, atom_search *asearch)
select object to insert from the library