atomes 1.1.16
atomes: an atomic scale modeling tool box
|
Functions to read CIF files. More...
#include "global.h"
#include "bind.h"
#include "interface.h"
#include "project.h"
#include "atom_edit.h"
#include "cbuild_edit.h"
#include "readers.h"
#include <ctype.h>
Go to the source code of this file.
Functions | |
int | get_atom_id_from_periodic_table (atom_search *asearch) |
get atom Z from selection in the periodic table | |
double | get_z_from_periodic_table (gchar *lab) |
get Z from atom label | |
void | get_origin (space_group *spg) |
get space group origin matrices | |
void | compute_lattice_properties (cell_info *cell) |
compute lattice parameters following cell description | |
int | test_lattice (builder_edition *cbuilder, cell_info *cif_cell) |
test lattice parameters | |
int | read_space_group (builder_edition *cbuilder, int spg) |
read space group N°spg data from file | |
void | get_wyck_char (float val, int ax, int bx) |
convert wyckoff value to string | |
space_group * | duplicate_space_group (space_group *spg) |
duplicate space ground information | |
int | build_crystal (gboolean visible, project *this_proj, gboolean to_wrap, gboolean show_clones, cell_info *cell, GtkWidget *widg) |
build crystal | |
distance | distance_3d (cell_info *cell, int mdstep, atom *at, atom *bt) |
distance between atom a and b in 3D | |
void | sort (int dim, int *tab) |
sort, nim to max, a table by integer value | |
gchar * | get_cif_word (gchar *mot) |
get string from CIF file, EOL can be ugly | |
float | get_atom_coord (gchar *line, int mid) |
read atom coordinates from CIF file | |
gchar * | get_atom_label (gchar *line, int lid) |
read atom label from CIF file | |
int | get_atom_wyckoff (gchar *line, int wid) |
read Wyckoff position from CIF file | |
G_MODULE_EXPORT void | set_cif_to_insert (GtkComboBox *box, gpointer data) |
change the object to insert at an empty cif position | |
gboolean | get_missing_object_from_user () |
get missing atomic number in CIF file from the user | |
void | file_get_to_line (int line_id) |
reach line in CIF file | |
int | cif_get_value (gchar *kroot, gchar *keyw, int linec, int lstart, gchar **cif_word, gboolean rec_val, gboolean all_ligne, gboolean in_loop) |
read pattern in CIF file | |
int | cif_file_get_data_in_loop (int linec, int lid) |
get the number of "_" motifs in a line | |
int | cif_file_get_number_of_atoms (int linec, int lid, int nelem) |
get the number of atom(s) in a CIF file | |
void | check_for_to_lab (int ato, gchar *stlab) |
check atom label | |
gboolean | cif_file_get_atoms_data (int lin, int cid[8]) |
get atoms data from the CIF file | |
int | get_loop_line_id (int linec, int lid) |
reach a line in the CIF file | |
int | get_loop_line_for_key (gchar *key_a, gchar *key_b, int linec) |
search a string | |
gboolean | cif_get_atomic_coordinates (int linec) |
read the atomic coordinates from the CIF file | |
int | cif_file_get_number_of_positions (int linec, int lid) |
get the number of symmetry positions | |
gboolean | cif_get_symmetry_positions (int linec) |
read the symmetry positions from the CIF file | |
int | get_space_group_from_hm (gchar *hmk) |
retrieve space group using the HM Key | |
gchar * | get_string_from_origin (space_group *spg) |
get the space group origin from its name | |
int | get_setting_from_hm (gchar *hmk, int end) |
Getting the space group parameters using the HM Key. | |
int | group_info_from_hm_key (int spg, gchar *key_hm) |
get the space group information using the HM key from the CIF file | |
gboolean | cif_get_cell_data (int linec) |
get the cell data from the CIF file | |
int | cif_get_space_group (int linec) |
get the space group from the CIF file | |
int | open_cif_file (int linec) |
open CIF file | |
Variables | |
gchar * | wnpos [3] |
gchar * | tmp_pos |
FILE * | cifp |
char * | line_ptr |
int * | keylines = NULL |
int | cif_loop_id |
gchar * | cif_coord_opts [40][2] |
GtkWidget ** | img_cif |
atom_search * | cif_search = NULL |
atomic_object * | cif_object = NULL |
Functions to read CIF files.
Definition in file read_cif.c.
|
extern |
build crystal
visible | is the crystal builder window visible ? |
this_proj | the target project |
to_wrap | wrap or not atomic coordinates in the unit cell |
show_clones | show / hide clone(s) |
cell | the cell info that contains the crystal description |
widg | the GtkWidget sending the signal |
Definition at line 907 of file cbuild_action.c.
void check_for_to_lab | ( | int | ato, |
gchar * | stlab ) |
check atom label
ato | Atom id |
stlab | Label read in the CIF file |
Definition at line 685 of file read_cif.c.
gboolean cif_file_get_atoms_data | ( | int | lin, |
int | cid[8] ) |
get atoms data from the CIF file
lin | Line to reach |
cid | positions on the line for the data to read |
Definition at line 735 of file read_cif.c.
int cif_file_get_data_in_loop | ( | int | linec, |
int | lid ) |
get the number of "_" motifs in a line
linec | Total number of lines |
lid | Line to reach |
Definition at line 562 of file read_cif.c.
int cif_file_get_number_of_atoms | ( | int | linec, |
int | lid, | ||
int | nelem ) |
get the number of atom(s) in a CIF file
linec | Total number of lines |
lid | Line to reach |
nelem | Number of element(s) the line |
Definition at line 623 of file read_cif.c.
int cif_file_get_number_of_positions | ( | int | linec, |
int | lid ) |
get the number of symmetry positions
linec | Total number of lines |
lid | Line to reach |
Definition at line 1085 of file read_cif.c.
gboolean cif_get_atomic_coordinates | ( | int | linec | ) |
read the atomic coordinates from the CIF file
linec | Total number of lines |
Definition at line 909 of file read_cif.c.
gboolean cif_get_cell_data | ( | int | linec | ) |
get the cell data from the CIF file
linec | Total number of lines |
Definition at line 1450 of file read_cif.c.
int cif_get_space_group | ( | int | linec | ) |
get the space group from the CIF file
linec | Total number of lines |
Definition at line 1495 of file read_cif.c.
gboolean cif_get_symmetry_positions | ( | int | linec | ) |
read the symmetry positions from the CIF file
linec | Total number of lines |
Definition at line 1167 of file read_cif.c.
int cif_get_value | ( | gchar * | kroot, |
gchar * | keyw, | ||
int | linec, | ||
int | lstart, | ||
gchar ** | cif_word, | ||
gboolean | rec_val, | ||
gboolean | all_ligne, | ||
gboolean | in_loop ) |
read pattern in CIF file
kroot | String root (first part) |
keyw | String root (first part) |
linec | Total number of lines |
lstart | Line to reach |
cif_word | pointer to store the data read |
rec_val | Record position on the line |
all_ligne | Browse all line (1/0) |
in_loop | More than one identical key string (1/0) |
Definition at line 407 of file read_cif.c.
|
extern |
compute lattice parameters following cell description
cell | the target cell description |
Definition at line 193 of file cbuild_action.c.
distance between atom a and b in 3D
cell | unit cell |
mdstep | the MD step |
at | atom a |
bt | atom b |
Definition at line 81 of file ogl_utils.c.
|
extern |
duplicate space ground information
spg | the space group to duplicate |
Definition at line 565 of file cbuild_action.c.
void file_get_to_line | ( | int | line_id | ) |
float get_atom_coord | ( | gchar * | line, |
int | mid ) |
read atom coordinates from CIF file
line | the string that contains the data |
mid | the position to reach on the line |
Definition at line 209 of file read_cif.c.
|
extern |
get atom Z from selection in the periodic table
asearch | target atom search, if any |
Definition at line 672 of file w_periodic.c.
gchar * get_atom_label | ( | gchar * | line, |
int | lid ) |
read atom label from CIF file
line | the string that contains the data |
lid | the position to reach on the line |
Definition at line 232 of file read_cif.c.
int get_atom_wyckoff | ( | gchar * | line, |
int | wid ) |
read Wyckoff position from CIF file
line | the string that contains the data |
wid | the position to reach on the line |
Definition at line 260 of file read_cif.c.
gchar * get_cif_word | ( | gchar * | mot | ) |
get string from CIF file, EOL can be ugly
mot | the string that was read in the file |
Definition at line 194 of file read_cif.c.
int get_loop_line_for_key | ( | gchar * | key_a, |
gchar * | key_b, | ||
int | linec ) |
search a string
key_a | String root (first part) |
key_b | String end (second part) |
linec | Total number of lines |
Definition at line 894 of file read_cif.c.
int get_loop_line_id | ( | int | linec, |
int | lid ) |
reach a line in the CIF file
linec | Total number of lines |
lid | Line to reach |
Definition at line 839 of file read_cif.c.
gboolean get_missing_object_from_user | ( | ) |
get missing atomic number in CIF file from the user
Definition at line 327 of file read_cif.c.
|
extern |
get space group origin matrices
spg | the target space group |
Definition at line 146 of file cbuild_action.c.
int get_setting_from_hm | ( | gchar * | hmk, |
int | end ) |
Getting the space group parameters using the HM Key.
hmk | the HM key |
end | Use origin (number of possible SP origins), or not (-1) |
Definition at line 1280 of file read_cif.c.
int get_space_group_from_hm | ( | gchar * | hmk | ) |
gchar * get_string_from_origin | ( | space_group * | spg | ) |
get the space group origin from its name
spg | Space group |
Definition at line 1250 of file read_cif.c.
|
extern |
convert wyckoff value to string
val | the target value |
ax | axis id, x = 0, y = 1, z = 2 |
bx | axis label 0 = "x", 1 = "y", 2 = "z" |
Definition at line 139 of file cbuild_info.c.
|
extern |
int group_info_from_hm_key | ( | int | spg, |
gchar * | key_hm ) |
get the space group information using the HM key from the CIF file
spg | Space group |
key_hm | HM key |
Definition at line 1368 of file read_cif.c.
int open_cif_file | ( | int | linec | ) |
|
extern |
read space group N°spg data from file
cbuilder | the target builder edition |
spg | the space group id |
Definition at line 771 of file cbuild_edit.c.
G_MODULE_EXPORT void set_cif_to_insert | ( | GtkComboBox * | box, |
gpointer | data ) |
change the object to insert at an empty cif position
box | the GtkComboBox sending the signal |
data | the associated data pointer |
Definition at line 292 of file read_cif.c.
|
extern |
|
extern |
test lattice parameters
cbuilder | the builder edition with the lattice parameters |
cif_cell | the cell information when testing CIF file |
Definition at line 312 of file cbuild_action.c.
gchar* cif_coord_opts[40][2] |
Definition at line 96 of file read_cif.c.
int cif_loop_id |
Definition at line 94 of file read_cif.c.
atomic_object* cif_object = NULL |
Definition at line 282 of file read_cif.c.
atom_search* cif_search = NULL |
Definition at line 281 of file read_cif.c.
FILE* cifp |
Definition at line 91 of file read_cif.c.
GtkWidget** img_cif |
Definition at line 280 of file read_cif.c.
int* keylines = NULL |
Definition at line 93 of file read_cif.c.
char* line_ptr |
Definition at line 92 of file read_cif.c.
|
extern |
Definition at line 72 of file cbuild_action.c.
|
extern |
Definition at line 74 of file cbuild_info.c.