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

Functions to create atomic objects. More...

#include "atom_edit.h"
+ Include dependency graph for atom_object.c:

Go to the source code of this file.

Functions

double get_object_dim (atomic_object *object)
 get estimate of an object dimension
 
void correct_pos_and_get_dim (atomic_object *object, gboolean adjust)
 get the barycenter of the atomic coordinates of an object
 
gboolean rebuild_atom_neighbors (project *this_proj, int step, atomic_object *object, int target, int aid, atom *at, gboolean *checked_at)
 rebuild target atom id coordinates using PBC
 
void reconstruct_bonds (project *this_proj, int ifcl, int *bcid)
 reconstruct the project bond(s)/clone(s) lists after reconstruction using PBC
 
void reconstruct_coordinates_for_object (project *this_proj, atomic_object *this_object, gboolean upcoord)
 reconstruct object atomic coordinates using PBC
 
void correct_coordinates_for_object (project *this_proj, atomic_object *this_object, gboolean upcoord)
 correct the atomic coordinates for 'this_object'
 
tint ulam_coord (glwin *view)
 shift insertion position for object not to have overlapping objects for multiple/repeated insertions
 
atomic_objectduplicate_atomic_object (atomic_object *old_obj)
 duplicate an insert object
 
void create_object_from_library (int p)
 create object using the molecular library
 
int in_object_bond_list (atomic_object *object, int aid, int bid)
 is there a bond between atom aid and atom bid ?
 
void clean_object_vois (project *this_proj, atomic_object *object, int *new_id, gboolean movtion)
 clean the object neigbours list
 
void clean_object_bonds (project *proj, int o_step, atomic_object *object, int *new_id, gboolean movtion)
 create the object bond list, and adjust the bond's atom id
 
void add_object_atoms (atomic_object *this_object, project *this_proj, int o_step, int numa, int *old_id, gboolean check_bonding, atom_search *remove)
 add atom list to insert object
 
int * duplicate_z (int species, double *old_z)
 duplicate z table when creating an object, integer is preferred to avoid comparison errors during action
 
atomic_objectcreate_object_from_species (project *this_proj, int sid, atom_search *remove)
 create object from all atom(s) of the same chemical species
 
atomic_objectcreate_object_from_selection (project *this_proj)
 create object from atom selection
 
atomic_objectcreate_object_from_atom_coordination (project *this_proj, int coord, int aid, atom_search *remove)
 create object from an atom and its nearest neighbors
 
atomic_objectcreate_object_from_overall_coordination (project *this_proj, int coord, int aid, atom_search *remove)
 create object from all the atom(s) that have the same exact coordination than the target atom
 
atomic_objectcreate_object_from_frag_mol (project *this_proj, int coord, int geo, atom_search *remove)
 create object from a fragment or a molecule
 
void adjust_object_frag_coord (atomic_object *object)
 adjust object number of fragment(s)
 
int create_object_from_open_project (project *this_proj, int p)
 create object from atom(s) of a project opened in the workspace
 
void clean_this_object (int orig, int act, project *this_proj, atom_search *asearch)
 clean object data
 
void to_insert_in_project (int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible)
 to insert object in project
 

Variables

atomic_objectcif_object
 
int being_copied
 
atomic_objectlib_object
 

Detailed Description

Functions to create atomic objects.

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 atom_object.c.

Function Documentation

◆ add_object_atoms()

void add_object_atoms ( atomic_object * this_object,
project * this_proj,
int o_step,
int numa,
int * old_id,
gboolean alloc_new_id,
atom_search * remove )

add atom list to insert object

Parameters
this_objectthe target insert object
this_projthe target project
o_stepthe MD step
numanumber of atom(s)
old_idlist of atom's old id in the project 'this_proj'
alloc_new_idcheck_bonding check bonding ? (partial copy or not)
removeremove search, if any

Definition at line 621 of file atom_object.c.

◆ adjust_object_frag_coord()

void adjust_object_frag_coord ( atomic_object * object)

adjust object number of fragment(s)

Parameters
objectthe target insert object

Definition at line 973 of file atom_object.c.

◆ clean_object_bonds()

void clean_object_bonds ( project * proj,
int o_step,
atomic_object * object,
int * new_id,
gboolean movtion )

create the object bond list, and adjust the bond's atom id

Parameters
projthe target project
o_stepthe MD step
objectthe target insert object
new_idlist of atom's old id in the project 'this_proj'
movtionreconstruction of atomic coordinates using PBC ?

Definition at line 542 of file atom_object.c.

◆ clean_object_vois()

void clean_object_vois ( project * this_proj,
atomic_object * object,
int * new_id,
gboolean movtion )

clean the object neigbours list

Parameters
this_projthe target project
objectthe target insert object
new_idlist of atom's old id in the project 'this_proj'
movtionreconstruction of atomic coordinates using PBC ?

Definition at line 487 of file atom_object.c.

◆ clean_this_object()

void clean_this_object ( int orig,
int act,
project * this_proj,
atom_search * asearch )

clean object data

Parameters
orig- (fragmol id/species id +1), -1, or, orgin atom id
actaction in enum 'actions'
this_projthe target project
asearchthe target atom search

Definition at line 1102 of file atom_object.c.

◆ correct_coordinates_for_object()

void correct_coordinates_for_object ( project * this_proj,
atomic_object * this_object,
gboolean upcoord )

correct the atomic coordinates for 'this_object'

Parameters
this_projthe target project
this_objectthe target insert object
upcoordreconstruction of atomic coordinates using PBC ?

