Getting started with VASP, good news for VASP and Linux system beginners~ (with detailed process of VASP simple structure optimization)

   In fact, many friends have no idea about learning VASP when they are suddenly thrown a subject, for example, what is VASP? What kind of software is VASP? (A lot of students asked me to help compile and install VASP. The most interesting sentence is "Hello! Where is the VASP software? Why can't I find it!") How to use VASP? What exactly is calculated with VASP? Wait, wait, then I will give a simple, especially for Xiaobai, an easy-to-understand introduction to this seemingly advanced and easy-to-understand Vienna Arithmetic (VASP).

   One: First of all, we must understand what VASP is for

        I won’t quote any special scientific words here. VASP is a first-principles calculation software for molecular structures developed by the University of Vienna. It can calculate many things. Before learning VASP, you must remember to learn a lot. Read the article on the principle of first-principles calculation, and pay attention when reading it. First-principle calculations can be performed with many softwares. Just read VASP first, and first realize what VASP can calculate. The calculation diagrams in general articles , here are some simple pictures as examples. (If there is any infringement, contact to delete).

   For example, these two pictures look quite powerful. The left picture is the energy band diagram, and the right picture is the electron density map. These pictures are not generated by VASP, but are generated by VASPKIT (China-made light, thank you teachers) for VASP Data extraction is performed on the calculated files, and then exportable files are output, so that drawing software such as origin, visio, etc. can be used for drawing, and various pictures in the article can be produced beautifully (attach the function interface of VASPKIT) .

These are probably the basic process of using VASP calculations in scientific research papers. The following introduces the working environment of VASP software.

Two: VASP working environment

     It cannot work on the Windows system that most of us use, no matter how many generations it is, it works on the Linux system. At present, Ubuntu and CentOS are the most used mainstream Linux systems (programmer gathering places).

Of course, both of these can be installed with VASP. As for the installation method, I will not mention it here. I will write a little later when I have time. Both systems have a pure terminal interface (no images, all codes) and a graphical interface. The graphical interface It is relatively friendly. If it is a pure terminal interface, then you need to learn specific operation instructions and so on (I will write an article on VASP basic application instructions later). It does not mean that we cannot use VASP on Windows. You can install it here A virtual machine, then map the above two systems and then install VASP. Note that the more virtual machines used now should be VMs. Before Win10, the old version of VM can be used, and the new version of Win11 must use the latest version. Otherwise, incompatibility will easily occur, and the network will be disconnected during the VM installation process to prevent errors.

Three: Common software used in conjunction with VASP

First of all, you need to understand where the structure you want to calculate comes from. Generally, Materials Studio is used the most, and you can perform a series of operations on the structure, such as cell expansion and sectioning. After the operation is completed, export the CIF format as shown in the figure below.

1. Click File in the upper left corner

2. Click Export in the menu, and select the cif format output in the figure below

 3. Download the Vesta software and drag the cif file into Vesta

 4. Click the File file in the upper left corner, then select Export data from the menu, and select the output .vasp, POSCAR file

So far, the POSCAR structure file that VASP can calculate is formally generated, because the name is not POSCAR, so when uploading to the Linux system, it needs to be renamed, even the suffix is ​​not required, just named POSCAR file.

Four: VASP simple structure optimization (Ubuntu system as an example)

1. Create a new folder and drag the .vasp file just mentioned into it. At this time, you can see that this file has restrictions because I use the sunflower remote control to transfer the file (small lock, readable but not writable?? Doesn’t matter, Anyway, there are restrictions) So you need to give him permission first, right click in the folder to open the terminal and enter the following code, there is a space after 777, just change it to your own file name here

sudo chmod 777 0000046760-conventional-cell.vasp

Here you can see that there is no limit, it is a readable and writable file, and then renamed to POSCAR as shown in the figure below

 2. Then we need to set up an INCAR file. This file is used to tell VASP what we want to calculate. The specific parameters can be adjusted according to our needs. I give a simple INCAR file for reference only. The parameters in it can be changed from many Self-study in the article, the INCAR file is the same as POSCAR, it can be viewed directly in Ubuntu, it is a text file, you can copy POSCAR, delete it, then copy the following parameters into it, change the name to INCAR, and put it in a folder with POSCAR That's it. See below

SYSTEM = OPT
PREC = Accurate
ENCUT = 500
EDIFF = 1e-7
IBRION = 2
ISIF = 2
NSW = 500
GGA = PE
ISMEAR = 0
SIGMA = 0.05
POTIM = 0.5
EDIFFG = -1e-2
NPAR = 8
NELM = 100
IVDW=11

  

3. There are still two files missing for the optimization operation. One is the pseudopotential POTCAR and KPOINTS files. Here we use VASPKIT to write and read (the premise is installed), right click to open the terminal and enter vaspkit, then enter 102, then enter 2, and finally according to Accuracy and server computing power selection accuracy I choose 0.04, see the operation in the figure below

 See the four or four files in the above figure and the files have been generated, and the files required for VASP optimization calculation are all ready.

4. Submit the task and perform the calculation. Generally, ubuntu uses mpirun to submit the code according to the number of its own server threads (open the terminal in the folder to enter)

mpirun -np 88 vasp_std

My server has 88 threads, so I need to change it according to my actual number of threads

5. Waiting for the end of the task, a lot of files will be generated, among which CONTCAR is the optimized structure, and then exported to Vesta for viewing. Similarly, if you need to use MS to view, then use Vesta to output the cif file, and Materials Studio can do it Check it out.

I hope you can learn knowledge from my article, please leave me a message if you have any questions, thank you for collecting and liking

Guess you like

Origin blog.csdn.net/zhaixiuyu/article/details/130163231