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

"Total oxidation state (cif): nan" & "Error:Group has no unique connection" #18

Closed PheLiBoP closed 5 years ago

PheLiBoP commented 5 years ago

Good day Supercell developers and users, I am trying to use the .cif of a hydrotalcite, a clay with partial occupancy of Al and Mg in the same site. However, when I run it with supercell, I get two different issues.

The first one is that the charge is not recognized. Even in the Oxidation table, I get the nan output. I can correct the Used charges in the table by manually assigning the values with:

./supercell -q -p "Mg*:c=+2" -p "Al*:c=+3" -p "O*:c=-2" -p "C*:c=+4" -p "H*:c=+1"

However, the nan does not change in the charge oxidation state and the total charge of the cell is not neutral. Regarding the second issue, I have seen it happens when the sites are too close. I tried to fix it by changing the tolerance value. The problem is that from the 0.75 Å of the preset value, the error was fixed until the tolerance was 11.49 Å which seems too large. Moreover, supercells groups all the sites in a single group and fixes the occupancy to zero for all of them. In consequence, it says there is only one combination possible.

./supercell -q -p "Mg*:c=+2" -p "Al*:c=+3" -p "O*:c=-2" -p "C*:c=+4" -p "H*:c=+1" -i /home/ubuntu/Documents/CIF/ICSD86655.cif -t 11.49  -o /home/ubuntu/Documents
-----------------------------------------------------
-               Supercell program                   -
-----------------------------------------------------
-      Authors:   * Kirill Okhotnikov               -
-                  (kirill.okhotnikov@gmail.com)    -
-                 * Sylvian Cadars                  -
-                  (sylvian.cadars@cnrs-imn.fr)     -
-                 * Thibault Charpentier            -
-                  (Thibault.Charpentier@cea.fr)    -
-----------------------------------------------------
-  please cite:                                     -
-    K. Okhotnikov, T. Charpentier and S. Cadars    -
-    J. Cheminform. 8 (2016) 17 – 33.               -
-----------------------------------------------------

Manual properties
Label   |fixed  |charge |popul  |
Al1 |N/A    |3  |N/A    |
C1  |N/A    |4  |N/A    |
H1  |N/A    |1  |N/A    |
H2  |N/A    |1  |N/A    |
Mg1 |N/A    |2  |N/A    |
O1  |N/A    |-2 |N/A    |
O2  |N/A    |-2 |N/A    |

Initial system:
  Chemical Formula: Al0.99 C0.498 H9 Mg2.01 O9.006

Supercell system (1x1x1):
  Size a=3.04535, b=3.04535, c=22.701

Current charge balance option is "try"
Total charge oxidation state (cif):  nan
Total charge cell:   -0.0299997
Charge balancing:   yes
----------------------------------------------------------------
| Atom Label    |   charge      | mult  | occup x mult
|       | Ox. state | Used  | (cif) |        
----------------------------------------------------------------
|  Al1      |  nan      |  3    |  3    |  0.99
|  C1       |  nan      |  4    |  6    |  0.498
|  H1       |  nan      |  1    |  6    |  6
|  H2       |  nan      |  1    |  6    |  3
|  Mg1      |  nan      |  2    |  3    |  2.01
|  O1       |  nan      |  -2   |  6    |  6
|  O2       |  nan      |  -2   |  18   |  3.006
----------------------------------------------------------------

Chemical formula of the supercell: Al0 C0 H0 Mg0 O0
Total charge of supercell: 0

----------------------------------------------------
 Identification of groups of crystallographic sites 
----------------------------------------------------

 Group 1 (1 atomic positions in supercell):
  * Site #1: Mg1 (occ. 2.01) -> FIXED with occupancy 0.000.
  * Site #2: Al1 (occ. 0.99) -> FIXED with occupancy 0.000.
  * Site #3: O1 (occ. 6) -> FIXED with occupancy 0.000.
  * Site #4: O2 (occ. 3.006) -> FIXED with occupancy 0.000.
  * Site #5: C1 (occ. 0.498) -> FIXED with occupancy 0.000.
  * Site #6: H1 (occ. 6) -> FIXED with occupancy 0.000.
  * Site #7: H2 (occ. 3) -> FIXED with occupancy 0.000.
  Crystallographic sites with different positions found for this group.
  Maximum distance within the group: 11.4791 A.

Minimal distance between atoms of two distinct groups: -1 A.

-------------------------------------------------
The total number of combinations is 1
-------------------------------------------------

I have tried with bigger cells (3x3x1) but the Error: Group has no unique connection appears again. I would really appreciate if you could help me to fix both problems so that I can generate the geometry of a supercell with adequate fixed occupancy. I require it for running Molecular Dynamics simulations.

Thank you for any help you can provide,

Phebe

PS: The cif files is the following:

#(C) 2017 by FIZ Karlsruhe - Leibniz Institute for Information Infrastructure.  All rights reserved.
data_86655-ICSD
_database_code_ICSD 86655
_audit_creation_date 2000-07-15
_chemical_name_systematic
'Magnesium aluminium hydroxide carbonate hydrate (0.67/0.33/2/0.17/0.48)'
_chemical_formula_structural '(Mg0.67 Al0.33 (O H)2) (C O3)0.165 (H2 O)0.48'
_chemical_formula_sum 'C0.165 H2.96 Al0.33 Mg0.67 O2.975'
_chemical_name_structure_type Hydrotalcite
_exptl_crystal_density_diffrn 2.12
_publ_section_title

;
New synthetic routes to hydrotalcite-like compounds characterisation and
properties of the obtained materials
;
loop_
_citation_id
_citation_journal_full
_citation_year
_citation_journal_volume
_citation_page_first
_citation_page_last
_citation_journal_id_ASTM
primary 'European Journal of Inorganic Chemistry  (online)' 1998 1998 1439 1446
EJICFO
loop_
_publ_author_name
'Costantino, U.'
'Marmottini, F.'
'Nocchetti, M.'
'Vivani, R.'
_cell_length_a 3.04535(9)
_cell_length_b 3.04535(9)
_cell_length_c 22.7010(13)
_cell_angle_alpha 90.
_cell_angle_beta 90.
_cell_angle_gamma 120.
_cell_volume 182.33
_cell_formula_units_Z 3
_symmetry_space_group_name_H-M 'R -3 m H'
_symmetry_Int_Tables_number 166
_refine_ls_R_factor_all 0.056
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
1 'x-y, -y, -z'
2 '-x, -x+y, -z'
3 'y, x, -z'
4 'x-y, x, -z'
5 'y, -x+y, -z'
6 '-x, -y, -z'
7 '-x+y, y, z'
8 'x, x-y, z'
9 '-y, -x, z'
10 '-x+y, -x, z'
11 '-y, x-y, z'
12 'x, y, z'
13 'x-y+2/3, -y+1/3, -z+1/3'
14 '-x+2/3, -x+y+1/3, -z+1/3'
15 'y+2/3, x+1/3, -z+1/3'
16 'x-y+2/3, x+1/3, -z+1/3'
17 'y+2/3, -x+y+1/3, -z+1/3'
18 '-x+2/3, -y+1/3, -z+1/3'
19 '-x+y+2/3, y+1/3, z+1/3'
20 'x+2/3, x-y+1/3, z+1/3'
21 '-y+2/3, -x+1/3, z+1/3'
22 '-x+y+2/3, -x+1/3, z+1/3'
23 '-y+2/3, x-y+1/3, z+1/3'
24 'x+2/3, y+1/3, z+1/3'
25 'x-y+1/3, -y+2/3, -z+2/3'
26 '-x+1/3, -x+y+2/3, -z+2/3'
27 'y+1/3, x+2/3, -z+2/3'
28 'x-y+1/3, x+2/3, -z+2/3'
29 'y+1/3, -x+y+2/3, -z+2/3'
30 '-x+1/3, -y+2/3, -z+2/3'
31 '-x+y+1/3, y+2/3, z+2/3'
32 'x+1/3, x-y+2/3, z+2/3'
33 '-y+1/3, -x+2/3, z+2/3'
34 '-x+y+1/3, -x+2/3, z+2/3'
35 '-y+1/3, x-y+2/3, z+2/3'
36 'x+1/3, y+2/3, z+2/3'
loop_
_atom_type_symbol
_atom_type_oxidation_number
Mg2+ 2
Al3+ 3
O2- -2
C4+ 4
H1+ 1
loop_
_atom_site_label
_atom_site_type_symbol
_atom_site_symmetry_multiplicity
_atom_site_Wyckoff_symbol
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_B_iso_or_equiv
_atom_site_occupancy
_atom_site_attached_hydrogens
Mg1 Mg2+ 3 a 0 0 0 0.0137(6) 0.67 0
Al1 Al3+ 3 a 0 0 0 0.0137(6) 0.33 0
O1 O2- 6 c 0 0 0.37631(10) 0.0266(9) 1. 0
O2 O2- 18 h 0.1075(10) 0.8925(10) 0.50034(48) 0.0198(22) 0.167 0
C1 C4+ 6 c 0.3333 0.6667 0.5003(5) 0.053(11) 0.083 0
H1 H1+ 6 c 0 0 0.4220(17) 0.082(13) 1. 0
H2 H1+ 6 c 0.3333 0.6667 0.5006(5) 0.082(13) 0.5 0
#End of TTdata_86655-ICSD
orex commented 5 years ago

