CIF2Cell download | SourceForge.net Written in python, which outputs the input file (specified part of atomic arrangement) of the first-principles calculation code (abinit, elk, vasp, pwscf, etc.) from cif (crystallographic Information File), which is a crystal structure format. App.
Try to install things as much as you can with general user privileges.
As an example, suppose you fetched cif2cell-1.2.10.tar.gz
.
With $ tar -zxvf cif2cell-1.2.10.tar.gz
, move the expanded cif2cell-1.2.10
to / home / user / sources
. Change to that directory.
In fact, to install cif2cell, you need an app called PyCiRW, which is included in the cif2cell code. Go to PyCifRW-3.3
which can be expanded with $ tar -zxvf PyCifRW-3.3.tar.gz
.
Basically, it is the kind that is installed by so-called python setup.py install
. However, this procedure requires some ingenuity because it tries to generate a file in /usr/lib64/python2.7/site-packages
, which cannot be added without administrator privileges.
Run python,
import sys
print(sys.path)
So, let's check the path that can be referenced now. If there is a part that can be edited by a general user, such as home / user / .local / lib / python2.7 / site-packages
, you can put it there. However, I'd like to keep the ones that I installed with extreme innocence separately so that I can recognize it, so I will make a clear place to put it.
The installation destination is / home / user / opt / PyCifRW-3.3
.
Later, when I try to install by specifying this directory as the installation prefix, I get angry that the proper path is not set. This is because the path that is attached to the directory to be entered is not included in the path examined above. So, I will add the path appropriately.
There are several ways to set this path, but here we will solve it by setting the environment variable PYTHONPATH
.
export PYTHONPATH=/home/user/opt/PyCifRW-3.3/lib64/python2.7/site-packages:$PYTHONPATH
Then, the environment variable PYTHONPATH
is set appropriately. This directory does not exist before the installation, but if you do not look ahead and supplement lib64 / python2.7 / site-packages
under the installation destination, it will be moss in the subsequent installation.
python setup.py install --prefix=/home/user/opt/PyCifRW-3.3
It was fine and the installation was completed. In ʻINSTALL` in the directory containing the source,
import CifFile
If you can import with, it means that the installation was successful.
Probably, this seems to be a procedure that can always be used when doing python setup.py install
with general user privileges.
At this point, it's sunny and you can install cif2cell. Move to the directory where the cif2cell source is located
python setup.py install --prefix=/home/user/opt/cif2cell-1.2.10
Installation is complete.
Naturally, put the path in cif2cell,
export PYTHONPATH=/home/user/opt/cif2cell-1.2.10/lib/python2.7/site-packages:$PYTHONPATH
Is necessary. Without this, it will be moss at from utils import *
of cif2cell
.
The PYTHONPATH specified when installing PyCifRW must continue to be specified when cif2cell is executed.
How to use the basic commands of cif2cell
cif2cell *.cif -p abinit
So, if you want to create an input file with elk or vasp, change the part of ʻabinit to ʻelk
or vasp
.
If you want to name the output file
cif2cell *.cif -p abinit -o hoge.in
Specify the desired file name after -o
as in.
The cif example is in cifs
or / home / user / opt / cif2cell-1.2.10 / lib / sample_cifs
in the directory containing the source code, so you can run it right away.
By specifying the option, you can use it elaborately. For example
cif2cell *.cif -p abinit --no-reduce
And view the input file in a non-primitive cell (probably a Bravais grid).
Other options can be found with $ cif2cell -h
, and there is an official manual pdf at / home / user / opt / cif2cell-1.2.10 / lib / docs
. It seems that you can make a super cell of an appropriate size from a primitive cell (I have never used it).
XCrySDen makes it easy to visualize the crystal structure and easily generate k-space paths in the corresponding Brillouin zone. XCrySDen can read input files in pyscf format, so it is convenient to output with pwscf for this purpose as well.
You can also find it by googled "(substance name or chemical formula) cif". I don't know the source of the cif, so I always look for it in NIMS's Inorganic Materials Database (AtomWork). Since it is basically based on the values reported in the literature, it is good to know the source. For crystals with the structure to be calculated for the first time, check the consistency by putting the cif in VESTA and looking around, or by reading the crystal data directly from the paper and generating the cif via VESTA. It might be a good idea to check it out in Materials Project (I have never used it).
Recommended Posts