136 for (i=0; i<tmp_ft -> num; i++)
138 if (tmp_ft -> list[i] == at)
return i;
157 for (i=0; i< fat -> num; i++)
159 if (at == fat -> list[i])
return fat -> id;
180 for (i=0; i< fat -> num; i++)
182 if (at == fat -> list[i])
return fat -> list_id[i];
207 k = tmp_ft -> list[j];
208 if (k == at)
return i;
258 tmpatf =
mol -> first_atom;
262 if (tmpatf -> sp == ato -> sp) j ++;
263 tmpatf = tmpatf -> next;
273 str = g_strdup_printf (
"%s-%d-%d",
279 str = g_strdup_printf (
"%s-%d-%d",
306 int h, i, j, k, l, m, n;
308 ato = g_malloc0 (
sizeof*ato);
312 ato -> list =
allocint (ato -> num);
313 ato -> list_id =
allocint (ato -> num);
314 ato -> frozen_id =
allocbool (ato -> num);
328 ato -> list_id[h] = k;
329 ato -> frozen_id[h] = FALSE;
341 for (k=0; k <
tmp_proj -> natomes; k++)
348 ato -> frozen_id[h] = FALSE;
357 ato -> frozen_id[h] = FALSE;
368 if (h != ato -> num) g_debug (
"Something is wrong in with this field atom: id= %d, sp= %d, co= %d",
id, at, coo);
373 ato -> fid = (ato -> mass == 0.0) ? -1 :
tmp_field -> type;
374 ato -> afid = (ato -> mass == 0.0) ? -1 : 0;
397 shell = g_malloc0 (
sizeof*shell);
403 shell -> show = FALSE;
405 shell -> next = NULL;
406 shell -> prev = NULL;
422 cons = g_malloc0 (
sizeof*cons);
427 cons -> length = 0.0;
428 cons -> show = FALSE;
448 pmf = g_malloc0 (
sizeof*pmf);
457 pmf -> num[i] = num[i];
467 pmf -> list[i] = NULL;
468 pmf -> weight[i] = NULL;
490 rig = g_malloc0 (
sizeof*rig);
513 tet = g_malloc0 (
sizeof*tet);
538 prop = g_malloc0 (
sizeof*prop);
567 res = stru ->
id + 1;
570 if (stru -> aid[i] != aid[i])
578 res = -(stru ->
id + 1);
581 if (stru -> aid[i] != aid[j-1-i])
605 if (num == 0)
return TRUE;
628 if (
tmp_fstr -> aid[k-1-j] != aid[j])
652 else if (
tmp_fstr -> aid[3] != aid[3])
688 if (!
res)
return FALSE;
707 str = g_malloc0 (
sizeof*str);
710 if (st == 6 || st == 7)
744 nthbd = g_malloc0 (
sizeof*nthbd);
750 nthbd -> fpid[0] = nthbd -> fpid[1] = -1;
757 for (i=0; i<j; i++) nthbd -> na[i] = -1;
765 nthbd -> ma = g_malloc0 (j*
sizeof*nthbd -> ma);
768 nthbd ->
a = g_malloc0 (j*
sizeof*nthbd ->
a);
769 for (i=0; i < j; i++)
771 if (ma != NULL) nthbd -> ma[i] =
duplicate_int (na[i], ma[i]);
776 nthbd -> show = FALSE;
778 nthbd -> next = NULL;
779 nthbd -> prev = NULL;
793 nfext = g_malloc0 (
sizeof*nfext);
797 nfext -> use = FALSE;
798 nfext -> next = NULL;
799 nfext -> prev = NULL;
824 tmp_fat -> next -> prev = g_malloc0 (
sizeof*
tmp_fat -> next -> prev);
866 for (m=0; m <
tmp_proj -> natomes; m++)
894 if (at == bd[0] || at == bd[1])
915 for (i=0; i<ngb -> num; i++)
917 if (ngb -> vois[i] == at)
return TRUE;
933 for (i=0; i<ato.
numv; i++)
935 if (ato.
vois[i] == at)
return TRUE;
953 for (i=0; i < at -> num; i++)
967 if (at ->
id == bt ->
id) m /= 2;
985 if (
tmp_fmol -> first_struct[ids] == NULL)
1017 if ((at -> sp ==
a && bt -> sp ==
b) || (at -> sp ==
b && bt -> sp ==
a))
1034 tmp_fmol -> first_struct[0] = NULL;
1036 for (j=0; j<
tmp_proj -> nspec; j++)
1050 for (j=0; j<
tmp_proj -> nspec-1; j++)
1052 for (l=j+1; l<
tmp_proj -> nspec; l++)
1085 int i, j, k, l, m, n, o;
1088 for (i=0; i<at -> num; i++)
1111 if (o > 0)
val /= o;
1112 if (at ->
id == ct ->
id) o /= 2;
1149 tmp_fmol -> first_struct[2] = NULL;
1152 for (m=0; m <
tmp_fmol -> nstruct[0]; m++)
1163 if (tmp_fst -> next != NULL) tmp_fst = tmp_fst -> next;
1186 int i, j, k, l, m, n, o, p, q;
1189 for (i=0; i<at -> num; i++)
1205 if (p != j && p != l &&
tmp_proj ->
atoms[0][p].faid == dt ->
id)
1220 if (q > 0)
val /= q;
1221 if (at ->
id == dt ->
id && bt ->
id == ct ->
id) q /= 2;
1263 tmp_fmol -> first_struct[4] = NULL;
1266 for (n=0; n<
tmp_fmol -> nstruct[2]; n++)
1278 if (tmp_fst -> next != NULL) tmp_fst = tmp_fst -> next;
1302 int at,
int bt,
int ct,
int dt,
1303 int a,
int b,
int c,
int d)
1345 int i, j, k, l, m, n, p;
1346 int * atid, * matid;
1349 tmp_fmol -> first_struct[stru] = NULL;
1373 matid[0], matid[l+1], matid[m+1], matid[n+1],
1374 atid[0], atid[l+1], atid[m+1], atid[n+1]);
1376 matid[0], matid[l+1], matid[n+1], matid[m+1],
1377 atid[0], atid[l+1], atid[n+1], atid[m+1]);
1379 matid[0], matid[m+1], matid[n+1], matid[l+1],
1380 atid[0], atid[m+1], atid[n+1], atid[l+1]);
1388 matid[0], matid[1], matid[2], matid[3],
1389 atid[0], atid[1], atid[2], atid[3]);
1391 matid[0], matid[2], matid[1], matid[3],
1392 atid[0], atid[2], atid[1], atid[3]);
1394 matid[0], matid[3], matid[1], matid[2],
1395 atid[0], atid[3], atid[1], atid[2]);
1401 for (i=0; i<
tmp_fmol -> nstruct[stru]; i++)
1429 if (
tmp_fct -> sp == at -> sp)
1431 for (j=0; j<
tmp_fct -> num; j++)
1489 if (ngb ->
id ==
a)
break;
1504 int i, j, k, l, m, n, o , p;
1557 if (m != ngma ->
id)
1594 int sid, gboolean save_it)
1600 for (j=frag*i; j < (frag+1)*i; j++)
1602 if (fat -> list_id[j] < 0)
1612 fat -> list_id[j] = fai;
1613 if (save_it && iter == sid)
return k;
1617 fat -> list_id[j] = -1;
1641 int i, j, k, l, m, n, o, p, q, r, s, t;
1648 i = ngma_init -> id;
1650 for (k=0; k<ngma_init -> num; k++)
1652 l = ngma_init -> vois[k];
1656 if (ngma -> num > num_ngb)
1682 for (r=0; r<ngmb -> num; r++)
1684 s = ngmb -> vois[r];
1710 fat -> list_id[p] = -1;
1728 if (ngma -> num > num_ngb)
1730 for (k=0; k<
tmp_proj -> natomes; k++)
1793 for (j=0; j<
tmp_proj -> natomes; j++)
1835 for (i=0; i<
tmp_proj -> natomes; i++)
1844 for (h=1; h<seq; h++)
1846 for (i=0; i<
tmp_proj -> natomes; i++)
1854 for (i=0; i<
tmp_proj -> natomes; i++)
1883 for (i=0; i<
tmp_proj -> natomes; i++)
1889 ngm -> next = g_malloc0(
sizeof*ngm);
1890 ngm -> next -> prev = ngm;
1902 for (k=0; k<ngm -> num; k++)
1912 for (h=1; h<seq; h++)
1919 for (j=0; j<ngm -> num; j++)
1961 if (seed > -1)
break;
1975 gboolean sym = FALSE;
1993 for (k=1; k<
tmp_fat -> num; k++)
2014 for (j=0; j<
tmp_fat -> num; j++)
2016 if (
tmp_fat -> list_id[j] < 0)
2035 for (i=0; i<
tmp_proj -> nspec; i++)
2037 for (j=0; j<
tmp_coord -> totcoord[1]; j++)
2039 if (coordnum[i][j] > 1 && coordnum[i][j] %
tmp_fmol ->
multi != 0) g_debug (
"This should not happen");
2046 for (i=0; i<
tmp_proj -> nspec; i++)
2048 for (j=0; j<
tmp_coord -> totcoord[1]; j++)
2050 if (coordnum[i][j] > 1 && coordnum[i][j] >= k && coordnum[i][j] % k != 0) sym = FALSE;
2057 if (assigned < tmp_fmol ->
mol -> natoms)
2062 g_debug (
"Molecule seems to be symmetric, k= %d", k);
2063 g_debug (
"Mol -> id: %d",
tmp_fmol ->
id);
2066 g_debug (
"Mol -> atomes= %d",
tmp_fmol ->
mol -> natoms);
2067 g_debug (
"Assigned so far= %d",
assigned);
2077 gboolean done = FALSE;
2081 while (! done && (seed < 0 || (
tmp_fmol ->
mol -> natoms && k < tmp_fmol ->
mol -> natoms)))
2088 g_debug (
"Assigning using: seed= %d, w_factor= %d", seed, k);
2094 g_debug (
" -> fragment id: %d", i+1);
2100 g_debug (
"**********************************");
2101 g_debug (
"*** NOT ABLE TO ASSIGN NUMBERS ***");
2102 g_debug (
"*** Mol -> Id= %3d ***",
tmp_fmol ->
id);
2104 g_debug (
"*** Fragment= %3d ***", i+1);
2105 g_debug (
"*** k= %3d ***", k);
2106 g_debug (
"*** assigned= %10d ***",
assigned);
2107 g_debug (
"**********************************");
2115 for (l=0; l<
tmp_proj -> natomes; l++)
2124 g_debug (
" -> done !");
2135 g_debug (
"Assigning completed !");
2152 stru = stru -> next;
2153 g_free (stru -> prev);
2173 for (i=0; i<
tmp_proj -> natomes; i++)
2190 tmp_fmol -> first_struct[i] = NULL;
2244 tmp_fmol -> name = g_strdup_printf(
"MOL-%d", i+1);
2256 for (j=0; j<
tmp_mol -> natoms; j++)
2278 tmp_fmol -> first_constraint = NULL;
2311 gchar ** to_be_vdw = g_malloc (nvdw*
sizeof*to_be_vdw);
2313 int ** vdw_aids =
allocdint (nvdw,nvdw);
2314 int ** vdw_mids =
allocdint (nvdw,nvdw);
2316 int * vdw_a[2], * vdw_ma[2];
2328 if (g_strcmp0 (to_be_vdw[j],
tmp_fat -> name) == 0)
2332 vdw_mids[j][vdw_mlist[j]] =
tmp_fmol -> id;
2333 vdw_aids[j][vdw_mlist[j]] =
tmp_fat -> id;
2339 to_be_vdw[j] = g_strdup_printf (
"%s",
tmp_fat -> name);
2341 vdw_aids[j][0] =
tmp_fat -> id;
2353 vdw_na[0] = vdw_na[1] = vdw_mlist[k]+1;
2354 vdw_a[0] = vdw_a[1] =
duplicate_int (vdw_na[0], vdw_aids[k]);
2355 vdw_ma[0] = vdw_ma[1] =
duplicate_int (vdw_na[0], vdw_mids[k]);
2377 for (k=0; k<i-1; k++)
2379 for (l=k+1; l<i; l++)
2381 vdw_na[0] = vdw_mlist[k]+1;
2382 vdw_na[1] = vdw_mlist[l]+1;
2424 new_field -> io_opts[0] = 1.0;
2426 new_field -> io_opts[1] = 10000.0;
2428 new_field -> io_opts[2] = 1.0;
2430 new_field -> io_opts[3] = 100.0;
2434 new_field -> io_opts[6] = 12;
2436 new_field -> io_opts[7] = 2000000;
2438 new_field -> io_opts[8] = 20000;
2443 new_field -> io_opts[12] = 1;
2446 new_field -> io_opts[14] = 12;
2448 new_field -> io_opts[15] = 2000000;
2450 new_field -> io_opts[16] = 20000;
2454 new_field -> io_opts[19] = 1;
2456 new_field -> io_opts[20] = 20;
2458 new_field -> io_opts[21] = 300;
2490 new_field -> equi_opts[0] = 1.0;
2492 new_field -> equi_opts[1] = 20.0;
2494 new_field -> equi_opts[3] = 1.0;
2496 new_field -> equi_opts[5] = 1000.0;
2498 new_field -> equi_opts[7] = 1.0;
2502 new_field -> equi_opts[10] = 50.0;
2504 new_field -> equi_opts[11] = 1.0;
2508 new_field -> equi_opts[14] = 50.0;
2517 new_field -> vdw_opts[0] = 1.0;
2519 new_field -> vdw_opts[1] = 12.0;
2529 new_field -> elec_opts[0] = 1.0;
2531 new_field -> elec_opts[1] = 12.0;
2536 new_field -> elec_opts[5] = 2.0;
2538 new_field -> elec_opts[6] = 1e-20;
2560 new_field -> thermo_opts[8] = 2.0;
2567 new_field -> md_opts[0] = 300.0;
2570 new_field -> md_opts[2] = 100.0;
2573 new_field -> md_opts[4] = 0.001;
2575 new_field -> md_opts[5] = 0.001;
2577 new_field -> md_opts[6] = 0.001;
2579 new_field -> md_opts[7] = 0.5;
2581 new_field -> md_opts[8] = 0.01;
2583 new_field -> md_opts[9] = 250.0;
2585 new_field -> md_opts[10] = 1e-6;
2587 new_field -> md_opts[11] = 100;
2589 new_field -> md_opts[12] = 1e-8;
2592 new_field -> md_opts[14] = 1.0;
2594 new_field -> md_opts[15] = 1.0;
2596 new_field -> md_opts[16] = 1.0;
2599 new_field -> md_opts[17] = 1.0;
2601 new_field -> md_opts[18] = 1.0;
2603 new_field -> md_opts[19] = 1.0;
2611 new_field -> out_opts[2] = 1.0;
2613 new_field -> out_opts[3] = 0.75;
2617 new_field -> out_opts[6] = 1.0;
2619 new_field -> out_opts[7] = 0.15;
2623 new_field -> out_opts[10] = 1.0;
2628 new_field -> out_opts[14] = 1.0;
2631 new_field -> out_opts[16] = 1.0;
2634 new_field -> out_opts[18] = 1.0;
2637 new_field -> out_opts[20] = 1.0;
2640 new_field -> out_opts[22] = 1.0;
2642 new_field -> out_opts[23] = 0.05;
2645 new_field -> out_opts[25] = 1.0;
2647 new_field -> out_opts[26] = 50.0;
2650 new_field -> out_opts[28] = 1.0;
2653 new_field -> out_opts[30] = 1000.0;
2660 new_field -> ana_opts[1] = 1.0;
2662 new_field -> ana_opts[2] = 100.0;
2664 new_field -> ana_opts[3] = 2.0;
2667 new_field -> ana_opts[5] = 1.0;
2669 new_field -> ana_opts[6] = 100.0;
2671 new_field -> ana_opts[7] = 2.0;
2674 new_field -> ana_opts[9] = 1.0;
2676 new_field -> ana_opts[10] = 90.0;
2679 new_field -> ana_opts[12] = 1.0;
2681 new_field -> ana_opts[13] = 90.0;
2684 new_field -> ana_opts[15] = 1.0;
2686 new_field -> ana_opts[16] = 90.0;
2714 new_field -> io_opts[0] = 1.0;
2716 new_field -> io_opts[1] = 10000.0;
2718 new_field -> io_opts[2] = 1.0;
2720 new_field -> io_opts[3] = 100.0;
2724 new_field -> io_opts[6] = 12;
2726 new_field -> io_opts[7] = 2000000;
2728 new_field -> io_opts[8] = 20000;
2733 new_field -> io_opts[12] = 1;
2736 new_field -> io_opts[14] = 12;
2738 new_field -> io_opts[15] = 2000000;
2740 new_field -> io_opts[16] = 20000;
2744 new_field -> io_opts[19] = 1;
2746 new_field -> io_opts[20] = 20;
2748 new_field -> io_opts[21] = 300;
2780 new_field -> equi_opts[0] = 1.0;
2782 new_field -> equi_opts[1] = 20.0;
2784 new_field -> equi_opts[3] = 1.0;
2786 new_field -> equi_opts[5] = 1000.0;
2788 new_field -> equi_opts[7] = 1.0;
2792 new_field -> equi_opts[10] = 50.0;
2794 new_field -> equi_opts[11] = 1.0;
2798 new_field -> equi_opts[14] = 50.0;
2807 new_field -> vdw_opts[0] = 1.0;
2809 new_field -> vdw_opts[1] = 12.0;
2819 new_field -> elec_opts[0] = 1.0;
2821 new_field -> elec_opts[1] = 12.0;
2826 new_field -> elec_opts[5] = 2.0;
2828 new_field -> elec_opts[6] = 1e-20;
2850 new_field -> thermo_opts[8] = 2.0;
2857 new_field -> md_opts[0] = 300.0;
2860 new_field -> md_opts[2] = 100.0;
2863 new_field -> md_opts[4] = 0.001;
2865 new_field -> md_opts[5] = 0.001;
2867 new_field -> md_opts[6] = 0.001;
2869 new_field -> md_opts[7] = 0.5;
2871 new_field -> md_opts[8] = 0.01;
2873 new_field -> md_opts[9] = 250.0;
2875 new_field -> md_opts[10] = 1e-6;
2877 new_field -> md_opts[11] = 100;
2879 new_field -> md_opts[12] = 1e-8;
2882 new_field -> md_opts[14] = 1.0;
2884 new_field -> md_opts[15] = 1.0;
2886 new_field -> md_opts[16] = 1.0;
2889 new_field -> md_opts[17] = 1.0;
2891 new_field -> md_opts[18] = 1.0;
2893 new_field -> md_opts[19] = 1.0;
2901 new_field -> out_opts[2] = 1.0;
2903 new_field -> out_opts[3] = 0.75;
2907 new_field -> out_opts[6] = 1.0;
2909 new_field -> out_opts[7] = 0.15;
2913 new_field -> out_opts[10] = 1.0;
2918 new_field -> out_opts[14] = 1.0;
2921 new_field -> out_opts[16] = 1.0;
2924 new_field -> out_opts[18] = 1.0;
2927 new_field -> out_opts[20] = 1.0;
2930 new_field -> out_opts[22] = 1.0;
2932 new_field -> out_opts[23] = 0.05;
2935 new_field -> out_opts[25] = 1.0;
2937 new_field -> out_opts[26] = 50.0;
2940 new_field -> out_opts[28] = 1.0;
2943 new_field -> out_opts[30] = 1000.0;
2950 new_field -> ana_opts[1] = 1.0;
2952 new_field -> ana_opts[2] = 100.0;
2954 new_field -> ana_opts[3] = 2.0;
2957 new_field -> ana_opts[5] = 1.0;
2959 new_field -> ana_opts[6] = 100.0;
2961 new_field -> ana_opts[7] = 2.0;
2964 new_field -> ana_opts[9] = 1.0;
2966 new_field -> ana_opts[10] = 90.0;
2969 new_field -> ana_opts[12] = 1.0;
2971 new_field -> ana_opts[13] = 90.0;
2974 new_field -> ana_opts[15] = 1.0;
2976 new_field -> ana_opts[16] = 90.0;
2991 new_field = g_malloc0 (
sizeof*new_field);
2993 new_field -> energy_unit = 1;
3005 new_field -> first_molecule = g_malloc0 (
sizeof*new_field -> first_molecule);
3006 tmp_fmol = new_field -> first_molecule;
3009 g_debug (
"Total num of molecules: %d",
tmp_proj -> modelfc -> mol_by_step[0]);
3011 for (i=0; i <
tmp_proj -> modelfc -> mol_by_step[0]; i++)
3015 g_debug (
"Init FORCE FIELD for: ");
3016 g_debug (
" tmp_mol -> id= %d",
tmp_mol ->
id);
3017 g_debug (
" tmp_mol -> multi= %d",
tmp_mol -> multiplicity);
3018 g_debug (
" tmp_mol -> natoms= %d",
tmp_mol -> natoms);
3022 if (i < tmp_proj -> modelfc -> mol_by_step[0]-1)
3043 new_field -> extern_fields = 0;
3044 new_field -> first_external = NULL;
integer(kind=c_int) function chemistry()
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
field_atom * get_active_atom(int a, int b)
retrieve field atom
field_nth_body * comp_fbody
field_struct * duplicate_field_struct_list(field_struct *list_str, gboolean init)
create copy of list of field structural element(s)
field_nth_body * tmp_fbody
int body_at(int b)
find the number of atom(s) in a non bonded interaction
int struct_id(int f)
number of atoms in a structural element
field_molecule * tmp_fmol
classical_field * tmp_field
Variable declarations for the creation of the DL_POLY input file(s)
angle dihedral_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct, atom *dt)
dihedral between atom a, b, c and d in 3D
angle inversion_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct, atom *dt)
inversion angle between atom a, b, c and d in 3D
angle angle_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct)
angle between atom a, b and c in 3D
distance distance_3d(cell_info *cell, int mdstep, atom *at, atom *bt)
distance between atom a and b in 3D
int angles_from_bonds(int n, field_atom *at, field_atom *bt, field_atom *ct)
find, and initialize, angles using bonds
field_shell * init_field_shell(int id, int ia, int ib)
initialize field core shell interaction
field_tethered * init_field_tethered(int id, int num)
intialize new field tethered potential
void clean_field_struct_list(field_struct *stru)
clean force field structural property(ies)
int find_neighbor_loop(int frag, int aid, int fai, field_atom *fat, field_neighbor *ngmb, int sid, gboolean save_it)
find / set up field atom data for a fragment
field_neighbor * init_ngb
void init_dlpoly_field(classical_field *new_field)
initialize DL-POLY classical force field
field_struct * init_field_struct(int st, int ai, int an, int *aid)
initialize field molecule new structural element
int * duplicate_int(int num, int *old_val)
copy a list of int
int prepare_field_atom(int i, int j, int k, int l, int m)
initialiaze new type of field atom
int test_for_angles(field_atom *at, field_atom *bt, field_atom *ct)
search for angle(s) between these field atoms
int get_struct_id_from_atom_id(int ids, int *aid)
retrieve field structural element id from a list of atom id
int get_atom_id_in_fragment_from_model_id(int frag, int at)
retrieve field atom id in fragment from model id
gboolean id_n_fold_atoms_in_fragment(int frag, int limit, int num_ngb, int search_type, int init, field_neighbor *ngma_init)
find atom id in fragment using the neighbor list
field_neighbor * get_init_neighbor(int a)
retrieve neighbor data structure for atom a
void print_all_field_struct(field_molecule *mol, int str)
print all field structural element(s)
int set_atom_id(field_atom *at, int c, int p, int id)
set new fragment/molecule atom parameters
int coord_sphere_multiplicity(atom *at, int id, gboolean set_atom_id)
get coord sphere multiplicity in the model
void get_weight(int seq)
compute field weigth for the atom(s) in the model
void init_all_impropers_inversions(int stru)
initialize all impropers and inversions
gchar * set_field_atom_name(field_atom *ato, field_molecule *mol)
get name string for field atom
field_prop * init_field_prop(int ti, int key, gboolean show, gboolean use)
initialize new field molecule structural property
int get_field_atom_id_from_model_id(field_molecule *fmol, int at)
retrieve field atom id using atom id in model
void init_field_molecule(int i)
initialiaze of field molecule data structurre
gboolean are_in_bond(atom ato, int at)
is at in ato neighbors ?
gboolean was_not_created_struct(int ids, int num, int *aid)
was this structural element already created ?
int test_for_bonds(field_atom *at, field_atom *bt)
search for bond(s) between 2 field atoms
int get_fragment_atom_id_from_model_id(field_molecule *fmol, int at)
retrieve fragment atom id using atom id in model
int bonds_between_atoms(int n, field_atom *at, field_atom *bt, int a, int b)
search for bond(s) between two field atoms
int setup_atomic_weight(int seq)
setup atom(s) field weight
void init_all_dihedrals()
find, and intialiaze, all dihedral(s) using bonds
int dihedrals_from_angles(int n, field_atom *at, field_atom *bt, field_atom *ct, field_atom *dt)
find, and initialize, dihedrals using angles
int impropers_inversion(int n, int stru, int at, int bt, int ct, int dt, int a, int b, int c, int d)
prepare new improper / inversion
field_pmf * init_field_pmf(int id, int num[2], int *list[2], float *w[2])
initialize new field mean force potential
float * duplicate_float(int num, float *old_val)
copy a list of float
int test_for_dihedrals(field_atom *at, field_atom *bt, field_atom *ct, field_atom *dt)
search for dihedral(s) between these field atoms
classical_field * create_force_field_data_structure(int ai)
initialize classical force field
int get_position_in_field_atom_from_model_id(int fat, int at)
retrieve atom position id in field atom id using atom id in model
int prepare_field_struct(int ids, int sid, int yes_no_num, int *aid)
prepare the creation of a field structural element
field_external * init_field_external(int bi)
intialize new field external potential
void find_atom_id_in_field_molecule()
find field atom id in field molecule (fragment multiplicity > 1)
gboolean are_neighbors(field_neighbor *ngb, int at)
test if 2 atoms are neighbors
void init_all_atoms(int i)
initialize all field atom(s)
gboolean id_atoms_in_fragment(int frag, int seed)
find the atom field id in the fragment
gboolean in_bond(int at, int bd[2])
is atom at in bond bd
field_constraint * init_field_constraint(int id, int ia, int ib)
initialize field bond constraint
void init_all_angles()
find, and intialiaze, all angle(s) using bonds
field_nth_body * init_field_nth_body(int bi, int bd, int *na, int **ma, int **ba)
intialize new field non bonded interaction
field_atom * init_field_atom(int id, int type, int at, int nat, int coo, int *list)
intialize a new type of field atom
void init_all_bonds()
find, and initialize all bond(s)
field_rigid * init_field_rigid(int id, int num, int *list)
initialize new field rigid constraint
void init_lammps_field(classical_field *new_field)
initialize a LAMMPS classical force field
void init_all_field_struct(gboolean init)
initialize the force field structural properties for a field molecule
gboolean is_this_numbering_possible_for_this_atom(int frag, field_neighbor *ngma, int atom)
check if the id in fragment for this atom is possible or not
gboolean is_numbering_possible(int frag)
compare if the atom numbering of two fragment(s) are identical, and it should
int init_vdw(gboolean init)
initialize the VdW section of a classical force field
int ** allocdint(int xal, int yal)
allocate an int ** pointer
gboolean * allocbool(int val)
allocate a gboolean * pointer
double * allocdouble(int val)
allocate a double * pointer
int * allocint(int val)
allocate an int * pointer
float * allocfloat(int val)
allocate a float * pointer
gchar * exact_name(gchar *name)
short cut to print string without spaces
Messaging function declarations.
integer(kind=c_int) function molecules(frag_and_mol, allbonds)