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;
127 if (old_mol ->
atoms)
138 new_mol -> nangles = old_mol -> nangles;
170 active_project -> modelfc -> mol_by_step[* sid - 1] = * mol_in_step;
219 int i, j, k, l, m, n, o, p, q, r, s, t, u;
224 for (l=0; l < * nvs; l++)
234 for (l=0; l<*nvs-1; l++)
240 for (q= l+1; q<*nvs; q++)
246 tmp_mol -> pangles[p][k][u] ++;
247 tmp_mol -> pangles[u][k][p] ++;
276 m = (j+l)*((j+l)-1)/2;
296void send_mol_details_ (
int * stp,
int *
mol,
int * ats,
int * sps,
int spec_in_mol[* sps],
int atom_in_mol[* ats])
310 for (i=0; i< * ats; i++)
312 j = atom_in_mol[i]-1;
321 if (spec_in_mol[i] > 0) j++;
347 if (mol_a -> md != mol_b -> md)
return FALSE;
348 if (mol_a -> natoms != mol_b -> natoms)
return FALSE;
349 if (mol_a -> nspec != mol_b -> nspec)
return FALSE;
352 if (mol_a -> species[i] != mol_b -> species[i])
return FALSE;
356 if (mol_a -> nangles != mol_b -> nangles)
return FALSE;
362 if (mol_a -> lgeo[i][j] != mol_b -> lgeo[i][j])
return FALSE;
372 if (mol_a -> pbonds[i][j] != mol_b -> pbonds[i][j])
return FALSE;
375 if (mol_a -> nangles > 1)
383 if (mol_a -> pangles[i][j][k] != mol_b -> pangles[i][j][k])
return FALSE;
402int *
merge_mol_data (
int val_a,
int val_b,
int table_a[val_a],
int table_b[val_b])
407 for (i=0; i<val_a; i++)
409 p_data[i] = table_a[i];
411 for (i=0; i<val_b; i++)
413 p_data[val_a+i] = table_b[i];
429 g_free (smol ->
atoms);
432 for (i=0; i<
active_coord -> totcoord[1]; i++) g_free (smol -> pbonds[i]);
433 g_free (smol -> pbonds);
439 for (j=0; j<
active_coord -> totcoord[1]; j++) g_free (smol -> pangles[i][j]);
440 g_free (smol -> pangles[i]);
442 g_free (smol -> pangles);
444 for (i=0; i<
active_project -> nspec; i++) g_free (smol -> lgeo[i]);
445 g_free (smol -> lgeo);
446 g_free (smol -> species);
447 g_free (smol -> fragments);
459 int i, j, k, l, m, n;
475 mtmp_at -> fragments =
merge_mol_data (mtmp_at -> multiplicity, mtmp_bt -> multiplicity,
476 mtmp_at -> fragments, mtmp_bt -> fragments);
477 mtmp_at ->
atoms =
merge_mol_data (mtmp_at -> natoms*mtmp_at -> multiplicity, mtmp_bt -> natoms*mtmp_bt -> multiplicity,
479 mtmp_at -> multiplicity ++;
483 mtmp_at = mtmp_at -> next;
490 while (mtmp_at -> next) mtmp_at = mtmp_at -> next;
492 mtmp_at -> next -> prev = mtmp_at;
Binding to the Fortran90 subroutines.
Structure definitions for color management Function declarations for color management.
int *** nbonds[NUM_STYLES][2]
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.