Author Topic: Re: How to transform a file from ICSD into a py file??  (Read 3725 times)

0 Members and 1 Guest are viewing this topic.

Offline huangshenjie

  • Heavy QuantumATK user
  • ***
  • Posts: 40
  • Country: cn
  • Reputation: 0
    • View Profile
On the structure with _atom_site_occupancy, it's a slightly trickier issue.

One way to get started is to just replace the fractional occupation numbers in the CIF file by 1. That way the CIF file can be imported into ATK (but, note carefully, it's not correct yet!). Now, this particular crystal belongs to space group 167, i.e. it's a trigonal crystal. It's given in the hexagonal setting in the file, thus it is imported as the hexagonal 3-unit supercell, but you could in principle reduce it back to the rhombohedral primitive cell using the recipe published at http://quantumwise.com/publications/tutorials/mini-tutorials/201.

Leaving that aside, what you find immediately is that all the Sr atoms are gone! This is because as the symm
« Last Edit: December 9, 2012, 08:29 by Anders Blom »

Offline zh

  • QuantumATK Support
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: How to transform a file from ICSD into a py file??
« Reply #1 on: December 8, 2012, 13:29 »
The ICSD file provides the crystallographic information of a compound, such as the space group, lattice constants, and Wyckoff positions of atoms. These can be used to manually build the crystal structure. Currently, no "intelligent" python script to convert the ICSD file.

The following information as shown in your attached file can be use the build the bulk configuration:
"
Unit Cell   3.9034(5) 3.9034(5) 3.9034(5) 90 90 90
Cryst Sys   cubic
Space Group P m -3 m
Atom  #   OX   SITE      x           y           z           SOF      H        ITF(B)   
 Sr   1  +2    1 a   0.          0.          0.             1.         0         0.48(5)
 Ti   1  +4    1 b   0.5         0.5         0.5            1.         0         0.40(6)
 O    1  -2    3 c   0.          0.5         0.5            1.         0          1.3(2)
"

BulkConfiguration(
bravais_lattice=SimpleCubic(3.9034 * Ang),
elements=[Strontium, Titanium, Oxygen, Oxygen, Oxygen],
fractional_coordinates=[[0.0,0.0,0.0], [0.5,0.5,0.5],[0.0,0.5, 0.5], [0.5,0.0,0.5],[0.5,0.5,0.0]],
)



Offline huangshenjie

  • Heavy QuantumATK user
  • ***
  • Posts: 40
  • Country: cn
  • Reputation: 0
    • View Profile
Re: How to transform a file from ICSD into a py file??
« Reply #2 on: December 8, 2012, 16:18 »
Thank you for your reply. But I still have several questions to ask you.

First, in the icsd file
"Atom  #   OX   SITE      x           y           z           SOF      H        ITF(B)   
 Sr   1  +2    1 a   0.          0.          0.             1.         0         0.48(5)
 Ti   1  +4    1 b   0.5         0.5         0.5            1.         0         0.40(6)
 O    1  -2    3 c   0.          0.5         0.5            1.         0          1.3(2)"

There is only the coordinate of one oxygen, (0,0.5,0.5). How do you know the coordinates of  other oxygen atoms? Does the file indicate it?

Second, according to your reply, I built the model. However, it was just a part of the ideal model. How could I build the complete model??

Offline huangshenjie

  • Heavy QuantumATK user
  • ***
  • Posts: 40
  • Country: cn
  • Reputation: 0
    • View Profile
Re: How to transform a file from ICSD into a py file??
« Reply #3 on: December 8, 2012, 16:21 »
Do I have to add the other atoms by myself???

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5418
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: How to transform a file from ICSD into a py file??
« Reply #4 on: December 8, 2012, 19:16 »
ICSD offers the option to download structures as CIF files. You can just import that file directly into the Builder, and the problem is solved. Just make sure to put one structure per file.

Offline huangshenjie

  • Heavy QuantumATK user
  • ***
  • Posts: 40
  • Country: cn
  • Reputation: 0
    • View Profile
Re: How to transform a file from ICSD into a py file??
« Reply #5 on: December 9, 2012, 01:03 »
ICSD offers the option to download structures as CIF files. You can just import that file directly into the Builder, and the problem is solved. Just make sure to put one structure per file.


Thank you Anders Blom. I have tried your method and it was effective. However, I still want to ask you another question.After I import the file into the Builder, the model I obtained in ATK was just a part of the complete model. Just like the images I have posted above. How could I get the complete model like the model in icsd?

Offline huangshenjie

  • Heavy QuantumATK user
  • ***
  • Posts: 40
  • Country: cn
  • Reputation: 0
    • View Profile
Re: How to transform a file from ICSD into a py file??
« Reply #6 on: December 9, 2012, 01:21 »
ICSD offers the option to download structures as CIF files. You can just import that file directly into the Builder, and the problem is solved. Just make sure to put one structure per file.


Hi, I feel confused when I import another icsd file into Builder. The error information showed that _atom_site_occupancy are not supported. How could I solve this problem? Waiting for your reply.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5418
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: How to transform a file from ICSD into a py file??
« Reply #7 on: December 9, 2012, 01:34 »
About the "complete" model, you must carefully remember that the image from ICSD is "wrong" - the atoms at the corner are equivalent by a translation of the Bravais lattice vectors. So they are included in ATK - by virtue of the periodic boundary conditions applied to the calculation - you just don't see them.

If you desperately want to see them, I made a plugin that can show them (or rather, actually inserts them in the structure), but such a structure can NOT be used for calculation.

Install the zip file, it will add an icon to the plugin toolbar; if you click it, the equivalent atoms will be added to the structure.

Offline zh

  • QuantumATK Support
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: How to transform a file from ICSD into a py file??
« Reply #8 on: December 9, 2012, 06:06 »
Thank you for your reply. But I still have several questions to ask you.

First, in the icsd file
"Atom  #   OX   SITE      x           y           z           SOF      H        ITF(B)    
 Sr   1  +2    1 a   0.          0.          0.             1.         0         0.48(5)
 Ti   1  +4    1 b   0.5         0.5         0.5            1.         0         0.40(6)
 O    1  -2    3 c   0.          0.5         0.5            1.         0          1.3(2)"

There is only the coordinate of one oxygen, (0,0.5,0.5). How do you know the coordinates of  other oxygen atoms? Does the file indicate it?

Second, according to your reply, I built the model. However, it was just a part of the ideal model. How could I build the complete model??

" 3 c " for oxygen, it means that there are three equivalent positions for oxygen atoms. The equivalent positions can be found from "International Tables for Crystallography" according to the space group of your compound.

Moderator edit: Adding back a missing ] to close the quote
« Last Edit: December 9, 2012, 07:48 by Anders Blom »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5418
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: How to transform a file from ICSD into a py file??
« Reply #9 on: December 9, 2012, 07:50 »
Let me just comment on the task of building the structure by hand from the information in the CIF file. In short: don't.