Dear PheLiBoP, Thank you very much for the detailed request. The answer to your first issue is simple. Change here

loop_
_atom_type_symbol
_atom_type_oxidation_number
Mg2+ 2
Al3+ 3
O2- -2
C4+ 4
H1+ 1

atom type to atom labels (Mg2+ to Mg1 for example). I understand that it can be quite confusing, but some cif files can use "type_symbol" like yours, but some of them can use labels to set an atomic charge. If you don't want to edit the file, you can set charges from supercell command line explicitly. More information you can find in the

  1. supercell tutorial http://orex.github.io/supercell/doc/supercell_tutorial.pdf ("Basic functionality section" for relevant cif file structure and "Permutations in ice" for command line charge change).
  2. supercell manual http://orex.github.io/supercell/doc/supercell_man.html#section_3 for charge setting options.
  3. Please also check the issue https://github.com/orex/supercell/issues/6#issuecomment-307298518. The second problem there is the same as yours first issue.

I need some time to answer to the second question. I will come soon.

P. S. To be clear Total charge oxidation state (cif): calculated by cif oxidation stated, but in the next steps only charges from column "Used" is proceed. Total charge cell calculated by sum of **. The charge is almost zero. The value comes from rounding error. if you calculate the value by yourself and you get the same nonzero value.

orex commented 5 years ago

The second issue looks more complex.

First of all, I would like to say, that there are absolutely no reasons to increase tolerance ("-t") value so much. Such huge increase breaks supercell algorithms logic. Please see the "Stage 1" of the "Algorithm implementations in the supercell program" section in supercell paper. https://jcheminf.biomedcentral.com/articles/10.1186/s13321-016-0129-3#Sec5 Shortly, the tolerance value should be less than the distance between distinct crystallographic sites. Let's say value 1.5 Å is absolute maximum.

Another good thing before using supercell with such complex structure is to visually check the structure (see image below). O2

In the picture you can clearly see that 6 O2 atoms make a ring with interatomic distance is around 0.5 Å. Obviously this ring can by occupied only by one oxygen atom (typical O-O distance is more than 2.0 Å). Please also note that O2 atom occupancy is 0.167. 0.167*6(atoms in ring) = 1.0. That means that it is always one O atom in the position. Therefore this site is not "occupancy" disordered, but "displacement" disordered. Simply speaking the O2 atoms move from central position to one of the positions on the ring because of another sites disorder. Your case is similar to case of PZT ceramics (described in supercell tutorial) where Pb atoms moves from high symmetry position because of Zr-Ti site disorder. In case of PZT the Pb atoms displacement are small. Therefore it can be combined to one group without problems. In your case the displacement is too much to be group automatically. Therefore you should put the O2 atom to high symmetry position manually. First of all O2 site has a multiplicity 18. The "central" position should have a multiplicity 18/6(atoms in O2 ring)=3. Checking crystallography data for the spacegroup (http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-wp-list?gnum=166&grha=hexagonal) you can see two special positions with multiplicity 3: 3a and 3b. The relevant position is 3b (almost the same z coordinate as O2 original position). Therefore just change the O2 line to

