"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "5824286df3628c4cd001a25d0d96e58c66022cfc"
Commit 36762962 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Edits to remove some VC9 warnings

parent d5a7dd89
...@@ -77,7 +77,7 @@ void testSerialization() { ...@@ -77,7 +77,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getIncludeCavityTerm(), force2.getIncludeCavityTerm()); ASSERT_EQUAL(force1.getIncludeCavityTerm(), force2.getIncludeCavityTerm());
ASSERT_EQUAL(force1.getNumParticles(), force2.getNumParticles()); ASSERT_EQUAL(force1.getNumParticles(), force2.getNumParticles());
for (unsigned int ii = 0; ii < force1.getNumParticles(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumParticles()); ii++) {
double radius1, charge1, scaleFactor1; double radius1, charge1, scaleFactor1;
double radius2, charge2, scaleFactor2; double radius2, charge2, scaleFactor2;
......
...@@ -64,7 +64,7 @@ void testSerialization() { ...@@ -64,7 +64,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicAnglePentic(), force2.getAmoebaGlobalHarmonicAnglePentic()); ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicAnglePentic(), force2.getAmoebaGlobalHarmonicAnglePentic());
ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicAngleSextic(), force2.getAmoebaGlobalHarmonicAngleSextic()); ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicAngleSextic(), force2.getAmoebaGlobalHarmonicAngleSextic());
ASSERT_EQUAL(force1.getNumAngles(), force2.getNumAngles()); ASSERT_EQUAL(force1.getNumAngles(), force2.getNumAngles());
for (unsigned int ii = 0; ii < force1.getNumAngles(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumAngles()); ii++) {
int a1, a2, a3, b1, b2, b3; int a1, a2, a3, b1, b2, b3;
double da, db, ka, kb; double da, db, ka, kb;
force1.getAngleParameters(ii, a1, a2, a3, da, ka); force1.getAngleParameters(ii, a1, a2, a3, da, ka);
......
...@@ -60,7 +60,7 @@ void testSerialization() { ...@@ -60,7 +60,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicBondCubic(), force2.getAmoebaGlobalHarmonicBondCubic()); ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicBondCubic(), force2.getAmoebaGlobalHarmonicBondCubic());
ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicBondQuartic(), force2.getAmoebaGlobalHarmonicBondQuartic()); ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicBondQuartic(), force2.getAmoebaGlobalHarmonicBondQuartic());
ASSERT_EQUAL(force1.getNumBonds(), force2.getNumBonds()); ASSERT_EQUAL(force1.getNumBonds(), force2.getNumBonds());
for (unsigned int ii = 0; ii < force1.getNumBonds(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumBonds()); ii++) {
int a1, a2, b1, b2; int a1, a2, b1, b2;
double da, db, ka, kb; double da, db, ka, kb;
force1.getBondParameters(ii, a1, a2, da, ka); force1.getBondParameters(ii, a1, a2, da, ka);
......
...@@ -68,7 +68,7 @@ void testSerialization() { ...@@ -68,7 +68,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicInPlaneAngleSextic(), force2.getAmoebaGlobalHarmonicInPlaneAngleSextic()); ASSERT_EQUAL(force1.getAmoebaGlobalHarmonicInPlaneAngleSextic(), force2.getAmoebaGlobalHarmonicInPlaneAngleSextic());
ASSERT_EQUAL(force1.getNumAngles(), force2.getNumAngles()); ASSERT_EQUAL(force1.getNumAngles(), force2.getNumAngles());
for ( unsigned int ii = 0; ii < force1.getNumAngles(); ii++) { for ( unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumAngles()); ii++) {
int a1, a2, a3, a4, b1, b2, b3, b4; int a1, a2, a3, a4, b1, b2, b3, b4;
double da, db, ka, kb; double da, db, ka, kb;
force1.getAngleParameters(ii, a1, a2, a3, a4, da, ka); force1.getAngleParameters(ii, a1, a2, a3, a4, da, ka);
......
...@@ -130,7 +130,7 @@ void testSerialization() { ...@@ -130,7 +130,7 @@ void testSerialization() {
} }
ASSERT_EQUAL(force1.getNumMultipoles(), force2.getNumMultipoles()); ASSERT_EQUAL(force1.getNumMultipoles(), force2.getNumMultipoles());
for (unsigned int ii = 0; ii < force1.getNumMultipoles(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumMultipoles()); ii++) {
int axisType1, multipoleAtomZ1, multipoleAtomX1, multipoleAtomY1; int axisType1, multipoleAtomZ1, multipoleAtomX1, multipoleAtomY1;
int axisType2, multipoleAtomZ2, multipoleAtomX2, multipoleAtomY2; int axisType2, multipoleAtomZ2, multipoleAtomX2, multipoleAtomY2;
......
...@@ -68,7 +68,7 @@ void testSerialization() { ...@@ -68,7 +68,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getAmoebaGlobalOutOfPlaneBendSextic(), force2.getAmoebaGlobalOutOfPlaneBendSextic()); ASSERT_EQUAL(force1.getAmoebaGlobalOutOfPlaneBendSextic(), force2.getAmoebaGlobalOutOfPlaneBendSextic());
ASSERT_EQUAL(force1.getNumOutOfPlaneBends(), force2.getNumOutOfPlaneBends()); ASSERT_EQUAL(force1.getNumOutOfPlaneBends(), force2.getNumOutOfPlaneBends());
for (unsigned int ii = 0; ii < force1.getNumOutOfPlaneBends(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumOutOfPlaneBends()); ii++) {
int a1, a2, a3, a4, b1, b2, b3, b4; int a1, a2, a3, a4, b1, b2, b3, b4;
double ka, kb; double ka, kb;
force1.getOutOfPlaneBendParameters(ii, a1, a2, a3, a4, ka); force1.getOutOfPlaneBendParameters(ii, a1, a2, a3, a4, ka);
......
...@@ -56,7 +56,7 @@ void testSerialization() { ...@@ -56,7 +56,7 @@ void testSerialization() {
// Compare the two forces to see if they are identical. // Compare the two forces to see if they are identical.
AmoebaPiTorsionForce& force2 = *copy; AmoebaPiTorsionForce& force2 = *copy;
ASSERT_EQUAL(force1.getNumPiTorsions(), force2.getNumPiTorsions()); ASSERT_EQUAL(force1.getNumPiTorsions(), force2.getNumPiTorsions());
for (unsigned int ii = 0; ii < force1.getNumPiTorsions(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumPiTorsions()); ii++) {
int a1, a2, a3, a4, a5, a6, b1, b2, b3, b4, b5, b6; int a1, a2, a3, a4, a5, a6, b1, b2, b3, b4, b5, b6;
double ka, kb; double ka, kb;
force1.getPiTorsionParameters(ii, a1, a2, a3, a4, a5, a6, ka); force1.getPiTorsionParameters(ii, a1, a2, a3, a4, a5, a6, ka);
......
...@@ -55,7 +55,7 @@ void testSerialization() { ...@@ -55,7 +55,7 @@ void testSerialization() {
// Compare the two forces to see if they are identical. // Compare the two forces to see if they are identical.
AmoebaStretchBendForce& force2 = *copy; AmoebaStretchBendForce& force2 = *copy;
ASSERT_EQUAL(force1.getNumStretchBends(), force2.getNumStretchBends()); ASSERT_EQUAL(force1.getNumStretchBends(), force2.getNumStretchBends());
for (unsigned int ii = 0; ii < force1.getNumStretchBends(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumStretchBends()); ii++) {
int p11, p12, p13; int p11, p12, p13;
int p21, p22, p23; int p21, p22, p23;
double dAB1, dAB2; double dAB1, dAB2;
......
...@@ -85,7 +85,7 @@ void testSerialization() { ...@@ -85,7 +85,7 @@ void testSerialization() {
// Compare the two forces to see if they are identical. // Compare the two forces to see if they are identical.
AmoebaTorsionForce& force2 = *copy; AmoebaTorsionForce& force2 = *copy;
ASSERT_EQUAL(force1.getNumTorsions(), force2.getNumTorsions()); ASSERT_EQUAL(force1.getNumTorsions(), force2.getNumTorsions());
for (unsigned int ii = 0; ii < force1.getNumTorsions(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumTorsions()); ii++) {
int a1, a2, a3, a4, b1, b2, b3, b4; int a1, a2, a3, a4, b1, b2, b3, b4;
......
...@@ -64,9 +64,9 @@ static void compareGrids( const std::vector< std::vector< std::vector<double> > ...@@ -64,9 +64,9 @@ static void compareGrids( const std::vector< std::vector< std::vector<double> >
ASSERT_EQUAL(grid1.size(), grid2.size()); ASSERT_EQUAL(grid1.size(), grid2.size());
for (unsigned int ii = 0; ii < grid1.size(); ii++) { for (unsigned int ii = 0; ii < grid1.size(); ii++) {
ASSERT_EQUAL(grid1[ii].size(), grid2[ii].size()); ASSERT_EQUAL(grid1[ii].size(), grid2[ii].size());
for (int jj = 0; jj < grid1[ii].size(); jj++) { for (unsigned int jj = 0; jj < grid1[ii].size(); jj++) {
ASSERT_EQUAL(grid1[ii][jj].size(), grid2[ii][jj].size()); ASSERT_EQUAL(grid1[ii][jj].size(), grid2[ii][jj].size());
for (int kk = 0; kk < grid1[ii][jj].size(); kk++) { for (unsigned int kk = 0; kk < grid1[ii][jj].size(); kk++) {
ASSERT_EQUAL(grid1[ii][jj][kk], grid2[ii][jj][kk]); ASSERT_EQUAL(grid1[ii][jj][kk], grid2[ii][jj][kk]);
} }
} }
...@@ -105,7 +105,7 @@ void testSerialization() { ...@@ -105,7 +105,7 @@ void testSerialization() {
AmoebaTorsionTorsionForce & force2 = *copy; AmoebaTorsionTorsionForce & force2 = *copy;
ASSERT_EQUAL(force1.getNumTorsionTorsions(), force2.getNumTorsionTorsions()); ASSERT_EQUAL(force1.getNumTorsionTorsions(), force2.getNumTorsionTorsions());
for (unsigned int ii = 0; ii < force1.getNumTorsionTorsions(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumTorsionTorsions()); ii++) {
int a1, a2, a3, a4, a5, aChiral, aGridIndex, b1, b2, b3, b4, b5, bChiral, bGridIndex; int a1, a2, a3, a4, a5, aChiral, aGridIndex, b1, b2, b3, b4, b5, bChiral, bGridIndex;
...@@ -122,7 +122,7 @@ void testSerialization() { ...@@ -122,7 +122,7 @@ void testSerialization() {
} }
ASSERT_EQUAL(force1.getNumTorsionTorsionGrids(), force2.getNumTorsionTorsionGrids()); ASSERT_EQUAL(force1.getNumTorsionTorsionGrids(), force2.getNumTorsionTorsionGrids());
for (unsigned int ii = 0; ii < force1.getNumTorsionTorsionGrids(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumTorsionTorsionGrids()); ii++) {
const std::vector< std::vector< std::vector<double> > >& grid1 = force1.getTorsionTorsionGrid( ii ); const std::vector< std::vector< std::vector<double> > >& grid1 = force1.getTorsionTorsionGrid( ii );
const std::vector< std::vector< std::vector<double> > >& grid2 = force2.getTorsionTorsionGrid( ii ); const std::vector< std::vector< std::vector<double> > >& grid2 = force2.getTorsionTorsionGrid( ii );
compareGrids(grid1, grid2 ); compareGrids(grid1, grid2 );
......
...@@ -60,7 +60,7 @@ void testSerialization() { ...@@ -60,7 +60,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getAmoebaGlobalUreyBradleyCubic(), force2.getAmoebaGlobalUreyBradleyCubic()); ASSERT_EQUAL(force1.getAmoebaGlobalUreyBradleyCubic(), force2.getAmoebaGlobalUreyBradleyCubic());
ASSERT_EQUAL(force1.getAmoebaGlobalUreyBradleyQuartic(), force2.getAmoebaGlobalUreyBradleyQuartic()); ASSERT_EQUAL(force1.getAmoebaGlobalUreyBradleyQuartic(), force2.getAmoebaGlobalUreyBradleyQuartic());
ASSERT_EQUAL(force1.getNumInteractions(), force2.getNumInteractions()); ASSERT_EQUAL(force1.getNumInteractions(), force2.getNumInteractions());
for (unsigned int ii = 0; ii < force1.getNumInteractions(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumInteractions()); ii++) {
int a1, a2, b1, b2; int a1, a2, b1, b2;
double da, db, ka, kb; double da, db, ka, kb;
......
...@@ -84,7 +84,7 @@ void testSerialization() { ...@@ -84,7 +84,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getNumParticles(), force2.getNumParticles()); ASSERT_EQUAL(force1.getNumParticles(), force2.getNumParticles());
for (unsigned int ii = 0; ii < force1.getNumParticles(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumParticles()); ii++) {
int ivIndex1, classIndex1; int ivIndex1, classIndex1;
int ivIndex2, classIndex2; int ivIndex2, classIndex2;
...@@ -101,7 +101,7 @@ void testSerialization() { ...@@ -101,7 +101,7 @@ void testSerialization() {
ASSERT_EQUAL(epsilon1, epsilon2); ASSERT_EQUAL(epsilon1, epsilon2);
ASSERT_EQUAL(reductionFactor1, reductionFactor2); ASSERT_EQUAL(reductionFactor1, reductionFactor2);
} }
for (unsigned int ii = 0; ii < force1.getNumParticles(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumParticles()); ii++) {
std::vector< int > exclusions1; std::vector< int > exclusions1;
std::vector< int > exclusions2; std::vector< int > exclusions2;
......
...@@ -83,7 +83,7 @@ void testSerialization() { ...@@ -83,7 +83,7 @@ void testSerialization() {
ASSERT_EQUAL(force1.getSlevy(), force2.getSlevy()); ASSERT_EQUAL(force1.getSlevy(), force2.getSlevy());
ASSERT_EQUAL(force1.getNumParticles(), force2.getNumParticles()); ASSERT_EQUAL(force1.getNumParticles(), force2.getNumParticles());
for (unsigned int ii = 0; ii < force1.getNumParticles(); ii++) { for (unsigned int ii = 0; ii < static_cast<unsigned int>(force1.getNumParticles()); ii++) {
double radius1, epsilon1; double radius1, epsilon1;
double radius2, epsilon2; double radius2, epsilon2;
......
...@@ -356,8 +356,8 @@ void CudaFreeEnergyCalcNonbondedSoftcoreForceKernel::initialize(const System& sy ...@@ -356,8 +356,8 @@ void CudaFreeEnergyCalcNonbondedSoftcoreForceKernel::initialize(const System& sy
for (int i = 0; i < numExceptions; i++) { for (int i = 0; i < numExceptions; i++) {
double charge, sig, eps, softcoreLJLambda; double charge, sig, eps, softcoreLJLambda;
force.getExceptionParameters(exceptions[i], particle1[i], particle2[i], charge, sig, eps, softcoreLJLambda); force.getExceptionParameters(exceptions[i], particle1[i], particle2[i], charge, sig, eps, softcoreLJLambda);
c6[i] = static_cast<float>( (4.0f*eps*powf(sig, 6.0f)) ); c6[i] = static_cast<float>( (4.0*eps*pow(sig, 6.0)) );
c12[i] = static_cast<float>( (4.0f*eps*powf(sig, 12.0f)) ); c12[i] = static_cast<float>( (4.0*eps*pow(sig, 12.0)) );
qProd[i] = static_cast<float>( charge ); qProd[i] = static_cast<float>( charge );
softcoreLJLambdaArray[i] = static_cast<float>( softcoreLJLambda ); softcoreLJLambdaArray[i] = static_cast<float>( softcoreLJLambda );
} }
......
...@@ -276,12 +276,17 @@ void freeEnergyGpuSetPeriodicBoxSize( freeEnergyGpuContext freeEnergyGpu, float ...@@ -276,12 +276,17 @@ void freeEnergyGpuSetPeriodicBoxSize( freeEnergyGpuContext freeEnergyGpu, float
gpuSetPeriodicBoxSize( freeEnergyGpu->gpuContext, xsize, ysize, zsize ); gpuSetPeriodicBoxSize( freeEnergyGpu->gpuContext, xsize, ysize, zsize );
} }
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4297)
#endif
extern "C" extern "C"
void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, float epsfac, const std::vector<int>& atom, const std::vector<float>& c6, void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, float epsfac, const std::vector<int>& atom, const std::vector<float>& c6,
const std::vector<float>& c12, const std::vector<float>& q, const std::vector<float>& c12, const std::vector<float>& q,
const std::vector<float>& softcoreLJLambdaArray, const std::vector<char>& symbol, const std::vector<float>& softcoreLJLambdaArray, const std::vector<char>& symbol,
const std::vector<std::vector<int> >& exclusions, CudaFreeEnergyNonbondedMethod method, const std::vector<std::vector<int> >& exclusions, CudaFreeEnergyNonbondedMethod method,
float cutoffDistance, float solventDielectric ){ float cutoffDistance, float solventDielectric ) {
unsigned int numberOfParticles = c6.size(); unsigned int numberOfParticles = c6.size();
gpuContext gpu = freeEnergyGpu->gpuContext; gpuContext gpu = freeEnergyGpu->gpuContext;
...@@ -301,6 +306,10 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa ...@@ -301,6 +306,10 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
throw OpenMM::OpenMMException( msg.str() ); throw OpenMM::OpenMMException( msg.str() );
} }
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
freeEnergyGpu->freeEnergySim.epsfac = epsfac; freeEnergyGpu->freeEnergySim.epsfac = epsfac;
freeEnergyGpu->freeEnergySim.nonbondedMethod = method; freeEnergyGpu->freeEnergySim.nonbondedMethod = method;
...@@ -349,7 +358,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa ...@@ -349,7 +358,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
// Dummy out extra atom data // Dummy out extra atom data
for( unsigned int ii = numberOfParticles; ii < paddedNumberOfAtoms; ii++ ){ for( int ii = numberOfParticles; ii < paddedNumberOfAtoms; ii++ ){
(*freeEnergyGpu->psSigEps4)[ii].x = 1.0f; (*freeEnergyGpu->psSigEps4)[ii].x = 1.0f;
(*freeEnergyGpu->psSigEps4)[ii].y = 0.0f; (*freeEnergyGpu->psSigEps4)[ii].y = 0.0f;
...@@ -380,7 +389,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa ...@@ -380,7 +389,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
if( offset > 0 ){ if( offset > 0 ){
if( offset > numberOfParticles ){ if( offset > numberOfParticles ){
(void) fprintf( freeEnergyGpu->log,"Dummy padded entries\n" ); (void) fprintf( freeEnergyGpu->log,"Dummy padded entries\n" );
for (unsigned int ii = offset; ii < paddedNumberOfAtoms; ii++){ for (int ii = offset; ii < paddedNumberOfAtoms; ii++){
(void) fprintf( freeEnergyGpu->log,"%6u sig[%14.7e %14.7e] lambda=%10.3f q=%10.3f\n", (void) fprintf( freeEnergyGpu->log,"%6u sig[%14.7e %14.7e] lambda=%10.3f q=%10.3f\n",
ii, ii,
(*freeEnergyGpu->psSigEps4)[ii].x, (*freeEnergyGpu->psSigEps4)[ii].y, (*freeEnergyGpu->psSigEps4)[ii].z, (*freeEnergyGpu->psSigEps4)[ii].w ); (*freeEnergyGpu->psSigEps4)[ii].x, (*freeEnergyGpu->psSigEps4)[ii].y, (*freeEnergyGpu->psSigEps4)[ii].z, (*freeEnergyGpu->psSigEps4)[ii].w );
......
...@@ -793,7 +793,7 @@ void CpuGBVISoftcore::printGbvi( const std::vector<OpenMM::RealVec>& atomCoordin ...@@ -793,7 +793,7 @@ void CpuGBVISoftcore::printGbvi( const std::vector<OpenMM::RealVec>& atomCoordin
gbviParameters->getBornRadiusScalingSoftcoreMethod(), GBVISoftcoreParameters::QuinticSpline ); gbviParameters->getBornRadiusScalingSoftcoreMethod(), GBVISoftcoreParameters::QuinticSpline );
(void) fprintf( log, " preFactor %15.7e)\n", preFactor ); (void) fprintf( log, " preFactor %15.7e)\n", preFactor );
for( unsigned int atomI = 0; atomI < numberOfAtoms; atomI++ ){ for( unsigned int atomI = 0; atomI < static_cast<unsigned int>(numberOfAtoms); atomI++ ){
(void) fprintf( log, "%6d r=%15.7e rSc=%15.7e swd=%15.7e lmda=%4.2f tau*gam=%15.7e q=%15.7e", atomI, (void) fprintf( log, "%6d r=%15.7e rSc=%15.7e swd=%15.7e lmda=%4.2f tau*gam=%15.7e q=%15.7e", atomI,
atomicRadii[atomI], atomicRadii[atomI],
scaledRadii[atomI], scaledRadii[atomI],
......
...@@ -419,9 +419,9 @@ int PositionGenerator::setPositions( GenerationMethod method, OpenMM_SFMT::SFMT& ...@@ -419,9 +419,9 @@ int PositionGenerator::setPositions( GenerationMethod method, OpenMM_SFMT::SFMT&
int errorFlag = 0; int errorFlag = 0;
positions.resize( _numParticles ); positions.resize( _numParticles );
if( method == Random ){ if( method == Random ){
for( unsigned int ii = 0; ii < _numParticles; ii += _numParticlesPerMolecule ){ for( unsigned int ii = 0; ii < static_cast<unsigned int>(_numParticles); ii += _numParticlesPerMolecule ){
positions[ii] = Vec3(_boxSize*genrand_real2(sfmt), _boxSize*genrand_real2(sfmt), _boxSize*genrand_real2(sfmt)); positions[ii] = Vec3(_boxSize*genrand_real2(sfmt), _boxSize*genrand_real2(sfmt), _boxSize*genrand_real2(sfmt));
for( unsigned int jj = 1; jj < _numParticlesPerMolecule; jj++) { for( unsigned int jj = 1; jj < static_cast<unsigned int>(_numParticlesPerMolecule); jj++) {
positions[ii+jj] = positions[ii] + Vec3(_bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt)); positions[ii+jj] = positions[ii] + Vec3(_bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt));
} }
} }
...@@ -486,7 +486,7 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi ...@@ -486,7 +486,7 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi
// place molecule centers on grid // place molecule centers on grid
for( unsigned int ii = 0; ii < _numParticles; ii += _numParticlesPerMolecule ){ for( unsigned int ii = 0; ii < static_cast<unsigned int>(_numParticles); ii += _numParticlesPerMolecule ){
array[ii] = Vec3(start); array[ii] = Vec3(start);
bool done = false; bool done = false;
for( unsigned int jj = 0; jj < 3 && !done; jj++ ){ for( unsigned int jj = 0; jj < 3 && !done; jj++ ){
...@@ -507,9 +507,9 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi ...@@ -507,9 +507,9 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi
// add molecule atoms // add molecule atoms
Vec3 bondOffset( 0.05, 0.05, 0.05 ); Vec3 bondOffset( 0.05, 0.05, 0.05 );
for( unsigned int ii = 0; ii < _numMolecules; ii++ ){ for( unsigned int ii = 0; ii < static_cast<unsigned int>(_numMolecules); ii++ ){
int molecularIndex = ii*_numParticlesPerMolecule; int molecularIndex = ii*_numParticlesPerMolecule;
for( unsigned int jj = 1; jj < _numParticlesPerMolecule; jj++ ){ for( unsigned int jj = 1; jj < static_cast<unsigned int>(_numParticlesPerMolecule); jj++ ){
array[molecularIndex+jj] = array[molecularIndex] + bondOffset + Vec3(_bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt)); array[molecularIndex+jj] = array[molecularIndex] + bondOffset + Vec3(_bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt), _bondDistance*genrand_real2(sfmt));
} }
} }
...@@ -1321,7 +1321,7 @@ static NonbondedForce* copyNonbondedForce( const NonbondedForce& nonbondedForce ...@@ -1321,7 +1321,7 @@ static NonbondedForce* copyNonbondedForce( const NonbondedForce& nonbondedForce
static void copySystem( const System& inputSystem, System& systemCopy ){ static void copySystem( const System& inputSystem, System& systemCopy ){
for( unsigned int ii = 0; ii < inputSystem.getNumParticles(); ii++ ){ for( unsigned int ii = 0; ii < static_cast<unsigned int>(inputSystem.getNumParticles()); ii++ ){
systemCopy.addParticle( inputSystem.getParticleMass( static_cast<int>(ii) ) ); systemCopy.addParticle( inputSystem.getParticleMass( static_cast<int>(ii) ) );
} }
...@@ -1331,8 +1331,7 @@ static void copySystem( const System& inputSystem, System& systemCopy ){ ...@@ -1331,8 +1331,7 @@ static void copySystem( const System& inputSystem, System& systemCopy ){
inputSystem.getDefaultPeriodicBoxVectors( a, b, c ); inputSystem.getDefaultPeriodicBoxVectors( a, b, c );
systemCopy.setDefaultPeriodicBoxVectors( a, b, c ); systemCopy.setDefaultPeriodicBoxVectors( a, b, c );
for( unsigned int ii = 0; ii < inputSystem.getNumConstraints(); ii++ ){ for( unsigned int ii = 0; ii < static_cast<unsigned int>(inputSystem.getNumConstraints()); ii++ ){
int index;
int particle1, particle2; int particle1, particle2;
double distance; double distance;
inputSystem.getConstraintParameters( ii, particle1, particle2, distance); inputSystem.getConstraintParameters( ii, particle1, particle2, distance);
...@@ -1698,7 +1697,7 @@ static CustomNonbondedForce* buildCustomNonbondedSoftcoreForce( const Nonbonded ...@@ -1698,7 +1697,7 @@ static CustomNonbondedForce* buildCustomNonbondedSoftcoreForce( const Nonbonded
customNonbonded->addPerParticleParameter("lambda"); customNonbonded->addPerParticleParameter("lambda");
vector<double> nonbondedParams(4); vector<double> nonbondedParams(4);
for( unsigned int ii = 0; ii < nonbondedSoftcoreForce.getNumParticles(); ii++ ){ for( unsigned int ii = 0; ii < static_cast<unsigned int>(nonbondedSoftcoreForce.getNumParticles()); ii++ ){
double charge; double charge;
double sigma; double sigma;
...@@ -1751,7 +1750,7 @@ CustomBondForce* buildCustomBondForceForNonbondedExceptions( const NonbondedSoft ...@@ -1751,7 +1750,7 @@ CustomBondForce* buildCustomBondForceForNonbondedExceptions( const NonbondedSoft
customBond->addPerBondParameter("eps"); customBond->addPerBondParameter("eps");
customBond->addPerBondParameter("lambda"); customBond->addPerBondParameter("lambda");
for( unsigned int ii = 0; ii < nonbondedSoftcoreForce.getNumExceptions(); ii++ ){ for( unsigned int ii = 0; ii < static_cast<unsigned int>(nonbondedSoftcoreForce.getNumExceptions()); ii++ ){
int particle1, particle2; int particle1, particle2;
double chargeProd; double chargeProd;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment