# Octave和shell-mode的几个小技巧

## Octave里角度制的三角函数

Octave里默认的三角函数，比如sincos等用的单位是弧度制，就是说π是180°，我以前总用蹩脚的方式把角度换算到弧度来计算：

# 调侃手机品牌的段子

2016-Oct-13 Update: 加了两个链接方便读者理解内涵，改了一个段子里的错别字，还改了一下格式。另外，新增了一个笑话段子分类。

“轰”一声巨响，我明显感觉到我的掩体颤了颤。

# Fix a not enough memory error in ORCA under Windows

Using ORCA under Windows is painful. However, this does not dim the light of ORCA. Today I met a “not enough memory” error. The following are the details.

Phenomenon: The ORCA 3.0.3 Windows 64-bit version was used under Windows 8.1. The calculation was run in single-process mode (I can’t make the parallel version work 😢). Since the auxiliary basis set def2-QZVPP/C was used, MP2 should be calculated. But a error occurred:

## RI-MP2 ENERGY

Dimension of the basis … 1685
Memory devoted to MP2 … 256 MB
Data format for buffers … DOUBLE
Compression type for matrix containers … UNCOMPRESSED
Scaling for aa/bb pairs … 0.000e+000 Eh
Scaling for ab pairs … 1.000e+000 Eh
Overall scaling of the MP2 energy … 2.690e-001 Eh
Calculating two index integrals … done ( 1.631 sec)
Error (ORCA_MP2/RI): not enough memory to calculate the Cholesky decomposition of the V**(-1) matrix (need 426.7 MB)

Analyzing: It seems that the amount of needed memory is not that huge. Why it failed? How about giving it more memory?

Solution: Increasing the MaxCore for MP2 did fix the problem. The corresponding input file looks like: