set of scripts for calculating linear and nonlinear optical properties of organic crystals
The aim of the program is to calculate linear (refractive indices) and nonlinear (chi(2) for second harmonic generation) optical properties of organic crystals.
The easy path with docker image:
docker run –volume $(pwd):/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:
- python 3.6
- open babel
- pip install chi1chi2
- for the fortran programs a Makefile is provided with the repository: make command builds the programs in the build/ directory
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.
- 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!)
see examples for the convention
- 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)
Use sets of charges, geometries and follow your favorite property calculation procedure. Additional shell scripts could be provided in later releases.
Use the script chi.main to get the chi(1) and chi(2) tensor components in the so called ab’c* reference frame.
Q-LFT calculations enabled! (since 0.1.1)
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)
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
- 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)
- ?.?.? - refractive indices dispersion
- ?.?.? - phase matching diagrams
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|chi1chi2-0.2.0-py3-none-any.whl (55.5 kB) Copy SHA256 hash SHA256||Wheel||py3|
|chi1chi2-0.2.0.tar.gz (39.0 kB) Copy SHA256 hash SHA256||Source||None|