Bug in structure.expand_to_p1?
Hi, I'm quite puzzled at the moment. using this code: if __name__ == '__main__': quartz_structure = xray.structure( special_position_settings=crystal.special_position_settings( crystal_symmetry=crystal.symmetry( unit_cell=(5.01,5.01,5.47,90,90,120), space_group_symbol="P6222")), scatterers=flex.xray_scatterer([ xray.scatterer( label="Si", site=(1/2.,1/2.,1/3.), u=0.2), xray.scatterer( label="O", site=(0.197,-0.197,0.83333), u=0)])) ref_structure = quartz_structure.expand_to_p1( append_number_to_labels=True) print(ref_structure.as_py_code()) I get this result: xray.structure( crystal_symmetry=crystal.symmetry( unit_cell=(5.01, 5.01, 5.47, 90, 90, 120), space_group_symbol="P 1"), scatterers=flex.xray_scatterer([ xray.scatterer( #0 label="Si_0", site=(0.500000, 0.500000, 0.333333), u=0.200000), xray.scatterer( #1 label="Si_1", site=(0.000000, 0.500000, 0.666667), u=0.200000), xray.scatterer( #2 label="Si_2", site=(0.500000, 0.000000, 1.000000), u=0.200000), xray.scatterer( #3 label="O_0", site=(0.197000, -0.197000, 0.833333), u=0.000000), xray.scatterer( #4 label="O_1", site=(0.394000, 0.197000, 1.166667), u=0.000000), xray.scatterer( #5 label="O_2", site=(-0.197000, -0.394000, 1.500000), u=0.000000), xray.scatterer( #6 label="O_3", site=(0.197000, 0.394000, 1.500000), u=0.000000), xray.scatterer( #7 label="O_4", site=(-0.394000, -0.197000, 1.166667), u=0.000000), xray.scatterer( #8 label="O_5", site=(-0.197000, 0.197000, 0.833333), u=0.000000)])) It bothers me that there are x,y,z not in [0, 1[. Shouldn't the newly expanded cell only contain atoms within the unit cell? I realize, that the quarz structure (from the sample code from the website) also violates this with Oy beeing negative, but still I think expand_to_p1 should return a regular structure. Also is there a method already implemented to change a structure from a non- conventional description into a conventional one (with all atoms within its unit cell)? With regards, Dipl. Phys. Jan M. Simons Institute of Crystallography RWTH Aachen University
Hi Jan,
ref_structure = quartz_structure.expand_to_p1(
append_number_to_labels=True).sites_mod_positive()
should do the trick. There is also .sites_mod_short().
Ralf
2011/6/20 Jan Marten Simons
Hi,
I'm quite puzzled at the moment.
using this code:
if __name__ == '__main__': quartz_structure = xray.structure( special_position_settings=crystal.special_position_settings( crystal_symmetry=crystal.symmetry( unit_cell=(5.01,5.01,5.47,90,90,120), space_group_symbol="P6222")), scatterers=flex.xray_scatterer([ xray.scatterer( label="Si", site=(1/2.,1/2.,1/3.), u=0.2), xray.scatterer( label="O", site=(0.197,-0.197,0.83333), u=0)]))
ref_structure = quartz_structure.expand_to_p1( append_number_to_labels=True)
print(ref_structure.as_py_code())
I get this result:
xray.structure( crystal_symmetry=crystal.symmetry( unit_cell=(5.01, 5.01, 5.47, 90, 90, 120), space_group_symbol="P 1"), scatterers=flex.xray_scatterer([ xray.scatterer( #0 label="Si_0", site=(0.500000, 0.500000, 0.333333), u=0.200000), xray.scatterer( #1 label="Si_1", site=(0.000000, 0.500000, 0.666667), u=0.200000), xray.scatterer( #2 label="Si_2", site=(0.500000, 0.000000, 1.000000), u=0.200000), xray.scatterer( #3 label="O_0", site=(0.197000, -0.197000, 0.833333), u=0.000000), xray.scatterer( #4 label="O_1", site=(0.394000, 0.197000, 1.166667), u=0.000000), xray.scatterer( #5 label="O_2", site=(-0.197000, -0.394000, 1.500000), u=0.000000), xray.scatterer( #6 label="O_3", site=(0.197000, 0.394000, 1.500000), u=0.000000), xray.scatterer( #7 label="O_4", site=(-0.394000, -0.197000, 1.166667), u=0.000000), xray.scatterer( #8 label="O_5", site=(-0.197000, 0.197000, 0.833333), u=0.000000)]))
It bothers me that there are x,y,z not in [0, 1[. Shouldn't the newly expanded cell only contain atoms within the unit cell? I realize, that the quarz structure (from the sample code from the website) also violates this with Oy beeing negative, but still I think expand_to_p1 should return a regular structure.
Also is there a method already implemented to change a structure from a non- conventional description into a conventional one (with all atoms within its unit cell)?
With regards,
Dipl. Phys. Jan M. Simons
Institute of Crystallography RWTH Aachen University _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
2011/6/20 Jan Marten Simons
It bothers me that there are x,y,z not in [0, 1[. Shouldn't the newly expanded cell only contain atoms within the unit cell?
I can't speak for Ralf, but FYI, this is exactly the opposite of what macromolecular crystallographers would expect - for us, the current behavior makes the most sense. -Nat
Am Montag 20 Juni 2011 19:16:16 schrieb Nat Echols:
2011/6/20 Jan Marten Simons
It bothers me that there are x,y,z not in [0, 1[. Shouldn't the newly expanded cell only contain atoms within the unit cell?
I can't speak for Ralf, but FYI, this is exactly the opposite of what macromolecular crystallographers would expect - for us, the current behavior makes the most sense.
I see your point with mmcrystals where molecules might span the cell boundary quite often. But for inorganic crystallogrphy one usually just wants to have all atoms inside the asymmetric unit (even after expansion to P1 where the asymmetric unit is the unit cell). Would any of you object if I add an optional parameter to expand_to_p1 to have all atoms inside the unit cell (defaulting to false of course)? I suppose the desired result can be achieved by calling .sites_mod_positive().sites_mod_short() on the result. The optional parameter would just be additional comfort and a little warning that by default expand_to_p1 will return scatterers with possible negative or bigger than 1 fractional coordinates. With regards, Dipl. Phys. Jan M. Simons Institute of Crystallography RWTH Aachen University
Hi Marten,
Your idea is fine. Please go ahead.
Ralf
2011/6/21 Jan Marten Simons
Am Montag 20 Juni 2011 19:16:16 schrieb Nat Echols:
2011/6/20 Jan Marten Simons
It bothers me that there are x,y,z not in [0, 1[. Shouldn't the newly expanded cell only contain atoms within the unit cell?
I can't speak for Ralf, but FYI, this is exactly the opposite of what macromolecular crystallographers would expect - for us, the current behavior makes the most sense.
I see your point with mmcrystals where molecules might span the cell boundary quite often. But for inorganic crystallogrphy one usually just wants to have all atoms inside the asymmetric unit (even after expansion to P1 where the asymmetric unit is the unit cell). Would any of you object if I add an optional parameter to expand_to_p1 to have all atoms inside the unit cell (defaulting to false of course)? I suppose the desired result can be achieved by calling .sites_mod_positive().sites_mod_short() on the result. The optional parameter would just be additional comfort and a little warning that by default expand_to_p1 will return scatterers with possible negative or bigger than 1 fractional coordinates.
With regards,
Dipl. Phys. Jan M. Simons
Institute of Crystallography RWTH Aachen University _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
participants (3)
-
Jan Marten Simons
-
Nat Echols
-
Ralf Grosse-Kunstleve