[Dock-fans] Sphere Selector Error

Trent E. Balius tbalius at aol.com
Wed Jun 22 16:00:26 PDT 2011


 One thing you could try is download sphgen.cpp and see if it always prints spaces.

The problem is the sphgen.f may not print spaces.

Both sphere_selector.cpp and the dock code (sphere.cpp) expect spaces. 

Interestingly, the showsphere.f works even with out spaces.

Sudipto Mukherjee and I modified the c++ code to get it to read in an sph file with out space and print one with space. 

Differences between new and old code:
101,104c101,102
<
<                         // chatacter arrays to store fields in the sphgen input
<                       char idx[6],x[11], y[11], z[11], radius[9],idx2[4];
<
---
>                       int             idx, idx2;
>                       char    x[10], y[10], z[10], radius[8];
107,128c105,106
<                                 //  652     format(i5,3f10.5,f8.3,i5,i2,i3)
<                                 // from fortran in sphgen.
<
<                                 //set all the fields to be read to null
<                                 //so that we always get a null-terminated string
<                                 memset (idx,'\0',6);
<                                 memset (x,'\0',11);
<                                 memset (y,'\0',11);
<                                 memset (z,'\0',11);
<                                 memset (radius,'\0',9);
<                                 memset (idx2,'\0',4);
<
<                               sscanf(line,"%5c%10c%10c%10c%8c%3c %*s", idx, x, y, z, radius, idx2);
< /*
<                                 cout << idx << " "
<                                      << x   << " "
<                                      << y   << " "
<                                      << z   << " "
<                                      << radius << " "
<                                      << idx << endl;
< */
<                               tot_spheres[j].idx = atoi(idx);
---
>                               sscanf(line, "%5i%s%s%s%s%i %*s", &idx, x, y, z, radius, &idx2);
>                               tot_spheres[j].idx = idx;
133c111
<                               tot_spheres[j].idx2 = atoi(idx2);
---
>                               tot_spheres[j].idx2 = idx2;
215,217c193
<
<                       sprintf(line, "%5i%10.4f%10.4f%10.4f%8.3f%5i 0  0\n", tot_spheres[i].idx, tot_spheres[i].x, tot_spheres[i].y, tot_spheres[i].z, tot_spheres[i].radius, tot_spheres[i].idx2);
<                       //sprintf(line, "%5i%10.5f%10.5f%10.5f%8.3f%5i 0  0\n", tot_spheres[i].idx, tot_spheres[i].x, tot_spheres[i].y, tot_spheres[i].z, tot_spheres[i].radius, tot_spheres[i].idx2);
---
>                       sprintf(line, "%5i%10.5f%10.5f%10.5f%8.3f%5i 0  0\n", tot_spheres[i].idx, tot_spheres[i].x, tot_spheres[i].y, tot_spheres[i].z, tot_spheres[i].radius, tot_spheres[i].idx2);


 I hope this helps,


Trent 

 

-----Original Message-----
From: Benny Lo <benny_yc_lo at yahoo.com>
To: Trent E. Balius <tbalius at aol.com>
Sent: Wed, Jun 22, 2011 3:17 pm
Subject: Re: Sphere Selector Error




Hi, Trent:
Sorry, I sent the modified spheres. 
Here is the total spheres generated by the script.

Thank you,
Ben

--- On Wed, 6/22/11, Trent E. Balius <tbalius at aol.com> wrote:


From: Trent E. Balius <tbalius at aol.com>
Subject: Re: Sphere Selector Error
To: benny_yc_lo at yahoo.com, dock-fans at mailman.docking.org
Date: Wednesday, June 22, 2011, 11:28 AM


How many spheres are in the rec.sph file?  

Try setting stack size to unlimited:

For example in csh:

limit stacksize unlimit

If this does not work send me your sphere and mol2 files.


 I hope this helps,


Trent 

 

-----Original Message-----
From: Benny Lo <benny_yc_lo at yahoo.com>
To: Trent E. Balius <tbalius at aol.com>
Sent: Wed, Jun 22, 2011 2:07 pm
Subject: Re: Sphere Selector Error




Hi, Trent:

The command I run is shown below:
../../../bin/sphere_selector rec.sph ../1_struct/lig_charged.mol2 10.0

