atomes 1.1.15
atomes: an atomic scale modeling tool box
|
Functions to create the molecular library
Functions to read the 'Simple chemical XML' files.
More...
#include "global.h"
#include "bind.h"
#include "interface.h"
#include "project.h"
#include "glview.h"
#include "glwindow.h"
#include <libxml/xmlreader.h>
Go to the source code of this file.
Macros | |
#define | FAMILY 26 |
Functions | |
gboolean | create_3d_model (int p, gboolean load) |
G_MODULE_EXPORT void | on_realize (GtkGLArea *area, gpointer data) |
xmlNodePtr | findnode (xmlNodePtr startnode, char *nname) |
find XML node | |
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) | |
void | to_insert_in_project (int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible) |
to insert object in project | |
void | create_object_from_library (int p) |
create object using the molecular library | |
double | get_z_from_periodic_table (gchar *lab) |
get Z from atom label | |
int | clean_xml_data (xmlDoc *doc, xmlTextReaderPtr reader) |
free XML 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 | |
gchar * | check_xml_string (gchar *init) |
check for, and correct tags in XML string | |
int | sml_preview (const char *filetoread) |
retrieve preview information from 'Simple chemical library XML' file | |
gchar * | open_sml_file (const char *filetoread, int fam) |
open 'Simple chemical library XML' file | |
int | get_family (gchar *str) |
get molecular family id | |
void | sort_files (int num_f) |
sort file(s) by molecular family and name | |
int | get_sml_files () |
get the library 'Simple chemical library XML' files | |
void | fill_molecule_tree (GtkListStore *store) |
fill molecule list store | |
void | fill_family_tree (GtkListStore *store) |
fill molecular family list store | |
void | insert_preview () |
insert preview in library window and visualize | |
void | prepare_preview (int active, int id, gboolean visible) |
prepare library molecule preview | |
G_MODULE_EXPORT void | select_library_data (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer data) |
select library element callback | |
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 | |
GtkWidget * | library_tree (GtkListStore *store, int id, gchar *name) |
create library tree store widget | |
G_MODULE_EXPORT void | run_select_from_library (GtkDialog *lib, gint response_id, gpointer data) |
select from library - running the dialog | |
int | select_from_library (gboolean visible, project *this_proj, atom_search *asearch) |
select object to insert from the library | |
int | insert_this_project_from_lib (int id, gboolean visible, project *this_proj, atom_search *asearch) |
insert object from the library | |
Variables | |
element_data | periodic_table_info [] |
insertion_menu | mol [] |
gchar * | family_list [FAMILY] |
gchar * | family_dir [FAMILY] |
atom_search * | remove_search |
GtkListStore * | family_store |
GtkTreeIter | first_family_iter |
GtkListStore * | molecule_store |
GtkTreeIter | first_mol_iter |
GtkTreeSelection * | libselect [2] |
int | the_family |
gchar * | the_molecule |
gchar ** | sml_file_name |
gchar ** | mol_name |
GtkWidget * | lib_preview_box = NULL |
GtkWidget * | lib_preview_plot = NULL |
project * | lib_proj = NULL |
gchar * | other_name [5] |
int | o_names |
int | inserted_from_lib |
gboolean | lib_res |
gboolean | lib_visible |
Functions to create the molecular library
Functions to read the 'Simple chemical XML' files.
Definition in file w_library.c.
#define FAMILY 26 |
Definition at line 214 of file w_library.c.
|
extern |
apply atom edition action to project (motion, remove, replace, insert, random move)
this_proj | the target project |
asearch | the target atom search |
visible | is the 'model edition' window visible (1/0) |
Definition at line 206 of file atom_action.c.
gchar * check_xml_string | ( | gchar * | init | ) |
check for, and correct tags in XML string
init | the XML string to check / correct |
Definition at line 393 of file w_library.c.
int clean_xml_data | ( | xmlDoc * | doc, |
xmlTextReaderPtr | reader ) |
free XML data
doc | the XML doc pointer to free |
reader | the XML reader to free |
Definition at line 322 of file w_library.c.
|
extern |
Definition at line 1384 of file glwindow.c.
|
extern |
create object using the molecular library
p | the project id of the library molecule in the workspace |
Definition at line 421 of file atom_object.c.
void fill_family_tree | ( | GtkListStore * | store | ) |
fill molecular family list store
store | the list store to fill |
Definition at line 803 of file w_library.c.
void fill_molecule_tree | ( | GtkListStore * | store | ) |
fill molecule list store
store | the list store to fill |
Definition at line 777 of file w_library.c.
|
extern |
find XML node
startnode | Starting node |
nname | Node name to find |
Definition at line 548 of file read_isaacs.c.
int get_family | ( | gchar * | str | ) |
get molecular family id
str | the moecular family |
Definition at line 607 of file w_library.c.
int get_sml_files | ( | ) |
get the library 'Simple chemical library XML' files
Definition at line 654 of file w_library.c.
double get_z_from_periodic_table | ( | gchar * | lab | ) |
void insert_preview | ( | ) |
insert preview in library window and visualize
Definition at line 827 of file w_library.c.
int insert_this_project_from_lib | ( | int | id, |
gboolean | visible, | ||
project * | this_proj, | ||
atom_search * | asearch ) |
insert object from the library
id | object id to insert |
visible | is the 'model edition window' visible |
this_proj | the target project |
asearch | the target atom search |
Definition at line 1158 of file w_library.c.
GtkWidget * library_tree | ( | GtkListStore * | store, |
int | id, | ||
gchar * | name ) |
create library tree store widget
store | the list store model to use |
id | selection id (0 = family, 1 = molecule) |
name | column label |
Definition at line 1013 of file w_library.c.
|
extern |
gchar * open_sml_file | ( | const char * | filetoread, |
int | fam ) |
open 'Simple chemical library XML' file
filetoread | the name of the file to open |
fam | the molecular family |
Definition at line 547 of file w_library.c.
void prepare_preview | ( | int | active, |
int | id, | ||
gboolean | visible ) |
prepare library molecule preview
active | active project id |
id | molecule id number |
visible | is the 'model edition' window visible |
Definition at line 910 of file w_library.c.
gchar * replace_markup | ( | char * | init, |
char * | key, | ||
char * | rep ) |
replace pattern in string
init | the string |
key | the pattern to replace |
rep | the new pattern |
Definition at line 339 of file w_library.c.
G_MODULE_EXPORT void run_select_from_library | ( | GtkDialog * | lib, |
gint | response_id, | ||
gpointer | data ) |
select from library - running the dialog
lib | the GtkDialog sending the signal |
response_id | the response id |
data | the associated data pointer |
Definition at line 1045 of file w_library.c.
int select_from_library | ( | gboolean | visible, |
project * | this_proj, | ||
atom_search * | asearch ) |
select object to insert from the library
visible | is the 'model edition' window visible |
this_proj | the target project |
asearch | the target atom search |
Definition at line 1102 of file w_library.c.
G_MODULE_EXPORT void select_library_data | ( | GtkTreeView * | tree_view, |
GtkTreePath * | path, | ||
GtkTreeViewColumn * | column, | ||
gpointer | data ) |
select library element callback
tree_view | the GtkTreeView sending the signal |
path | the path in the tree view |
column | the column in the tree view |
data | the associated data pointer |
Definition at line 958 of file w_library.c.
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
col | the target GtkTreeViewColumn |
renderer | the target cell renderer |
mod | the target tree model |
iter | the target tree iter |
data | the associated data pointer |
Definition at line 996 of file w_library.c.
int sml_preview | ( | const char * | filetoread | ) |
retrieve preview information from 'Simple chemical library XML' file
filetoread | the name of the file to read |
Definition at line 412 of file w_library.c.
void sort_files | ( | int | num_f | ) |
sort file(s) by molecular family and name
num_f | number of file(s) to sort |
Definition at line 624 of file w_library.c.
gchar * substitute_string | ( | gchar * | init, |
gchar * | o_motif, | ||
gchar * | n_motif ) |
substitute all patterns in string
init | the initial string |
o_motif | the pattern to replace |
n_motif | the new pattern |
Definition at line 372 of file w_library.c.
|
extern |
to insert object in project
stat | in enum object_types |
orig | - (fragmol id/species id +1), -1, or, orgin atom id |
this_proj | the target project |
asearch | the target atom search |
visible | is the model edition window visible ? |
Definition at line 1214 of file atom_object.c.
gchar* family_dir[FAMILY] |
Definition at line 242 of file w_library.c.
gchar* family_list[FAMILY] |
Definition at line 215 of file w_library.c.
GtkListStore* family_store |
Definition at line 281 of file w_library.c.
GtkTreeIter first_family_iter |
Definition at line 282 of file w_library.c.
GtkTreeIter first_mol_iter |
Definition at line 284 of file w_library.c.
int inserted_from_lib |
Definition at line 295 of file w_library.c.
GtkWidget* lib_preview_box = NULL |
Definition at line 290 of file w_library.c.
GtkWidget* lib_preview_plot = NULL |
Definition at line 291 of file w_library.c.
project* lib_proj = NULL |
Definition at line 292 of file w_library.c.
gboolean lib_res |
Definition at line 1033 of file w_library.c.
gboolean lib_visible |
Definition at line 1034 of file w_library.c.
GtkTreeSelection* libselect[2] |
Definition at line 285 of file w_library.c.
insertion_menu mol[] |
Definition at line 193 of file w_library.c.
gchar** mol_name |
Definition at line 289 of file w_library.c.
GtkListStore* molecule_store |
Definition at line 283 of file w_library.c.
int o_names |
Definition at line 294 of file w_library.c.
gchar* other_name[5] |
Definition at line 293 of file w_library.c.
element_data periodic_table_info[] |
Definition at line 71 of file w_library.c.
|
extern |
gchar** sml_file_name |
Definition at line 288 of file w_library.c.
int the_family |
Definition at line 286 of file w_library.c.
gchar* the_molecule |
Definition at line 287 of file w_library.c.