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
980003cc
Commit
980003cc
authored
Dec 19, 2008
by
Peter Eastman
Browse files
OpenMMContext.reinitialize() works correctly with CudaPlatform. Also fixed an incorrect comment.
parent
dd741b6d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
17 deletions
+6
-17
openmmapi/include/VerletIntegrator.h
openmmapi/include/VerletIntegrator.h
+1
-1
openmmapi/include/internal/OpenMMContextImpl.h
openmmapi/include/internal/OpenMMContextImpl.h
+0
-4
openmmapi/src/OpenMMContext.cpp
openmmapi/src/OpenMMContext.cpp
+5
-1
openmmapi/src/OpenMMContextImpl.cpp
openmmapi/src/OpenMMContextImpl.cpp
+0
-11
No files found.
openmmapi/include/VerletIntegrator.h
View file @
980003cc
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
namespace
OpenMM
{
namespace
OpenMM
{
/**
/**
* This is an Integrator which simulates a System using the
leap-frog
Verlet algorithm.
* This is an Integrator which simulates a System using the
velocity
Verlet algorithm.
*/
*/
class
OPENMM_EXPORT
VerletIntegrator
:
public
Integrator
{
class
OPENMM_EXPORT
VerletIntegrator
:
public
Integrator
{
...
...
openmmapi/include/internal/OpenMMContextImpl.h
View file @
980003cc
...
@@ -144,10 +144,6 @@ public:
...
@@ -144,10 +144,6 @@ public:
* ForceImpl in the system, allowing them to modify the values of state variables.
* ForceImpl in the system, allowing them to modify the values of state variables.
*/
*/
void
updateContextState
();
void
updateContextState
();
/**
* Delete all ForceImpl objects that have been created and create new ones.
*/
void
reinitialize
();
/**
/**
* Get the platform-specific data stored in this context.
* Get the platform-specific data stored in this context.
*/
*/
...
...
openmmapi/src/OpenMMContext.cpp
View file @
980003cc
...
@@ -113,5 +113,9 @@ void OpenMMContext::setParameter(string name, double value) {
...
@@ -113,5 +113,9 @@ void OpenMMContext::setParameter(string name, double value) {
}
}
void
OpenMMContext
::
reinitialize
()
{
void
OpenMMContext
::
reinitialize
()
{
impl
->
reinitialize
();
System
&
system
=
impl
->
getSystem
();
Integrator
&
integrator
=
impl
->
getIntegrator
();
Platform
&
platform
=
impl
->
getPlatform
();
delete
impl
;
impl
=
new
OpenMMContextImpl
(
*
this
,
system
,
integrator
,
&
platform
);
}
}
openmmapi/src/OpenMMContextImpl.cpp
View file @
980003cc
...
@@ -121,17 +121,6 @@ void OpenMMContextImpl::updateContextState() {
...
@@ -121,17 +121,6 @@ void OpenMMContextImpl::updateContextState() {
forceImpls
[
i
]
->
updateContextState
(
*
this
);
forceImpls
[
i
]
->
updateContextState
(
*
this
);
}
}
void
OpenMMContextImpl
::
reinitialize
()
{
for
(
int
i
=
0
;
i
<
(
int
)
forceImpls
.
size
();
++
i
)
delete
forceImpls
[
i
];
forceImpls
.
resize
(
0
);
for
(
int
i
=
0
;
i
<
system
.
getNumForces
();
++
i
)
{
forceImpls
.
push_back
(
system
.
getForce
(
i
).
createImpl
());
forceImpls
[
i
]
->
initialize
(
*
this
);
}
integrator
.
initialize
(
*
this
);
}
void
*
OpenMMContextImpl
::
getPlatformData
()
{
void
*
OpenMMContextImpl
::
getPlatformData
()
{
return
platformData
;
return
platformData
;
}
}
...
...
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