Jmol.sh: Difference between revisions

From Wiki
Jump to navigation Jump to search
Qli (talk | contribs)
No edit summary
Qli (talk | contribs)
No edit summary
Line 32: Line 32:
== Visualization Steps ==
== Visualization Steps ==


7 Go to your frequency calculation path and run the steps as shown in the figure:
[[Image:Jmolrun.jpg]]
 
In terminal, go to your frequency calculation path and run the steps as shown in the figure:




Line 42: Line 44:




Note1:
"Note1:"
 
For the imaginary frequencies.  In the interface of Jmol, the minus symbol is not displayed. So you need to check them firstly with the command:  grep f/i OUTCAR
For the imaginary frequencies.  In the interface of Jmol, the minus symbol is not displayed. So you need to check them firstly with the command:  grep f/i OUTCAR
Then, you will get the wave number of imaginary frequencies and visualize the vibration modes by comparing the wave numbers.
Then, you will get the wave number of imaginary frequencies and visualize the vibration modes by comparing the wave numbers.




Note2:
"Note2:"
 
In the  step2 in the figure, I used the command:  jmol.sh OUTCAR_jmol  
In the  step2 in the figure, I used the command:  jmol.sh OUTCAR_jmol  
This is because of the bug of Jmol when it reads OUTCAR in frequency calculations with  NWRITE = 0.
This is because of the bug of Jmol when it reads OUTCAR in frequency calculations with  NWRITE = 0.

Revision as of 11:22, 16 May 2018

go back to Main Page, Computational Resources, Scripts, Scripts for VASP

This is a brief tutorial to use Jmol to visualize the vibration modes.

Installation steps

1) Install Java Runtime Environment: sudo apt-get install default-jre

2) Download the Jmol package: https://sourceforge.net/projects/jmol/files/Jmol/



3) Extract the file and you will get a folder named jmol-14.29.14(the numbers are depend on the versions your download), get into this folder's path in the terminal and run:

chmod u+x jmol.sh

4) In my case, I extract the file to the ~/Documents folder:

cd ~/Documents/jmol-14.29.14

chmod u+x jmol.sh

5) Edit your ~/.bashrc file:

export PATH=$PATH:~/Documents/jmol-14.29.14

6) Source your ~/.bashrc file: source ~/.bashrc or . ~/.bashrc


Visualization Steps

In terminal, go to your frequency calculation path and run the steps as shown in the figure:


Step1: grep f/i OUTCAR To get the wave number of imaginary frequencies Step2: jmol.sh OUTCAR Open OUTCAR with Jmol package Step3: Click Tools and click AtomSetChooser Step4: Select the modes Step5: Click the Arrow button in the bottom to start visualizing.


"Note1:"

For the imaginary frequencies. In the interface of Jmol, the minus symbol is not displayed. So you need to check them firstly with the command: grep f/i OUTCAR Then, you will get the wave number of imaginary frequencies and visualize the vibration modes by comparing the wave numbers.


"Note2:"

In the step2 in the figure, I used the command: jmol.sh OUTCAR_jmol This is because of the bug of Jmol when it reads OUTCAR in frequency calculations with NWRITE = 0. When we use NWRITE = 0, the important tags for jmol to read the element information from OUTCAR is not written. So, if you use NWRITE = 0 and run jmol.sh OUTCAR directly, you will find that all your atoms are in the same color.

To solve this bug, there are two options: Method-1) Use NWRITE = 2 and run jmol.sh OUTCAR Method-2) Add more information to the OUTCAR by hand.

i) grep TIT POTCAR > title ii) copy the outputs of above commands and paste them to the OUTCAR: cat title OUTCAR >> OUTCAR_jmol iii) jmol.sh OUTCAR_jmol

If you have any problems in visualizing the frequencies, do not hesitate to tell me.

Enjoy.

Qiang


1)




uncompress it and compile it: f77 Cell.f -o x.Cell or ifort Cell.f -o x.Cell or gfortran Cell.f -o x.Cell. Place it in your ~/bin folder.

2) Download the script and uncompress it. Make it executable with the command: chmod ug+x nfreq.sh:

File:Nfreq.tgz


3) Change in line ofnfreq.sh: path=/home/lbellarosa/bin/exe/Cell with the path of the directory where you put the executable (i.e. path=/home/yourusername/bin).

4) Now you can run the script typing:

nfreq.sh OUTCAR

Be sure you are using standard pseudopotentials (not soft nor hard). Otherwise change the name of the pseudopotentials in OUTCAR (i.e O_h ==> O)