Commit 0ba57257 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Minor bug fix

parent c4008bb2
...@@ -6018,7 +6018,7 @@ Double "simulationTimeBetweenReportsRatio" simulationTimeBetweenReportsRat ...@@ -6018,7 +6018,7 @@ Double "simulationTimeBetweenReportsRatio" simulationTimeBetweenReportsRat
} else if( key == "log" ){ } else if( key == "log" ){
logControl = atoi( value.c_str() ); logControl = atoi( value.c_str() );
} else if( key == ALL_FORCES ){ } else if( key == ALL_FORCES ){
initializeForceMap( forceMap, 1 ); initializeForceMap( forceMap, atoi( value.c_str() ) );
} else if( key == AMOEBA_HARMONIC_BOND_FORCE || } else if( key == AMOEBA_HARMONIC_BOND_FORCE ||
key == AMOEBA_HARMONIC_ANGLE_FORCE || key == AMOEBA_HARMONIC_ANGLE_FORCE ||
key == AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE || key == AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE ||
......
...@@ -103,9 +103,9 @@ static void computeAmoebaHarmonicBondForces( Context& context, AmoebaHarmonicBon ...@@ -103,9 +103,9 @@ static void computeAmoebaHarmonicBondForces( Context& context, AmoebaHarmonicBon
} }
if( log ){ if( log ){
(void) fprintf( log, "computeAmoebaHarmonicBondForces: expected energy=%14.7e\n", *expectedEnergy ); (void) fprintf( log, "computeAmoebaHarmonicBondForces: expected energy=%15.7e\n", *expectedEnergy );
for( unsigned int ii = 0; ii < positions.size(); ii++ ){ for( unsigned int ii = 0; ii < positions.size(); ii++ ){
(void) fprintf( log, "%6u [%14.7e %14.7e %14.7e]\n", ii, expectedForces[ii][0], expectedForces[ii][1], expectedForces[ii][2] ); (void) fprintf( log, "%6u [%15.7e %15.7e %15.7e]\n", ii, expectedForces[ii][0], expectedForces[ii][1], expectedForces[ii][2] );
} }
(void) fflush( log ); (void) fflush( log );
} }
...@@ -123,9 +123,9 @@ void compareWithExpectedForceAndEnergy( Context& context, AmoebaHarmonicBondForc ...@@ -123,9 +123,9 @@ void compareWithExpectedForceAndEnergy( Context& context, AmoebaHarmonicBondForc
const std::vector<Vec3> forces = state.getForces(); const std::vector<Vec3> forces = state.getForces();
if( log ){ if( log ){
(void) fprintf( log, "computeAmoebaHarmonicBondForces: expected energy=%14.7e %14.7e\n", expectedEnergy, state.getPotentialEnergy() ); (void) fprintf( log, "computeAmoebaHarmonicBondForces: expected energy=%15.7e %15.7e\n", expectedEnergy, state.getPotentialEnergy() );
for( unsigned int ii = 0; ii < forces.size(); ii++ ){ for( unsigned int ii = 0; ii < forces.size(); ii++ ){
(void) fprintf( log, "%6u [%14.7e %14.7e %14.7e] [%14.7e %14.7e %14.7e]\n", ii, (void) fprintf( log, "%6u [%15.7e %15.7e %15.7e] [%15.7e %15.7e %15.7e]\n", ii,
expectedForces[ii][0], expectedForces[ii][1], expectedForces[ii][2], forces[ii][0], forces[ii][1], forces[ii][2] ); expectedForces[ii][0], expectedForces[ii][1], expectedForces[ii][2], forces[ii][0], forces[ii][1], forces[ii][2] );
} }
(void) fflush( log ); (void) fflush( log );
......
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