Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock
Commits
2ae385a1
Commit
2ae385a1
authored
Sep 14, 2018
by
lvs
Browse files
gradients scaled to angstrom/radians
parent
e3dbf5e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
device/calcgradient.cl
View file @
2ae385a1
...
...
@@ -40,6 +40,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
define
ENABLE_PARALLEL_GRAD_TORSION
//
The
following
is
a
scaling
of
gradients.
//
Initially
all
genotypes
and
gradients
//
were
expressed
in
grid-units
(
translations
)
//
and
sexagesimal
degrees
(
rotation
and
torsion
angles
)
.
//
Expressing
them
using
angstroms
/
radians
//
might
help
gradient-based
minimizers.
//
This
conversion
is
applied
to
final
gradients.
#
define
CONVERT_INTO_ANGSTROM_RADIAN
//
Scaling
factor
to
multiply
the
gradients
of
//
the
genes
expressed
in
degrees
(
all
genes
except
the
first
three
)
//
(
GRID-SPACING
*
GRID-SPACING
)
/
(
DEG_TO_RAD
*
DEG_TO_RAD
)
=
461.644
#
define
SCFACTOR_ANGSTROM_RADIAN
((
0.375
*
0.375
)
/
(
DEG_TO_RAD
*
DEG_TO_RAD
))
void
map_priv_angle
(
float*
angle
)
//
The
GPU
device
function
maps
//
the
input
parameter
to
the
interval
0...360
...
...
@@ -1332,4 +1346,16 @@ void gpu_calc_gradient(
//----------------------------------
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
#
if
defined
(
CONVERT_INTO_ANGSTROM_RADIAN
)
for
(
uint
gene_cnt
=
get_local_id
(
0
)
;
gene_cnt
<
dockpars_num_of_genes
;
gene_cnt+=
NUM_OF_THREADS_PER_BLOCK
)
{
if
(
gene_cnt
>
2
)
{
gradient_genotype[gene_cnt]
*=
SCFACTOR_ANGSTROM_RADIAN
;
}
}
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
#
endif
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment