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
0307a0db
Commit
0307a0db
authored
Apr 15, 2013
by
Yutong Zhao
Browse files
Context constructor now uses const System&, guaranteeing that System won't be modified.
parent
19757775
Changes
138
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
43 additions
and
43 deletions
+43
-43
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
.../openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
...a/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaGeneralizedKirkwoodForceImpl.h
...lude/openmm/internal/AmoebaGeneralizedKirkwoodForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
...api/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
...nmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaOutOfPlaneBendForceImpl.h
...i/include/openmm/internal/AmoebaOutOfPlaneBendForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaPiTorsionForceImpl.h
...nmmapi/include/openmm/internal/AmoebaPiTorsionForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaStretchBendForceImpl.h
...mapi/include/openmm/internal/AmoebaStretchBendForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaTorsionTorsionForceImpl.h
...i/include/openmm/internal/AmoebaTorsionTorsionForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
...ba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
...pi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
+3
-3
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaBondForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaBondForceImpl.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
...s/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForceImpl.cpp
...oeba/openmmapi/src/AmoebaGeneralizedKirkwoodForceImpl.cpp
+2
-2
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForceImpl.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
+1
-1
No files found.
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
View file @
0307a0db
...
...
@@ -47,10 +47,10 @@ namespace OpenMM {
class
AmoebaAngleForceImpl
:
public
ForceImpl
{
public:
AmoebaAngleForceImpl
(
AmoebaAngleForce
&
owner
);
AmoebaAngleForceImpl
(
const
AmoebaAngleForce
&
owner
);
~
AmoebaAngleForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaAngleForce
&
getOwner
()
{
const
AmoebaAngleForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -63,7 +63,7 @@ public:
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaAngleForce
&
owner
;
const
AmoebaAngleForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
View file @
0307a0db
...
...
@@ -48,10 +48,10 @@ namespace OpenMM {
class
AmoebaBondForceImpl
:
public
ForceImpl
{
public:
AmoebaBondForceImpl
(
AmoebaBondForce
&
owner
);
AmoebaBondForceImpl
(
const
AmoebaBondForce
&
owner
);
~
AmoebaBondForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaBondForce
&
getOwner
()
{
const
AmoebaBondForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -66,7 +66,7 @@ public:
std
::
vector
<
std
::
pair
<
int
,
int
>
>
getBondedParticles
()
const
;
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaBondForce
&
owner
;
const
AmoebaBondForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaGeneralizedKirkwoodForceImpl.h
View file @
0307a0db
...
...
@@ -45,9 +45,9 @@ namespace OpenMM {
class
AmoebaGeneralizedKirkwoodForceImpl
:
public
ForceImpl
{
public:
AmoebaGeneralizedKirkwoodForceImpl
(
AmoebaGeneralizedKirkwoodForce
&
owner
);
AmoebaGeneralizedKirkwoodForceImpl
(
const
AmoebaGeneralizedKirkwoodForce
&
owner
);
void
initialize
(
ContextImpl
&
context
);
AmoebaGeneralizedKirkwoodForce
&
getOwner
()
{
const
AmoebaGeneralizedKirkwoodForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -63,7 +63,7 @@ public:
}
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaGeneralizedKirkwoodForce
&
owner
;
const
AmoebaGeneralizedKirkwoodForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
View file @
0307a0db
...
...
@@ -47,10 +47,10 @@ namespace OpenMM {
class
AmoebaInPlaneAngleForceImpl
:
public
ForceImpl
{
public:
AmoebaInPlaneAngleForceImpl
(
AmoebaInPlaneAngleForce
&
owner
);
AmoebaInPlaneAngleForceImpl
(
const
AmoebaInPlaneAngleForce
&
owner
);
~
AmoebaInPlaneAngleForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaInPlaneAngleForce
&
getOwner
()
{
const
AmoebaInPlaneAngleForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -63,7 +63,7 @@ public:
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaInPlaneAngleForce
&
owner
;
const
AmoebaInPlaneAngleForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
View file @
0307a0db
...
...
@@ -47,10 +47,10 @@ namespace OpenMM {
class
OPENMM_EXPORT_AMOEBA
AmoebaMultipoleForceImpl
:
public
ForceImpl
{
public:
AmoebaMultipoleForceImpl
(
AmoebaMultipoleForce
&
owner
);
AmoebaMultipoleForceImpl
(
const
AmoebaMultipoleForce
&
owner
);
~
AmoebaMultipoleForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaMultipoleForce
&
getOwner
()
{
const
AmoebaMultipoleForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -90,7 +90,7 @@ public:
private:
AmoebaMultipoleForce
&
owner
;
const
AmoebaMultipoleForce
&
owner
;
Kernel
kernel
;
static
int
CovalentDegrees
[
AmoebaMultipoleForce
::
CovalentEnd
];
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaOutOfPlaneBendForceImpl.h
View file @
0307a0db
...
...
@@ -47,10 +47,10 @@ namespace OpenMM {
class
AmoebaOutOfPlaneBendForceImpl
:
public
ForceImpl
{
public:
AmoebaOutOfPlaneBendForceImpl
(
AmoebaOutOfPlaneBendForce
&
owner
);
AmoebaOutOfPlaneBendForceImpl
(
const
AmoebaOutOfPlaneBendForce
&
owner
);
~
AmoebaOutOfPlaneBendForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaOutOfPlaneBendForce
&
getOwner
()
{
const
AmoebaOutOfPlaneBendForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -63,7 +63,7 @@ public:
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaOutOfPlaneBendForce
&
owner
;
const
AmoebaOutOfPlaneBendForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaPiTorsionForceImpl.h
View file @
0307a0db
...
...
@@ -47,10 +47,10 @@ namespace OpenMM {
class
AmoebaPiTorsionForceImpl
:
public
ForceImpl
{
public:
AmoebaPiTorsionForceImpl
(
AmoebaPiTorsionForce
&
owner
);
AmoebaPiTorsionForceImpl
(
const
AmoebaPiTorsionForce
&
owner
);
~
AmoebaPiTorsionForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaPiTorsionForce
&
getOwner
()
{
const
AmoebaPiTorsionForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -63,7 +63,7 @@ public:
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaPiTorsionForce
&
owner
;
const
AmoebaPiTorsionForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaStretchBendForceImpl.h
View file @
0307a0db
...
...
@@ -47,10 +47,10 @@ namespace OpenMM {
class
AmoebaStretchBendForceImpl
:
public
ForceImpl
{
public:
AmoebaStretchBendForceImpl
(
AmoebaStretchBendForce
&
owner
);
AmoebaStretchBendForceImpl
(
const
AmoebaStretchBendForce
&
owner
);
~
AmoebaStretchBendForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaStretchBendForce
&
getOwner
()
{
const
AmoebaStretchBendForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -63,7 +63,7 @@ public:
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaStretchBendForce
&
owner
;
const
AmoebaStretchBendForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaTorsionTorsionForceImpl.h
View file @
0307a0db
...
...
@@ -46,10 +46,10 @@ namespace OpenMM {
class
AmoebaTorsionTorsionForceImpl
:
public
ForceImpl
{
public:
AmoebaTorsionTorsionForceImpl
(
AmoebaTorsionTorsionForce
&
owner
);
AmoebaTorsionTorsionForceImpl
(
const
AmoebaTorsionTorsionForce
&
owner
);
~
AmoebaTorsionTorsionForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaTorsionTorsionForce
&
getOwner
()
{
const
AmoebaTorsionTorsionForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -64,7 +64,7 @@ public:
OPENMM_EXPORT_AMOEBA
static
void
reorderGrid
(
const
TorsionTorsionGrid
&
grid
,
TorsionTorsionGrid
&
reorderedGrid
);
private:
AmoebaTorsionTorsionForce
&
owner
;
const
AmoebaTorsionTorsionForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
View file @
0307a0db
...
...
@@ -49,10 +49,10 @@ class System;
class
OPENMM_EXPORT_AMOEBA
AmoebaVdwForceImpl
:
public
ForceImpl
{
public:
AmoebaVdwForceImpl
(
AmoebaVdwForce
&
owner
);
AmoebaVdwForceImpl
(
const
AmoebaVdwForce
&
owner
);
~
AmoebaVdwForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaVdwForce
&
getOwner
()
{
const
AmoebaVdwForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -70,7 +70,7 @@ public:
static
double
calcDispersionCorrection
(
const
System
&
system
,
const
AmoebaVdwForce
&
force
);
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaVdwForce
&
owner
;
const
AmoebaVdwForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
View file @
0307a0db
...
...
@@ -47,10 +47,10 @@ namespace OpenMM {
class
OPENMM_EXPORT_AMOEBA
AmoebaWcaDispersionForceImpl
:
public
ForceImpl
{
public:
AmoebaWcaDispersionForceImpl
(
AmoebaWcaDispersionForce
&
owner
);
AmoebaWcaDispersionForceImpl
(
const
AmoebaWcaDispersionForce
&
owner
);
~
AmoebaWcaDispersionForceImpl
();
void
initialize
(
ContextImpl
&
context
);
AmoebaWcaDispersionForce
&
getOwner
()
{
const
AmoebaWcaDispersionForce
&
getOwner
()
const
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -82,7 +82,7 @@ public:
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaWcaDispersionForce
&
owner
;
const
AmoebaWcaDispersionForce
&
owner
;
Kernel
kernel
;
};
...
...
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
View file @
0307a0db
...
...
@@ -95,7 +95,7 @@ void AmoebaAngleForce::setAmoebaGlobalAngleSextic(double sexticK ) {
_globalSexticK
=
sexticK
;
}
ForceImpl
*
AmoebaAngleForce
::
createImpl
()
{
ForceImpl
*
AmoebaAngleForce
::
createImpl
()
const
{
return
new
AmoebaAngleForceImpl
(
*
this
);
}
...
...
plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp
View file @
0307a0db
...
...
@@ -39,7 +39,7 @@ using std::pair;
using
std
::
vector
;
using
std
::
set
;
AmoebaAngleForceImpl
::
AmoebaAngleForceImpl
(
AmoebaAngleForce
&
owner
)
:
owner
(
owner
)
{
AmoebaAngleForceImpl
::
AmoebaAngleForceImpl
(
const
AmoebaAngleForce
&
owner
)
:
owner
(
owner
)
{
}
AmoebaAngleForceImpl
::~
AmoebaAngleForceImpl
()
{
...
...
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
View file @
0307a0db
...
...
@@ -75,7 +75,7 @@ double AmoebaBondForce::getAmoebaGlobalBondQuartic( void ) const {
return
_globalQuarticK
;
}
ForceImpl
*
AmoebaBondForce
::
createImpl
()
{
ForceImpl
*
AmoebaBondForce
::
createImpl
()
const
{
return
new
AmoebaBondForceImpl
(
*
this
);
}
...
...
plugins/amoeba/openmmapi/src/AmoebaBondForceImpl.cpp
View file @
0307a0db
...
...
@@ -40,7 +40,7 @@ using std::pair;
using
std
::
vector
;
using
std
::
set
;
AmoebaBondForceImpl
::
AmoebaBondForceImpl
(
AmoebaBondForce
&
owner
)
:
owner
(
owner
)
{
AmoebaBondForceImpl
::
AmoebaBondForceImpl
(
const
AmoebaBondForce
&
owner
)
:
owner
(
owner
)
{
}
AmoebaBondForceImpl
::~
AmoebaBondForceImpl
()
{
...
...
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
View file @
0307a0db
...
...
@@ -90,7 +90,7 @@ void AmoebaGeneralizedKirkwoodForce::setSurfaceAreaFactor(double inputSurfaceAre
surfaceAreaFactor
=
inputSurfaceAreaFactor
;
}
ForceImpl
*
AmoebaGeneralizedKirkwoodForce
::
createImpl
()
{
ForceImpl
*
AmoebaGeneralizedKirkwoodForce
::
createImpl
()
const
{
return
new
AmoebaGeneralizedKirkwoodForceImpl
(
*
this
);
}
...
...
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForceImpl.cpp
View file @
0307a0db
...
...
@@ -36,12 +36,12 @@
using
namespace
OpenMM
;
using
std
::
vector
;
AmoebaGeneralizedKirkwoodForceImpl
::
AmoebaGeneralizedKirkwoodForceImpl
(
AmoebaGeneralizedKirkwoodForce
&
owner
)
:
owner
(
owner
)
{
AmoebaGeneralizedKirkwoodForceImpl
::
AmoebaGeneralizedKirkwoodForceImpl
(
const
AmoebaGeneralizedKirkwoodForce
&
owner
)
:
owner
(
owner
)
{
}
void
AmoebaGeneralizedKirkwoodForceImpl
::
initialize
(
ContextImpl
&
context
)
{
System
&
system
=
context
.
getSystem
();
const
System
&
system
=
context
.
getSystem
();
if
(
owner
.
getNumParticles
()
!=
system
.
getNumParticles
())
throw
OpenMMException
(
"AmoebaGeneralizedKirkwoodForce must have exactly as many particles as the System it belongs to."
);
...
...
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
View file @
0307a0db
...
...
@@ -97,7 +97,7 @@ double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleSextic( void ) const
return
_globalSexticK
;
}
ForceImpl
*
AmoebaInPlaneAngleForce
::
createImpl
()
{
ForceImpl
*
AmoebaInPlaneAngleForce
::
createImpl
()
const
{
return
new
AmoebaInPlaneAngleForceImpl
(
*
this
);
}
...
...
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForceImpl.cpp
View file @
0307a0db
...
...
@@ -39,7 +39,7 @@ using std::pair;
using
std
::
vector
;
using
std
::
set
;
AmoebaInPlaneAngleForceImpl
::
AmoebaInPlaneAngleForceImpl
(
AmoebaInPlaneAngleForce
&
owner
)
:
owner
(
owner
)
{
AmoebaInPlaneAngleForceImpl
::
AmoebaInPlaneAngleForceImpl
(
const
AmoebaInPlaneAngleForce
&
owner
)
:
owner
(
owner
)
{
}
AmoebaInPlaneAngleForceImpl
::~
AmoebaInPlaneAngleForceImpl
()
{
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
View file @
0307a0db
...
...
@@ -234,7 +234,7 @@ void AmoebaMultipoleForce::getSystemMultipoleMoments(Context& context, std::vect
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getSystemMultipoleMoments
(
getContextImpl
(
context
),
outputMultipoleMonents
);
}
ForceImpl
*
AmoebaMultipoleForce
::
createImpl
()
{
ForceImpl
*
AmoebaMultipoleForce
::
createImpl
()
const
{
return
new
AmoebaMultipoleForceImpl
(
*
this
);
}
...
...
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