set of scripts for calculating linear and nonlinear optical properties of organic crystals
Project description
The aim of the program is to calculate linear (refractive indices) and nonlinear (chi(2) for second harmonic generation) optical properties of organic crystals.
Installation
The easy path with docker image:
workdir=$(pwd) # or any other directory of your choice
docker run -v $(workdir):/chi1chi2 -it tomeks86/python-chi1chi2 bash
The hard path
Warning: manual installation and getting the program to its full functionality requires quite much of expertise even in linux (I do not give any warranty that it is possible to run it in any other OS) and can be a very daunting task.
- Make sure you have installed:
gfortran
python 3.6
open babel
- Installation:
pip install chi1chi2
for the fortran programs a Makefile is provided with the repository: make command builds the programs in the build/ directory
Easier installation of openbabel using conda
conda env create –file=chi1chi2.yaml
for program usage activate the environment with: conda activate chi1chi2
follow the installation of other dependencies with pip
Description
The whole program constitutes a set of scripts that need to be executed in order.
There are four main steps:
Input preparation (optionally - geometry optimization)
Optical properties of molecular sub-units calculations
Calculations of bulk properties
Analysis of the results
The purpose of this file is to lead the user through all these steps.
Step 1 - Input preparation
from Cif (easy path)
use chi.from_cif to get geometry for further optimization with e.g. crystal09/14/..
from fractional coordinates
use chi.from_fra script (see: examples/mna_cif.fra, examples/mna_cif2.fra to see the convention) (remember to adjust the symmetry operations!)
manually
see examples for the convention
Step 1a after geometry optimization
use chi.from_crystal script to adjust the coordinates and charges after crystal geometry optimization
run chi.input_preparator script to get input files for:
charge_generator program (example usage: charge_generator < chg1.inp)
Lorentz tensor with lorentz program (example usage: lorentz < lorentz.inp > L.dat)
Step 2 - property calculation
Use sets of charges, geometries and follow your favorite property calculation procedure. Additional shell scripts could be provided in later releases.
Step 3 - core calculations
Use the script chi.main to get the chi(1) and chi(2) tensor components in the so called a’bc* reference frame.
Q-LFT calculations enabled! (since 0.1.1)
Step 4 - result analysis
Use the script chi.analyze with output file generated in step 3
Refractive indices analysis (since 0.1.3)
Magnitude of the chi(2) tensor components in the direction of the optical indicatrix (since 0.1.3)
Helpers
- Two helper scripts are available to use around molecular calculations:
read_g09.py for reading the molecular properties after the QC calculations
scale_props.py for scaling the static properties with use of the reference calculations
Note: the scripts minimize depencencies on the project library so that they could be used as standalone scripts on an external machine
Examples
See the examples/examples.pdf to follow the steps used in the integration tests. The files used for the tests are located in the tests/integration directory:
input as a starting point
expected as a reference
Example gaussian09 input file for calculations could be found in examples/mna.com
Version history
0.1.0 - first release (31.01.2019)
0.1.1 - Q-LFT calculations support added (05.02.2019)
0.1.2 - a minor README fix on the PyPI (06.02.2019)
0.2.0 - analysis of the core calculations - reporting in tables (09.03.2019)
0.2.1 - property scaling helper (27.03.2019)
0.3.0 - atomic polarizability scaling approach change (03.03.2020)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file chi1chi2-0.3.0.tar.gz
.
File metadata
- Download URL: chi1chi2-0.3.0.tar.gz
- Upload date:
- Size: 43.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d44a72ee0fe48d4bbb779e9341739cd38033f63ad6da2a72db9753d29ff027e1 |
|
MD5 | c0483e0d09d2689f71a4733669acb16b |
|
BLAKE2b-256 | 08d1a9ee1e9755e48753a476e5e9febdb1e8268e685afdff5e24c1aa513153ec |
File details
Details for the file chi1chi2-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: chi1chi2-0.3.0-py3-none-any.whl
- Upload date:
- Size: 61.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06d1cebcfff0cc20d1d601ae8d7d509a75c243f8161da49cb230b861905f30c |
|
MD5 | 622f682be40c82de33f0d38b8f34ed65 |
|
BLAKE2b-256 | b4e941ddc5e08c87276e122e46b8d3ef4f2f3c1750db12ad4008c6d964a70565 |