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
c24c619e
Unverified
Commit
c24c619e
authored
Nov 06, 2025
by
Peter Eastman
Committed by
GitHub
Nov 06, 2025
Browse files
Code cleanup (#5127)
parent
b1a5324c
Changes
80
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
42 additions
and
139 deletions
+42
-139
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
...ba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
+1
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
...pi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/internal/HippoNonbondedForceImpl.h
...enmmapi/include/openmm/internal/HippoNonbondedForceImpl.h
+1
-1
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForceImpl.cpp
...oeba/openmmapi/src/AmoebaGeneralizedKirkwoodForceImpl.cpp
+1
-3
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
+1
-3
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForceImpl.cpp
...ns/amoeba/openmmapi/src/AmoebaTorsionTorsionForceImpl.cpp
+1
-3
plugins/amoeba/openmmapi/src/AmoebaVdwForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaVdwForceImpl.cpp
+7
-15
plugins/amoeba/openmmapi/src/AmoebaWcaDispersionForceImpl.cpp
...ins/amoeba/openmmapi/src/AmoebaWcaDispersionForceImpl.cpp
+1
-3
plugins/amoeba/openmmapi/src/HippoNonbondedForceImpl.cpp
plugins/amoeba/openmmapi/src/HippoNonbondedForceImpl.cpp
+1
-3
plugins/drude/openmmapi/include/openmm/internal/DrudeForceImpl.h
.../drude/openmmapi/include/openmm/internal/DrudeForceImpl.h
+1
-1
plugins/drude/openmmapi/src/DrudeForceImpl.cpp
plugins/drude/openmmapi/src/DrudeForceImpl.cpp
+1
-3
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
+1
-3
plugins/drude/openmmapi/src/DrudeSCFIntegrator.cpp
plugins/drude/openmmapi/src/DrudeSCFIntegrator.cpp
+1
-3
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
+1
-3
plugins/rpmd/openmmapi/src/RPMDMonteCarloBarostatImpl.cpp
plugins/rpmd/openmmapi/src/RPMDMonteCarloBarostatImpl.cpp
+2
-6
tests/TestCustomCentroidBondForce.h
tests/TestCustomCentroidBondForce.h
+14
-59
tests/TestCustomCompoundBondForce.h
tests/TestCustomCompoundBondForce.h
+1
-4
tests/TestCustomIntegrator.h
tests/TestCustomIntegrator.h
+1
-3
tests/TestCustomManyParticleForce.h
tests/TestCustomManyParticleForce.h
+2
-9
tests/TestNonbondedForce.h
tests/TestNonbondedForce.h
+2
-10
No files found.
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
View file @
c24c619e
...
...
@@ -58,9 +58,7 @@ public:
}
double
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
parameters
;
parameters
[
AmoebaVdwForce
::
Lambda
()]
=
1.0
;
return
parameters
;
return
{{
AmoebaVdwForce
::
Lambda
(),
1.0
}};
}
std
::
vector
<
std
::
string
>
getKernelNames
();
/**
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
View file @
c24c619e
...
...
@@ -56,7 +56,7 @@ public:
}
double
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
()
;
// This force field doesn't define any parameters.
return
{}
;
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
...
...
plugins/amoeba/openmmapi/include/openmm/internal/HippoNonbondedForceImpl.h
View file @
c24c619e
...
...
@@ -55,7 +55,7 @@ public:
}
double
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
()
;
// This force doesn't define any parameters.
return
{}
;
// This force doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
getLabFramePermanentDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
...
...
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForceImpl.cpp
View file @
c24c619e
...
...
@@ -60,9 +60,7 @@ double AmoebaGeneralizedKirkwoodForceImpl::calcForcesAndEnergy(ContextImpl& cont
}
std
::
vector
<
std
::
string
>
AmoebaGeneralizedKirkwoodForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoebaGeneralizedKirkwoodForceKernel
::
Name
());
return
names
;
return
{
CalcAmoebaGeneralizedKirkwoodForceKernel
::
Name
()};
}
void
AmoebaGeneralizedKirkwoodForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
View file @
c24c619e
...
...
@@ -150,9 +150,7 @@ double AmoebaMultipoleForceImpl::calcForcesAndEnergy(ContextImpl& context, bool
}
std
::
vector
<
std
::
string
>
AmoebaMultipoleForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoebaMultipoleForceKernel
::
Name
());
return
names
;
return
{
CalcAmoebaMultipoleForceKernel
::
Name
()};
}
const
int
*
AmoebaMultipoleForceImpl
::
getCovalentDegrees
()
{
...
...
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForceImpl.cpp
View file @
c24c619e
...
...
@@ -152,8 +152,6 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid(const TorsionTorsionGrid& grid,
}
std
::
vector
<
std
::
string
>
AmoebaTorsionTorsionForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoebaTorsionTorsionForceKernel
::
Name
());
return
names
;
return
{
CalcAmoebaTorsionTorsionForceKernel
::
Name
()};
}
plugins/amoeba/openmmapi/src/AmoebaVdwForceImpl.cpp
View file @
c24c619e
...
...
@@ -245,12 +245,6 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const
// Compute the VdW tapering coefficients. Mostly copied from amoebaCudaGpu.cpp.
double
cutoff
=
force
.
getCutoffDistance
();
double
vdwTaper
=
0.90
;
// vdwTaper is a scaling factor, it is not a distance.
double
c0
=
0.0
;
double
c1
=
0.0
;
double
c2
=
0.0
;
double
c3
=
0.0
;
double
c4
=
0.0
;
double
c5
=
0.0
;
double
vdwCut
=
cutoff
;
double
vdwTaperCut
=
vdwTaper
*
cutoff
;
...
...
@@ -275,12 +269,12 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const
double
denom2
=
denom
*
denom
;
denom
=
denom
*
denom2
*
denom2
;
c0
=
vdwCut
*
vdwCut2
*
(
vdwCut2
-
5.0
*
vdwCut
*
vdwTaperCut
+
10.0
*
vdwTaperCut2
)
*
denom
;
c1
=
-
30.0
*
vdwCut2
*
vdwTaperCut2
*
denom
;
c2
=
30.0
*
(
vdwCut2
*
vdwTaperCut
+
vdwCut
*
vdwTaperCut2
)
*
denom
;
c3
=
-
10.0
*
(
vdwCut2
+
4.0
*
vdwCut
*
vdwTaperCut
+
vdwTaperCut2
)
*
denom
;
c4
=
15.0
*
(
vdwCut
+
vdwTaperCut
)
*
denom
;
c5
=
-
6.0
*
denom
;
double
c0
=
vdwCut
*
vdwCut2
*
(
vdwCut2
-
5.0
*
vdwCut
*
vdwTaperCut
+
10.0
*
vdwTaperCut2
)
*
denom
;
double
c1
=
-
30.0
*
vdwCut2
*
vdwTaperCut2
*
denom
;
double
c2
=
30.0
*
(
vdwCut2
*
vdwTaperCut
+
vdwCut
*
vdwTaperCut2
)
*
denom
;
double
c3
=
-
10.0
*
(
vdwCut2
+
4.0
*
vdwCut
*
vdwTaperCut
+
vdwTaperCut2
)
*
denom
;
double
c4
=
15.0
*
(
vdwCut
+
vdwTaperCut
)
*
denom
;
double
c5
=
-
6.0
*
denom
;
// Loop over all pairs of types to compute the coefficient.
// Copied over from TINKER - numerical integration.
...
...
@@ -347,9 +341,7 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const
}
std
::
vector
<
std
::
string
>
AmoebaVdwForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoebaVdwForceKernel
::
Name
());
return
names
;
return
{
CalcAmoebaVdwForceKernel
::
Name
()};
}
void
AmoebaVdwForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
...
...
plugins/amoeba/openmmapi/src/AmoebaWcaDispersionForceImpl.cpp
View file @
c24c619e
...
...
@@ -133,9 +133,7 @@ double AmoebaWcaDispersionForceImpl::getTotalMaximumDispersionEnergy(const Amoeb
}
std
::
vector
<
std
::
string
>
AmoebaWcaDispersionForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoebaWcaDispersionForceKernel
::
Name
());
return
names
;
return
{
CalcAmoebaWcaDispersionForceKernel
::
Name
()};
}
void
AmoebaWcaDispersionForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
...
...
plugins/amoeba/openmmapi/src/HippoNonbondedForceImpl.cpp
View file @
c24c619e
...
...
@@ -140,9 +140,7 @@ double HippoNonbondedForceImpl::calcForcesAndEnergy(ContextImpl& context, bool i
}
std
::
vector
<
std
::
string
>
HippoNonbondedForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcHippoNonbondedForceKernel
::
Name
());
return
names
;
return
{
CalcHippoNonbondedForceKernel
::
Name
()};
}
void
HippoNonbondedForceImpl
::
getLabFramePermanentDipoles
(
ContextImpl
&
context
,
vector
<
Vec3
>&
dipoles
)
{
...
...
plugins/drude/openmmapi/include/openmm/internal/DrudeForceImpl.h
View file @
c24c619e
...
...
@@ -58,7 +58,7 @@ public:
}
double
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
);
std
::
map
<
std
::
string
,
double
>
getDefaultParameters
()
{
return
std
::
map
<
std
::
string
,
double
>
()
;
// This force field doesn't define any parameters.
return
{}
;
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
...
...
plugins/drude/openmmapi/src/DrudeForceImpl.cpp
View file @
c24c619e
...
...
@@ -120,9 +120,7 @@ double DrudeForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeFor
}
vector
<
string
>
DrudeForceImpl
::
getKernelNames
()
{
vector
<
string
>
names
;
names
.
push_back
(
CalcDrudeForceKernel
::
Name
());
return
names
;
return
{
CalcDrudeForceKernel
::
Name
()};
}
void
DrudeForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
...
...
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
View file @
c24c619e
...
...
@@ -87,9 +87,7 @@ void DrudeLangevinIntegrator::cleanup() {
}
vector
<
string
>
DrudeLangevinIntegrator
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
IntegrateDrudeLangevinStepKernel
::
Name
());
return
names
;
return
{
IntegrateDrudeLangevinStepKernel
::
Name
()};
}
double
DrudeLangevinIntegrator
::
computeKineticEnergy
()
{
...
...
plugins/drude/openmmapi/src/DrudeSCFIntegrator.cpp
View file @
c24c619e
...
...
@@ -73,9 +73,7 @@ void DrudeSCFIntegrator::cleanup() {
}
vector
<
string
>
DrudeSCFIntegrator
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
IntegrateDrudeSCFStepKernel
::
Name
());
return
names
;
return
{
IntegrateDrudeSCFStepKernel
::
Name
()};
}
double
DrudeSCFIntegrator
::
computeKineticEnergy
()
{
...
...
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
View file @
c24c619e
...
...
@@ -78,9 +78,7 @@ void RPMDIntegrator::stateChanged(State::DataType changed) {
}
vector
<
string
>
RPMDIntegrator
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
IntegrateRPMDStepKernel
::
Name
());
return
names
;
return
{
IntegrateRPMDStepKernel
::
Name
()};
}
void
RPMDIntegrator
::
setPositions
(
int
copy
,
const
vector
<
Vec3
>&
positions
)
{
...
...
plugins/rpmd/openmmapi/src/RPMDMonteCarloBarostatImpl.cpp
View file @
c24c619e
...
...
@@ -155,13 +155,9 @@ void RPMDMonteCarloBarostatImpl::updateRPMDState(ContextImpl& context) {
}
std
::
map
<
std
::
string
,
double
>
RPMDMonteCarloBarostatImpl
::
getDefaultParameters
()
{
std
::
map
<
std
::
string
,
double
>
parameters
;
parameters
[
RPMDMonteCarloBarostat
::
Pressure
()]
=
getOwner
().
getDefaultPressure
();
return
parameters
;
return
{{
RPMDMonteCarloBarostat
::
Pressure
(),
getOwner
().
getDefaultPressure
()}};
}
std
::
vector
<
std
::
string
>
RPMDMonteCarloBarostatImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
ApplyMonteCarloBarostatKernel
::
Name
());
return
names
;
return
{
ApplyMonteCarloBarostatKernel
::
Name
()};
}
tests/TestCustomCentroidBondForce.h
View file @
c24c619e
...
...
@@ -52,21 +52,9 @@ void testHarmonicBond() {
system
.
addParticle
(
5.0
);
CustomCentroidBondForce
*
force
=
new
CustomCentroidBondForce
(
2
,
"k*distance(g1,g2)^2"
);
force
->
addPerBondParameter
(
"k"
);
vector
<
int
>
particles1
;
particles1
.
push_back
(
0
);
particles1
.
push_back
(
1
);
vector
<
int
>
particles2
;
particles2
.
push_back
(
2
);
particles2
.
push_back
(
3
);
particles2
.
push_back
(
4
);
force
->
addGroup
(
particles1
);
force
->
addGroup
(
particles2
);
vector
<
int
>
groups
;
groups
.
push_back
(
0
);
groups
.
push_back
(
1
);
vector
<
double
>
parameters
;
parameters
.
push_back
(
1.0
);
force
->
addBond
(
groups
,
parameters
);
force
->
addGroup
({
0
,
1
});
force
->
addGroup
({
2
,
3
,
4
});
force
->
addBond
({
0
,
1
},
{
1.0
});
system
.
addForce
(
force
);
ASSERT
(
!
system
.
usesPeriodicBoundaryConditions
());
...
...
@@ -97,8 +85,7 @@ void testHarmonicBond() {
// Update the per-bond parameter and see if the results change.
parameters
[
0
]
=
2.0
;
force
->
setBondParameters
(
0
,
groups
,
parameters
);
force
->
setBondParameters
(
0
,
{
0
,
1
},
{
2.0
});
force
->
updateParametersInContext
(
context
);
state
=
context
.
getState
(
State
::
Forces
|
State
::
Energy
);
ASSERT_EQUAL_TOL
(
2
*
2.5
*
2.5
,
state
.
getPotentialEnergy
(),
TOL
);
...
...
@@ -236,11 +223,7 @@ void testCustomWeights() {
weights
[
0
]
=
2.0
;
weights
[
1
]
=
1.0
;
force
->
addGroup
(
particles
,
weights
);
vector
<
int
>
groups
;
groups
.
push_back
(
0
);
groups
.
push_back
(
1
);
vector
<
double
>
parameters
;
force
->
addBond
(
groups
,
parameters
);
force
->
addBond
({
0
,
1
});
system
.
addForce
(
force
);
// The center of mass of group 0 is (0, 1, 0).
...
...
@@ -272,14 +255,9 @@ void testIllegalVariable() {
system
.
addParticle
(
1.0
);
system
.
addParticle
(
1.0
);
CustomCentroidBondForce
*
force
=
new
CustomCentroidBondForce
(
2
,
"1+none"
);
vector
<
int
>
particles
;
particles
.
push_back
(
0
);
force
->
addGroup
(
particles
);
force
->
addGroup
(
particles
);
vector
<
int
>
groups
;
groups
.
push_back
(
0
);
groups
.
push_back
(
1
);
force
->
addBond
(
groups
);
force
->
addGroup
({
0
});
force
->
addGroup
({
0
});
force
->
addBond
({
0
,
1
});
system
.
addForce
(
force
);
VerletIntegrator
integrator
(
0.001
);
bool
threwException
=
false
;
...
...
@@ -309,21 +287,9 @@ void testPeriodic(bool byGroups) {
expression
=
"k*pointdistance(x1,y1,z1,x2,y2,z2)^2"
;
CustomCentroidBondForce
*
force
=
new
CustomCentroidBondForce
(
2
,
expression
);
force
->
addPerBondParameter
(
"k"
);
vector
<
int
>
particles1
;
particles1
.
push_back
(
0
);
particles1
.
push_back
(
1
);
vector
<
int
>
particles2
;
particles2
.
push_back
(
2
);
particles2
.
push_back
(
3
);
particles2
.
push_back
(
4
);
force
->
addGroup
(
particles1
);
force
->
addGroup
(
particles2
);
vector
<
int
>
groups
;
groups
.
push_back
(
0
);
groups
.
push_back
(
1
);
vector
<
double
>
parameters
;
parameters
.
push_back
(
1.0
);
force
->
addBond
(
groups
,
parameters
);
force
->
addGroup
({
0
,
1
});
force
->
addGroup
({
2
,
3
,
4
});
force
->
addBond
({
0
,
1
},
{
1.0
});
force
->
setUsesPeriodicBoundaryConditions
(
true
);
system
.
addForce
(
force
);
...
...
@@ -365,20 +331,9 @@ void testEnergyParameterDerivatives() {
force
->
addGlobalParameter
(
"k"
,
0.0
);
force
->
addEnergyParameterDerivative
(
"r0"
);
force
->
addEnergyParameterDerivative
(
"k"
);
vector
<
int
>
particles1
;
particles1
.
push_back
(
0
);
particles1
.
push_back
(
1
);
vector
<
int
>
particles2
;
particles2
.
push_back
(
2
);
particles2
.
push_back
(
3
);
particles2
.
push_back
(
4
);
force
->
addGroup
(
particles1
);
force
->
addGroup
(
particles2
);
vector
<
int
>
groups
;
groups
.
push_back
(
0
);
groups
.
push_back
(
1
);
vector
<
double
>
parameters
;
force
->
addBond
(
groups
,
parameters
);
force
->
addGroup
({
0
,
1
});
force
->
addGroup
({
2
,
3
,
4
});
force
->
addBond
({
0
,
1
});
system
.
addForce
(
force
);
// The center of mass of group 0 is (1.5, 0, 0).
...
...
tests/TestCustomCompoundBondForce.h
View file @
c24c619e
...
...
@@ -342,10 +342,7 @@ void testIllegalVariable() {
system
.
addParticle
(
1.0
);
system
.
addParticle
(
1.0
);
CustomCompoundBondForce
*
force
=
new
CustomCompoundBondForce
(
2
,
"1+none"
);
vector
<
int
>
particles
;
particles
.
push_back
(
0
);
particles
.
push_back
(
1
);
force
->
addBond
(
particles
);
force
->
addBond
({
0
,
1
});
system
.
addForce
(
force
);
VerletIntegrator
integrator
(
0.001
);
bool
threwException
=
false
;
...
...
tests/TestCustomIntegrator.h
View file @
c24c619e
...
...
@@ -930,9 +930,7 @@ void testTabulatedFunction() {
integrator
.
addPerDofVariable
(
"dof"
,
0.0
);
integrator
.
addComputeGlobal
(
"global"
,
"fn(global)"
);
integrator
.
addComputePerDof
(
"dof"
,
"fn(x)"
);
vector
<
double
>
table
;
table
.
push_back
(
10.0
);
table
.
push_back
(
20.0
);
vector
<
double
>
table
=
{
10.0
,
20.0
};
integrator
.
addTabulatedFunction
(
"fn"
,
new
Continuous1DFunction
(
table
,
1.0
,
2.0
));
Context
context
(
system
,
integrator
,
platform
);
vector
<
Vec3
>
positions
(
1
);
...
...
tests/TestCustomManyParticleForce.h
View file @
c24c619e
...
...
@@ -358,12 +358,7 @@ void testAllTerms() {
CustomCompoundBondForce
*
force2
=
new
CustomCompoundBondForce
(
4
,
"distance(p1,p2)+angle(p1,p3,p4)+dihedral(p1,p4,p2,p3)+x1+y3+z4"
);
system2
.
addForce
(
force2
);
vector
<
int
>
particles
;
particles
.
push_back
(
0
);
particles
.
push_back
(
1
);
particles
.
push_back
(
2
);
particles
.
push_back
(
3
);
force2
->
addBond
(
particles
,
params
);
force2
->
addBond
({
0
,
1
,
2
,
3
},
params
);
for
(
int
i
=
0
;
i
<
numParticles
;
i
++
)
system2
.
addParticle
(
1.0
);
...
...
@@ -462,9 +457,7 @@ void testTabulatedFunctions() {
// Create two tabulated functions.
vector
<
double
>
values
;
values
.
push_back
(
0.0
);
values
.
push_back
(
50.0
);
vector
<
double
>
values
=
{
0.0
,
50.0
};
Continuous1DFunction
*
f1
=
new
Continuous1DFunction
(
values
,
0
,
100
);
OpenMM_SFMT
::
SFMT
sfmt
;
init_gen_rand
(
0
,
sfmt
);
...
...
tests/TestNonbondedForce.h
View file @
c24c619e
...
...
@@ -102,11 +102,7 @@ void testExclusionsAnd14() {
system
.
addParticle
(
1.0
);
nonbonded
->
addParticle
(
0
,
1.5
,
0
);
}
vector
<
pair
<
int
,
int
>
>
bonds
;
bonds
.
push_back
(
pair
<
int
,
int
>
(
0
,
1
));
bonds
.
push_back
(
pair
<
int
,
int
>
(
1
,
2
));
bonds
.
push_back
(
pair
<
int
,
int
>
(
2
,
3
));
bonds
.
push_back
(
pair
<
int
,
int
>
(
3
,
4
));
vector
<
pair
<
int
,
int
>
>
bonds
=
{{
0
,
1
},
{
1
,
2
},
{
2
,
3
},
{
3
,
4
}};
nonbonded
->
createExceptionsFromBonds
(
bonds
,
0.0
,
0.0
);
int
first14
,
second14
;
for
(
int
i
=
0
;
i
<
nonbonded
->
getNumExceptions
();
i
++
)
{
...
...
@@ -233,11 +229,7 @@ void testCutoff14() {
nonbonded
->
setCutoffDistance
(
cutoff
);
const
double
eps
=
30.0
;
nonbonded
->
setReactionFieldDielectric
(
eps
);
vector
<
pair
<
int
,
int
>
>
bonds
;
bonds
.
push_back
(
pair
<
int
,
int
>
(
0
,
1
));
bonds
.
push_back
(
pair
<
int
,
int
>
(
1
,
2
));
bonds
.
push_back
(
pair
<
int
,
int
>
(
2
,
3
));
bonds
.
push_back
(
pair
<
int
,
int
>
(
3
,
4
));
vector
<
pair
<
int
,
int
>
>
bonds
=
{{
0
,
1
},
{
1
,
2
},
{
2
,
3
},
{
3
,
4
}};
nonbonded
->
createExceptionsFromBonds
(
bonds
,
0.0
,
0.0
);
int
first14
,
second14
;
for
(
int
i
=
0
;
i
<
nonbonded
->
getNumExceptions
();
i
++
)
{
...
...
Prev
1
2
3
4
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