Definition at line 325 of file atom_object.c.

◆ correct_pos_and_get_dim()

void correct_pos_and_get_dim ( atomic_object * object,
gboolean adjust )

get the barycenter of the atomic coordinates of an object

Parameters
objectthe target insert object
adjustcenter object coordinates or not

Definition at line 104 of file atom_object.c.

◆ create_object_from_atom_coordination()

atomic_object * create_object_from_atom_coordination ( project * this_proj,
int coord,
int aid,
atom_search * remove )

create object from an atom and its nearest neighbors

Parameters
this_projthe target project
coord0 = total coordination, 1 = partial coordination
aidthe atom id
removeremove search, if any

Definition at line 777 of file atom_object.c.

◆ create_object_from_frag_mol()

atomic_object * create_object_from_frag_mol ( project * this_proj,
int coord,
int geo,
atom_search * remove )

create object from a fragment or a molecule

Parameters
this_projthe target project
coord2 = fragment, 3 = molecule
geofragment or molecule id
removeremove search, if any

Definition at line 928 of file atom_object.c.

◆ create_object_from_library()

void create_object_from_library ( int p)

create object using the molecular library

Parameters
pthe project id of the library molecule in the workspace

Definition at line 421 of file atom_object.c.

◆ create_object_from_open_project()

int create_object_from_open_project ( project * this_proj,
int p )

create object from atom(s) of a project opened in the workspace

Parameters
this_projthe target project
pthe project id of the project that contains the atom(s) to copy

Definition at line 1015 of file atom_object.c.

◆ create_object_from_overall_coordination()

atomic_object * create_object_from_overall_coordination ( project * this_proj,
int coord,
int aid,
atom_search * remove )

create object from all the atom(s) that have the same exact coordination than the target atom

Parameters
this_projthe target project
coord0 = total coordination, 1 = partial coordination
aidtarget atom id
removeremove search, if any

Definition at line 848 of file atom_object.c.

◆ create_object_from_selection()

atomic_object * create_object_from_selection ( project * this_proj)

create object from atom selection

Parameters
this_projthe target project

Definition at line 724 of file atom_object.c.

◆ create_object_from_species()

atomic_object * create_object_from_species ( project * this_proj,
int sid,
atom_search * remove )

create object from all atom(s) of the same chemical species

Parameters
this_projthe target project
sidthe species id
removeremove search, if any

Definition at line 683 of file atom_object.c.

◆ duplicate_atomic_object()

atomic_object * duplicate_atomic_object ( atomic_object * old_obj)

duplicate an insert object

Parameters
old_objthe insert object to duplicate

Definition at line 381 of file atom_object.c.

◆ duplicate_z()

int * duplicate_z ( int species,
double * old_z )

duplicate z table when creating an object, integer is preferred to avoid comparison errors during action

Parameters
speciesthe number of chemical species
old_zthe old z table to duplicate

Definition at line 663 of file atom_object.c.

◆ get_object_dim()

double get_object_dim ( atomic_object * object)

get estimate of an object dimension

Parameters
object

Definition at line 77 of file atom_object.c.

◆ in_object_bond_list()

int in_object_bond_list ( atomic_object * object,
int aid,
int bid )

is there a bond between atom aid and atom bid ?

Parameters
objectthe target insert object
aid1st atom id
bid2nd atom id

Definition at line 466 of file atom_object.c.

◆ rebuild_atom_neighbors()

gboolean rebuild_atom_neighbors ( project * this_proj,
int step,
atomic_object * object,
int target,
int aid,
atom * at,
gboolean * checked_at )

rebuild target atom id coordinates using PBC

Parameters
this_projthe target project
stepthe MD step
objectthe target insert object
targetthe target atom id to correct
aidthe atom id
atthe target atom
checked_atthe list of already checked/corrected atom coordinates id

Definition at line 141 of file atom_object.c.

◆ reconstruct_bonds()

void reconstruct_bonds ( project * this_proj,
int ifcl,
int * bcid )

reconstruct the project bond(s)/clone(s) lists after reconstruction using PBC

Parameters
this_projthe target project
ifclnumber of clone bond(s) removed
bcidthe removed clone bond(s) atoms id

Definition at line 180 of file atom_object.c.

◆ reconstruct_coordinates_for_object()

void reconstruct_coordinates_for_object ( project * this_proj,
atomic_object * this_object,
gboolean upcoord )

reconstruct object atomic coordinates using PBC

Parameters
this_objectthe target project
this_projthe target insert object
upcoordreconstruction of atomic coordinates using PBC ?

Definition at line 263 of file atom_object.c.

◆ to_insert_in_project()

void to_insert_in_project ( int stat,
int orig,
project * this_proj,
atom_search * asearch,
gboolean visible )

to insert object in project

Parameters
statin enum object_types
orig- (fragmol id/species id +1), -1, or, orgin atom id
this_projthe target project
asearchthe target atom search
visibleis the model edition window visible ?

Definition at line 1214 of file atom_object.c.

◆ ulam_coord()

tint ulam_coord ( glwin * view)

shift insertion position for object not to have overlapping objects for multiple/repeated insertions

Parameters
viewthe target glwin

Definition at line 354 of file atom_object.c.

Variable Documentation

◆ being_copied

int being_copied

Definition at line 371 of file atom_object.c.

◆ cif_object

atomic_object* cif_object
extern

Definition at line 282 of file read_cif.c.

◆ lib_object

atomic_object* lib_object

Definition at line 372 of file atom_object.c.