Tinker9
70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
include
math
math/switch.h
1
#pragma once
2
#include "ff/precision.h"
3
#include "seq/seq.h"
4
5
namespace
tinker
{
20
#pragma acc routine seq
21
template
<
int
DO_DTAPER>
22
SEQ_CUDA
23
void
switchTaper5
(
real
rik,
real
cut,
real
off,
real
&
restrict
taper,
24
real
&
restrict
dtaper)
25
{
26
real
rinv = 1 / (cut - off);
27
real
x
= (rik - off) * rinv;
28
real
x2 =
x
*
x
;
29
real
x3 = x2 *
x
;
30
taper = x3 * (6 * x2 - 15 *
x
+ 10);
31
if
CONSTEXPR
(DO_DTAPER) dtaper = 30 * (
x
* (1 -
x
)) * (
x
* (1 -
x
)) * rinv;
32
}
33
}
SEQ_CUDA
#define SEQ_CUDA
Definition:
acc/seqdef.h:12
restrict
#define restrict
Definition:
macro.h:51
CONSTEXPR
#define CONSTEXPR
Definition:
macro.h:61
tinker::x
real * x
Number of the trajectory frames.
tinker::switchTaper5
__device__ void switchTaper5(real rik, real cut, real off, real &__restrict__ taper, real &__restrict__ dtaper)
Smooth function F: [cut,off]->[1,0].
Definition:
math/switch.h:23
tinker::real
float real
Definition:
precision.h:80
tinker
Definition:
testrt.h:9
Generated by
1.9.5