The long version is that the CIF file only contains the irreducible basis. To form the entire model, each atom needs to be repeated using the symmetry operations of the space group, which as zh mentioned can be found in the ITA, online, or - often at least - in the CIF file itself. But this is a big and not very fun task, and moreover not really necessary since ATK will do it for you when you import the CIF file.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5418
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: How to transform a file from ICSD into a py file??
« Reply #10 on: December 9, 2012, 08:28 »
On the structure with _atom_site_occupancy, it's a slightly trickier issue.

One way to get started is to just replace the fractional occupation numbers in the CIF file by 1. That way the CIF file can be imported into ATK (but, note carefully, it's not correct yet!). Now, this particular crystal belongs to space group 167, i.e. it's a trigonal crystal. It's given in the hexagonal setting in the file, thus it is imported as the hexagonal 3-unit supercell, but you could in principle reduce it back to the rhombohedral primitive cell using the recipe published at http://quantumwise.com/publications/tutorials/mini-tutorials/201.

Leaving that aside, what you find immediately is that all the Sr atoms are gone! This is because as the symmetry operations were applied, the Sr atoms ended up on top of the La atoms, and so were removed. And that's precisely what the fractional occupancy means - that in fact 30% of the La atoms should be replaced by Sr.

So - that's the final task. Now, at this point the structure contains just 6 La atoms, so you can't just replace 30% of them since that's not a whole number of atoms; for that, you first to make a supercell. Now, this can be made in many ways, and it's not clear from the CIF file precisely how (in fact, the occupancy is really statistic only, so probably a really large supercell should be made). But the minimal supercell you can make is one that contains 30 La atoms, that is you need to repeat the current cell 5 times. If it was 4 it would be easy to do a 2x2 cell in the A/B directions, for 5 you have to be creative, I guess :)

This gives 30 La atoms - now replace, randomly, 9 of them by Sr. You can install the attached plugin to do that.

Good luck!
« Last Edit: December 9, 2012, 08:30 by Anders Blom »