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
a4020466
"vscode:/vscode.git/clone" did not exist on "326b2385433c5a2cb2b9dc99a5e799fd8bb4d7af"
Commit
a4020466
authored
Jul 14, 2009
by
Peter Eastman
Browse files
Renamed OpenMMContext to Context
parent
95b8dbd6
Changes
139
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
91 additions
and
91 deletions
+91
-91
openmmapi/include/openmm/VariableLangevinIntegrator.h
openmmapi/include/openmm/VariableLangevinIntegrator.h
+4
-4
openmmapi/include/openmm/VariableVerletIntegrator.h
openmmapi/include/openmm/VariableVerletIntegrator.h
+4
-4
openmmapi/include/openmm/VerletIntegrator.h
openmmapi/include/openmm/VerletIntegrator.h
+4
-4
openmmapi/include/openmm/internal/AndersenThermostatImpl.h
openmmapi/include/openmm/internal/AndersenThermostatImpl.h
+4
-4
openmmapi/include/openmm/internal/CMMotionRemoverImpl.h
openmmapi/include/openmm/internal/CMMotionRemoverImpl.h
+4
-4
openmmapi/include/openmm/internal/ContextImpl.h
openmmapi/include/openmm/internal/ContextImpl.h
+13
-13
openmmapi/include/openmm/internal/ForceImpl.h
openmmapi/include/openmm/internal/ForceImpl.h
+9
-9
openmmapi/include/openmm/internal/GBSAOBCForceImpl.h
openmmapi/include/openmm/internal/GBSAOBCForceImpl.h
+4
-4
openmmapi/include/openmm/internal/GBVIForceImpl.h
openmmapi/include/openmm/internal/GBVIForceImpl.h
+4
-4
openmmapi/include/openmm/internal/HarmonicAngleForceImpl.h
openmmapi/include/openmm/internal/HarmonicAngleForceImpl.h
+4
-4
openmmapi/include/openmm/internal/HarmonicBondForceImpl.h
openmmapi/include/openmm/internal/HarmonicBondForceImpl.h
+4
-4
openmmapi/include/openmm/internal/NonbondedForceImpl.h
openmmapi/include/openmm/internal/NonbondedForceImpl.h
+4
-4
openmmapi/include/openmm/internal/PeriodicTorsionForceImpl.h
openmmapi/include/openmm/internal/PeriodicTorsionForceImpl.h
+4
-4
openmmapi/include/openmm/internal/RBTorsionForceImpl.h
openmmapi/include/openmm/internal/RBTorsionForceImpl.h
+4
-4
openmmapi/src/AndersenThermostatImpl.cpp
openmmapi/src/AndersenThermostatImpl.cpp
+3
-3
openmmapi/src/BrownianIntegrator.cpp
openmmapi/src/BrownianIntegrator.cpp
+3
-3
openmmapi/src/CMMotionRemoverImpl.cpp
openmmapi/src/CMMotionRemoverImpl.cpp
+3
-3
openmmapi/src/GBSAOBCForceImpl.cpp
openmmapi/src/GBSAOBCForceImpl.cpp
+4
-4
openmmapi/src/GBVIForceImpl.cpp
openmmapi/src/GBVIForceImpl.cpp
+4
-4
openmmapi/src/HarmonicAngleForceImpl.cpp
openmmapi/src/HarmonicAngleForceImpl.cpp
+4
-4
No files found.
openmmapi/include/openmm/VariableLangevinIntegrator.h
View file @
a4020466
...
@@ -134,11 +134,11 @@ public:
...
@@ -134,11 +134,11 @@ public:
void
stepTo
(
double
time
);
void
stepTo
(
double
time
);
protected:
protected:
/**
/**
* This will be called by the
OpenMM
Context when it is created. It informs the Integrator
* This will be called by the Context when it is created. It informs the Integrator
* of what context it will be integrating, and gives it a chance to do any necessary initialization.
* of what context it will be integrating, and gives it a chance to do any necessary initialization.
* It will also get called again if the application calls reinitialize() on the
OpenMM
Context.
* It will also get called again if the application calls reinitialize() on the Context.
*/
*/
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
/**
/**
* Get the names of all Kernels used by this Integrator.
* Get the names of all Kernels used by this Integrator.
*/
*/
...
@@ -146,7 +146,7 @@ protected:
...
@@ -146,7 +146,7 @@ protected:
private:
private:
double
temperature
,
friction
,
errorTol
;
double
temperature
,
friction
,
errorTol
;
int
randomNumberSeed
;
int
randomNumberSeed
;
OpenMM
ContextImpl
*
context
;
ContextImpl
*
context
;
Kernel
kernel
;
Kernel
kernel
;
};
};
...
...
openmmapi/include/openmm/VariableVerletIntegrator.h
View file @
a4020466
...
@@ -95,18 +95,18 @@ public:
...
@@ -95,18 +95,18 @@ public:
void
stepTo
(
double
time
);
void
stepTo
(
double
time
);
protected:
protected:
/**
/**
* This will be called by the
OpenMM
Context when it is created. It informs the Integrator
* This will be called by the Context when it is created. It informs the Integrator
* of what context it will be integrating, and gives it a chance to do any necessary initialization.
* of what context it will be integrating, and gives it a chance to do any necessary initialization.
* It will also get called again if the application calls reinitialize() on the
OpenMM
Context.
* It will also get called again if the application calls reinitialize() on the Context.
*/
*/
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
/**
/**
* Get the names of all Kernels used by this Integrator.
* Get the names of all Kernels used by this Integrator.
*/
*/
std
::
vector
<
std
::
string
>
getKernelNames
();
std
::
vector
<
std
::
string
>
getKernelNames
();
private:
private:
double
errorTol
;
double
errorTol
;
OpenMM
ContextImpl
*
context
;
ContextImpl
*
context
;
Kernel
kernel
;
Kernel
kernel
;
};
};
...
...
openmmapi/include/openmm/VerletIntegrator.h
View file @
a4020466
...
@@ -58,17 +58,17 @@ public:
...
@@ -58,17 +58,17 @@ public:
void
step
(
int
steps
);
void
step
(
int
steps
);
protected:
protected:
/**
/**
* This will be called by the
OpenMM
Context when it is created. It informs the Integrator
* This will be called by the Context when it is created. It informs the Integrator
* of what context it will be integrating, and gives it a chance to do any necessary initialization.
* of what context it will be integrating, and gives it a chance to do any necessary initialization.
* It will also get called again if the application calls reinitialize() on the
OpenMM
Context.
* It will also get called again if the application calls reinitialize() on the Context.
*/
*/
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
/**
/**
* Get the names of all Kernels used by this Integrator.
* Get the names of all Kernels used by this Integrator.
*/
*/
std
::
vector
<
std
::
string
>
getKernelNames
();
std
::
vector
<
std
::
string
>
getKernelNames
();
private:
private:
OpenMM
ContextImpl
*
context
;
ContextImpl
*
context
;
Kernel
kernel
;
Kernel
kernel
;
};
};
...
...
openmmapi/include/openmm/internal/AndersenThermostatImpl.h
View file @
a4020466
...
@@ -46,15 +46,15 @@ namespace OpenMM {
...
@@ -46,15 +46,15 @@ namespace OpenMM {
class
AndersenThermostatImpl
:
public
ForceImpl
{
class
AndersenThermostatImpl
:
public
ForceImpl
{
public:
public:
AndersenThermostatImpl
(
AndersenThermostat
&
owner
);
AndersenThermostatImpl
(
AndersenThermostat
&
owner
);
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
AndersenThermostat
&
getOwner
()
{
AndersenThermostat
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
);
void
updateContextState
(
ContextImpl
&
context
);
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
)
{
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
)
{
// This force doesn't apply forces to particles.
// This force doesn't apply forces to particles.
}
}
double
calcEnergy
(
OpenMM
ContextImpl
&
context
)
{
double
calcEnergy
(
ContextImpl
&
context
)
{
return
0.0
;
// This force doesn't contribute to the potential energy.
return
0.0
;
// This force doesn't contribute to the potential energy.
}
}
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
();
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
();
...
...
openmmapi/include/openmm/internal/CMMotionRemoverImpl.h
View file @
a4020466
...
@@ -45,15 +45,15 @@ namespace OpenMM {
...
@@ -45,15 +45,15 @@ namespace OpenMM {
class
CMMotionRemoverImpl
:
public
ForceImpl
{
class
CMMotionRemoverImpl
:
public
ForceImpl
{
public:
public:
CMMotionRemoverImpl
(
CMMotionRemover
&
owner
);
CMMotionRemoverImpl
(
CMMotionRemover
&
owner
);
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
CMMotionRemover
&
getOwner
()
{
CMMotionRemover
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
);
void
updateContextState
(
ContextImpl
&
context
);
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
)
{
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
)
{
// This force doesn't apply forces to particles.
// This force doesn't apply forces to particles.
}
}
double
calcEnergy
(
OpenMM
ContextImpl
&
context
)
{
double
calcEnergy
(
ContextImpl
&
context
)
{
return
0.0
;
// This force doesn't contribute to the potential energy.
return
0.0
;
// This force doesn't contribute to the potential energy.
}
}
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
...
...
openmmapi/include/openmm/internal/
OpenMM
ContextImpl.h
→
openmmapi/include/openmm/internal/ContextImpl.h
View file @
a4020466
#ifndef OPENMM_
OPENMM
CONTEXTIMPL_H_
#ifndef OPENMM_CONTEXTIMPL_H_
#define OPENMM_
OPENMM
CONTEXTIMPL_H_
#define OPENMM_CONTEXTIMPL_H_
/* -------------------------------------------------------------------------- *
/* -------------------------------------------------------------------------- *
* OpenMM *
* OpenMM *
...
@@ -42,24 +42,24 @@ namespace OpenMM {
...
@@ -42,24 +42,24 @@ namespace OpenMM {
class
ForceImpl
;
class
ForceImpl
;
class
Integrator
;
class
Integrator
;
class
OpenMM
Context
;
class
Context
;
class
System
;
class
System
;
/**
/**
* This is the internal implementation of a
n OpenMM
Context.
* This is the internal implementation of a
Context.
*/
*/
class
OPENMM_EXPORT
OpenMM
ContextImpl
{
class
OPENMM_EXPORT
ContextImpl
{
public:
public:
/**
/**
* Create an
OpenMM
ContextImpl for a
n OpenMM
Context;
* Create an ContextImpl for a
Context;
*/
*/
OpenMM
ContextImpl
(
OpenMM
Context
&
owner
,
System
&
system
,
Integrator
&
integrator
,
Platform
*
platform
);
ContextImpl
(
Context
&
owner
,
System
&
system
,
Integrator
&
integrator
,
Platform
*
platform
);
~
OpenMM
ContextImpl
();
~
ContextImpl
();
/**
/**
* Get the
OpenMM
Context for which this is the implementation.
* Get the Context for which this is the implementation.
*/
*/
OpenMM
Context
&
getOwner
()
{
Context
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
/**
/**
...
@@ -149,8 +149,8 @@ public:
...
@@ -149,8 +149,8 @@ public:
*/
*/
void
setPlatformData
(
void
*
data
);
void
setPlatformData
(
void
*
data
);
private:
private:
friend
class
OpenMM
Context
;
friend
class
Context
;
OpenMM
Context
&
owner
;
Context
&
owner
;
System
&
system
;
System
&
system
;
Integrator
&
integrator
;
Integrator
&
integrator
;
std
::
vector
<
ForceImpl
*>
forceImpls
;
std
::
vector
<
ForceImpl
*>
forceImpls
;
...
@@ -163,4 +163,4 @@ private:
...
@@ -163,4 +163,4 @@ private:
}
// namespace OpenMM
}
// namespace OpenMM
#endif
/*OPENMM_
OPENMM
CONTEXTIMPL_H_*/
#endif
/*OPENMM_CONTEXTIMPL_H_*/
openmmapi/include/openmm/internal/ForceImpl.h
View file @
a4020466
...
@@ -39,14 +39,14 @@
...
@@ -39,14 +39,14 @@
namespace
OpenMM
{
namespace
OpenMM
{
class
Force
;
class
Force
;
class
OpenMM
ContextImpl
;
class
ContextImpl
;
class
Stream
;
class
Stream
;
/**
/**
* A ForceImpl provides the internal implementation of a Force. When a
n OpenMM
Context is
* A ForceImpl provides the internal implementation of a Force. When a
Context is
* created for a System, it creates a ForceImpl for each Force in the System. The ForceImpl
* created for a System, it creates a ForceImpl for each Force in the System. The ForceImpl
* is permitted to cache information from the Force or System which is needed to apply the
* is permitted to cache information from the Force or System which is needed to apply the
* force efficiently. If the user calls reinitialize() on the
OpenMM
Context, all ForceImpl
* force efficiently. If the user calls reinitialize() on the Context, all ForceImpl
* objects it had previously created are deleted and recreated from scratch.
* objects it had previously created are deleted and recreated from scratch.
*
*
* This is an abstract class. Each Force subclass is responsible for defining its own
* This is an abstract class. Each Force subclass is responsible for defining its own
...
@@ -61,7 +61,7 @@ public:
...
@@ -61,7 +61,7 @@ public:
* This is called after the ForceImpl is created and before updateContextState(), calcForces(),
* This is called after the ForceImpl is created and before updateContextState(), calcForces(),
* or calcEnergy() is called on it. This allows it to do any necessary initialization.
* or calcEnergy() is called on it. This allows it to do any necessary initialization.
*/
*/
virtual
void
initialize
(
OpenMM
ContextImpl
&
context
)
=
0
;
virtual
void
initialize
(
ContextImpl
&
context
)
=
0
;
/**
/**
* Get the Force object from which this ForceImpl was created.
* Get the Force object from which this ForceImpl was created.
*/
*/
...
@@ -69,11 +69,11 @@ public:
...
@@ -69,11 +69,11 @@ public:
/**
/**
* This method is called at the beginning of each time step. It give the ForceImpl a chance
* This method is called at the beginning of each time step. It give the ForceImpl a chance
* to modify the state variables (positions, velocities, and parameters) stored in the
* to modify the state variables (positions, velocities, and parameters) stored in the
*
OpenMM
Context in arbitrary ways before integration is performed.
* Context in arbitrary ways before integration is performed.
*
*
* @param context the context in which the system is being simulated
* @param context the context in which the system is being simulated
*/
*/
virtual
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
=
0
;
virtual
void
updateContextState
(
ContextImpl
&
context
)
=
0
;
/**
/**
* Calculate the force on each particle generated by this ForceImpl. The forces should be <i>added</i>
* Calculate the force on each particle generated by this ForceImpl. The forces should be <i>added</i>
* to the values already present in the array that is passed in. If this ForceImpl does not generate
* to the values already present in the array that is passed in. If this ForceImpl does not generate
...
@@ -82,7 +82,7 @@ public:
...
@@ -82,7 +82,7 @@ public:
* @param context the context in which the system is being simulated
* @param context the context in which the system is being simulated
* @param forces new forces should be added to the value already stored in this
* @param forces new forces should be added to the value already stored in this
*/
*/
virtual
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
)
=
0
;
virtual
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
)
=
0
;
/**
/**
* Calculate this ForceImpl's contribution to the potential energy of the system.
* Calculate this ForceImpl's contribution to the potential energy of the system.
*
*
...
@@ -90,10 +90,10 @@ public:
...
@@ -90,10 +90,10 @@ public:
* @return this force's contribution to the potential energy of the system, or 0 if this
* @return this force's contribution to the potential energy of the system, or 0 if this
* force does not contribute to potential energy
* force does not contribute to potential energy
*/
*/
virtual
double
calcEnergy
(
OpenMM
ContextImpl
&
context
)
=
0
;
virtual
double
calcEnergy
(
ContextImpl
&
context
)
=
0
;
/**
/**
* Get a map containing the default values for all adjustable parameters defined by this ForceImpl. These
* Get a map containing the default values for all adjustable parameters defined by this ForceImpl. These
* parameters and their default values will automatically be added to the
OpenMM
Context.
* parameters and their default values will automatically be added to the Context.
*/
*/
virtual
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
=
0
;
virtual
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
=
0
;
/**
/**
...
...
openmmapi/include/openmm/internal/GBSAOBCForceImpl.h
View file @
a4020466
...
@@ -46,15 +46,15 @@ namespace OpenMM {
...
@@ -46,15 +46,15 @@ namespace OpenMM {
class
GBSAOBCForceImpl
:
public
ForceImpl
{
class
GBSAOBCForceImpl
:
public
ForceImpl
{
public:
public:
GBSAOBCForceImpl
(
GBSAOBCForce
&
owner
);
GBSAOBCForceImpl
(
GBSAOBCForce
&
owner
);
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
GBSAOBCForce
&
getOwner
()
{
GBSAOBCForce
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
updateContextState
(
ContextImpl
&
context
)
{
// This force field doesn't update the state directly.
// This force field doesn't update the state directly.
}
}
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
);
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
);
double
calcEnergy
(
OpenMM
ContextImpl
&
context
);
double
calcEnergy
(
ContextImpl
&
context
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
}
...
...
openmmapi/include/openmm/internal/GBVIForceImpl.h
View file @
a4020466
...
@@ -46,7 +46,7 @@ namespace OpenMM {
...
@@ -46,7 +46,7 @@ namespace OpenMM {
class
GBVIForceImpl
:
public
ForceImpl
{
class
GBVIForceImpl
:
public
ForceImpl
{
public:
public:
GBVIForceImpl
(
GBVIForce
&
owner
);
GBVIForceImpl
(
GBVIForce
&
owner
);
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
GBVIForce
&
getOwner
()
{
GBVIForce
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
...
@@ -56,11 +56,11 @@ public:
...
@@ -56,11 +56,11 @@ public:
void
findScaledRadii
(
int
numberOfParticles
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
bondIndices
,
void
findScaledRadii
(
int
numberOfParticles
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
bondIndices
,
const
std
::
vector
<
double
>
&
bondLengths
,
std
::
vector
<
double
>
&
scaledRadii
)
const
;
const
std
::
vector
<
double
>
&
bondLengths
,
std
::
vector
<
double
>
&
scaledRadii
)
const
;
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
updateContextState
(
ContextImpl
&
context
)
{
// This force field doesn't update the state directly.
// This force field doesn't update the state directly.
}
}
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
);
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
);
double
calcEnergy
(
OpenMM
ContextImpl
&
context
);
double
calcEnergy
(
ContextImpl
&
context
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
}
...
...
openmmapi/include/openmm/internal/HarmonicAngleForceImpl.h
View file @
a4020466
...
@@ -49,15 +49,15 @@ class HarmonicAngleForceImpl : public ForceImpl {
...
@@ -49,15 +49,15 @@ class HarmonicAngleForceImpl : public ForceImpl {
public:
public:
HarmonicAngleForceImpl
(
HarmonicAngleForce
&
owner
);
HarmonicAngleForceImpl
(
HarmonicAngleForce
&
owner
);
~
HarmonicAngleForceImpl
();
~
HarmonicAngleForceImpl
();
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
HarmonicAngleForce
&
getOwner
()
{
HarmonicAngleForce
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
updateContextState
(
ContextImpl
&
context
)
{
// This force field doesn't update the state directly.
// This force field doesn't update the state directly.
}
}
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
);
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
);
double
calcEnergy
(
OpenMM
ContextImpl
&
context
);
double
calcEnergy
(
ContextImpl
&
context
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
}
...
...
openmmapi/include/openmm/internal/HarmonicBondForceImpl.h
View file @
a4020466
...
@@ -49,15 +49,15 @@ class HarmonicBondForceImpl : public ForceImpl {
...
@@ -49,15 +49,15 @@ class HarmonicBondForceImpl : public ForceImpl {
public:
public:
HarmonicBondForceImpl
(
HarmonicBondForce
&
owner
);
HarmonicBondForceImpl
(
HarmonicBondForce
&
owner
);
~
HarmonicBondForceImpl
();
~
HarmonicBondForceImpl
();
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
HarmonicBondForce
&
getOwner
()
{
HarmonicBondForce
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
updateContextState
(
ContextImpl
&
context
)
{
// This force field doesn't update the state directly.
// This force field doesn't update the state directly.
}
}
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
);
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
);
double
calcEnergy
(
OpenMM
ContextImpl
&
context
);
double
calcEnergy
(
ContextImpl
&
context
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
}
...
...
openmmapi/include/openmm/internal/NonbondedForceImpl.h
View file @
a4020466
...
@@ -49,15 +49,15 @@ class NonbondedForceImpl : public ForceImpl {
...
@@ -49,15 +49,15 @@ class NonbondedForceImpl : public ForceImpl {
public:
public:
NonbondedForceImpl
(
NonbondedForce
&
owner
);
NonbondedForceImpl
(
NonbondedForce
&
owner
);
~
NonbondedForceImpl
();
~
NonbondedForceImpl
();
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
NonbondedForce
&
getOwner
()
{
NonbondedForce
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
updateContextState
(
ContextImpl
&
context
)
{
// This force field doesn't update the state directly.
// This force field doesn't update the state directly.
}
}
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
);
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
);
double
calcEnergy
(
OpenMM
ContextImpl
&
context
);
double
calcEnergy
(
ContextImpl
&
context
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
}
...
...
openmmapi/include/openmm/internal/PeriodicTorsionForceImpl.h
View file @
a4020466
...
@@ -49,15 +49,15 @@ class PeriodicTorsionForceImpl : public ForceImpl {
...
@@ -49,15 +49,15 @@ class PeriodicTorsionForceImpl : public ForceImpl {
public:
public:
PeriodicTorsionForceImpl
(
PeriodicTorsionForce
&
owner
);
PeriodicTorsionForceImpl
(
PeriodicTorsionForce
&
owner
);
~
PeriodicTorsionForceImpl
();
~
PeriodicTorsionForceImpl
();
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
PeriodicTorsionForce
&
getOwner
()
{
PeriodicTorsionForce
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
updateContextState
(
ContextImpl
&
context
)
{
// This force field doesn't update the state directly.
// This force field doesn't update the state directly.
}
}
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
);
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
);
double
calcEnergy
(
OpenMM
ContextImpl
&
context
);
double
calcEnergy
(
ContextImpl
&
context
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
}
...
...
openmmapi/include/openmm/internal/RBTorsionForceImpl.h
View file @
a4020466
...
@@ -49,15 +49,15 @@ class RBTorsionForceImpl : public ForceImpl {
...
@@ -49,15 +49,15 @@ class RBTorsionForceImpl : public ForceImpl {
public:
public:
RBTorsionForceImpl
(
RBTorsionForce
&
owner
);
RBTorsionForceImpl
(
RBTorsionForce
&
owner
);
~
RBTorsionForceImpl
();
~
RBTorsionForceImpl
();
void
initialize
(
OpenMM
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
RBTorsionForce
&
getOwner
()
{
RBTorsionForce
&
getOwner
()
{
return
owner
;
return
owner
;
}
}
void
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
updateContextState
(
ContextImpl
&
context
)
{
// This force field doesn't update the state directly.
// This force field doesn't update the state directly.
}
}
void
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
);
void
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
);
double
calcEnergy
(
OpenMM
ContextImpl
&
context
);
double
calcEnergy
(
ContextImpl
&
context
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
}
...
...
openmmapi/src/AndersenThermostatImpl.cpp
View file @
a4020466
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/AndersenThermostatImpl.h"
#include "openmm/internal/AndersenThermostatImpl.h"
#include "openmm/internal/
OpenMM
ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/Integrator.h"
#include "openmm/Integrator.h"
#include "openmm/System.h"
#include "openmm/System.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
...
@@ -42,12 +42,12 @@ using std::vector;
...
@@ -42,12 +42,12 @@ using std::vector;
AndersenThermostatImpl
::
AndersenThermostatImpl
(
AndersenThermostat
&
owner
)
:
owner
(
owner
)
{
AndersenThermostatImpl
::
AndersenThermostatImpl
(
AndersenThermostat
&
owner
)
:
owner
(
owner
)
{
}
}
void
AndersenThermostatImpl
::
initialize
(
OpenMM
ContextImpl
&
context
)
{
void
AndersenThermostatImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
ApplyAndersenThermostatKernel
::
Name
(),
context
);
kernel
=
context
.
getPlatform
().
createKernel
(
ApplyAndersenThermostatKernel
::
Name
(),
context
);
dynamic_cast
<
ApplyAndersenThermostatKernel
&>
(
kernel
.
getImpl
()).
initialize
(
context
.
getSystem
(),
owner
);
dynamic_cast
<
ApplyAndersenThermostatKernel
&>
(
kernel
.
getImpl
()).
initialize
(
context
.
getSystem
(),
owner
);
}
}
void
AndersenThermostatImpl
::
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
AndersenThermostatImpl
::
updateContextState
(
ContextImpl
&
context
)
{
dynamic_cast
<
ApplyAndersenThermostatKernel
&>
(
kernel
.
getImpl
()).
execute
(
context
);
dynamic_cast
<
ApplyAndersenThermostatKernel
&>
(
kernel
.
getImpl
()).
execute
(
context
);
}
}
...
...
openmmapi/src/BrownianIntegrator.cpp
View file @
a4020466
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/BrownianIntegrator.h"
#include "openmm/BrownianIntegrator.h"
#include "openmm/
OpenMM
Context.h"
#include "openmm/Context.h"
#include "openmm/internal/
OpenMM
ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
#include <ctime>
#include <ctime>
#include <string>
#include <string>
...
@@ -48,7 +48,7 @@ BrownianIntegrator::BrownianIntegrator(double temperature, double frictionCoeff,
...
@@ -48,7 +48,7 @@ BrownianIntegrator::BrownianIntegrator(double temperature, double frictionCoeff,
setRandomNumberSeed
((
int
)
time
(
NULL
));
setRandomNumberSeed
((
int
)
time
(
NULL
));
}
}
void
BrownianIntegrator
::
initialize
(
OpenMM
ContextImpl
&
contextRef
)
{
void
BrownianIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
context
=
&
contextRef
;
context
=
&
contextRef
;
kernel
=
context
->
getPlatform
().
createKernel
(
IntegrateBrownianStepKernel
::
Name
(),
contextRef
);
kernel
=
context
->
getPlatform
().
createKernel
(
IntegrateBrownianStepKernel
::
Name
(),
contextRef
);
dynamic_cast
<
IntegrateBrownianStepKernel
&>
(
kernel
.
getImpl
()).
initialize
(
contextRef
.
getSystem
(),
*
this
);
dynamic_cast
<
IntegrateBrownianStepKernel
&>
(
kernel
.
getImpl
()).
initialize
(
contextRef
.
getSystem
(),
*
this
);
...
...
openmmapi/src/CMMotionRemoverImpl.cpp
View file @
a4020466
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/CMMotionRemoverImpl.h"
#include "openmm/internal/CMMotionRemoverImpl.h"
#include "openmm/internal/
OpenMM
ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/Integrator.h"
#include "openmm/Integrator.h"
#include "openmm/System.h"
#include "openmm/System.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
...
@@ -42,13 +42,13 @@ using std::vector;
...
@@ -42,13 +42,13 @@ using std::vector;
CMMotionRemoverImpl
::
CMMotionRemoverImpl
(
CMMotionRemover
&
owner
)
:
owner
(
owner
)
{
CMMotionRemoverImpl
::
CMMotionRemoverImpl
(
CMMotionRemover
&
owner
)
:
owner
(
owner
)
{
}
}
void
CMMotionRemoverImpl
::
initialize
(
OpenMM
ContextImpl
&
context
)
{
void
CMMotionRemoverImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
RemoveCMMotionKernel
::
Name
(),
context
);
kernel
=
context
.
getPlatform
().
createKernel
(
RemoveCMMotionKernel
::
Name
(),
context
);
const
System
&
system
=
context
.
getSystem
();
const
System
&
system
=
context
.
getSystem
();
dynamic_cast
<
RemoveCMMotionKernel
&>
(
kernel
.
getImpl
()).
initialize
(
system
,
owner
);
dynamic_cast
<
RemoveCMMotionKernel
&>
(
kernel
.
getImpl
()).
initialize
(
system
,
owner
);
}
}
void
CMMotionRemoverImpl
::
updateContextState
(
OpenMM
ContextImpl
&
context
)
{
void
CMMotionRemoverImpl
::
updateContextState
(
ContextImpl
&
context
)
{
dynamic_cast
<
RemoveCMMotionKernel
&>
(
kernel
.
getImpl
()).
execute
(
context
);
dynamic_cast
<
RemoveCMMotionKernel
&>
(
kernel
.
getImpl
()).
execute
(
context
);
}
}
...
...
openmmapi/src/GBSAOBCForceImpl.cpp
View file @
a4020466
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/internal/GBSAOBCForceImpl.h"
#include "openmm/internal/GBSAOBCForceImpl.h"
#include "openmm/internal/
OpenMM
ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
#include <vector>
#include <vector>
...
@@ -41,18 +41,18 @@ using std::vector;
...
@@ -41,18 +41,18 @@ using std::vector;
GBSAOBCForceImpl
::
GBSAOBCForceImpl
(
GBSAOBCForce
&
owner
)
:
owner
(
owner
)
{
GBSAOBCForceImpl
::
GBSAOBCForceImpl
(
GBSAOBCForce
&
owner
)
:
owner
(
owner
)
{
}
}
void
GBSAOBCForceImpl
::
initialize
(
OpenMM
ContextImpl
&
context
)
{
void
GBSAOBCForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcGBSAOBCForceKernel
::
Name
(),
context
);
kernel
=
context
.
getPlatform
().
createKernel
(
CalcGBSAOBCForceKernel
::
Name
(),
context
);
if
(
owner
.
getNumParticles
()
!=
context
.
getSystem
().
getNumParticles
())
if
(
owner
.
getNumParticles
()
!=
context
.
getSystem
().
getNumParticles
())
throw
OpenMMException
(
"GBSAOBCForce must have exactly as many particles as the System it belongs to."
);
throw
OpenMMException
(
"GBSAOBCForce must have exactly as many particles as the System it belongs to."
);
dynamic_cast
<
CalcGBSAOBCForceKernel
&>
(
kernel
.
getImpl
()).
initialize
(
context
.
getSystem
(),
owner
);
dynamic_cast
<
CalcGBSAOBCForceKernel
&>
(
kernel
.
getImpl
()).
initialize
(
context
.
getSystem
(),
owner
);
}
}
void
GBSAOBCForceImpl
::
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
)
{
void
GBSAOBCForceImpl
::
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
)
{
dynamic_cast
<
CalcGBSAOBCForceKernel
&>
(
kernel
.
getImpl
()).
executeForces
(
context
);
dynamic_cast
<
CalcGBSAOBCForceKernel
&>
(
kernel
.
getImpl
()).
executeForces
(
context
);
}
}
double
GBSAOBCForceImpl
::
calcEnergy
(
OpenMM
ContextImpl
&
context
)
{
double
GBSAOBCForceImpl
::
calcEnergy
(
ContextImpl
&
context
)
{
return
dynamic_cast
<
CalcGBSAOBCForceKernel
&>
(
kernel
.
getImpl
()).
executeEnergy
(
context
);
return
dynamic_cast
<
CalcGBSAOBCForceKernel
&>
(
kernel
.
getImpl
()).
executeEnergy
(
context
);
}
}
...
...
openmmapi/src/GBVIForceImpl.cpp
View file @
a4020466
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/GBVIForceImpl.h"
#include "openmm/internal/GBVIForceImpl.h"
#include "openmm/internal/
OpenMM
ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
#include <vector>
#include <vector>
...
@@ -43,7 +43,7 @@ using std::vector;
...
@@ -43,7 +43,7 @@ using std::vector;
GBVIForceImpl
::
GBVIForceImpl
(
GBVIForce
&
owner
)
:
owner
(
owner
)
{
GBVIForceImpl
::
GBVIForceImpl
(
GBVIForce
&
owner
)
:
owner
(
owner
)
{
}
}
void
GBVIForceImpl
::
initialize
(
OpenMM
ContextImpl
&
context
)
{
void
GBVIForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcGBVIForceKernel
::
Name
(),
context
);
kernel
=
context
.
getPlatform
().
createKernel
(
CalcGBVIForceKernel
::
Name
(),
context
);
if
(
owner
.
getNumParticles
()
!=
context
.
getSystem
().
getNumParticles
())
if
(
owner
.
getNumParticles
()
!=
context
.
getSystem
().
getNumParticles
())
throw
OpenMMException
(
"GBVIForce must have exactly as many particles as the System it belongs to."
);
throw
OpenMMException
(
"GBVIForce must have exactly as many particles as the System it belongs to."
);
...
@@ -188,11 +188,11 @@ void GBVIForceImpl::findScaledRadii( int numberOfParticles, const std::vector<st
...
@@ -188,11 +188,11 @@ void GBVIForceImpl::findScaledRadii( int numberOfParticles, const std::vector<st
}
}
void
GBVIForceImpl
::
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
)
{
void
GBVIForceImpl
::
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
)
{
dynamic_cast
<
CalcGBVIForceKernel
&>
(
kernel
.
getImpl
()).
executeForces
(
context
);
dynamic_cast
<
CalcGBVIForceKernel
&>
(
kernel
.
getImpl
()).
executeForces
(
context
);
}
}
double
GBVIForceImpl
::
calcEnergy
(
OpenMM
ContextImpl
&
context
)
{
double
GBVIForceImpl
::
calcEnergy
(
ContextImpl
&
context
)
{
return
dynamic_cast
<
CalcGBVIForceKernel
&>
(
kernel
.
getImpl
()).
executeEnergy
(
context
);
return
dynamic_cast
<
CalcGBVIForceKernel
&>
(
kernel
.
getImpl
()).
executeEnergy
(
context
);
}
}
...
...
openmmapi/src/HarmonicAngleForceImpl.cpp
View file @
a4020466
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/
OpenMM
ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/HarmonicAngleForceImpl.h"
#include "openmm/internal/HarmonicAngleForceImpl.h"
#include "openmm/kernels.h"
#include "openmm/kernels.h"
...
@@ -44,16 +44,16 @@ HarmonicAngleForceImpl::HarmonicAngleForceImpl(HarmonicAngleForce& owner) : owne
...
@@ -44,16 +44,16 @@ HarmonicAngleForceImpl::HarmonicAngleForceImpl(HarmonicAngleForce& owner) : owne
HarmonicAngleForceImpl
::~
HarmonicAngleForceImpl
()
{
HarmonicAngleForceImpl
::~
HarmonicAngleForceImpl
()
{
}
}
void
HarmonicAngleForceImpl
::
initialize
(
OpenMM
ContextImpl
&
context
)
{
void
HarmonicAngleForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcHarmonicAngleForceKernel
::
Name
(),
context
);
kernel
=
context
.
getPlatform
().
createKernel
(
CalcHarmonicAngleForceKernel
::
Name
(),
context
);
dynamic_cast
<
CalcHarmonicAngleForceKernel
&>
(
kernel
.
getImpl
()).
initialize
(
context
.
getSystem
(),
owner
);
dynamic_cast
<
CalcHarmonicAngleForceKernel
&>
(
kernel
.
getImpl
()).
initialize
(
context
.
getSystem
(),
owner
);
}
}
void
HarmonicAngleForceImpl
::
calcForces
(
OpenMM
ContextImpl
&
context
,
Stream
&
forces
)
{
void
HarmonicAngleForceImpl
::
calcForces
(
ContextImpl
&
context
,
Stream
&
forces
)
{
dynamic_cast
<
CalcHarmonicAngleForceKernel
&>
(
kernel
.
getImpl
()).
executeForces
(
context
);
dynamic_cast
<
CalcHarmonicAngleForceKernel
&>
(
kernel
.
getImpl
()).
executeForces
(
context
);
}
}
double
HarmonicAngleForceImpl
::
calcEnergy
(
OpenMM
ContextImpl
&
context
)
{
double
HarmonicAngleForceImpl
::
calcEnergy
(
ContextImpl
&
context
)
{
return
dynamic_cast
<
CalcHarmonicAngleForceKernel
&>
(
kernel
.
getImpl
()).
executeEnergy
(
context
);
return
dynamic_cast
<
CalcHarmonicAngleForceKernel
&>
(
kernel
.
getImpl
()).
executeEnergy
(
context
);
}
}
...
...
Prev
1
2
3
4
5
6
7
Next
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