[Dock-fans] Sphere Selector Error

Trent E. Balius tbalius at aol.com
Thu Jun 23 03:52:00 PDT 2011


 Hi Ben,

Perhaps, sending you a modified  sphere_selector.cpp program was premature.
Use the unmodified version.  Sorry for the confusion. 

Try the following:

(1) download  from the following page and use sphgen.cpp:

http://dock.compbio.ucsf.edu/Contributed_Code/sphgen_cpp.htm

I think using this program will fix your problem.

if (1) does not work try the following:

(2) Manually modify the sphere file to place a space between the x and y coordinates. 

change from:
DOCK 3.5 receptor_spheres
cluster     1   number of spheres in cluster    78
  707 -33.09760-166.17085 102.97881   1.401 1901 0  0
  712 -33.89517-163.42758  96.20749   1.400 2280 0  0
 1121 -41.28802-160.96045 101.66316   1.400 1759 0  0
 1131 -38.10195-158.30315 102.35743   2.409 1916 0  0
 1132 -38.40201-156.86279 100.07462   1.401 1744 0  0
 1152 -35.59296-155.01543  95.68601   1.401 2241 0  0
 1169 -35.01744-154.05220  94.01767   1.401 2241 0  0
 1377 -30.56226-162.93300 104.71400   3.966  708 0  0

To:
DOCK 3.5 receptor_spheres
cluster     1   number of spheres in cluster    78
  707 -33.0976 -166.17085 102.97881   1.401 1901 0  0
  712 -33.8951 -163.42758  96.20749   1.400 2280 0  0
 1121 -41.2880 -160.96045 101.66316   1.400 1759 0  0
 1131 -38.1019 -158.30315 102.35743   2.409 1916 0  0
 1132 -38.4020 -156.86279 100.07462   1.401 1744 0  0
 1152 -35.5929 -155.01543  95.68601   1.401 2241 0  0
 1169 -35.0174 -154.05220  94.01767   1.401 2241 0  0
 1377 -30.5622 -162.93300 104.71400   3.966  708 0  0

(3)  Alternatively, use a program (like chimera) to translate (use the move command) the center of mass of your protein to the origin.

I hope this helps,

Trent E. Balius
Graduate Student, Rizzo Group,
Department of Applied Mathematics and Statistics,
Stony Brook University.
Office: Math Tower 3-129, Phone: (631) 632-8519
URL: http://www.ams.sunysb.edu/~tbalius/

 

 

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




Hi. Trent:

I tried to compile the updated sphere selector cpp file but received the following error:

g++ -O2 sphere_selector.cpp -lm -o sphere_selector 
sphere_selector.cpp: In member function ‘void Spheres::read_spheres(FILE*)’:
sphere_selector.cpp:112: error: ‘memset’ was not declared in this scope
sphere_selector.cpp:79: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
sphere_selector.cpp:106: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
sphere_selector.cpp: In member function ‘void Spheres::read_atoms(FILE*)’:
sphere_selector.cpp:159: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
sphere_selector.cpp:161: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
sphere_selector.cpp:162: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
sphere_selector.cpp:171: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
sphere_selector.cpp:173: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
sphere_selector.cpp:186: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
make[2]: *** [sphere_selector] Error 1
make[2]: Leaving directory `/home/ben/Desktop/dock6/src/accessories'
make[1]: *** [utils] Error 2
make[1]: Leaving directory `/home/ben/Desktop/dock6/src'
make: *** [install] Error 2

Please help.

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, 4:00 PM


 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/20110623/5825c6fd/attachment-0001.html 


More information about the Dock-fans mailing list