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
d472d875
Commit
d472d875
authored
Jul 07, 2018
by
lvs
Browse files
corrected atom-based intragrads
parent
033a33cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
device/calcgradient.cl
View file @
d472d875
...
...
@@ -712,10 +712,12 @@ void gpu_calc_gradient(
}
//
if
cuttoff2
-
internuclear-distance
at
20.48A
//
Decomposing
"priv_gradient_per_intracontributor"
//
into
the
contribution
of
each
atom
of
the
pair
float
subx_div_dist
=
native_divide
(
subx,
dist
)
;
float
suby_div_dist
=
native_divide
(
suby,
dist
)
;
float
subz_div_dist
=
native_divide
(
subz,
dist
)
;
//
into
the
contribution
of
each
atom
of
the
pair.
//
Distances
in
Angstroms
of
vector
that
goes
from
//
"atom1_id"
-to-
"atom2_id"
,
therefore
-
subx,
-
suby,
and
-
subz
are
used
float
subx_div_dist
=
native_divide
(
-subx,
dist
)
;
float
suby_div_dist
=
native_divide
(
-suby,
dist
)
;
float
subz_div_dist
=
native_divide
(
-subz,
dist
)
;
float
priv_intra_gradient_x
=
priv_gradient_per_intracontributor
*
subx_div_dist
;
float
priv_intra_gradient_y
=
priv_gradient_per_intracontributor
*
suby_div_dist
;
...
...
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