-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME_vasp
230 lines (156 loc) · 6.98 KB
/
README_vasp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
Introduction:
-------------
'v2xsf' is a command line tool that converts structural output data
generated by the 'VASP' code (crystal structure, charge density,
electron localization function (ELF) and local potential) to a format
that can be read by the program 'XCrysDen', a powerful and easy to use
visualization tool for crystal structures and densities.
In detail it is able to read POSCAR, CONTCAR, CHGCAR, CHG and LOCPOT
files and converts the information given to a xsf-file, the 'XCrysDen'
file format. The output file is compressed using 'gzip'.
The VASP 5.2 format is supported since version 1.03.
Version:
--------
1.04 (09 September 2014)
Author:
-------
Jens Kunstmann (jens@j-kunstmann.de)
appreciates comments and bug reports.
Copyright:
----------
Copyright (C) 2005,2006,2010,2014 Jens Kunstmann
'xsfconvert' is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
'xsfconvert' is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Requirements:
-------------
Please use 'XCrysDen' Version Beta-1.0 and above. Some problems were
reported by people using older versions.
To take advantage of the automatic compression feature of 'v2xsf' the
tool 'gzip' is required. It is usually available on all Unix platforms.
Installation:
-------------
The program is written in ANSI-C and should compile on any machine.
In a linux shell type:
> mkdir bin
> cd source
> make vasp
If this doesn't work change the compiler options in the makefile or
contact the author.
The executable is called 'v2xsf'. After compilation it can be found
in the 'bin' directory. Now copy it somewhere in your PATH.
Usage: examples
---------------
> v2xsf
By default 'v2xsf' will read the 'CONTCAR' file from the local
directory, convert the data, write it to a file named 'CONTCAR.xsf', and
compress this file using 'gzip'. The resulting file 'CONTCAR.xsf.gz' can
directly be read by 'XCrysDen'.
> v2xsf -wrong
Starting 'v2xsf' with some wrong arguments will print the following
help text:
---------------------------------------------
+++ v2xsf version 1.03 (19 July 2010) written by Jens Kunstmann +++
Syntax error!
Usage: v2xsf [<infile>] [-1 <#1>] [-2 <#2>] .. [-n <#n>]
[-c <y|n>] [-d] [-o <outfile>] [-s] [-u <a> <b> <c>]
infile input file (e.g. POSCAR, CHGCAR, LOCPOT)
default: CONTCAR
options:
-1 specifies atomic number of species 1
-2 specifies atomic number of species 2
: : :
-n specifies atomic number of species n
-c, -C y[es]: scale field data by 1/Vol_cell
n[o]: do not scale field data
-d, -D do not compress the xsf output file
-o, -O xsf output file (without .gz extension)
default: <infile>.xsf
-s, -S do not read field data, convert crystal structure, only
-u, -U define lattice constants a,b,c of conventional unit cell
(a,b,c are in Angstrom)
---------------------------------------------
> v2xsf CHGCAR
Will read the crystal structure AND the charge density contained within
the file 'CHGCAR' and write both to 'CHGCAR.xsf.gz'.
> v2xsf CHGCAR -1 5 -2 6 -3 1
Acts like in the previous example. Additionally it will assign the
atomic number 5 (boron) to the first, 6 (carbon) to the second and
1 (hydrogen) to the third species.
This option is primarily for users of VASP 4.6 and older. In these
older version of VASP the definition of the crystal structure just
discriminates between different species but does not DEFINE the species.
The association of a certain species with an atom of a special type
takes place in 'POTCAR'. 'v2xsf' does not read 'POTCAR', that's why the
user has to define the atomic number of each species by hand like it is
done in this example.
For users of VASP 5.2 this option allows to modify the atom types in
the *.xsf file.
> v2xsf CHG -c n
The field values of 'VASP' files containing charge densities ('CHGCAR'
and 'CHG') are saved as: rho(r) * Vol_cell.
To get the unscaled charge density rho(r), 'v2xsf' will by default scale
the field values of input files containing the string "CHG" in the
filename by a factor of 1/Vol_cell. For 'ELF' or 'LOCPOT' files this
scaling is not required and switched off by default.
With the '-c' option the default behavior can be altered. Here, using
'-c n', the field values will not be scaled.
> v2xsf -d
The xsf output file is not compressed using 'gzip'.
> v2xsf CHGCAR -o SiO_2.xsf
Will read CHGCAR and write the output to 'SiO_2.xsf.gz'.
> v2xsf CHG -s
Will only read the crystal structure and not the charge density from
'CHG'.
> v2xsf -u 12 12 12
Will create a cubic conventional unit cell, with each side having the
length of 12 Angstrom.
Explanation: 'XCrysDen' can switch between primitive and conventional
unit cells if both are defined in the xsf-file. For structures where
the primitive and the conventional unit cell differ, you have to
define the conventional unit cell yourself, either by changing the
xsf-file by hand or by using the '-u' command line argument as above.
By default 'v2xsf' will define both unit cells to be the same.
XCrysDen:
---------
> xcrysden --xsf CHG.xsf.gz
This starts 'XCrysDen' and will read in the file 'CHG.xsf.gz'. The
3D-structure is displayed in the main window. The charge density can be
visualized via the menu 'Tools'->'Data Grid'. Please read the XCrysDen
user manual for further information.
Restrictions:
-------------
'v2xsf' will always read the crystal structure from the input file and,
if present, also the scalar field. Some files contain more than
one scalar field. Here 'v2xsf' will only read the first field.
'v2xsf' can handle at maximum a number of 50 different species and not
more than than 130 characters per line as restriction for input files.
If this is not enough for you, modify the source file 'v_all.h' and
increase the values defined as 'SPECIES_SIZE' or 'LINEBUF_SIZE'. Than
compile again by entering the commands:
> make clean
> make vasp
History:
--------
Version 1.01:
- first release
Version 1.02: (two major bugfixes)
- The crystal structure given in Cartesian coordinates is now read in
correctly.
- The charge density was slightly shifted with respect to the crystal
structure. Fixed.
Version 1.03:
- VASP 5.2 format can be read in. The modifications of the code that
allow to read VASP 5.2 input was provided by Paul Chevalier
(paul.chevalier@mines-albi.fr).
Version 1.04 (12.09.2014):
- included ANSI-C include files. This removes the error messages during compilation.
References:
-----------
VASP: http://cms.mpi.univie.ac.at/vasp/
XCrysDen: http://www.xcrysden.org/