SFTOOLS has a random number generator that produces a uniform distribution between 0 and 1, which you can than use in different ways.

You could then select all non-centric reflections and asign their phase as RanU*360. For the centric reflections you can first set them to the P-variable in the CALC command which substitutes the restricted phase value for centric reflections (0 or 90 degrees). Next you can use the random number to add 180 degrees to half of the centric reflections.

READ in.mtz
CALC col RanU = RAN_U
SELECT NOT CENTRO
CALC P col Phase = col RanU 360 *
SELECT INVERT
CALC col Phase = P
SELECT col RanU > 0.5
CALC col Phase = 180 +
SELECT ALL
WRITE out.mtz

This is clearly advanced use of the CALC/SELECT commands and even I had to check the help pages, but I thought it was a nice example of the flexibility.

Bart

Eleanor Dodson wrote:
You can do that to some extent by scattering random atoms about and calculating phases from them..
Then the centrics will be sensible.
That is how some direct methods programs get their "random starting set" of phases..
Depends on how flat you want the starting map to be
 Eleanor


David Briggs wrote:

Hi y'all.

Excuse that rather "noddy" question, but I've been googling this for hours now and I've finally lost patience...

How can I generate a random phase set for either a .mtz or .hkl (cns format) reflection file (if possbile with sensible values for centric reflections).

That's it.

Thanks in advance,

Dave

--
---------------------------------------
David Briggs, PhD.
Father & Crystallographer
www.dbriggs.talktalk.net <http://www.dbriggs.talktalk.net>
iChat AIM ID: DBassophile
---------------------------------------
Anyone who is capable of getting themselves made President should on no account be allowed to do the job. - Douglas Adams





--

==============================================================================

Bart Hazes (Assistant Professor)
Dept. of Medical Microbiology & Immunology
University of Alberta
1-15 Medical Sciences Building
Edmonton, Alberta
Canada, T6G 2H7
phone:  1-780-492-0042
fax:    1-780-492-7521

==============================================================================

Reply via email to