Thursday, March 19, 2015

my understanding about linux/unix and windows

in Linux
there are several shell types.

1. Bourne Shell
PATH : PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user.
examples:
PATH="/usr/sbin:$PATH"
or
export PATH=$PATH:/usr/sbin

EXPORT
examples:
export PATH=$PATH:/path/to/dir1:/path/to/dir2
 
2. CSH
Example: 
set path = ($path /usr/local/bin /scripts/admin)

3. KSH
4. TCSH
Example:
setenv PATH $PATH:/usr/local/bin:/scripts/admin

.bashrc (.bashrc, .tcshrc, .kshrc) definition: This file is normally read by interactive shells only. Here is the place to define your aliases, functions and other interactive features like your prompt.
.bash_profile and .profile

Classically, .profile is used by Bourne Shell, and is probably supported by Bash as a legacy measure. Again, .login and .cshrc were used by C Shell.

The .bash_profile would be used once, at login. The .bashrc script is read every time a shell is started. This is analogous to .cshrc for C Shell.
One consequence is that stuff in .bashrc should be as lightweight (minimal) as possible to reduce the overhead when starting a non-login shell.



Wednesday, March 18, 2015

Install Cantera in windows 7/8 and linux machines

Some of following content copied from other website.

Windows installation(has done in windows 7 and 8 machines)

1. Download Python from python.org
2. Choose python-2.7.9
3. Install it.
4. Download numpy-1.9.2-win32-superpack-python2.7 from website http://sourceforge.net/projects/numpy/files.
5. Make sure that you select .exe file. Somehow I do not like whl file.
6. Install it and make sure it is installed in the previous python home directory.
7. Download (32bit, not 64bit, somehow I have problems for 64bit versions. The good news is that both windows 7 and 8 are compatible for 32bit versions) Cantera-2.1.2-x86.msi and Cantera-Python-2.1.2-x86-py2.7.msi files.
8. Install it. Make sure you SHOULD install Cantera-Python-2.1.2-x86-py2.7.msi into the previous python home directory.
9. Now open python command line or shell GUI interface. Input following commands.
import cantera
gas = cantera.Solution('gri30.cti')
h2o = cantera.PureFluid('liquidvapor.cti', 'water')
 
If everything is fine and you are lucky, you should successfully install the
cantera in your windows machine.  

Linux/Unix installation: not completed and tested yet
1. go to website: http://sourceforge.net/projects/cantera/
2. download the file cantera-2.1.2.tar.gz
3. tar xzvf  cantera-2.1.2.tar.gz
4. go to website http://sourceforge.net/projects/numpy/
5. download file numpy-1.9.2.tar.gz\
6. tax xzvf  numpy-1.9.2.tar.gz
7. cd numpy-1.9.2
8. python setup.py install --home=$HOME/python_modules
 

The “ignition delay time” can be considered the time at which the reaction “takes off”.  For our purposes, this can be considered the time at which the temperature rise corresponds to approximately 50% of the final value.

Wednesday, January 21, 2015

how to use Gaussian to calculate enthalpy, free energy, and entropy

Q1: What is

CBS-4M
CBS-QB3
CBS-APNO?

They are various Complete Basis Set (CBS) methods of Petersson and coworkers for computing very accurate energies
Q2: how many calculations they include?
It includes geometry optimization and frequency calculations.
It include MP2, MP4, CCSD calculations too.

Q3: why no basis sets are required in the Gaussian input file?
These methods will automatically assign basis sets for atoms.

Saturday, November 1, 2014

how to use vmd to make a movie

Now you have one trajectory.xyz file from your MD simulations. And you want to make a nice movie using VMD.
1. open your VMD menu, extension/visulization/movie maker.
2. Click Format, choose MPEG-1.
3. Click Render, choose Tachyon (other selection could cause something weird).
4. Click Movie Setting, choose TRAJECTORY.
5. Make sure you choose the directory for your movie.
6. Choose frame interval (Trajectory step size) so that you do not have a too long movie.
7. MAKE SURE YOU KNOCK THE ENTER KEY for EVERY NUMBER INPUT. Otherwise you will have some weird mistakes.

Now wait for your movie.

Thursday, October 16, 2014

some basic concepts about OPV


open circuit voltage:  where the electron current density is zero.

JSC: The photo current is referred to as the short circuit (SC) photocurrent.

cathode: obtain electrons.
Anode: lose electrons.
Positive electrode: High voltage.
Negative electrond: low voltage.

,
PCE: PCE= Poutput/P(solar energy)= FF*Voc*Jsc/P(solar energy)

n=\frac {P_{max}} {P_{solar}} = FF \frac {J_{SC} V_{OC} }{P_{solar}}\,\!



FF=\frac{J_{MAX} V_{MAX} } {J_{SC} V_{OC} }\,\!

Except for the beyond equations, we also need learn:
Exciton binding energy: = E(affinity)-E(ionization)-E(optical gap) (HOMO and LUMO are not necessarily to be ionization and affinity energy.)

E(optical gap):  the threshold for photons to be absorbed.
In almost all inorganic semiconductors, such as silicon, gallium arsenide, etc., there is very little interaction between electrons and holes (very small exciton binding energy), and therefore the optical and electronic bandgap are essentially identical, and the distinction between them is ignored. However, in some systems, including organic solar cells, the distinction may be significant.


generalized Shockley equation:

Onsager model: 








Thursday, August 28, 2014

How to systematically to master CPMD program?

Like leaning some real skills or having real ability, you have to make a plan first and then finish it.

For me, I have following plans.

First step, you need to learn how to use it. Download it, compile it, test it, and run it (such as a wave function optimization, geometry optimization, CPMD/BOMD for isolated or PBC systems, etc.).

Second step, learn the results of CPMD output, fully understand the meaning.

Third step, learn to change and optimize the CPMD input parameters, and get the meaningful, useful and correct outputs.

Fourth step, learn the code of CPMD, read the related references carefully, if possible, write a module to implement your own program in CPMD, for example, C-DFT in CPMD.

Fifth, if possible, try to combine CPMD and other programs such as GROMACS to run QM/MM simulations.


Wednesday, July 23, 2014

what is a binary tree?

A binary tree is a data structure where a node has the degree of 0 or 1 or at most 2. This may be due to the binary system (only 0 and 1 are recognized) in computer.

It is pretty easy to find desired data using this data structure.