I tried the sample script it works but if I run with my own protein, I kept receiving stack smashing error. The ligand I tried to dock is an ATP molecule.

Please feel free to let me know if you need any additional information.

Thank you,
Ben

--- On Wed, 6/22/11, Trent E. Balius <tbalius at aol.com> wrote:


From: Trent E. Balius <tbalius at aol.com>
Subject: Re: Sphere Selector Error
To: benny_yc_lo at yahoo.com, dock-fans at mailman.docking.org
Date: Wednesday, June 22, 2011, 6:33 AM


 Hi Ben,

I need more information.  Could you provide the command you are running and more details? 

Trent


 

-----Original Message-----
From: Benny Lo <benny_yc_lo at yahoo.com>
To: tbalius at ams.sunysb.edu
Sent: Tue, Jun 21, 2011 6:41 pm
Subject: Sphere Selector Error




Hi, Trent:

I try to use the sphere selector but receive the following error:

*** stack smashing detected ***: ../../../bin/sphere_selector terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x50)[0x2e0970]
/lib/libc.so.6(+0xe591a)[0x2e091a]
../../../bin/sphere_selector[0x804941a]
../../../bin/sphere_selector[0x8049511]
/lib/libc.so.6(__libc_start_main+0xe7)[0x211ce7]
../../../bin/sphere_selector[0x8048b71]
======= Memory map: ========
00110000-001ef000 r-xp 00000000 08:05 11275861   /usr/lib/libstdc++.so.6.0.14
001ef000-001f3000 r--p 000de000 08:05 11275861   /usr/lib/libstdc++.so.6.0.14
001f3000-001f4000 rw-p 000e2000 08:05 11275861   /usr/lib/libstdc++.so.6.0.14
001f4000-001fb000 rw-p 00000000 00:00 0 
001fb000-00352000 r-xp 00000000 08:05 1573626    /lib/libc-2.12.1.so
00352000-00354000 r--p 00157000 08:05 1573626    /lib/libc-2.12.1.so
00354000-00355000 rw-p 00159000 08:05 1573626    /lib/libc-2.12.1.so
00355000-00358000 rw-p 00000000 00:00 0 
00409000-00423000 r-xp 00000000 08:05 1572943    /lib/libgcc_s.so.1
00423000-00424000 r--p 00019000 08:05 1572943    /lib/libgcc_s.so.1
00424000-00425000 rw-p 0001a000 08:05 1572943    /lib/libgcc_s.so.1
0086e000-0086f000 r-xp 00000000 00:00 0          [vdso]
008ef000-0090b000 r-xp 00000000 08:05 1573623    /lib/ld-2.12.1.so
0090b000-0090c000 r--p 0001b000 08:05 1573623    /lib/ld-2.12.1.so
0090c000-0090d000 rw-p 0001c000 08:05 1573623    /lib/ld-2.12.1.so
00f65000-00f89000 r-xp 00000000 08:05 1573630    /lib/libm-2.12.1.so
00f89000-00f8a000 r--p 00023000 08:05 1573630    /lib/libm-2.12.1.so
00f8a000-00f8b000 rw-p 00024000 08:05 1573630    /lib/libm-2.12.1.so
08048000-0804a000 r-xp 00000000 08:05 5380267    /home/ben/Desktop/dock6/bin/sphere_selector
0804a000-0804b000 r--p 00001000 08:05 5380267    /home/ben/Desktop/dock6/bin/sphere_selector
0804b000-0804c000 rw-p 00002000 08:05 5380267    /home/ben/Desktop/dock6/bin/sphere_selector
08167000-08188000 rw-p 00000000 00:00 0          [heap]
b7681000-b770d000 rw-p 00000000 00:00 0 
b771e000-b7721000 rw-p 00000000 00:00 0 
bf831000-bf852000 rw-p 00000000 00:00 0          [stack]
Aborted

Please help,

Thank you,
Ben



 



 



 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.docking.org/pipermail/dock-fans/attachments/20110622/bc44f5ca/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sphere_selector.cpp
Type: application/octet-stream
Size: 6143 bytes
Desc: not available
Url : http://mailman.docking.org/pipermail/dock-fans/attachments/20110622/bc44f5ca/attachment-0001.obj 


More information about the Dock-fans mailing list