Commit d4868db4 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

passed grad test for 3tmn, only one torsion

parent 1354f05c
......@@ -553,9 +553,7 @@ void gpu_calc_gradient(
vz_y1 = (1 - dx) * z62 + dx * z75; // y = 1
gradient_inter_z[atom_id] += fabs(q) *((1 - dy) * vz_y0 + dy * vz_y1);
//printf("%-15s %-3u %-10.8f %-10.8f %-10.8f %-10.8f %-10.8f %-10.8f\n", "desol", atom_id, vx_z0, vx_z1, vy_z0, vy_z1, vz_y0, vz_y1);
// -------------------------------------------------------------------
}
......@@ -632,6 +630,7 @@ void gpu_calc_gradient(
dockpars_coeff_desolv * -0.07716049382716049 * atomic_distance * native_exp(-0.038580246913580245*native_powr(atomic_distance, 2));
}
} // End contributor_counter for-loop (INTRAMOLECULAR ENERGY)
barrier(CLK_LOCAL_MEM_FENCE);
......@@ -663,6 +662,8 @@ void gpu_calc_gradient(
gradient_intra_x[atom2_id] += gradient_per_intracontributor[contributor_counter] * subx / dist;
gradient_intra_y[atom2_id] += gradient_per_intracontributor[contributor_counter] * suby / dist;
gradient_intra_z[atom2_id] += gradient_per_intracontributor[contributor_counter] * subz / dist;
//printf("%-20s %-10u %-5u %-5u %-10.8f\n", "grad_intracontrib", contributor_counter, atom1_id, atom2_id, gradient_per_intracontributor[contributor_counter]);
}
}
......@@ -683,11 +684,11 @@ void gpu_calc_gradient(
gradient_inter_y[atom_cnt] = gradient_inter_y[atom_cnt] / dockpars_grid_spacing;
gradient_inter_z[atom_cnt] = gradient_inter_z[atom_cnt] / dockpars_grid_spacing;
gradient_x[atom_cnt] = gradient_inter_x[atom_cnt] ;//+ gradient_intra_x[atom_cnt];
gradient_y[atom_cnt] = gradient_inter_y[atom_cnt] ;//+ gradient_intra_y[atom_cnt];
gradient_z[atom_cnt] = gradient_inter_z[atom_cnt] ;//+ gradient_intra_z[atom_cnt];
gradient_x[atom_cnt] = gradient_inter_x[atom_cnt] + gradient_intra_x[atom_cnt];
gradient_y[atom_cnt] = gradient_inter_y[atom_cnt] + gradient_intra_y[atom_cnt];
gradient_z[atom_cnt] = gradient_inter_z[atom_cnt] + gradient_intra_z[atom_cnt];
printf("%-15s %-5u %-10.8f %-10.8f %-10.8f\n", "grad_grid", atom_cnt, gradient_inter_x[atom_cnt], gradient_inter_y[atom_cnt], gradient_inter_z[atom_cnt]);
//printf("%-15s %-5u %-10.8f %-10.8f %-10.8f\n", "grad_grid", atom_cnt, gradient_inter_x[atom_cnt], gradient_inter_y[atom_cnt], gradient_inter_z[atom_cnt]);
//printf("%-15s %-5u %-10.8f %-10.8f %-10.8f\n", "grad_intra", atom_cnt, gradient_intra_x[atom_cnt], gradient_intra_y[atom_cnt], gradient_intra_z[atom_cnt]);
......
......@@ -342,7 +342,7 @@ resed in the Shoemake space: local_genotype [3|4|5]
// Taking step
local_genotype_new[i] = local_genotype[i] - gradMin_alpha * local_gradient[i];
// Updating terminatiodockpars_num_of_genesn metrics
// Updating termination metrics
local_genotype_diff[i] = local_genotype_new[i] - local_genotype[i];
// Updating current solution
......@@ -375,11 +375,11 @@ resed in the Shoemake space: local_genotype [3|4|5]
}
*/
/*
///*
if (get_local_id(0) == 0) {
printf("Number of gradient iterations: %u\n", local_nIter);
}
*/
//*/
is_gradDescent_enabled(
is_perturb_gt_gene_min,
......
......@@ -409,7 +409,7 @@ filled with clock() */
// This should be ultimately configurable by the user as program exec. flags.
Gradientparameters gradientpars;
gradientpars.tolerance = 1.e-6;
gradientpars.max_num_of_iters = 10000;
gradientpars.max_num_of_iters = 300; // Same as Solis-Wetts local search
gradientpars.alpha = 0.00001f; //0.001f; // TODO: find out why 0.001f, 0.0001f (100 runs, 500 popsize) throws segmentation fault
gradientpars.h = 0.0001f;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment