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
a84a2997
Commit
a84a2997
authored
Mar 05, 2011
by
Peter Eastman
Browse files
Fixed bugs in CMAPTorsionForce
parent
551eb600
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
platforms/cuda/src/kernels/kCalculateCMAPTorsionForces.cu
platforms/cuda/src/kernels/kCalculateCMAPTorsionForces.cu
+1
-1
platforms/opencl/src/kernels/cmapTorsionForce.cl
platforms/opencl/src/kernels/cmapTorsionForce.cl
+1
-1
serialization/src/CMAPTorsionForceProxy.cpp
serialization/src/CMAPTorsionForceProxy.cpp
+1
-1
No files found.
platforms/cuda/src/kernels/kCalculateCMAPTorsionForces.cu
View file @
a84a2997
...
@@ -133,7 +133,7 @@ void kCalculateCMAPTorsionForces_kernel(int numAtoms, int numTorsions, float4* f
...
@@ -133,7 +133,7 @@ void kCalculateCMAPTorsionForces_kernel(int numAtoms, int numTorsions, float4* f
int
s
=
(
int
)
(
angleA
/
delta
);
int
s
=
(
int
)
(
angleA
/
delta
);
int
t
=
(
int
)
(
angleB
/
delta
);
int
t
=
(
int
)
(
angleB
/
delta
);
float4
c
[
4
];
float4
c
[
4
];
int
coeffIndex
=
4
*
(
pos
.
x
+
s
+
size
*
t
);
int
coeffIndex
=
pos
.
x
+
4
*
(
s
+
size
*
t
);
c
[
0
]
=
coeff
[
coeffIndex
];
c
[
0
]
=
coeff
[
coeffIndex
];
c
[
1
]
=
coeff
[
coeffIndex
+
1
];
c
[
1
]
=
coeff
[
coeffIndex
+
1
];
c
[
2
]
=
coeff
[
coeffIndex
+
2
];
c
[
2
]
=
coeff
[
coeffIndex
+
2
];
...
...
platforms/opencl/src/kernels/cmapTorsionForce.cl
View file @
a84a2997
...
@@ -71,7 +71,7 @@ __kernel void computeCMAPTorsionForces(int numAtoms, int numTorsions, __global f
...
@@ -71,7 +71,7 @@ __kernel void computeCMAPTorsionForces(int numAtoms, int numTorsions, __global f
int
s
=
(
int
)
(
angleA/delta
)
;
int
s
=
(
int
)
(
angleA/delta
)
;
int
t
=
(
int
)
(
angleB/delta
)
;
int
t
=
(
int
)
(
angleB/delta
)
;
float4
c[4]
;
float4
c[4]
;
int
coeffIndex
=
4*
(
pos.x+s+size*t
)
;
int
coeffIndex
=
pos.x+
4*
(
s+size*t
)
;
c[0]
=
coeff[coeffIndex]
;
c[0]
=
coeff[coeffIndex]
;
c[1]
=
coeff[coeffIndex+1]
;
c[1]
=
coeff[coeffIndex+1]
;
c[2]
=
coeff[coeffIndex+2]
;
c[2]
=
coeff[coeffIndex+2]
;
...
...
serialization/src/CMAPTorsionForceProxy.cpp
View file @
a84a2997
...
@@ -49,7 +49,7 @@ void CMAPTorsionForceProxy::serialize(const void* object, SerializationNode& nod
...
@@ -49,7 +49,7 @@ void CMAPTorsionForceProxy::serialize(const void* object, SerializationNode& nod
int
size
;
int
size
;
vector
<
double
>
energy
;
vector
<
double
>
energy
;
force
.
getMapParameters
(
i
,
size
,
energy
);
force
.
getMapParameters
(
i
,
size
,
energy
);
SerializationNode
&
map
=
maps
.
createChildNode
(
"
Torsion
"
).
setIntProperty
(
"size"
,
size
);
SerializationNode
&
map
=
maps
.
createChildNode
(
"
Map
"
).
setIntProperty
(
"size"
,
size
);
for
(
int
i
=
0
;
i
<
(
int
)
energy
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
energy
.
size
();
i
++
)
map
.
createChildNode
(
"Energy"
).
setDoubleProperty
(
"e"
,
energy
[
i
]);
map
.
createChildNode
(
"Energy"
).
setDoubleProperty
(
"e"
,
energy
[
i
]);
}
}
...
...
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