On Tue, Nov 25, 2008, Arturas Ziemys wrote:
>
> For some frames I get errors like that:
> molsurf: molsurf.c:1055: is_buried: Assertion `sarg1 >= 0.0' failed.
Try the following patch to $AMBERHOME/src/mm_pbsa/molsurf.c, the recompile:
diff -u -r10.1 -r10.2
--- molsurf.c 2 Jun 2008 22:15:47 -0000 10.1
+++ molsurf.c 17 Sep 2008 10:47:50 -0000 10.2
.. -1030,7 +1030,7 ..
POINT t_ij, t_ik, t_diff;
REAL_T b_factor, h_ijk, xtest;
REAL_T w_ijk, w_sin, r_pk2;
- REAL_T sarg1, sarg2;
+ REAL_T sarg1, sarg2, check1, check2, check3, check4;
POINT b_ijk, r_ib;
void cross ();
int i;
.. -1050,7 +1050,16 ..
}
sarg1 = (ai->rad + aj->rad + probe_diam) * (ai->rad + aj->rad +
- probe_diam) - d_ij * d_ij;
+ probe_diam) - d_ij * d_ij;
+ /* For rounding to 6 decimal points in case sarg1 < 0 */
+ if(sarg1 < 0){
+ check1 = sarg1;
+ check2 = 0;
+ check3 = fabs(modf( check1 * 1000000, &check2));
+ check4 = (floor(check1 * 1000000) + (check3 < 0.5 ? 1 : 0 ))/1000000;
+ sarg1 = check4;
+ }
+
sarg2 = d_ij * d_ij - (ai->rad - aj->rad) * (ai->rad - aj->rad);
assert( sarg1 >= 0.0 );
assert( sarg2 >= 0.0 );
[This probably should get posted as a bugfix....]
...good luck....dac
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)
to majordomo.scripps.edu
Received on Fri Dec 05 2008 - 16:45:00 PST