Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
b77ab693
Commit
b77ab693
authored
Feb 16, 2011
by
Mark Friedrichs
Browse files
OutOfPlaneBend force fix
parent
25ce1664
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaLocalForces.cu
...forms/cuda/src/kernels/kCalculateAmoebaCudaLocalForces.cu
+12
-2
No files found.
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaLocalForces.cu
View file @
b77ab693
...
...
@@ -1163,16 +1163,26 @@ void kCalculateAmoebaLocalForces_kernel()
float
bkk3
=
(
rdb2
!=
0.0
f
)
?
bkk2
/
rdb2
:
0.0
f
;
bkk2
=
rdb2
-
bkk2
;
float
adXcd_0
=
yad
*
zcd
-
zad
*
ycd
;
float
adXcd_1
=
zad
*
xcd
-
xad
*
zcd
;
float
adXcd_2
=
xad
*
ycd
-
yad
*
xcd
;
float
adXcd_nrm2
=
adXcd_0
*
adXcd_0
+
adXcd_1
*
adXcd_1
+
adXcd_2
*
adXcd_2
;
float
adXcd_dot_db
=
xdb
*
adXcd_0
+
ydb
*
adXcd_1
+
zdb
*
adXcd_2
;
adXcd_dot_db
/=
sqrt
(
rdb2
*
adXcd_nrm2
);
float
angle
;
/*
if( bkk3 < 1.0e-6f ){
angle = sqrtf( bkk3 );
} else if( bkk3 < 0.98f ){
float cosine = sqrtf(1.0f - bkk3);
angle = acos(cosine);
} else {
float
sin
=
sqrtf
(
bkk3
);
angle
=
asin
(
sin
);
angle = abs( asin(adXcd_dot_db) );
}
*/
angle
=
abs
(
asin
(
adXcd_dot_db
)
);
// find the out-of-plane energy and master chain rule terms
...
...
Write
Preview
Markdown
is supported
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