Skip to content

KenHino/PyVibLocalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyVibLocalizer

visualize atomic mode and genetrate displacement vectors (normal/local mode, arbitary path)

Installation

$ git clone https://github.com/KenHino/PyVibLocalizer
  • In WSL2 or Ubuntu,
$ sudo apt install blender
  • In Mac,
$ brew install --cask blender

or simply install from homepage.

  • First, modify PATH related to blender in CMakeLists.txt in PyVibLocalizer directory. Below is an example of PATH in Mac OS. (In Ubuntu, this may be /usr/bin/blender)
set(BPython "/Applications/Blender.app/Contents/Resources/3.5/python/bin/python3.10")
set(BPythonDir "/Applications/Blender.app/Contents/Resources/3.5/python/")
set(Blender "/Applications/Blender.app/Contents/MacOS/Blender")
  • Next, move to test directory and make build directory. And execute cmake.
$ cd test
$ mkdir build
$ cd build
$ cmake ../..
  • At last, activate virtual environment and execute a some example file such as work/ch2o.py.
$ source venv/bin/activate
$ blender --python main.py
  • And you can also use jupyter notebook in blender.
$ jupyter-lab

In jupyter notebook, you can use blender_kernel to execute blender script.

Local mode

J. Chem. Phys. 130, 084106 (2009)

  • Pipek-Mezy metric

$$\xi_{\mathrm{at}}\left(\widetilde{\boldsymbol{Q}}^{\mathrm{sub}}\right)=\sum_{p=1}^{k} \sum_{i=1}^{n}\left(\tilde{C}_{i p}^{\mathrm{sub}}\right)^{2}$$

$$\tilde{C}_{i p}^{\mathrm{sub}}=\sum_{\alpha=x, y, z}\left(\tilde{Q}_{i \alpha, p}^{\mathrm{sub}}\right)^{2}$$

  • Boys metric

$$\xi_{\mathrm{dist}}\left(\widetilde{\boldsymbol{Q}}^{\mathrm{sub}}\right)=\sum_{p=1}^{k}\left(\boldsymbol{R}_{p}^{\text {center }}\right)^{2}$$

$$\boldsymbol{R}_{p}^{\text {center }}=\sum_{i=1}^{n} \tilde{C}_{i p}^{\mathrm{sub}} \boldsymbol{R}_{i}$$

To maximize, metrices, this program used scipy.optimized.minimize_scalar, in jacobi sweep method. The choice of unitary rotation mode pair is based on window frequency.: J. Chem. Phys. 145, 124112 (2016) Default window frequency set as 400 cm-1.

Group Localized Coordinate

Group localized coordinate is one of the local mode, which diagonalize subspace mass-weighted hessian whose subspace is defined by your selction of atoms.

Quick Start

  • See here
  • To run this program, execute python {$mol_name}.py or blender --python {$mol_name}.py (example; mol_name=src/ch2o)

About

VIsualise molecular vibration by blender & create local modes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors