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
222460ef
"wrappers/python/vscode:/vscode.git/clone" did not exist on "ae0ad5c9832b9cd4ed579a2db38ff9e9cb2fccef"
Commit
222460ef
authored
Sep 26, 2016
by
peastman
Browse files
CompoundIntegrator::stateChanged() calls through to component integrators
parent
985d927a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
openmmapi/include/openmm/CompoundIntegrator.h
openmmapi/include/openmm/CompoundIntegrator.h
+11
-1
openmmapi/src/CompoundIntegrator.cpp
openmmapi/src/CompoundIntegrator.cpp
+6
-1
No files found.
openmmapi/include/openmm/CompoundIntegrator.h
View file @
222460ef
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2015 Stanford University and the Authors.
*
* Portions copyright (c) 2015
-2016
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -171,6 +171,16 @@ protected:
...
@@ -171,6 +171,16 @@ protected:
* The implementation returns the union of all kernel names required by all Integrators that have been added.
* The implementation returns the union of all kernel names required by all Integrators that have been added.
*/
*/
std
::
vector
<
std
::
string
>
getKernelNames
();
std
::
vector
<
std
::
string
>
getKernelNames
();
/**
* This will be called by the Context when the user modifies aspects of the context state, such
* as positions, velocities, or parameters. This gives the Integrator a chance to discard cached
* information. This is <i>only</i> called when the user modifies information using methods of the Context
* object. It is <i>not</i> called when a ForceImpl object modifies state information in its updateContextState()
* method (unless the ForceImpl calls a Context method to perform the modification).
*
* @param changed this specifies what aspect of the Context was changed
*/
void
stateChanged
(
State
::
DataType
changed
);
/**
/**
* Compute the kinetic energy of the system at the current time.
* Compute the kinetic energy of the system at the current time.
*
*
...
...
openmmapi/src/CompoundIntegrator.cpp
View file @
222460ef
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2015 Stanford University and the Authors.
*
* Portions copyright (c) 2015
-2016
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -120,6 +120,11 @@ vector<string> CompoundIntegrator::getKernelNames() {
...
@@ -120,6 +120,11 @@ vector<string> CompoundIntegrator::getKernelNames() {
return
kernels
;
return
kernels
;
}
}
void
CompoundIntegrator
::
stateChanged
(
State
::
DataType
changed
)
{
for
(
int
i
=
0
;
i
<
integrators
.
size
();
i
++
)
integrators
[
i
]
->
stateChanged
(
changed
);
}
double
CompoundIntegrator
::
computeKineticEnergy
()
{
double
CompoundIntegrator
::
computeKineticEnergy
()
{
return
integrators
[
currentIntegrator
]
->
computeKineticEnergy
();
return
integrators
[
currentIntegrator
]
->
computeKineticEnergy
();
}
}
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