65extern int build_crystal (gboolean visible,
project * this_proj,
int c_step, gboolean to_wrap, gboolean show_clones,
cell_info * cell, GtkWidget * widg);
66extern const gchar *
dfi[2];
127 g_print (
"Reading coordinates [%s]: %s = %d\n", type, sinf,
val);
145 str = g_strdup_printf (
"Wrong file format: error at step %d !\n"
146 "Wrong file format: record <b>%s</b> on line <b>%d</b> is corrupted !",
151 str = g_strdup_printf (
"Wrong file format: error at step %d, atom %d !\n"
152 "Wrong file format: record <b>%s</b> on line <b>%d</b> is corrupted !",
153 stp, ato,
mot, line+1);
176 gchar **
dummy = NULL;
193 gchar * str = g_strdup_printf (
"Use dummy atom(s) for unknown %s species ?",
this_word);
198 str = g_strdup_printf (
"Using dummy atom(s) for unknown %s species",
this_word);
205 str = g_strdup_printf (
"No dummy atom(s) for unknown %s species",
this_word);
285 int fsize =
status.st_size;
295 gchar * coord_content = g_malloc0(fsize*
sizeof*coord_content);
296 fread (coord_content, fsize, 1,
coordf);
299 for (j=0; j<fsize; j++)
if (coord_content[j] ==
'\n') linecount ++;
303 for (j=0; j<fsize; j++)
305 if (coord_content[j] ==
'\n')
307 coord_content[j] =
'\0';
316 gchar * buf = g_malloc0(
LINE_SIZE*
sizeof*buf);
330 tail -> next = g_malloc0 (
sizeof*
tail -> next);
331 if (fti == 9 || fti == 10)
333 tail -> next -> prev = g_malloc0 (
sizeof*
tail -> next -> prev);
338 tail -> line = g_strdup_printf (
"%s", buf);
364 else if (fti > 6 && fti < 9)
368 else if (fti > 8 && fti < 12)
416 add_reader_info (
"Error(s) trying to build crystal using the CIF file parameters !\n"
417 "This usually comes from: \n"
418 "\t - incorrect space group description\n"
419 "\t - incomplete space group description\n"
420 "\t - missing space group setting\n"
421 "\t - incorrect space group setting\n", 0);
427 add_reader_info (
"Error(s) trying to build crystal using the CIF file parameters !\n"
428 "Information lead to change(s) between each configuration\n", 0);
435 "This usually comes from: \n"
436 "\t - incorrect space group description\n"
437 "\t - incomplete space group description\n"
438 "\t - missing space group setting\n"
439 "\t - incorrect space group setting\n", 1);
442 add_reader_info (
"\nAnother model will be built using included symmetry positions\n", 1);
490 gchar * str = g_strdup_printf (
"For species %s, radius is equal to 0.0 !\n",
active_chem ->
label[i]);
Binding to the Fortran90 subroutines.
double set_radius_(int *, int *)
double set_neutron_(int *)
gchar * substitute_string(gchar *init, gchar *o_motif, gchar *n_motif)
substitute all patterns in string
Callback declarations for main window.
gboolean crystal_low_warning
gboolean crystal_dist_chk
Function declarations for the crystal builder.
integer(kind=c_int) function chemistry()
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
gchar ** duplicate_strings(int num, gchar **old_val)
copy a list of strings
gboolean cif_use_symmetry_positions
Global variable declarations Global convenience function declarations Global data structure defin...
element_data periodic_table_info[]
chemical_data * active_chem
char * coord_files_ext[NCFORMATS+1]
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
gboolean ask_yes_no(gchar *title, gchar *text, int type, GtkWidget *widg)
ask yes or no for something: prepare dialog
Messaging function declarations.
integer(kind=c_int) function lattice(totl, lid, vectors, vmod, angles, lat, cfrac, apbc)
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void active_project_changed(int id)
change the active project
int open_coord_file(gchar *filename, int fti)
open atomic coordinates file
int open_trj_file(int linec)
open CPMD file
void reader_info(gchar *type, gchar *sinf, int val)
display reader information
int open_c3d_file(int linec)
open C3D file
void add_reader_info(gchar *info, int mid)
append information message to the reader information
chemical_data * alloc_chem_data(int spec)
allocate chemistry data
int open_hist_file(int linec)
open DL-POLY history file
int build_crystal(gboolean visible, project *this_proj, int c_step, gboolean to_wrap, gboolean show_clones, cell_info *cell, GtkWidget *widg)
build crystal
void format_error(int stp, int ato, gchar *mot, int line)
Message to display an error message.
void allocatoms(project *this_proj)
allocate project data
int open_cif_file(int linec)
open CIF file
void check_for_species(double v, int ato)
Fill the species for each atom and the associated data.
int open_cif_configuration(int linec, int conf)
int set_v_dummy(gchar *this_word)
check if dummy is used for unknown species, if not then ask what to do
int open_xyz_file(int linec)
open XYZ file
int open_vas_file(int linec)
open VASP file
int open_pdb_file(int linec)
open PDB file
atomic_object * cif_object
gboolean append(atom_search *asearch, project *this_proj, int i, int j)
test if the atom 'i' of species 'j' must be added to the tree store or not