Cctbx: Difference between revisions
Jump to navigation
Jump to search
(New page: == What is cctbx? == == How to use it? == == Example: fill n unit cell randomly by an arbitrary number of spheres (atoms) == Save this: from cctbx.development import random_structure ...) |
|||
Line 3: | Line 3: | ||
== How to use it? == | == How to use it? == | ||
== Example: fill | == Example: fill a unit cell randomly by an arbitrary number of spheres (atoms) == | ||
Save this: | Save this: | ||
Latest revision as of 09:46, 29 November 2008
What is cctbx?[edit | edit source]
How to use it?[edit | edit source]
Example: fill a unit cell randomly by an arbitrary number of spheres (atoms)[edit | edit source]
Save this:
from cctbx.development import random_structure from cctbx import sgtbx rs = random_structure.xray_structure( space_group_info=sgtbx.space_group_info(symbol="P212121"), unit_cell=(20,30,40,90,90,90), elements="random", n_scatterers=10) rs.show_summary() rs.show_scatterers()
Then:
cctbx.python filename
You will need cctbx, either as included in CCP4 or phenix, or the bare libraries from cctbx.sf.net -> Downloads.
There are many more options to direct the generation of the random structure. See http://cci.lbl.gov/cctbx_sources/cctbx/development/random_structure.py , around the middle of the file, "class xray_structure".