Hello, I have some trouble with cctbx, I try to understand why and I do not succeed. I need your help ! I replaced quartz with silicon in the "beach in the box" example/tutorial. This is the resulting code : 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")), scatterers=flex.xray_scatterer([ xray.scatterer( label="Si", site=(0.,0.,0.), u=0) ])) silicon_structure.show_summary().show_scatterers() 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() f_calc = silicon_structure.structure_factors(d_min=1).f_calc() f_calc.show_summary().show_array() and running the script gives the following result result : Number of scatterers: 1 At special positions: 1 Unit cell: (5.4307, 5.4307, 5.4307, 90, 90, 90) Space group: F d -3 m :2 (No. 227) Label, Scattering, Multiplicity, Coordinates, Occupancy, Uiso Si Si 16 ( 0.0000 0.0000 0.0000) 1.00 0.0000 Si: 0.0000 0.0000 0.0000 point group type: -3m special position operator: 0,0,0 Miller array info: None Observation type: None Type of data: complex_double, size=9 Type of sigmas: None Number of Miller indices: 9 Anomalous flag: False Unit cell: (5.4307, 5.4307, 5.4307, 90, 90, 90) Space group: F d -3 m :2 (No. 227) (0, 2, 2) 0j (0, 4, 0) (120.217658126+0j) (1, 1, 1) (-84.1884955081+0j) (1, 3, 1) (65.4837172721+0j) (1, 3, 3) (57.4543830832+0j) (1, 5, 1) (-51.4875968695+0j) (2, 2, 2) (128.545406989+0j) (2, 4, 2) 0j (3, 3, 3) (-51.4875968695+0j) The 220 structure factor, at least, does not look correct . I do not understand the 16 multiplicity either. Is there something I miss ? Best regards Marc
Hi Marc, Please try space_group_symbol="Fd3m:1")), to specify "origin choice 1" (see Int. Tab. Volume A). Does this lead to what you expect? See also: http://cctbx.sourceforge.net/current_cvs/c_plus_plus/classcctbx_1_1sgtbx_1_1... Look for the "Detailed Description" section. Cheers, Ralf __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
Hi Ralf, thank you very much, it is much better now. 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. Tomorrow morning I will have a look in the International Tables. I still have a lot to learn in crystallography ... Thanks again for your answer ( and for cctbx ) Marc Le Mardi 18 Octobre 2005 01:38, vous avez écrit :
Hi Marc,
Please try
space_group_symbol="Fd3m:1")),
to specify "origin choice 1" (see Int. Tab. Volume A). Does this lead to what you expect?
See also: http://cctbx.sourceforge.net/current_cvs/c_plus_plus/classcctbx_1_1sgtbx_1_ 1space__group__symbols.html
Look for the "Detailed Description" section.
Cheers, Ralf
__________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
--- Marc Gailhanou
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
participants (2)
-
Marc Gailhanou
-
Ralf W. Grosse-Kunstleve