O2 O2- 3 b 0.0 0.0 0.5 0.0198(22) 1.0 0

The result you can see below ox1 O2old - the old 18h position, O2 - new "central" position.

If you have doubts that the new structure is not the same that the initial one, don't worry. During the MD simulation the O2 atom will move to more energetically preferable position.

Feel free to ask any questions. When the problems are solved, please close the issue. If you have another questions, not related to this topic, don't hesitate to open another issue. I'm also happy to receive any feedback about supercell program. Kirill.

PheLiBoP commented 5 years ago

Dear Kirill, Thank you very much for your help. The issues have been solved ^ ^ The first one by changing the labels and the second by using the suggested position. I will proceed with the creation of a bigger supercell. I hope you have a nice week.

-----------------------------------------------------
-               Supercell program                   -
-----------------------------------------------------
-      Authors:   * Kirill Okhotnikov               -
-                  (kirill.okhotnikov@gmail.com)    -
-                 * Sylvian Cadars                  -
-                  (sylvian.cadars@cnrs-imn.fr)     -
-                 * Thibault Charpentier            -
-                  (Thibault.Charpentier@cea.fr)    -
-----------------------------------------------------
-  please cite:                                     -
-    K. Okhotnikov, T. Charpentier and S. Cadars    -
-    J. Cheminform. 8 (2016) 17 – 33.               -
-----------------------------------------------------

Initial system:
  Chemical Formula: Al0.99 C0.498 H9 Mg2.01 O9

Supercell system (1x1x1):
  Size a=3.04535, b=3.04535, c=22.701

Current charge balance option is "try"
Total charge oxidation state (cif):  -0.0179999
Total charge cell:   -0.0179999
Charge balancing:   yes
----------------------------------------------------------------
| Atom Label    |   charge      | mult  | occup x mult
|       | Ox. state | Used  | (cif) |        
----------------------------------------------------------------
|  Al1      |  3        |  3    |  3    |  0.99
|  C1       |  4        |  4    |  6    |  0.498
|  H1       |  1        |  1    |  6    |  6
|  H2       |  1        |  1    |  6    |  3
|  Mg1      |  2        |  2    |  3    |  2.01
|  O1       |  -2       |  -2   |  6    |  6
|  O2       |  -2       |  -2   |  3    |  3
----------------------------------------------------------------

Chemical formula of the supercell: Al1 C0 H11 Mg2 O9
Total charge of supercell: 0

----------------------------------------------------
 Identification of groups of crystallographic sites 
----------------------------------------------------

 Group 1 (3 atomic positions in supercell):
  * Site #1: Mg1 (occ. 0.67) -> distributed over 2 positions out of 3 (actual occ.: 0.667).
  * Site #2: Al1 (occ. 0.33) -> distributed over 1 positions out of 3 (actual occ.: 0.333).
  Number of combinations for the group is 3

 Group 2 (6 atomic positions in supercell):
  * Site #1: C1 (occ. 0.083) -> distributed over 0 positions out of 6 (actual occ.: 0.000).
  * Site #2: H2 (occ. 0.5) -> distributed over 5 positions out of 6 (actual occ.: 0.833).
  Crystallographic sites with different positions found for this group.
  Maximum distance within the group: 0.0068103 A.
  Number of combinations for the group is 6

 Group 3 (6 atomic positions in supercell):
  * Site #1: H1 (occ. 1) -> FIXED with occupancy 1.000.

 Group 4 (6 atomic positions in supercell):
  * Site #1: O1 (occ. 1) -> FIXED with occupancy 1.000.

 Group 5 (3 atomic positions in supercell):
  * Site #1: O2 (occ. 1) -> FIXED with occupancy 1.000.

Minimal distance between atoms of two distinct groups: 1.03721 A.

-------------------------------------------------
The total number of combinations is 18
-------------------------------------------------