"platforms/vscode:/vscode.git/clone" did not exist on "55bae85f997296d3f0632d4a69ee8ba02e02a9bd"
Commit 9e56b300 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Bug fix got GBVI force

parent db8b58e3
......@@ -357,8 +357,6 @@ RealOpenMM CpuGBVI::dL_dr( RealOpenMM r, RealOpenMM x, RealOpenMM S ){
// ---------------------------------------------------------------------------------------
// static const char* methodName = "\nCpuGBVI::dL_dr";
static const RealOpenMM one = static_cast<RealOpenMM>( 1.0 );
static const RealOpenMM threeHalves = static_cast<RealOpenMM>( 1.5 );
static const RealOpenMM threeEights = static_cast<RealOpenMM>( 0.375 );
......@@ -396,8 +394,6 @@ RealOpenMM CpuGBVI::dL_dx( RealOpenMM r, RealOpenMM x, RealOpenMM S ){
// ---------------------------------------------------------------------------------------
// static const char* methodName = "CpuGBVI::dL_dx";
static const RealOpenMM one = static_cast<RealOpenMM>( 1.0 );
static const RealOpenMM half = static_cast<RealOpenMM>( 0.5 );
static const RealOpenMM threeHalvesM = static_cast<RealOpenMM>( -1.5 );
......@@ -693,14 +689,15 @@ void CpuGBVI::computeBornForces( std::vector<RealVec>& atomCoordinates, const Re
// find dRb/dr, where Rb is the Born radius
de = CpuGBVI::dL_dr( r, r+S, S ) + CpuGBVI::dL_dx( r, r+S, S );
if( FABS( diff ) < r ){
de = CpuGBVI::dL_dr( r, r+S, S ) + CpuGBVI::dL_dx( r, r+S, S );
if( R > (r - S) ){
de -= CpuGBVI::dL_dr( r, R, S );
} else {
de -= ( CpuGBVI::dL_dr( r, (r-S), S ) + CpuGBVI::dL_dx( r, (r-S), S ) );
}
} else if( r < (S - R) ){
de = CpuGBVI::dL_dr( r, r+S, S ) + CpuGBVI::dL_dx( r, r+S, S );
de -= ( CpuGBVI::dL_dr( r, r-S, S ) + CpuGBVI::dL_dx( r, r-S, S ) );
}
......
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