Monday, 30 October 2017

Install P4VASP visualization package

If you like this post, please leave a comment or share in social media. Thanks for your support. 

The package named p4vasp is a free to use code available in this link.

In the present version of Ubuntu Linux, following simple commands may be suffice.

sudo apt-get install p4vasp 


For other OS's, please go through following steps.


For a quick view of the pages of P4VASP site click following links.

The info given in the official site is sufficient. However, the users who is new to linux environment may find it difficult to install the package. This tutorial may help them.

Create a new folder in your home directory or wherever you want the installation directory. It doesn't matter where you place this file. In Windows system, the default installation path is C:/ directory. In linux, we can chose any folder. Consider that you have created a folder named P4vasp/. Considering that your terminal ends with the symbol "$".


Move to the created directory by

cd P4vasp/

wget http://www.p4vasp.at/#download . <Enter>

This will download the tarred files in the current directory.

Then, unzip using following commend.
tar -xzvf p4vasp.x.x.x   <Enter>

This will unzip all the files in the folder.

Before installation, we need to check whether all the dependencies (needed packages that are necessary to run p4vasp) are installed in the system. For p4vasp, no worries. There is a script by which you can install all the dependencies (in the case of Ubuntu OS).

To install all the dependencies, move to install folder.

The file name install-ubuntu-dependencies.sh    which is in green color  by default. This green color means that it is an executable file.

Now do the following from this install folder.

./install_ubuntu_dependencies.sh   <Enter>

This will install all the needed packages for running p4vasp.

(Note: If there is older version installed already remove it first and then install new packages)

Now if you type

make config    <Enter>

cd install && python configure.py   will be displayed. The make tell us to execute this comment. This will configure environment.

After running the comment, if anything is missing, the info will be prompted. If nothing displayed "no problem". You can go ahead.

(Now you will be in install directory. Use cd .. to come to the installation directory)

Enter the following comment.

sudo make install

This will start to install the p4vasp package. This will install the p4vasp package.

To check whether p4vasp in stalled, type the command

which p4v           <Enter>

This will let you know the path of installation. Now, the installation is complete.

You can start using p4vasp by typing

p4v <file_name>




To test the installation, move to test directory. This directory contains many files which can be used for testing p4v.

p4v      <file_name>

So far so good. you may be prompted with the following error.

/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Can't open display:

So, we need do little more. The above error message is due to the gtk-2.0 package. The package that need to be installed is libgtk2.0-dev

To install this package, first type

sudo apt-get update

This will update the apt-get library.

Now, type

sudo apt-get install libgtk2.0-dev

This will install this gtk dependency.

This may solve your problem. Still getting the same error. Okay. Guess need little more effort.

(Thanks for your support. This post has received a lot of attention. I hope this post is useful to you also. If so, please leave a comment to help more researchers like you. By commenting and sharing in your Facebook or Twitter accounts or any other social media, this post is more likely to reach more researcher.)













3 comments:

  1. If you do have a problem while using p4v, maybe you are using python3 and not python2.7.
    It did happened to me, I was not able to plot the LDOS, and after reinstalling, I had the error:

    File "/usr/bin/p4v.py", line 9
    can get source code from http://www.pygtk.org """

    The trick is so to modify the file given by

    which p4v

    (for me it is /usr/bin/p4v)

    and change the line

    exec python /usr/bin/p4v.py "$@"

    by

    exec python2.7 /usr/bin/p4v.py "$@"

    and so using the correct version of python.

    I hope it may help peoples,
    Best regards.

    ReplyDelete

Reason for the Maximum index for Augmentation-charges (SET IRDMAX)" error in OUTCAR file: VASP Calculation.

 "The Maximum index for Augmentation-charges (SET IRDMAX)" error is most-likely due to parallelization issues.  To check this, try...