Jmol.sh: Difference between revisions
No edit summary |
No edit summary |
||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
== Installation steps == | == Installation steps == | ||
1) Install Java Runtime Environment: sudo apt-get install default-jre | 1) Install Java Runtime Environment: '''sudo apt-get install default-jre ''' | ||
2) Download the Jmol package: https://sourceforge.net/projects/jmol/files/Jmol/ | 2) Download the Jmol package: https://sourceforge.net/projects/jmol/files/Jmol/ | ||
[[Image:Jmol1.png]] | |||
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: | 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 | '''chmod u+x jmol.sh''' | ||
4) In my case, I extract the file to the ~/Documents folder: | 4) In my case, I extract the file to the ~/Documents folder: | ||
cd ~/Documents/jmol-14.29.14 | '''cd ~/Documents/jmol-14.29.14 ''' | ||
chmod u+x jmol.sh | '''chmod u+x jmol.sh ''' | ||
5) Edit your ~/.bashrc file: | 5) Edit your ~/.bashrc file: | ||
export PATH=$PATH:~/Documents/jmol-14.29.14 | '''export PATH=$PATH:~/Documents/jmol-14.29.14''' | ||
6) Source your ~/.bashrc file: source ~/.bashrc | 6) Source your ~/.bashrc file: '''source ~/.bashrc''' or '''. ~/.bashrc''' | ||
== Visualization Steps == | == Visualization Steps == | ||
[[Image:Jmolrun.jpg]] | |||
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. (for OUTCAR_jmol file, see Note 2) | |||
Step3: Click Tools and click AtomSetChooser | Step3: Click Tools and click AtomSetChooser | ||
Step4: Select the modes | Step4: Select the modes | ||
Step5: Click the Arrow button in the bottom to start visualizing. | 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''' | |||
So | |||
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 | |||
Latest revision as of 11:27, 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[edit]
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[edit]
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. (for OUTCAR_jmol file, see Note 2)
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

