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
ebf0ca29
Commit
ebf0ca29
authored
Aug 09, 2016
by
peastman
Browse files
Merge branch 'gayberne' of
https://github.com/peastman/openmm
into gayberne
parents
5f1c5e19
b683cd81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
3 deletions
+13
-3
platforms/cpu/include/CpuGayBerneForce.h
platforms/cpu/include/CpuGayBerneForce.h
+1
-1
platforms/cpu/src/CpuGayBerneForce.cpp
platforms/cpu/src/CpuGayBerneForce.cpp
+5
-0
platforms/cuda/src/kernels/gayBerne.cu
platforms/cuda/src/kernels/gayBerne.cu
+1
-1
platforms/opencl/src/kernels/gayBerne.cl
platforms/opencl/src/kernels/gayBerne.cl
+1
-1
platforms/reference/src/SimTKReference/ReferenceGayBerneForce.cpp
...s/reference/src/SimTKReference/ReferenceGayBerneForce.cpp
+5
-0
No files found.
platforms/cpu/include/CpuGayBerneForce.h
View file @
ebf0ca29
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
namespace
OpenMM
{
namespace
OpenMM
{
class
OPENMM_EXPORT
CpuGayBerneForce
{
class
CpuGayBerneForce
{
public:
public:
struct
Matrix
;
struct
Matrix
;
class
ComputeTask
;
class
ComputeTask
;
...
...
platforms/cpu/src/CpuGayBerneForce.cpp
View file @
ebf0ca29
...
@@ -29,11 +29,16 @@
...
@@ -29,11 +29,16 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#ifdef _MSC_VER
// Prevent Windows from defining macros that interfere with other code.
#define NOMINMAX
#endif
#include "CpuGayBerneForce.h"
#include "CpuGayBerneForce.h"
#include "ReferenceForce.h"
#include "ReferenceForce.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/GayBerneForce.h"
#include "openmm/GayBerneForce.h"
#include "openmm/internal/gmx_atomic.h"
#include "openmm/internal/gmx_atomic.h"
#include <algorithm>
#include <cmath>
#include <cmath>
using
namespace
OpenMM
;
using
namespace
OpenMM
;
...
...
platforms/cuda/src/kernels/gayBerne.cu
View file @
ebf0ca29
...
@@ -234,7 +234,7 @@ inline __device__ void matrixInverse(real (*result)[3], real (*m)[3]) {
...
@@ -234,7 +234,7 @@ inline __device__ void matrixInverse(real (*result)[3], real (*m)[3]) {
result
[
2
][
2
]
=
invDet
*
(
m
[
0
][
0
]
*
m
[
1
][
1
]
-
m
[
0
][
1
]
*
m
[
1
][
0
]);
result
[
2
][
2
]
=
invDet
*
(
m
[
0
][
0
]
*
m
[
1
][
1
]
-
m
[
0
][
1
]
*
m
[
1
][
0
]);
}
}
__device__
void
computeOneInteraction
(
AtomData
*
data1
,
AtomData
*
data2
,
real
sigma
,
real
epsilon
,
real3
dr
,
real
r2
,
real3
*
force1
,
real3
*
force2
,
real3
*
torque1
,
real3
*
torque2
,
real
*
totalEnergy
)
{
__device__
void
computeOneInteraction
(
AtomData
*
data1
,
AtomData
*
data2
,
real
sigma
,
real
epsilon
,
real3
dr
,
real
r2
,
real3
*
force1
,
real3
*
force2
,
real3
*
torque1
,
real3
*
torque2
,
mixed
*
totalEnergy
)
{
real
rInv
=
RSQRT
(
r2
);
real
rInv
=
RSQRT
(
r2
);
real
r
=
r2
*
rInv
;
real
r
=
r2
*
rInv
;
real3
drUnit
=
dr
*
rInv
;
real3
drUnit
=
dr
*
rInv
;
...
...
platforms/opencl/src/kernels/gayBerne.cl
View file @
ebf0ca29
...
@@ -239,7 +239,7 @@ void matrixInverse(real (*result)[3], real (*m)[3]) {
...
@@ -239,7 +239,7 @@ void matrixInverse(real (*result)[3], real (*m)[3]) {
result[2][2]
=
invDet*
(
m[0][0]*m[1][1]
-
m[0][1]*m[1][0]
)
;
result[2][2]
=
invDet*
(
m[0][0]*m[1][1]
-
m[0][1]*m[1][0]
)
;
}
}
void
computeOneInteraction
(
AtomData*
data1,
AtomData*
data2,
real
sigma,
real
epsilon,
real3
dr,
real
r2,
real3*
force1,
real3*
force2,
real3*
torque1,
real3*
torque2,
real
*totalEnergy
)
{
void
computeOneInteraction
(
AtomData*
data1,
AtomData*
data2,
real
sigma,
real
epsilon,
real3
dr,
real
r2,
real3*
force1,
real3*
force2,
real3*
torque1,
real3*
torque2,
mixed
*totalEnergy
)
{
real
rInv
=
RSQRT
(
r2
)
;
real
rInv
=
RSQRT
(
r2
)
;
real
r
=
r2*rInv
;
real
r
=
r2*rInv
;
real3
drUnit
=
dr*rInv
;
real3
drUnit
=
dr*rInv
;
...
...
platforms/reference/src/SimTKReference/ReferenceGayBerneForce.cpp
View file @
ebf0ca29
...
@@ -29,9 +29,14 @@
...
@@ -29,9 +29,14 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#ifdef _MSC_VER
// Prevent Windows from defining macros that interfere with other code.
#define NOMINMAX
#endif
#include "ReferenceGayBerneForce.h"
#include "ReferenceGayBerneForce.h"
#include "ReferenceForce.h"
#include "ReferenceForce.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include <algorithm>
#include <cmath>
#include <cmath>
using
namespace
OpenMM
;
using
namespace
OpenMM
;
...
...
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