FREE_R set

Bernhard Rupp br at LLNL.GOV
Thu Nov 12 18:43:19 EST 1998


There are standard FORTRAN routines to set the random
seed and then to get 'random' random numbers. 
Code below creates a random filename of letters.

      subroutine random_name (fname,fext,in,num)
                               
      character fname*(*),fext*4 
      integer iran(in) 
      real rand(in)  
         
      call random_seed ()    
      call random_number (rand)  
                        
      do i=1,in      
         iran(i)=int(rand(i)*num)   
         fname(i:i)=char(iran(i)+65)
      end do              
  
      fname=fname(1:in)//fext    
      return                   
      end                    

Mfg, BR

At 04:41 PM 11/12/98 -0500, Phil Jeffrey wrote:
>***  For details on how to be removed from this list visit the  ***
>***    CCP4 home page http://www.dl.ac.uk/CCP/CCP4/main.html    ***
>
>On Thu, 12 Nov 1998, Hongmin Li wrote:
>
>> I am curious about generating Free_R flag for reflection files. I found
that
>> when I used X-PLOR setup_free_r.inp to generate free set, it seemed that
the
>> freeflag assignment was not random. Because when I run the script
several times
>> for the same beginning reflection file, the generated free sets were the
same.
>
>This is because "random" number generators on computers are not truly
>random, but approximate it.  If you give the Random Number Generator the
>same starting value each time (as X-PLOR probably does) then you'll get
>the same sequence of numbers out of it leading to the same freeR set.
>(Alternatives, such as seeding the generator from the integer value of the
>computer clock, are well-known, but probably beyond the scope of the
>user to implement in X-PLOR).
>
>Phil
>---------------------------------------------------------------------------
----
>| Phil Jeffrey                                  |
   |
>| Crystallography Facility Manager              | If you lie to the
compiler, |
>| Memorial Sloan-Kettering Cancer Center, NYC   | it will get its revenge
   |
>| phil at xray2.mskcc.org                          |     - Henry Spencer
   |
>| Voice: (212) 639 8547   Fax: (212) 717 3135   |
   |
>---------------------------------------------------------------------------
----
>
>
>
-----------------------------------------------------------------
Experience : Mental phase bias.
-----------------------------------------------------------------
Dr. Bernhard Rupp
Macromolecular Crystallography               Phone (925) 423-3273
LLNL-BBRP L452				    Phax  (925) 422-2282
POB 808                                      Emerg (800) 313-2310
Livermore, CA 94551                          email    br at llnl.gov
URL                                 http://www-structure.llnl.gov
EU Mirror  http://www.dl.ac.uk/CCP/CCP14/ccp/web-mirrors/llnlrupp
Private email/URL                       http://www.vienna-air.com
-----------------------------------------------------------------



More information about the X-plor mailing list