[answered] How to check the crystal structure in abinit

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
samabdel
Posts: 22
Joined: Mon Nov 21, 2011 1:26 pm

[answered] How to check the crystal structure in abinit

Post by samabdel » Tue Nov 22, 2011 12:16 pm

Dear all,
I am trying to make calculations for fullerene (C60) and I would like to visualize the structure before lunching a run.
I need to make sure that the atoms are located in the right positions.
Thanks,

jolafc
Posts: 34
Joined: Wed Aug 26, 2009 5:37 am

Re: How to check the crystal structure in abinit

Post by jolafc » Thu Nov 24, 2011 6:47 pm

Hi samabdel,

Visualizing a structure is unfortunately not yet built-in in abinit. Therefore, to visualise a crystal structure, there are 3 steps you have to do and some require you to install extra software.

First, run your calculation a short time (about 10 s) to allow abinit to produce an .out file with the header properly written. Then, just kill the calculation.

Second, use the AbinitStructureViewer2.py file (attached at the end of this post with the .py extension replaced by .in to allow the file to be attached; replace it by .py to be able to use it) on one of your output :

Code: Select all

python ~/AbinitStructureViewer2.py *.out

This assumes that you have access to a shell (e.g. you run abinit on a mac or a linux computer) and that you have python installed somewhere with numpy available. It also assumes that you put the AbinitStructureViewer2.py file in your home directory (just change the path ~/AbinitStructureViewer2.py to something else if you put it elsewhere). Also, you need to be in the directory where the .out file is.

Once you have run the code, you should see :

Code: Select all

$ /opt/local/bin/python2.5 /Users/jonathan/programmes/AbinitStructureViewer2.py 123.out 

==========================
 AbinitStructureViewer.py
 version beta
==========================
- WARNING : rprim not fount in given file, assuming : rprim 1 0 0  0 1 0  0 0 1

1 configuration(s) found
- WARNING : calculation not completed in the given file -

Enter the number of times you wish to replicate the primitive cell
(If you only want the primitive cell, enter : 1 1 1)

You just mention the number of time you want the cell specified in your input to be replicated. Then, you should see :

Code: Select all

"123_out.xyz" file created successfully

and have a new file in your folder named 123_out.xyz.

Finally, you can use jmol to open such a file and visualize your structure in 3D, take pictures of it, etc. Jmol is available there :
http://jmol.sourceforge.net/download/
althought I just installed my version (on a mac) using macports (http://www.macports.org/) and it is also easy to use your favorite package manager in linux to install it.

Good luck!

Jonathan
Attachments
AbinitStructureViewer2.in
(28.6 KiB) Downloaded 530 times

Locked