orex / supercell

The program allows you to create regular structure supercell from cif file with partial occupancy and/or substitutions.
GNU General Public License v2.0
91 stars 56 forks source link

bug: changing the angles in cif file results in wrong number of atomic sites #8

Closed Gitdowski closed 6 years ago

Gitdowski commented 6 years ago

When running the supercell program I expired that it might give wrong results depending on the angles of the Crystal structure.

Here is an example:

An example structure contains 24 sites with 0.8633 occupancy. That should result in 21 occupied sites and a total number of combinations of 2024. Using the cif file below that exactly is the output of the supercell program. No Problem.

Now the the alpha angle in the cif file below is changed from 71.55 to 71.56 without touching anything else. The new supercell output says there would only be 21 sites and supercell wants to occupy 18 of it (which would be the right occupancy but applied to the wrong number of atomic sites). Changing the angle seems to have kicked out some atoms.

--------------Cif file------------------

CIF file generated by openbabel 2.4.1, see http://openbabel.sf.net data_I _chemical_name_common 'Supercell generated structure' _cell_length_a 7.93821 _cell_length_b 11.22630 _cell_length_c 17.75040 _cell_angle_alpha 71.55 _cell_angle_beta 90 _cell_angle_gamma 90 _space_group_name_H-M_alt 'P 1' _space_group_name_Hall 'P 1'

loop_ _symmetry_equiv_pos_as_xyz x,y,z

loop_ _atom_site_label _atom_site_type_symbol _atom_site_fract_x _atom_site_fract_y _atom_site_fract_z _atom_site_occupancy Al1 Al -0.000000 0.500000 1.000000 0.8633 Al1 Al -0.000000 0.666667 0.666667 0.8633 Al1 Al -0.000000 0.833333 0.333333 0.8633 Al1 Al -0.000000 0.166667 0.666667 0.8633 Al1 Al -0.000000 0.333333 0.333333 0.8633 Al1 Al -0.000000 0.000000 1.000000 0.8633 Al1 Al 0.250000 0.083333 0.833333 0.8633 Al1 Al 0.250000 0.250000 0.500000 0.8633 Al1 Al 0.250000 0.416667 0.166667 0.8633 Al1 Al 0.250000 0.583333 0.833333 0.8633 Al1 Al 0.250000 0.750000 0.500000 0.8633 Al1 Al 0.250000 0.916667 0.166667 0.8633 Al1 Al 0.500000 0.166667 0.166667 0.8633 Al1 Al 0.500000 0.333333 0.833333 0.8633 Al1 Al 0.500000 0.500000 0.500000 0.8633 Al1 Al 0.500000 0.666667 0.166667 0.8633 Al1 Al 0.500000 0.833333 0.833333 0.8633 Al1 Al 0.500000 0.000000 0.500000 0.8633 Al1 Al 0.750000 0.083333 0.333333 0.8633 Al1 Al 0.750000 0.250000 1.000000 0.8633 Al1 Al 0.750000 0.416667 0.666667 0.8633 Al1 Al 0.750000 0.583333 0.333333 0.8633 Al1 Al 0.750000 0.750000 1.000000 0.8633 Al1 Al 0.750000 0.916667 0.666667 0.8633

loop_ _atom_type_symbol _atom_type_oxidation_number Al1 3

orex commented 6 years ago

Dear Gitdowski,

Thank you very much for the issue. I reproduce it easily. In my spare time (in a few days, I hope) I will return to it. By the way, the structure looks very symmetrycal. Can you tell some words, how you generate it? Initial structure and the way of its generation. I think it can help me much. My program now, treat some of the Al sites as equivalent. I should check is it so or not.

Gitdowski commented 6 years ago

The original cif file I took from experimental data. From that I created a reoriented supercell. The file supplied here is just some part of the file I actually wanted to run the supercell program on. Unfortunately, I am not able to tell you more on that. The given 24 atomic positions are definitely non-equivalent and surely that is not changed by changes of the lattice angles.

orex commented 6 years ago

The problem fixed. Please, check.