[cctbxbb] strange silicon
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Mon Oct 17 20:38:22 PDT 2005
--- Marc Gailhanou <marc.gailhanou at wanadoo.fr> wrote:
> I still have a small discrepancy
> with an independant structure factor calculation I do, but as I do not know
> the default parameters of the x-ray scatterer in cctbx ( energy, anomalous
> scattering factor, ...) this is not surprising.
Below you'll find a slightly extended version of your original script. It shows
how to modify f' and f", which default to zero, and how to see the content of
the scattering dictionary. I hope it is reasonably obvious how to modify the
attributes of scatterers (.site, .u_iso or .u_star, .occupancy, .fp, .fdp,
.scattering_type). However, the interaction of .scattering_type and
scattering_dict is a little bit complex because it supports a variety of
customizations and is designed to optimize runtime performance. If the default
Gaussian approximations to the atomic scattering factors are not suitable I'd
be happy to explain more.
Cheers,
Ralf
from cctbx import xray
from cctbx import crystal
from cctbx.array_family import flex
silicon_structure = xray.structure(
special_position_settings=crystal.special_position_settings(
crystal_symmetry=crystal.symmetry(
unit_cell=(5.4307,5.4307,5.4307,90,90,90),
space_group_symbol="Fd3m:1")),
scatterers=flex.xray_scatterer([
xray.scatterer(
label="Si",
site=(0.,0.,0.),
u=0) ]))
silicon_structure.show_summary().show_scatterers()
print
for scatterer in silicon_structure.scatterers():
print "%s:" % scatterer.label, "%8.4f %8.4f %8.4f" % scatterer.site
site_symmetry = silicon_structure.site_symmetry(scatterer.site)
print " point group type:", site_symmetry.point_group_type()
print " special position operator:", site_symmetry.special_op()
print " scattering type:", scatterer.scattering_type
print " f-prime:", scatterer.fp
print " f-double-prime:", scatterer.fdp
print " anisotropic_flag:", scatterer.anisotropic_flag
print
silicon_structure.scattering_dict(d_min=1).show()
print
f_calc = silicon_structure.structure_factors(d_min=1).f_calc()
f_calc.show_summary().show_array()
print
scatterer = silicon_structure.scatterers()[0]
scatterer.fp = -1
scatterer.fdp = 0.5
silicon_structure.show_summary().show_scatterers()
print
f_calc = silicon_structure.structure_factors(d_min=1).f_calc()
f_calc.show_summary().show_array()
print
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
More information about the cctbxbb
mailing list