100 new_mol -> multiplicity = old_mol -> multiplicity;
102 new_mol -> natoms = old_mol -> natoms;
103 new_mol -> nspec = old_mol -> nspec;
119 new_mol -> multiplicity = old_mol -> multiplicity;
121 new_mol -> natoms = old_mol -> natoms;
122 new_mol -> nspec = old_mol -> nspec;
125 if (old_mol -> natoms > 1)
128 if (old_mol -> natoms > 2)
133 if (old_mol ->
atoms)
137 new_mol -> nbonds = old_mol -> nbonds;
144 new_mol -> nangles = old_mol -> nangles;
176 active_project -> modelfc -> mol_by_step[* sid - 1] = * mol_in_step;
225 int i, j, k, l, m, n, o, p, q, r, s, t, u;
230 for (l=0; l < * nvs; l++)
240 for (l=0; l<*nvs-1; l++)
246 for (q= l+1; q<*nvs; q++)
252 tmp_mol -> pangles[p][k][u] ++;
253 tmp_mol -> pangles[u][k][p] ++;
275 if (j &&
mol -> natoms > 2)
282 m = (j+l)*((j+l)-1)/2;
302void send_mol_details_ (
int * stp,
int *
mol,
int * ats,
int * sps,
int spec_in_mol[* sps],
int atom_in_mol[* ats])
322 for (i=0; i< * ats; i++)
324 j = atom_in_mol[i]-1;
333 if (spec_in_mol[i] > 0) j++;
359 if (mol_a -> md != mol_b -> md)
return FALSE;
360 if (mol_a -> natoms != mol_b -> natoms)
return FALSE;
361 if (mol_a -> nspec != mol_b -> nspec)
return FALSE;
364 if (mol_a -> species[i] != mol_b -> species[i])
return FALSE;
367 if (mol_a -> nbonds != mol_b -> nbonds)
return FALSE;
368 if (mol_a -> nangles != mol_b -> nangles)
return FALSE;
374 if (mol_a -> lgeo[i][j] != mol_b -> lgeo[i][j])
return FALSE;
378 if (mol_a -> nbonds > 1)
384 if (mol_a -> pbonds[i][j] != mol_b -> pbonds[i][j])
return FALSE;
387 if (mol_a -> nangles > 1)
395 if (mol_a -> pangles[i][j][k] != mol_b -> pangles[i][j][k])
return FALSE;
414int *
merge_mol_data (
int val_a,
int val_b,
int table_a[val_a],
int table_b[val_b])
419 for (i=0; i<val_a; i++)
421 p_data[i] = table_a[i];
423 for (i=0; i<val_b; i++)
425 p_data[val_a+i] = table_b[i];
442 g_free (smol ->
atoms);
443 smol ->
atoms = NULL;
449 if (smol -> pbonds[i])
451 g_free (smol -> pbonds[i]);
452 smol -> pbonds[i] = NULL;
455 g_free (smol -> pbonds);
456 smol -> pbonds = NULL;
462 if (smol -> pangles[i])
466 if (smol -> pangles[i][j])
468 g_free (smol -> pangles[i][j]);
469 smol -> pangles[i][j] = NULL;
472 g_free (smol -> pangles[i]);
473 smol -> pangles[i] = NULL;
476 g_free (smol -> pangles);
477 smol -> pangles = NULL;
485 g_free (smol -> lgeo[i]);
486 smol -> lgeo[i] = NULL;
489 g_free (smol -> lgeo);
492 g_free (smol -> species);
493 smol -> species = NULL;
494 g_free (smol -> fragments);
495 smol -> fragments = NULL;
507 int i, j, k, l, m, n;
519 mtmp_at = (first_mol) ? first_mol : NULL;
524 tmp_data =
merge_mol_data (mtmp_at -> multiplicity, mtmp_bt -> multiplicity, mtmp_at -> fragments, mtmp_bt -> fragments);
525 g_free (mtmp_at -> fragments);
526 mtmp_at -> fragments = NULL;
530 g_free (mtmp_at ->
atoms);
531 mtmp_at ->
atoms = NULL;
532 mtmp_at ->
atoms =
duplicate_int (mtmp_at -> natoms*mtmp_at -> multiplicity+mtmp_bt -> natoms*mtmp_bt -> multiplicity,
tmp_data);
534 mtmp_at -> multiplicity ++;
538 mtmp_at = mtmp_at -> next;
545 while (mtmp_at -> next) mtmp_at = mtmp_at -> next;
547 mtmp_at -> next -> prev = mtmp_at;
Binding to the Fortran90 subroutines.
Structure definitions for color management Function declarations for color management.
int * duplicate_int(int num, int *old_val)
copy a list of int
int ** allocdint(int xal, int yal)
allocate an int ** pointer
int *** alloctint(int xal, int yal, int zal)
allocate an int *** pointer
int * allocint(int val)
allocate an int * pointer
Global variable declarations Global convenience function declarations Global data structure defin...
coord_info * active_coord
Function declarations for the creation of the OpenGL window.
void init_menu_fragmol_(int *id)
getting fragment(s)/molecule(s) data from Fortran90, and related GTK3 menu elements creation
Function declarations to handle the atomic coordination data.
void setup_molecules_(int *stepid)
setup molecule data
void allocate_mol_data_()
allocate data to store molecule information
void free_search_molecule_data(search_molecule *smol)
free search molecule data structure
void setup_menu_molecules_()
prepare the menu elements related to molecule(s)
int * merge_mol_data(int val_a, int val_b, int table_a[val_a], int table_b[val_b])
merge molecule a and molecule b data
gboolean are_identical_molecules(search_molecule *mol_a, search_molecule *mol_b)
test if 2 molecules are identicals
search_molecule ** in_calc_mol
void update_mol_details(search_molecule *mol, int sp, int cp)
update molecule information
void send_mol_details_(int *stp, int *mol, int *ats, int *sps, int spec_in_mol[*sps], int atom_in_mol[*ats])
overall molecule information from Fortran90
void send_mol_neighbors_(int *stp, int *mol, int *aid, int *nvs, int neigh[*nvs])
update molecule typology information from Fortran90
search_molecule * duplicate_search_molecule(search_molecule *old_mol)
create a copy of a search molecule data structure
void setup_fragments_(int *sid, int coord[active_project -> natomes])
search_molecule * tmp_search
void duplicate_molecule(molecule *new_mol, search_molecule *old_mol)
create a copy of a molecule data structure
void allocate_mol_for_step_(int *sid, int *mol_in_step)
allocate the data to store molecule information for a MD step
Messaging function declarations.