[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ccp4bb]: pksearch



***  For details on how to be removed from this list visit the  ***
***          CCP4 home page http://www.ccp4.ac.uk         ***

Here probably another case of foot in mouth disease
regarding peaksearch..... Consider:

real(4), allocatable :: fmap(:,:,:) ! example 3-d map n=3
m=1 ! rank of search vertex
allocate (fmap(-m:nx+m,-m:ny+m,-m:nz+m)) ! make/read/allocate map with
suitable border
do i=0,nx
 do ii=0,ny
  do iii=0,nz
   if (fmap(i,ii,iii).ge.maxval(fmap(i-m:i+m,ii-m:ii+m,iii-m:iii+m))) then
     print*, fmap(i,ii,iii), i,ii,iii ! or put in peak list for sorting
whatever
   end if
  end do
 end do
end do

done.

Note:
a) can be used at any dimension (n)
b) can be used with larger search vortex (m) (think noise)
c) beats coding (2m+1)**n if-statements
d) is fast.

result (nx=50, ny=nz=30, m=1,
3A P212121 plain Patterson a=75 b=28 c=22 A, 1bpi-Hg)

   peak   value     u       v       w
or     1  11631.  0.0000  0.0000  0.0000
hark   2   3509.  0.0500  0.3333  0.5000
hark   3   3470.  0.5000  0.1667  0.4000
hark   4   3268.  0.4500  0.5000  0.1000
harkor 5   2013.  0.0000  0.0000  0.5000
harkor 6   1895.  0.0000  0.4333  0.0000

which correctly gives .225 .333 .300 for xyz


-----------------------------------------------------------------
Bernhard Rupp
Macromolecular Crystallography and Structural Genomics
LLNL-BBRP L448                               Phone (925) 423-3273
University of California                     Phax  (925) 424-3130
Livermore, CA 94551                          email    br@llnl.gov
URL                                 http://www-structure.llnl.gov
TB Structural Genomics Consortium  http://www.doe-mbi.ucla.edu/TB
EU Mirror         http://www.ccp14.ac.uk/ccp/web-mirrors/llnlrupp
-----------------------------------------------------------------