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
fc21fd19
Unverified
Commit
fc21fd19
authored
May 27, 2026
by
Peter Eastman
Committed by
GitHub
May 27, 2026
Browse files
Compile correctly under newer C++ standards (#5296)
parent
c6f9fab2
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
4298 additions
and
2358 deletions
+4298
-2358
libraries/pocketfft/include/pocketfft_hdronly.h
libraries/pocketfft/include/pocketfft_hdronly.h
+1
-0
openmmapi/include/openmm/ConstantPotentialForce.h
openmmapi/include/openmm/ConstantPotentialForce.h
+4
-10
openmmapi/src/ConstantPotentialForce.cpp
openmmapi/src/ConstantPotentialForce.cpp
+13
-1
platforms/common/include/openmm/common/CommonIntegrateCustomStepKernel.h
...n/include/openmm/common/CommonIntegrateCustomStepKernel.h
+1
-3
platforms/common/src/CommonIntegrateCustomStepKernel.cpp
platforms/common/src/CommonIntegrateCustomStepKernel.cpp
+5
-1
platforms/opencl/src/opencl.hpp
platforms/opencl/src/opencl.hpp
+4202
-2294
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
...openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
+2
-4
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
+2
-4
plugins/amoeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
...oeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
+3
-7
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
+4
-10
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
...moeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
+2
-4
plugins/amoeba/openmmapi/include/openmm/HippoNonbondedForce.h
...ins/amoeba/openmmapi/include/openmm/HippoNonbondedForce.h
+3
-7
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
...s/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
+5
-1
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
+5
-1
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
+7
-0
plugins/amoeba/openmmapi/src/AmoebaVdwForce.cpp
plugins/amoeba/openmmapi/src/AmoebaVdwForce.cpp
+13
-1
plugins/amoeba/openmmapi/src/AmoebaWcaDispersionForce.cpp
plugins/amoeba/openmmapi/src/AmoebaWcaDispersionForce.cpp
+5
-1
plugins/amoeba/openmmapi/src/HippoNonbondedForce.cpp
plugins/amoeba/openmmapi/src/HippoNonbondedForce.cpp
+9
-1
plugins/drude/openmmapi/include/openmm/DrudeForce.h
plugins/drude/openmmapi/include/openmm/DrudeForce.h
+3
-7
plugins/drude/openmmapi/src/DrudeForce.cpp
plugins/drude/openmmapi/src/DrudeForce.cpp
+9
-1
No files found.
libraries/pocketfft/include/pocketfft_hdronly.h
View file @
fc21fd19
...
@@ -54,6 +54,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
...
@@ -54,6 +54,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cmath>
#include <cmath>
#include <cstdlib>
#include <cstdlib>
#include <stdexcept>
#include <stdexcept>
#include <exception>
#include <memory>
#include <memory>
#include <vector>
#include <vector>
#include <complex>
#include <complex>
...
...
openmmapi/include/openmm/ConstantPotentialForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-202
5
Stanford University and the Authors. *
* Portions copyright (c) 2008-202
6
Stanford University and the Authors. *
* Authors: Peter Eastman, Evan Pretti *
* Authors: Peter Eastman, Evan Pretti *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -116,15 +116,11 @@ public:
...
@@ -116,15 +116,11 @@ public:
/**
/**
* Get the number of particles for which force field parameters have been defined.
* Get the number of particles for which force field parameters have been defined.
*/
*/
int
getNumParticles
()
const
{
int
getNumParticles
()
const
;
return
particles
.
size
();
}
/**
/**
* Get the number of special interactions that should be calculated differently from other interactions.
* Get the number of special interactions that should be calculated differently from other interactions.
*/
*/
int
getNumExceptions
()
const
{
int
getNumExceptions
()
const
;
return
exceptions
.
size
();
}
/**
/**
* Get the cutoff distance (in nm) being used for nonbonded interactions.
* Get the cutoff distance (in nm) being used for nonbonded interactions.
*
*
...
@@ -362,9 +358,7 @@ public:
...
@@ -362,9 +358,7 @@ public:
/**
/**
* Get the number of electrodes that have been added.
* Get the number of electrodes that have been added.
*/
*/
int
getNumElectrodes
()
const
{
int
getNumElectrodes
()
const
;
return
electrodes
.
size
();
}
/**
/**
* Add a new electrode from a set of particles. The specified particles
* Add a new electrode from a set of particles. The specified particles
* will have their charges solved for such that they are held at the
* will have their charges solved for such that they are held at the
...
...
openmmapi/src/ConstantPotentialForce.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-202
5
Stanford University and the Authors. *
* Portions copyright (c) 2008-202
6
Stanford University and the Authors. *
* Authors: Peter Eastman, Evan Pretti *
* Authors: Peter Eastman, Evan Pretti *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -47,6 +47,18 @@ ConstantPotentialForce::ConstantPotentialForce() : constantPotentialMethod(CG),
...
@@ -47,6 +47,18 @@ ConstantPotentialForce::ConstantPotentialForce() : constantPotentialMethod(CG),
nx
(
0
),
ny
(
0
),
nz
(
0
),
numContexts
(
0
)
{
nx
(
0
),
ny
(
0
),
nz
(
0
),
numContexts
(
0
)
{
}
}
int
ConstantPotentialForce
::
getNumParticles
()
const
{
return
particles
.
size
();
}
int
ConstantPotentialForce
::
getNumExceptions
()
const
{
return
exceptions
.
size
();
}
int
ConstantPotentialForce
::
getNumElectrodes
()
const
{
return
electrodes
.
size
();
}
double
ConstantPotentialForce
::
getCutoffDistance
()
const
{
double
ConstantPotentialForce
::
getCutoffDistance
()
const
{
return
cutoffDistance
;
return
cutoffDistance
;
}
}
...
...
platforms/common/include/openmm/common/CommonIntegrateCustomStepKernel.h
View file @
fc21fd19
...
@@ -44,9 +44,7 @@ namespace OpenMM {
...
@@ -44,9 +44,7 @@ namespace OpenMM {
class
CommonIntegrateCustomStepKernel
:
public
IntegrateCustomStepKernel
{
class
CommonIntegrateCustomStepKernel
:
public
IntegrateCustomStepKernel
{
public:
public:
enum
GlobalTargetType
{
DT
,
VARIABLE
,
PARAMETER
};
enum
GlobalTargetType
{
DT
,
VARIABLE
,
PARAMETER
};
CommonIntegrateCustomStepKernel
(
std
::
string
name
,
const
Platform
&
platform
,
ComputeContext
&
cc
)
:
IntegrateCustomStepKernel
(
name
,
platform
),
cc
(
cc
),
CommonIntegrateCustomStepKernel
(
std
::
string
name
,
const
Platform
&
platform
,
ComputeContext
&
cc
);
hasInitializedKernels
(
false
),
deviceGlobalsAreCurrent
(
false
),
needsEnergyParamDerivs
(
false
)
{
}
/**
/**
* Initialize the kernel.
* Initialize the kernel.
*
*
...
...
platforms/common/src/CommonIntegrateCustomStepKernel.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-202
5
Stanford University and the Authors. *
* Portions copyright (c) 2008-202
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -113,6 +113,10 @@ private:
...
@@ -113,6 +113,10 @@ private:
string
param
;
string
param
;
};
};
CommonIntegrateCustomStepKernel
::
CommonIntegrateCustomStepKernel
(
std
::
string
name
,
const
Platform
&
platform
,
ComputeContext
&
cc
)
:
IntegrateCustomStepKernel
(
name
,
platform
),
cc
(
cc
),
hasInitializedKernels
(
false
),
deviceGlobalsAreCurrent
(
false
),
needsEnergyParamDerivs
(
false
)
{
}
void
CommonIntegrateCustomStepKernel
::
initialize
(
const
System
&
system
,
const
CustomIntegrator
&
integrator
)
{
void
CommonIntegrateCustomStepKernel
::
initialize
(
const
System
&
system
,
const
CustomIntegrator
&
integrator
)
{
cc
.
initializeContexts
();
cc
.
initializeContexts
();
ContextSelector
selector
(
cc
);
ContextSelector
selector
(
cc
);
...
...
platforms/opencl/src/opencl.hpp
View file @
fc21fd19
This diff is collapsed.
Click to expand it.
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
1
2 Stanford University and the Authors. *
* Portions copyright (c) 2008-202
6
Stanford University and the Authors. *
* Authors: Mark Friedrichs, Peter Eastman *
* Authors: Mark Friedrichs, Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -59,9 +59,7 @@ public:
...
@@ -59,9 +59,7 @@ public:
/**
/**
* Get the number of particles in the system.
* Get the number of particles in the system.
*/
*/
int
getNumParticles
()
const
{
int
getNumParticles
()
const
;
return
particles
.
size
();
}
/**
/**
* Add the parameters for a particle. This should be called once for each particle
* Add the parameters for a particle. This should be called once for each particle
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
1
6 Stanford University and the Authors. *
* Portions copyright (c) 2008-20
2
6 Stanford University and the Authors. *
* Authors: Mark Friedrichs, Peter Eastman *
* Authors: Mark Friedrichs, Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -105,9 +105,7 @@ public:
...
@@ -105,9 +105,7 @@ public:
/**
/**
* Get the number of particles in the potential function
* Get the number of particles in the potential function
*/
*/
int
getNumMultipoles
()
const
{
int
getNumMultipoles
()
const
;
return
multipoles
.
size
();
}
/**
/**
* Get the method used for handling long-range nonbonded interactions.
* Get the method used for handling long-range nonbonded interactions.
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
1
6 Stanford University and the Authors. *
* Portions copyright (c) 2008-20
2
6 Stanford University and the Authors. *
* Authors: Mark Friedrichs, Peter Eastman *
* Authors: Mark Friedrichs, Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -59,16 +59,12 @@ public:
...
@@ -59,16 +59,12 @@ public:
/**
/**
* Get the number of torsion-torsion terms in the potential function
* Get the number of torsion-torsion terms in the potential function
*/
*/
int
getNumTorsionTorsions
(
void
)
const
{
int
getNumTorsionTorsions
(
void
)
const
;
return
torsionTorsions
.
size
();
}
/**
/**
* Get the number of torsion-torsion grids
* Get the number of torsion-torsion grids
*/
*/
int
getNumTorsionTorsionGrids
(
void
)
const
{
int
getNumTorsionTorsionGrids
(
void
)
const
;
return
torsionTorsionGrids
.
size
();
}
/**
/**
* Add a torsion-torsion term to the force field.
* Add a torsion-torsion term to the force field.
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-202
0
Stanford University and the Authors. *
* Portions copyright (c) 2008-202
6
Stanford University and the Authors. *
* Authors: Mark Friedrichs, Peter Eastman *
* Authors: Mark Friedrichs, Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -143,23 +143,17 @@ public:
...
@@ -143,23 +143,17 @@ public:
/**
/**
* Get the number of particles
* Get the number of particles
*/
*/
int
getNumParticles
()
const
{
int
getNumParticles
()
const
;
return
parameters
.
size
();
}
/**
/**
* Get the number of particle types.
* Get the number of particle types.
*/
*/
int
getNumParticleTypes
()
const
{
int
getNumParticleTypes
()
const
;
return
types
.
size
();
}
/**
/**
* Get the number of type pairs.
* Get the number of type pairs.
*/
*/
int
getNumTypePairs
()
const
{
int
getNumTypePairs
()
const
;
return
pairs
.
size
();
}
/**
/**
* Set the force field parameters for a vdw particle.
* Set the force field parameters for a vdw particle.
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
1
2 Stanford University and the Authors. *
* Portions copyright (c) 2008-202
6
Stanford University and the Authors. *
* Authors: Mark Friedrichs, Peter Eastman *
* Authors: Mark Friedrichs, Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -57,9 +57,7 @@ public:
...
@@ -57,9 +57,7 @@ public:
/**
/**
* Get the number of particles
* Get the number of particles
*/
*/
int
getNumParticles
()
const
{
int
getNumParticles
()
const
;
return
parameters
.
size
();
}
/**
/**
* Set the force field parameters for a WCA dispersion particle.
* Set the force field parameters for a WCA dispersion particle.
...
...
plugins/amoeba/openmmapi/include/openmm/HippoNonbondedForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
19
Stanford University and the Authors. *
* Portions copyright (c) 2008-20
26
Stanford University and the Authors. *
* Authors: Peter Eastman, Mark Friedrichs *
* Authors: Peter Eastman, Mark Friedrichs *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -79,15 +79,11 @@ public:
...
@@ -79,15 +79,11 @@ public:
/**
/**
* Get the number of particles in the potential function.
* Get the number of particles in the potential function.
*/
*/
int
getNumParticles
()
const
{
int
getNumParticles
()
const
;
return
particles
.
size
();
}
/**
/**
* Get the number of exceptions.
* Get the number of exceptions.
*/
*/
int
getNumExceptions
()
const
{
int
getNumExceptions
()
const
;
return
exceptions
.
size
();
}
/**
/**
* Get the method used for handling long-range nonbonded interactions.
* Get the method used for handling long-range nonbonded interactions.
*/
*/
...
...
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
09
Stanford University and the Authors. *
* Portions copyright (c) 2008-20
26
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -40,6 +40,10 @@ AmoebaGeneralizedKirkwoodForce::AmoebaGeneralizedKirkwoodForce() :
...
@@ -40,6 +40,10 @@ AmoebaGeneralizedKirkwoodForce::AmoebaGeneralizedKirkwoodForce() :
surfaceAreaFactor
=
-
6.0
*
3.1415926535
*
0.0216
*
1000.0
*
0.4184
;
surfaceAreaFactor
=
-
6.0
*
3.1415926535
*
0.0216
*
1000.0
*
0.4184
;
}
}
int
AmoebaGeneralizedKirkwoodForce
::
getNumParticles
()
const
{
return
particles
.
size
();
}
int
AmoebaGeneralizedKirkwoodForce
::
addParticle
(
double
charge
,
double
radius
,
double
scalingFactor
)
{
int
AmoebaGeneralizedKirkwoodForce
::
addParticle
(
double
charge
,
double
radius
,
double
scalingFactor
)
{
particles
.
push_back
(
ParticleInfo
(
charge
,
radius
,
scalingFactor
,
radius
,
0.0
));
particles
.
push_back
(
ParticleInfo
(
charge
,
radius
,
scalingFactor
,
radius
,
0.0
));
return
particles
.
size
()
-
1
;
return
particles
.
size
()
-
1
;
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
1
6 Stanford University and the Authors. *
* Portions copyright (c) 2008-20
2
6 Stanford University and the Authors. *
* Authors: *
* Authors: *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -46,6 +46,10 @@ AmoebaMultipoleForce::AmoebaMultipoleForce() : nonbondedMethod(NoCutoff), polari
...
@@ -46,6 +46,10 @@ AmoebaMultipoleForce::AmoebaMultipoleForce() : nonbondedMethod(NoCutoff), polari
extrapolationCoefficients
.
push_back
(
0.474
);
extrapolationCoefficients
.
push_back
(
0.474
);
}
}
int
AmoebaMultipoleForce
::
getNumMultipoles
()
const
{
return
multipoles
.
size
();
}
AmoebaMultipoleForce
::
NonbondedMethod
AmoebaMultipoleForce
::
getNonbondedMethod
()
const
{
AmoebaMultipoleForce
::
NonbondedMethod
AmoebaMultipoleForce
::
getNonbondedMethod
()
const
{
return
nonbondedMethod
;
return
nonbondedMethod
;
}
}
...
...
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
View file @
fc21fd19
...
@@ -39,6 +39,13 @@ using namespace std;
...
@@ -39,6 +39,13 @@ using namespace std;
AmoebaTorsionTorsionForce
::
AmoebaTorsionTorsionForce
()
:
usePeriodic
(
false
)
{
AmoebaTorsionTorsionForce
::
AmoebaTorsionTorsionForce
()
:
usePeriodic
(
false
)
{
}
}
int
AmoebaTorsionTorsionForce
::
getNumTorsionTorsions
(
void
)
const
{
return
torsionTorsions
.
size
();
}
int
AmoebaTorsionTorsionForce
::
getNumTorsionTorsionGrids
(
void
)
const
{
return
torsionTorsionGrids
.
size
();
}
int
AmoebaTorsionTorsionForce
::
addTorsionTorsion
(
int
particle1
,
int
particle2
,
int
particle3
,
int
AmoebaTorsionTorsionForce
::
addTorsionTorsion
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
int
particle5
,
int
chiralCheckAtomIndex
,
int
particle4
,
int
particle5
,
int
chiralCheckAtomIndex
,
int
gridIndex
)
{
int
gridIndex
)
{
...
...
plugins/amoeba/openmmapi/src/AmoebaVdwForce.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-202
0
Stanford University and the Authors. *
* Portions copyright (c) 2008-202
6
Stanford University and the Authors. *
* Authors: *
* Authors: *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -42,6 +42,18 @@ AmoebaVdwForce::AmoebaVdwForce() : nonbondedMethod(NoCutoff), potentialFunction(
...
@@ -42,6 +42,18 @@ AmoebaVdwForce::AmoebaVdwForce() : nonbondedMethod(NoCutoff), potentialFunction(
useTypes
(
false
),
alchemicalMethod
(
None
),
n
(
5
),
alpha
(
0.7
)
{
useTypes
(
false
),
alchemicalMethod
(
None
),
n
(
5
),
alpha
(
0.7
)
{
}
}
int
AmoebaVdwForce
::
getNumParticles
()
const
{
return
parameters
.
size
();
}
int
AmoebaVdwForce
::
getNumParticleTypes
()
const
{
return
types
.
size
();
}
int
AmoebaVdwForce
::
getNumTypePairs
()
const
{
return
pairs
.
size
();
}
int
AmoebaVdwForce
::
addParticle
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
,
bool
isAlchemical
,
double
scaleFactor
)
{
int
AmoebaVdwForce
::
addParticle
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
,
bool
isAlchemical
,
double
scaleFactor
)
{
if
(
useTypes
)
if
(
useTypes
)
throw
OpenMMException
(
"AmoebaVdwForce: must use the same version of addParticle() for all particles"
);
throw
OpenMMException
(
"AmoebaVdwForce: must use the same version of addParticle() for all particles"
);
...
...
plugins/amoeba/openmmapi/src/AmoebaWcaDispersionForce.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
09
Stanford University and the Authors. *
* Portions copyright (c) 2008-20
26
Stanford University and the Authors. *
* Authors: *
* Authors: *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -54,6 +54,10 @@ AmoebaWcaDispersionForce::AmoebaWcaDispersionForce() {
...
@@ -54,6 +54,10 @@ AmoebaWcaDispersionForce::AmoebaWcaDispersionForce() {
shctd
=
0.82
;
shctd
=
0.82
;
}
}
int
AmoebaWcaDispersionForce
::
getNumParticles
()
const
{
return
parameters
.
size
();
}
int
AmoebaWcaDispersionForce
::
addParticle
(
double
radius
,
double
epsilon
)
{
int
AmoebaWcaDispersionForce
::
addParticle
(
double
radius
,
double
epsilon
)
{
parameters
.
push_back
(
WcaDispersionInfo
(
radius
,
epsilon
));
parameters
.
push_back
(
WcaDispersionInfo
(
radius
,
epsilon
));
return
parameters
.
size
()
-
1
;
return
parameters
.
size
()
-
1
;
...
...
plugins/amoeba/openmmapi/src/HippoNonbondedForce.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2008-20
19
Stanford University and the Authors. *
* Portions copyright (c) 2008-20
26
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -42,6 +42,14 @@ HippoNonbondedForce::HippoNonbondedForce() : nonbondedMethod(NoCutoff), cutoffDi
...
@@ -42,6 +42,14 @@ HippoNonbondedForce::HippoNonbondedForce() : nonbondedMethod(NoCutoff), cutoffDi
extrapolationCoefficients
=
{
0.042
,
0.635
,
0.414
};
extrapolationCoefficients
=
{
0.042
,
0.635
,
0.414
};
}
}
int
HippoNonbondedForce
::
getNumParticles
()
const
{
return
particles
.
size
();
}
int
HippoNonbondedForce
::
getNumExceptions
()
const
{
return
exceptions
.
size
();
}
HippoNonbondedForce
::
NonbondedMethod
HippoNonbondedForce
::
getNonbondedMethod
()
const
{
HippoNonbondedForce
::
NonbondedMethod
HippoNonbondedForce
::
getNonbondedMethod
()
const
{
return
nonbondedMethod
;
return
nonbondedMethod
;
}
}
...
...
plugins/drude/openmmapi/include/openmm/DrudeForce.h
View file @
fc21fd19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2013-202
4
Stanford University and the Authors. *
* Portions copyright (c) 2013-202
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -59,15 +59,11 @@ public:
...
@@ -59,15 +59,11 @@ public:
/**
/**
* Get the number of particles for which force field parameters have been defined.
* Get the number of particles for which force field parameters have been defined.
*/
*/
int
getNumParticles
()
const
{
int
getNumParticles
()
const
;
return
particles
.
size
();
}
/**
/**
* Get the number of special interactions that should be calculated differently from other interactions.
* Get the number of special interactions that should be calculated differently from other interactions.
*/
*/
int
getNumScreenedPairs
()
const
{
int
getNumScreenedPairs
()
const
;
return
screenedPairs
.
size
();
}
/**
/**
* Add a Drude particle to which forces should be applied.
* Add a Drude particle to which forces should be applied.
*
*
...
...
plugins/drude/openmmapi/src/DrudeForce.cpp
View file @
fc21fd19
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* This is part of the OpenMM molecular simulation toolkit. *
* This is part of the OpenMM molecular simulation toolkit. *
* See https://openmm.org/development. *
* See https://openmm.org/development. *
* *
* *
* Portions copyright (c) 2013-202
4
Stanford University and the Authors. *
* Portions copyright (c) 2013-202
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -39,6 +39,14 @@ using namespace std;
...
@@ -39,6 +39,14 @@ using namespace std;
DrudeForce
::
DrudeForce
()
:
usePeriodic
(
false
)
{
DrudeForce
::
DrudeForce
()
:
usePeriodic
(
false
)
{
}
}
int
DrudeForce
::
getNumParticles
()
const
{
return
particles
.
size
();
}
int
DrudeForce
::
getNumScreenedPairs
()
const
{
return
screenedPairs
.
size
();
}
int
DrudeForce
::
addParticle
(
int
particle
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
charge
,
double
polarizability
,
double
aniso12
,
double
aniso34
)
{
int
DrudeForce
::
addParticle
(
int
particle
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
charge
,
double
polarizability
,
double
aniso12
,
double
aniso34
)
{
if
(
polarizability
<=
0
)
if
(
polarizability
<=
0
)
throw
OpenMMException
(
"Polarizability must be positive"
);
throw
OpenMMException
(
"Polarizability must be positive"
);
...
...
Prev
1
2
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