I just noticed a bug in the dneb portion of neb.F
Line 244 reads:
f_dneb = f_spring_perp-vproj(f_spring_perp,f_perp)
This is the line that makes the dneb force normal to the real perpendicular force.
According to equation (14) of Sheppard et al. (2008), this equation should be:
f_dneb = f_spring_perp - (f_spring_perp*f_perp_unit) f_perp_unit
where f_perp_unit is a unit vector in the direction of f_perp
The function vproj, however, returns the following:
vproj=v2*SUM(v1*v2)/SQRT(SUM(v2*v2))
which returns
f_perp_unit * (f_spring_perp*f_perp)
This *should* return
f_perp_unit * (f_spring_perp*f_perp_unit)
so the code should be
vproj=v2*SUM(v1*v2)/(SUM(v2*v2))
This bug has caused numerous calculations to unexpectedly "blow up". I already made the fix in my compilation and will see if it solves the divergence issues I've been having.
major bug found in DNEB method
Moderator: moderators
Re: major bug found in DNEB method
Thanks for reporting the bug. The corrected version has been updated in CVS.
Despite the correction to the vproj function there is no dneb improvement in the pt111 benchmark system described in the Sheppard (JCP) 2008 paper.
Despite the correction to the vproj function there is no dneb improvement in the pt111 benchmark system described in the Sheppard (JCP) 2008 paper.
Re: major bug found in DNEB method
I just want to reiterate our thanks for fixing this bug. This was in a standard function, which could have propagated to other parts of our code.