atomes 1.1.16
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
cbuild_action.c File Reference

Functions to build a crystal using space group, crystallographic position(s) and object(s) to insert. More...

#include "global.h"
#include "callbacks.h"
#include "interface.h"
#include "glview.h"
#include "bind.h"
#include "project.h"
#include "workspace.h"
#include "atom_edit.h"
#include "cbuild_edit.h"
#include "readers.h"
#include <ctype.h>
+ Include dependency graph for cbuild_action.c:

Go to the source code of this file.

Functions

int get_crystal_id (int spg)
 get the bravais lattice id from space group id
 
double get_val_from_setting (gchar *pos, gchar *sval)
 get value from space group setting
 
double get_value_from_pos (gchar *pos)
 get position double value from string description
 
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
 
double get_val_from_wyckoff (gchar *pos, gchar *wval)
 get point value from wyckoff position
 
void clean_this_proj (project *this_proj, gboolean newp)
 clean project and/or associated cell parameters
 
gboolean same_coords (float a, float b)
 test if values are similar, allowing a 0.0001 difference
 
gboolean are_equal_vectors (vec3_t u, vec3_t v)
 comparing atomic coordinates vectors
 
int pos_not_saved (vec3_t *all_pos, int num_pos, vec3_t pos)
 was this position already saved ?
 
space_groupduplicate_space_group (space_group *spg)
 duplicate space ground information
 
crystal_dataallocate_crystal_data (int objects, int species)
 allocate crystal data pointer
 
crystal_datafree_crystal_data (crystal_data *cryst)
 free crystal data pointer
 
gboolean pos_not_taken (int pos, int dim, int *tab)
 is this position already taken ?
 
gboolean adjust_object_occupancy (crystal_data *cryst, int occupying, int tot_cell)
 adjust the crystallograpĥic sites occupancy
 
int build_crystal (gboolean visible, project *this_proj, gboolean to_wrap, gboolean show_clones, cell_info *cell, GtkWidget *widg)
 build crystal
 

Variables

atomic_objectcif_object
 
gchar * tmp_pos = NULL
 

Detailed Description

Functions to build a crystal using space group, crystallographic position(s) and object(s) to insert.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file cbuild_action.c.

Function Documentation

◆ adjust_object_occupancy()

gboolean adjust_object_occupancy ( crystal_data * cryst,
int occupying,
int tot_cell )

adjust the crystallograpĥic sites occupancy

Parameters
crystthe crystal
occupyinghow to adjust occupancy: 0 = Random for the initial cell only, 1 = Random cell by cell, 2 = Completely random 3 = Successively 4 = Alternatively
tot_cellthe total number of cell to build

Definition at line 665 of file cbuild_action.c.

◆ allocate_crystal_data()

crystal_data * allocate_crystal_data ( int objects,
int species )

allocate crystal data pointer

Parameters
objectsthe number of object(s)
speciesthe number of chemical species

Definition at line 590 of file cbuild_action.c.

◆ are_equal_vectors()

gboolean are_equal_vectors ( vec3_t u,
vec3_t v )

comparing atomic coordinates vectors

Parameters
u1st vector
v2nd vector

Definition at line 530 of file cbuild_action.c.

◆ build_crystal()

int build_crystal ( gboolean visible,
project * this_proj,
gboolean to_wrap,
gboolean show_clones,
cell_info * cell,
GtkWidget * widg )

build crystal

Parameters
visibleis the crystal builder window visible ?
this_projthe target project
to_wrapwrap or not atomic coordinates in the unit cell
show_clonesshow / hide clone(s)
cellthe cell info that contains the crystal description
widgthe GtkWidget sending the signal

Definition at line 907 of file cbuild_action.c.

◆ clean_this_proj()

void clean_this_proj ( project * this_proj,
gboolean newp )

clean project and/or associated cell parameters

Parameters
this_projthe target project
newpis this a new project ?

Definition at line 485 of file cbuild_action.c.

◆ compute_lattice_properties()

void compute_lattice_properties ( cell_info * cell)

compute lattice parameters following cell description

Parameters
cellthe target cell description

Definition at line 193 of file cbuild_action.c.

◆ duplicate_space_group()

space_group * duplicate_space_group ( space_group * spg)

duplicate space ground information

Parameters
spgthe space group to duplicate

Definition at line 565 of file cbuild_action.c.

◆ free_crystal_data()

crystal_data * free_crystal_data ( crystal_data * cryst)

free crystal data pointer

Parameters
crystthe data pointer to free

Definition at line 617 of file cbuild_action.c.

◆ get_crystal_id()

int get_crystal_id ( int spg)
extern

get the bravais lattice id from space group id

Parameters
spgthe target space group id

Definition at line 127 of file cbuild_edit.c.

◆ get_origin()

void get_origin ( space_group * spg)

get space group origin matrices

Parameters
spgthe target space group

Definition at line 146 of file cbuild_action.c.

◆ get_val_from_setting()

double get_val_from_setting ( gchar * pos,
gchar * sval )

get value from space group setting

Parameters
posthe position "a", "b" or "c"
svalthe space group setting

Definition at line 82 of file cbuild_action.c.

◆ get_val_from_wyckoff()

double get_val_from_wyckoff ( gchar * pos,
gchar * wval )

get point value from wyckoff position

Parameters
pos"x", "y" or "z"
wvalwyckoff position vector

Definition at line 446 of file cbuild_action.c.

◆ get_value_from_pos()

double get_value_from_pos ( gchar * pos)

get position double value from string description

Parameters
posthe string description

Definition at line 121 of file cbuild_action.c.

◆ pos_not_saved()

int pos_not_saved ( vec3_t * all_pos,
int num_pos,
vec3_t pos )

was this position already saved ?

Parameters
all_posthe list of saved atomic coordinates
num_posthe number of saved atomic coordinates
posthe vector to test

Definition at line 548 of file cbuild_action.c.

◆ pos_not_taken()

gboolean pos_not_taken ( int pos,
int dim,
int * tab )

is this position already taken ?

Parameters
posposition id
dimnumber of position(s)
tabthe list of position(s)

Definition at line 644 of file cbuild_action.c.

◆ same_coords()

gboolean same_coords ( float a,
float b )

test if values are similar, allowing a 0.0001 difference

Parameters
a1st value
b2nd value

Definition at line 515 of file cbuild_action.c.

◆ test_lattice()

int test_lattice ( builder_edition * cbuilder,
cell_info * cif_cell )

test lattice parameters

Parameters
cbuilderthe builder edition with the lattice parameters
cif_cellthe cell information when testing CIF file

Definition at line 312 of file cbuild_action.c.

Variable Documentation

◆ cif_object

atomic_object* cif_object
extern

Definition at line 282 of file read_cif.c.

◆ tmp_pos

gchar* tmp_pos = NULL

Definition at line 72 of file cbuild_action.c.