AMBER Archive (2008)

Subject: AMBER: note on the molsurf and "Assertion `sarg1 >= 0.0' failed" error

From: Kateryna Miroshnychenko (kateryna_mirosh_at_ire.kharkov.ua)
Date: Wed May 28 2008 - 10:08:19 CDT


Dear AMBER users,

I've got an error while running mmpbsa script for drug-DNA complex "molsurf:
molsurf.c:1055: is_buried: Assertion `sarg1 >= 0.0' failed". As suggested in
the previous mails in the AMBER mail archive, I've checked the radii and the
geometry of the complex - they were quite reasonable. The further inspection
showed that sarg1 was not actually negative but rather equal to zero and that
error arised due to some precision issues. Small modifications in lines 1033,
1055 and 1056 (see below) solved the problem. May be this would be of help
for somebody also.

with best regards,
Katya

*** /usr/local/amber9/src/mm_pbsa/molsurf.c_bak 2008-05-26 18:17:37.000000000
+0300
--- /usr/local/amber9/src/mm_pbsa/molsurf.c 2008-05-26 20:17:17.000000000
+0300
*************** static int is_buried (ai, aj, ak, probe_
*** 1030,1036 ****
    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;
    POINT b_ijk, r_ib;
    void cross ();
    int i;
--- 1030,1036 ----
    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, eps=0.001;
    POINT b_ijk, r_ib;
    void cross ();
    int i;
*************** static int is_buried (ai, aj, ak, probe_
*** 1052,1059 ****
    sarg1 = (ai->rad + aj->rad + probe_diam) * (ai->rad + aj->rad +
                  probe_diam) - d_ij * d_ij;
    sarg2 = d_ij * d_ij - (ai->rad - aj->rad) * (ai->rad - aj->rad);
! assert( sarg1 >= 0.0 );
! assert( sarg2 >= 0.0 );
    t_rad = 0.5 * sqrt (sarg1) * sqrt (sarg2) / d_ij;
  
    t_fact1 = ((ai->rad + probe_rad) * (ai->rad + probe_rad) -
--- 1052,1059 ----
    sarg1 = (ai->rad + aj->rad + probe_diam) * (ai->rad + aj->rad +
                  probe_diam) - d_ij * d_ij;
    sarg2 = d_ij * d_ij - (ai->rad - aj->rad) * (ai->rad - aj->rad);
! assert( sarg1 > 0.0 - eps);
! assert( sarg2 > 0.0 - eps);
    t_rad = 0.5 * sqrt (sarg1) * sqrt (sarg2) / d_ij;
  
    t_fact1 = ((ai->rad + probe_rad) * (ai->rad + probe_rad) -

-----------------------------------------
Kateryna Miroshnychenko
Department of Biological Physics
Institute of Radiophysics and Electronics
of NAS of Ukraine
Kharkiv
Ukraine
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)
      to majordomo_at_scripps.edu