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
2f921936
Commit
2f921936
authored
Dec 11, 2009
by
Peter Eastman
Browse files
Fixed compilation warnings on Windows
parent
3f248310
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
19 deletions
+22
-19
olla/include/openmm/KernelFactory.h
olla/include/openmm/KernelFactory.h
+1
-1
openmmapi/include/openmm/internal/ForceImpl.h
openmmapi/include/openmm/internal/ForceImpl.h
+2
-1
platforms/reference/src/ReferenceKernels.cpp
platforms/reference/src/ReferenceKernels.cpp
+8
-8
platforms/reference/src/SimTKReference/PME.cpp
platforms/reference/src/SimTKReference/PME.cpp
+1
-1
platforms/reference/src/SimTKReference/ReferenceConstraintAlgorithm.h
...ference/src/SimTKReference/ReferenceConstraintAlgorithm.h
+3
-1
platforms/reference/src/SimTKReference/ReferenceCustomGBIxn.cpp
...rms/reference/src/SimTKReference/ReferenceCustomGBIxn.cpp
+4
-4
platforms/reference/src/gbsa/CpuGBVI.cpp
platforms/reference/src/gbsa/CpuGBVI.cpp
+2
-2
plugins/freeEnergy/platforms/reference/src/gbsa/ObcSoftcoreParameters.cpp
...gy/platforms/reference/src/gbsa/ObcSoftcoreParameters.cpp
+1
-1
No files found.
olla/include/openmm/KernelFactory.h
View file @
2f921936
...
@@ -42,7 +42,7 @@ namespace OpenMM {
...
@@ -42,7 +42,7 @@ namespace OpenMM {
* KernelImpls as needed.
* KernelImpls as needed.
*/
*/
class
KernelFactory
{
class
OPENMM_EXPORT
KernelFactory
{
public:
public:
/**
/**
* Create a KernelImpl.
* Create a KernelImpl.
...
...
openmmapi/include/openmm/internal/ForceImpl.h
View file @
2f921936
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/windowsExport.h"
#include <map>
#include <map>
#include <string>
#include <string>
#include <vector>
#include <vector>
...
@@ -52,7 +53,7 @@ class ContextImpl;
...
@@ -52,7 +53,7 @@ class ContextImpl;
* ForceImpl subclass.
* ForceImpl subclass.
*/
*/
class
ForceImpl
{
class
OPENMM_EXPORT
ForceImpl
{
public:
public:
virtual
~
ForceImpl
()
{
virtual
~
ForceImpl
()
{
}
}
...
...
platforms/reference/src/ReferenceKernels.cpp
View file @
2f921936
...
@@ -191,9 +191,9 @@ void ReferenceUpdateStateDataKernel::setPositions(ContextImpl& context, const st
...
@@ -191,9 +191,9 @@ void ReferenceUpdateStateDataKernel::setPositions(ContextImpl& context, const st
int
numParticles
=
context
.
getSystem
().
getNumParticles
();
int
numParticles
=
context
.
getSystem
().
getNumParticles
();
RealOpenMM
**
posData
=
extractPositions
(
context
);
RealOpenMM
**
posData
=
extractPositions
(
context
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
posData
[
i
][
0
]
=
positions
[
i
][
0
];
posData
[
i
][
0
]
=
(
RealOpenMM
)
positions
[
i
][
0
];
posData
[
i
][
1
]
=
positions
[
i
][
1
];
posData
[
i
][
1
]
=
(
RealOpenMM
)
positions
[
i
][
1
];
posData
[
i
][
2
]
=
positions
[
i
][
2
];
posData
[
i
][
2
]
=
(
RealOpenMM
)
positions
[
i
][
2
];
}
}
}
}
...
@@ -209,9 +209,9 @@ void ReferenceUpdateStateDataKernel::setVelocities(ContextImpl& context, const s
...
@@ -209,9 +209,9 @@ void ReferenceUpdateStateDataKernel::setVelocities(ContextImpl& context, const s
int
numParticles
=
context
.
getSystem
().
getNumParticles
();
int
numParticles
=
context
.
getSystem
().
getNumParticles
();
RealOpenMM
**
velData
=
extractVelocities
(
context
);
RealOpenMM
**
velData
=
extractVelocities
(
context
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
velData
[
i
][
0
]
=
velocities
[
i
][
0
];
velData
[
i
][
0
]
=
(
RealOpenMM
)
velocities
[
i
][
0
];
velData
[
i
][
1
]
=
velocities
[
i
][
1
];
velData
[
i
][
1
]
=
(
RealOpenMM
)
velocities
[
i
][
1
];
velData
[
i
][
2
]
=
velocities
[
i
][
2
];
velData
[
i
][
2
]
=
(
RealOpenMM
)
velocities
[
i
][
2
];
}
}
}
}
...
@@ -540,12 +540,12 @@ void ReferenceCalcNonbondedForceKernel::initialize(const System& system, const N
...
@@ -540,12 +540,12 @@ void ReferenceCalcNonbondedForceKernel::initialize(const System& system, const N
if
(
nonbondedMethod
==
Ewald
)
{
if
(
nonbondedMethod
==
Ewald
)
{
double
alpha
;
double
alpha
;
NonbondedForceImpl
::
calcEwaldParameters
(
system
,
force
,
alpha
,
kmax
[
0
],
kmax
[
1
],
kmax
[
2
]);
NonbondedForceImpl
::
calcEwaldParameters
(
system
,
force
,
alpha
,
kmax
[
0
],
kmax
[
1
],
kmax
[
2
]);
ewaldAlpha
=
alpha
;
ewaldAlpha
=
(
RealOpenMM
)
alpha
;
}
}
else
if
(
nonbondedMethod
==
PME
)
{
else
if
(
nonbondedMethod
==
PME
)
{
double
alpha
;
double
alpha
;
NonbondedForceImpl
::
calcPMEParameters
(
system
,
force
,
alpha
,
gridSize
[
0
],
gridSize
[
1
],
gridSize
[
2
]);
NonbondedForceImpl
::
calcPMEParameters
(
system
,
force
,
alpha
,
gridSize
[
0
],
gridSize
[
1
],
gridSize
[
2
]);
ewaldAlpha
=
alpha
;
ewaldAlpha
=
(
RealOpenMM
)
alpha
;
}
}
rfDielectric
=
(
RealOpenMM
)
force
.
getReactionFieldDielectric
();
rfDielectric
=
(
RealOpenMM
)
force
.
getReactionFieldDielectric
();
}
}
...
...
platforms/reference/src/SimTKReference/PME.cpp
View file @
2f921936
...
@@ -512,7 +512,7 @@ pme_reciprocal_convolution(pme_t pme,
...
@@ -512,7 +512,7 @@ pme_reciprocal_convolution(pme_t pme,
pme_virial
[
1
][
2
]
=
pme_virial
[
2
][
1
]
=
(
RealOpenMM
)
(
0.25
*
viryz
);
pme_virial
[
1
][
2
]
=
pme_virial
[
2
][
1
]
=
(
RealOpenMM
)
(
0.25
*
viryz
);
/* The factor 0.5 is nothing special, but it is better to have it here than inside the loop :-) */
/* The factor 0.5 is nothing special, but it is better to have it here than inside the loop :-) */
*
energy
=
0.5
*
esum
;
*
energy
=
(
RealOpenMM
)
(
0.5
*
esum
)
;
}
}
...
...
platforms/reference/src/SimTKReference/ReferenceConstraintAlgorithm.h
View file @
2f921936
...
@@ -25,10 +25,12 @@
...
@@ -25,10 +25,12 @@
#ifndef __ReferenceConstraintAlgorithm_H__
#ifndef __ReferenceConstraintAlgorithm_H__
#define __ReferenceConstraintAlgorithm_H__
#define __ReferenceConstraintAlgorithm_H__
#include "openmm/internal/windowsExport.h"
/**
/**
* This abstract class defines the interface which constraint algorithms must implement.
* This abstract class defines the interface which constraint algorithms must implement.
*/
*/
class
ReferenceConstraintAlgorithm
{
class
OPENMM_EXPORT
ReferenceConstraintAlgorithm
{
public:
public:
virtual
~
ReferenceConstraintAlgorithm
()
{};
virtual
~
ReferenceConstraintAlgorithm
()
{};
...
...
platforms/reference/src/SimTKReference/ReferenceCustomGBIxn.cpp
View file @
2f921936
...
@@ -218,7 +218,7 @@ void ReferenceCustomGBIxn::calculateOnePairValue(int index, int atom1, int atom2
...
@@ -218,7 +218,7 @@ void ReferenceCustomGBIxn::calculateOnePairValue(int index, int atom1, int atom2
if
(
cutoff
&&
r
>=
cutoffDistance
)
if
(
cutoff
&&
r
>=
cutoffDistance
)
return
;
return
;
map
<
string
,
double
>
variables
=
globalParameters
;
map
<
string
,
double
>
variables
=
globalParameters
;
for
(
int
i
=
0
;
i
<
paramNames
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
paramNames
.
size
();
i
++
)
{
variables
[
particleParamNames
[
i
*
2
]]
=
atomParameters
[
atom1
][
i
];
variables
[
particleParamNames
[
i
*
2
]]
=
atomParameters
[
atom1
][
i
];
variables
[
particleParamNames
[
i
*
2
+
1
]]
=
atomParameters
[
atom2
][
i
];
variables
[
particleParamNames
[
i
*
2
+
1
]]
=
atomParameters
[
atom2
][
i
];
}
}
...
@@ -289,7 +289,7 @@ void ReferenceCustomGBIxn::calculateOnePairEnergyTerm(int index, int atom1, int
...
@@ -289,7 +289,7 @@ void ReferenceCustomGBIxn::calculateOnePairEnergyTerm(int index, int atom1, int
// Record variables for evaluating expressions.
// Record variables for evaluating expressions.
map
<
string
,
double
>
variables
=
globalParameters
;
map
<
string
,
double
>
variables
=
globalParameters
;
for
(
int
i
=
0
;
i
<
paramNames
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
paramNames
.
size
();
i
++
)
{
variables
[
particleParamNames
[
i
*
2
]]
=
atomParameters
[
atom1
][
i
];
variables
[
particleParamNames
[
i
*
2
]]
=
atomParameters
[
atom1
][
i
];
variables
[
particleParamNames
[
i
*
2
+
1
]]
=
atomParameters
[
atom2
][
i
];
variables
[
particleParamNames
[
i
*
2
+
1
]]
=
atomParameters
[
atom2
][
i
];
}
}
...
@@ -361,7 +361,7 @@ void ReferenceCustomGBIxn::calculateOnePairChainRule(int atom1, int atom2, RealO
...
@@ -361,7 +361,7 @@ void ReferenceCustomGBIxn::calculateOnePairChainRule(int atom1, int atom2, RealO
// Record variables for evaluating expressions.
// Record variables for evaluating expressions.
map
<
string
,
double
>
variables
=
globalParameters
;
map
<
string
,
double
>
variables
=
globalParameters
;
for
(
int
i
=
0
;
i
<
paramNames
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
paramNames
.
size
();
i
++
)
{
variables
[
particleParamNames
[
i
*
2
]]
=
atomParameters
[
atom1
][
i
];
variables
[
particleParamNames
[
i
*
2
]]
=
atomParameters
[
atom1
][
i
];
variables
[
particleParamNames
[
i
*
2
+
1
]]
=
atomParameters
[
atom2
][
i
];
variables
[
particleParamNames
[
i
*
2
+
1
]]
=
atomParameters
[
atom2
][
i
];
}
}
...
@@ -379,7 +379,7 @@ void ReferenceCustomGBIxn::calculateOnePairChainRule(int atom1, int atom2, RealO
...
@@ -379,7 +379,7 @@ void ReferenceCustomGBIxn::calculateOnePairChainRule(int atom1, int atom2, RealO
forces
[
atom2
][
i
]
+=
f
;
forces
[
atom2
][
i
]
+=
f
;
}
}
variables
=
globalParameters
;
variables
=
globalParameters
;
for
(
int
i
=
0
;
i
<
paramNames
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
paramNames
.
size
();
i
++
)
variables
[
paramNames
[
i
]]
=
atomParameters
[
atom1
][
i
];
variables
[
paramNames
[
i
]]
=
atomParameters
[
atom1
][
i
];
variables
[
valueNames
[
0
]]
=
values
[
0
][
atom1
];
variables
[
valueNames
[
0
]]
=
values
[
0
][
atom1
];
for
(
int
i
=
1
;
i
<
(
int
)
valueNames
.
size
();
i
++
)
{
for
(
int
i
=
1
;
i
<
(
int
)
valueNames
.
size
();
i
++
)
{
...
...
platforms/reference/src/gbsa/CpuGBVI.cpp
View file @
2f921936
...
@@ -433,7 +433,7 @@ RealOpenMM CpuGBVI::computeBornEnergy( const RealOpenMM* bornRadii, RealOpenMM**
...
@@ -433,7 +433,7 @@ RealOpenMM CpuGBVI::computeBornEnergy( const RealOpenMM* bornRadii, RealOpenMM**
static
const
RealOpenMM
half
=
(
RealOpenMM
)
0.5
;
static
const
RealOpenMM
half
=
(
RealOpenMM
)
0.5
;
static
const
RealOpenMM
fourth
=
(
RealOpenMM
)
0.25
;
static
const
RealOpenMM
fourth
=
(
RealOpenMM
)
0.25
;
static
const
RealOpenMM
eighth
=
(
RealOpenMM
)
0.125
;
static
const
RealOpenMM
eighth
=
(
RealOpenMM
)
0.125
;
static
const
RealOpenMM
CAL_TO_JOULE
=
0.4184
;
static
const
RealOpenMM
CAL_TO_JOULE
=
(
RealOpenMM
)
0.4184
;
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -551,7 +551,7 @@ int CpuGBVI::computeBornForces( const RealOpenMM* bornRadii, RealOpenMM** atomCo
...
@@ -551,7 +551,7 @@ int CpuGBVI::computeBornForces( const RealOpenMM* bornRadii, RealOpenMM** atomCo
static
const
RealOpenMM
oneThird
=
(
RealOpenMM
)
(
1.0
/
3.0
);
static
const
RealOpenMM
oneThird
=
(
RealOpenMM
)
(
1.0
/
3.0
);
static
const
RealOpenMM
fourth
=
(
RealOpenMM
)
0.25
;
static
const
RealOpenMM
fourth
=
(
RealOpenMM
)
0.25
;
static
const
RealOpenMM
eighth
=
(
RealOpenMM
)
0.125
;
static
const
RealOpenMM
eighth
=
(
RealOpenMM
)
0.125
;
static
const
RealOpenMM
CAL_TO_JOULE
=
0.4184
;
static
const
RealOpenMM
CAL_TO_JOULE
=
(
RealOpenMM
)
0.4184
;
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
...
plugins/freeEnergy/platforms/reference/src/gbsa/ObcSoftcoreParameters.cpp
View file @
2f921936
...
@@ -118,7 +118,7 @@ ObcSoftcoreParameters::ObcSoftcoreParameters( int numberOfAtoms, ObcSoftcorePara
...
@@ -118,7 +118,7 @@ ObcSoftcoreParameters::ObcSoftcoreParameters( int numberOfAtoms, ObcSoftcorePara
_nonPolarScaleFactors
=
NULL
;
_nonPolarScaleFactors
=
NULL
;
_nonPolarPreFactor
=
2.25936
;
_nonPolarPreFactor
=
(
RealOpenMM
)
2.25936
;
setObcTypeParameters
(
obcType
);
setObcTypeParameters
(
obcType
);
...
...
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