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