Cctbx

From CCP4 wiki
Revision as of 09:44, 29 November 2008 by Kay (talk | contribs) (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 ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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
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".

Documentation