atomes 1.1.14
atomes: an atomic scale modeling tool box
|
General callbacks
Functions to open and close files.
More...
#include "global.h"
#include "interface.h"
#include "callbacks.h"
#include "bind.h"
#include "project.h"
#include "workspace.h"
#include "glwindow.h"
#include "glview.h"
#include "atom_edit.h"
#include "cell_edit.h"
#include "readers.h"
Go to the source code of this file.
Functions | |
void | initcwidgets () |
initializing curve values | |
G_MODULE_EXPORT void | on_edit_activate (GtkWidget *widg, gpointer data) |
create an edition dialog - prepare the dialog | |
gchar * | substitute_string (gchar *init, gchar *o_motif, gchar *n_motif) |
substitute all patterns in string | |
int | open_cif_file (gchar *filename) |
int | open_coord_file (gchar *filename, int fti) |
open atomic coordinates file | |
int | open_history_file (gchar *filename) |
int | open_cell_file (int format, gchar *filename) |
open the file that contains the cell parameters | |
double | get_z_from_periodic_table (gchar *lab) |
get Z from atom label | |
void | quit_gtk () |
Leave the application. | |
G_MODULE_EXPORT void | on_close_workspace (GtkWidget *widg, gpointer data) |
close the active workspace | |
int | open_save (FILE *fp, int i, int pid, int aid, int npi, gchar *pfile) |
open or save project file | |
int | open_save_workspace (FILE *fp, int act) |
open or save the active workspace | |
void | open_this_proj (gpointer data, gpointer user_data) |
Open many projects, one at a time. | |
G_MODULE_EXPORT void | run_on_open_save_active (GtkDialog *info, gint response_id, gpointer data) |
open or save an atomes file - running the dialog | |
G_MODULE_EXPORT void | on_open_save_activate (GtkWidget *widg, gpointer data) |
open or save an atomes file - prepare the dialog | |
G_MODULE_EXPORT void | on_save_as_activate (GtkWidget *widg, gpointer data) |
open or save, choosing a file name | |
void | run_project () |
send project data to Fortran90 | |
void | apply_project (gboolean showtools) |
get project ready for calculation and initialize the OpenGL window | |
void | open_this_isaacs_xml_file (gchar *profile, int ptoc, gboolean visible) |
open an ISAACS XML file | |
G_MODULE_EXPORT void | run_on_isaacs_port (GtkDialog *info, gint response_id, gpointer data) |
open or write ISAACS XML file - running the dialog | |
G_MODULE_EXPORT void | on_isaacs_port (GtkWidget *widg, gpointer data) |
open or write ISAACS XML file - prepare the dialog | |
void | to_read_pos () |
send atomic coordinates to Fortran90 | |
void | check_read_sa () |
reading CPMD/VASP trajectory, testing parameters to active the read capabilty | |
void | update_sa_info (int sid) |
reading CPMD/VASP trajectory, update chemical species info | |
G_MODULE_EXPORT void | update_sa (GtkEntry *res, gpointer data) |
reading CPMD/VASP trajectory, set the number of chemical species | |
G_MODULE_EXPORT void | changed_spec_combo (GtkComboBox *box, gpointer data) |
reading CPMD/VASP trajectory, change the active species | |
void | prepare_sp_box () |
eading CPMD/VASP trajectory, prepare the species combo box | |
G_MODULE_EXPORT void | update_at_sp (GtkEntry *res, gpointer data) |
reading CPMD/VASP trajectory, changing number of atomes or species | |
int | prep_chem_data () |
prepare chemical data to read CPMD/VASP file | |
G_MODULE_EXPORT void | run_to_read_trj_or_vas (GtkDialog *dialog, gint response_id, gpointer data) |
reading CPMD/VASP trajectory: run the dialog | |
int | to_read_trj_or_vas (int ff) |
reading CPMD/VASP trajectory - prepare the dialog | |
void | cell_data_from_pdb_ (float *a, float *b, float *c, float *alp, float *bet, float *gam) |
update cell parameters from the data in the PDB file | |
G_MODULE_EXPORT void | run_read_npt_data (GtkDialog *info, gint response_id, gpointer data) |
read NPT data associated with atomic coordinates: run the dialog GTK3 callback | |
int | read_npt_data () |
read NPT data associated with atomic coordinates: setup the dialog | |
int | open_coordinate_file (int id) |
try to open coordinate file, type is based of id | |
void | open_this_coordinate_file (int format, gchar *proj_name) |
open coordinate file format, if successful add to workspace | |
G_MODULE_EXPORT void | run_on_coord_port (GtkDialog *info, gint response_id, gpointer data) |
export or import atomic coordinates: run dialog | |
G_MODULE_EXPORT void | on_coord_port (GtkWidget *widg, gpointer data) |
export or import atomic coordinates: prepare dialog | |
Variables | |
char * | coord_files [NCFORMATS+1] |
char * | coord_files_ext [NCFORMATS+1] |
char ** | las |
const gchar * | dfi [2] |
gboolean | save = TRUE |
tint | osp |
gboolean | run_os |
GtkWidget * | read_box |
GtkWidget * | all_sp_box |
GtkWidget * | sa_lab [2] |
GtkWidget * | sa_entry [2] |
GtkWidget * | read_this |
int | read_spec |
int | reading_vas_trj |
int | npt_selection |
gchar * | npt_file |
GtkFileFilter * | filter [NCFORMATS+1] |
int | pactive |
General callbacks
Functions to open and close files.
Definition in file callbacks.c.
void apply_project | ( | gboolean | showtools | ) |
get project ready for calculation and initialize the OpenGL window
showtools |
Definition at line 665 of file callbacks.c.
void cell_data_from_pdb_ | ( | float * | a, |
float * | b, | ||
float * | c, | ||
float * | alp, | ||
float * | bet, | ||
float * | gam ) |
update cell parameters from the data in the PDB file
a | a |
b | b |
c | c |
alp | alpha |
bet | beta |
gam | gamma |
Definition at line 1167 of file callbacks.c.
G_MODULE_EXPORT void changed_spec_combo | ( | GtkComboBox * | box, |
gpointer | data ) |
reading CPMD/VASP trajectory, change the active species
box | the GtkComboBox sending the signal |
data | the associated data pointer |
Definition at line 975 of file callbacks.c.
void check_read_sa | ( | ) |
reading CPMD/VASP trajectory, testing parameters to active the read capabilty
Definition at line 881 of file callbacks.c.
|
extern |
G_MODULE_EXPORT void on_close_workspace | ( | GtkWidget * | widg, |
gpointer | data ) |
close the active workspace
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 133 of file callbacks.c.
G_MODULE_EXPORT void on_coord_port | ( | GtkWidget * | widg, |
gpointer | data ) |
export or import atomic coordinates: prepare dialog
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 1602 of file callbacks.c.
|
extern |
create an edition dialog - prepare the dialog
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 835 of file edit_menu.c.
G_MODULE_EXPORT void on_isaacs_port | ( | GtkWidget * | widg, |
gpointer | data ) |
open or write ISAACS XML file - prepare the dialog
widg | the GtkWidget sending the signal |
data | the associated data pointer (int *) open = 0, save = 1 |
Definition at line 776 of file callbacks.c.
G_MODULE_EXPORT void on_open_save_activate | ( | GtkWidget * | widg, |
gpointer | data ) |
open or save an atomes file - prepare the dialog
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 423 of file callbacks.c.
G_MODULE_EXPORT void on_save_as_activate | ( | GtkWidget * | widg, |
gpointer | data ) |
open or save, choosing a file name
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 621 of file callbacks.c.
|
extern |
open the file that contains the cell parameters
format | File format |
filename | File name |
Definition at line 232 of file read_npt.c.
|
extern |
|
extern |
open atomic coordinates file
filename | the file name |
fti | the type of coordinates |
Definition at line 248 of file read_coord.c.
int open_coordinate_file | ( | int | id | ) |
try to open coordinate file, type is based of id
id | file type to open |
Definition at line 1269 of file callbacks.c.
|
extern |
int open_save | ( | FILE * | fp, |
int | i, | ||
int | pid, | ||
int | aid, | ||
int | npi, | ||
gchar * | pfile ) |
open or save project file
fp | the file pointer |
i | 0 = read, 1 = write |
pid | the project id |
aid | the active project id |
npi | total number of projects |
pfile | the file name |
Definition at line 174 of file callbacks.c.
int open_save_workspace | ( | FILE * | fp, |
int | act ) |
open or save the active workspace
fp | the file to read or write |
act | the action (0 = read, 1 = write) |
Definition at line 234 of file callbacks.c.
void open_this_coordinate_file | ( | int | format, |
gchar * | proj_name ) |
open coordinate file format, if successful add to workspace
format | the format of the file that contains the atomic coordinates |
proj_name | the project name to use, if any |
Definition at line 1417 of file callbacks.c.
void open_this_isaacs_xml_file | ( | gchar * | profile, |
int | ptoc, | ||
gboolean | visible ) |
open an ISAACS XML file
profile | the XML file name |
ptoc | the previous active project |
visible | read from the command line (FALSE), from the gui (TRUE) |
Definition at line 685 of file callbacks.c.
void open_this_proj | ( | gpointer | data, |
gpointer | user_data ) |
Open many projects, one at a time.
data | |
user_data |
Definition at line 301 of file callbacks.c.
int prep_chem_data | ( | ) |
prepare chemical data to read CPMD/VASP file
Definition at line 1079 of file callbacks.c.
void prepare_sp_box | ( | ) |
eading CPMD/VASP trajectory, prepare the species combo box
Definition at line 985 of file callbacks.c.
void quit_gtk | ( | ) |
Leave the application.
Definition at line 119 of file callbacks.c.
int read_npt_data | ( | ) |
read NPT data associated with atomic coordinates: setup the dialog
Definition at line 1232 of file callbacks.c.
G_MODULE_EXPORT void run_on_coord_port | ( | GtkDialog * | info, |
gint | response_id, | ||
gpointer | data ) |
export or import atomic coordinates: run dialog
info | the GtkDialog sending the signal |
response_id | the response id |
data | the associated data pointer |
Definition at line 1499 of file callbacks.c.
G_MODULE_EXPORT void run_on_isaacs_port | ( | GtkDialog * | info, |
gint | response_id, | ||
gpointer | data ) |
open or write ISAACS XML file - running the dialog
info | the GtkDialog sending the signal |
response_id | the response id |
data | the associated data pointer |
Definition at line 729 of file callbacks.c.
G_MODULE_EXPORT void run_on_open_save_active | ( | GtkDialog * | info, |
gint | response_id, | ||
gpointer | data ) |
open or save an atomes file - running the dialog
info | the GtkDialog sending the signal |
response_id | the response id |
data | the associated data pointer |
Definition at line 338 of file callbacks.c.
void run_project | ( | ) |
send project data to Fortran90
Definition at line 633 of file callbacks.c.
G_MODULE_EXPORT void run_read_npt_data | ( | GtkDialog * | info, |
gint | response_id, | ||
gpointer | data ) |
read NPT data associated with atomic coordinates: run the dialog GTK3 callback
info | the GtkDialog sending the signal |
response_id | the response id |
data | the associated data pointer |
Definition at line 1207 of file callbacks.c.
G_MODULE_EXPORT void run_to_read_trj_or_vas | ( | GtkDialog * | dialog, |
gint | response_id, | ||
gpointer | data ) |
reading CPMD/VASP trajectory: run the dialog
dialog | the GtkDialog sending the signal |
response_id | the response id |
data | the associated data pointer |
Definition at line 1101 of file callbacks.c.
|
extern |
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.
void to_read_pos | ( | ) |
send atomic coordinates to Fortran90
Definition at line 832 of file callbacks.c.
int to_read_trj_or_vas | ( | int | ff | ) |
reading CPMD/VASP trajectory - prepare the dialog
ff | file type |
Definition at line 1130 of file callbacks.c.
G_MODULE_EXPORT void update_at_sp | ( | GtkEntry * | res, |
gpointer | data ) |
reading CPMD/VASP trajectory, changing number of atomes or species
res | the GtkEntry sending the signal |
data | the associated data pointer (int *) 0 = atomes, 1 = species |
Definition at line 1039 of file callbacks.c.
G_MODULE_EXPORT void update_sa | ( | GtkEntry * | res, |
gpointer | data ) |
reading CPMD/VASP trajectory, set the number of chemical species
res | the GtkEntry sending the signal |
data | the associated data pointer |
Definition at line 943 of file callbacks.c.
void update_sa_info | ( | int | sid | ) |
reading CPMD/VASP trajectory, update chemical species info
sid | the species id |
Definition at line 907 of file callbacks.c.
GtkWidget* all_sp_box |
Definition at line 870 of file callbacks.c.
char* coord_files[NCFORMATS+1] |
Definition at line 86 of file callbacks.c.
char* coord_files_ext[NCFORMATS+1] |
Definition at line 100 of file callbacks.c.
GtkFileFilter* filter[NCFORMATS+1] |
Definition at line 1406 of file callbacks.c.
char** las |
Definition at line 103 of file callbacks.c.
gchar* npt_file |
Definition at line 1182 of file callbacks.c.
int npt_selection |
Definition at line 1181 of file callbacks.c.
tint osp |
Definition at line 311 of file callbacks.c.
int pactive |
Definition at line 1407 of file callbacks.c.
GtkWidget* read_box |
Definition at line 869 of file callbacks.c.
int read_spec |
Definition at line 874 of file callbacks.c.
GtkWidget* read_this |
Definition at line 873 of file callbacks.c.
int reading_vas_trj |
Definition at line 1072 of file callbacks.c.
gboolean run_os |
Definition at line 312 of file callbacks.c.
GtkWidget* sa_entry[2] |
Definition at line 872 of file callbacks.c.
GtkWidget* sa_lab[2] |
Definition at line 871 of file callbacks.c.
gboolean save = TRUE |
Definition at line 160 of file callbacks.c.