Thursday, October 17, 2013

一个人擅长什么,不擅长什么,基本是后天的事情

如果我们承认知识和能力是后天学习而来,那么一个人擅长什么,不擅长什么,完全是后天决定的,也是每天的习惯决定的。

比如一个人不擅长英语写作,如果每天能用一个小时写作200-300字的英文短文,一年之后他就会成为英文写作的专家。当然,要有效的学习。

再比如一个人不擅长编程,如果每天花一个小时编程,一年之后就可以成为C/C++, JAVA的专家。当然,人不能太笨。

比如一个人如果不擅长英文阅读或是听说, 如果每天花一个小时练习听力,阅读或是当众演说,一年之后就可以成为英文读听说的专家。当然,人还是不能太笨。

最后,如果看人不擅长什么,就看他最近一年的工作,在重复做些什么?如果一个编程的人过去一年全在看小说,旅游,我们说这个人暂时废掉了。给一个月还是可能恢复的。当然,你如果从来没有学过英语和编程,大概连废掉的机会都么有。

我个人感觉,每天最理想的是花一个小时学习新东西,可以是新方法,比如编程JAVA的可以学学C/C++。比如做科研的,每天可以花一个小时看看别人用的什么新设备,软件,数值方法,或是新概念,然后动手去试试看。其余7个小时吗,还是老老实实做好自己的老本行。科研写文章,马工找工作,都是懂得越多越有市场,不是吗?

所以说,擅长都是练出来的,擅长都是时间堆出来的。

Monday, October 14, 2013

Conjugation effects, molecular wire and charge transport property

Related note
quantum interference:
Interference of two waves.svg
Considering wave-particle duality of real world objects, we can conclude any two objects can interfere with each other. And of course, human beings (can be regarded as particles) can interfere with each other too. We can conclude that the wavelength of a person with 60 kg weight is lambda (wavelength) = h/p =6.63/10^(-34) (J.s) / (60(kg)*465.1 m/s) (Speed: the equatorial speed of the earth) = 2.38 * 10 ^(-38) m.

Conjugation effect: a conjugated system is a system of connected p-orbitals with delocalized electrons in compounds with alternating single and multiple bonds, which in general may lower the overall energy of the molecule and increase stability. 

Thursday, October 10, 2013

CPMD and Metadynamic learning

CPMD
Q1: Can CPMD generate Free energy surface? With MetaD or Umbrella sampling?
Q2: What is meaning of collective variables? fictitious mass? fictitious energy?
        Is it a function of coordinate R (nuclear position)?
Q3: what is the meaning of 1/2(s_i(R)-s_i)^2? Is the deviation of original s_i?
Q4: V(t,s) potential = integration along trajectories.

Wednesday, October 9, 2013

Ionic liquid learning

File:Imidazole 2D numbered.svg
Compound: imidazole
File:Propargyl.png
Propargyl


dicyanamide: in IL, it should be an anion.

A one real IL propellant: 1-propargyl-3-methyl-imidazolium dicyanamide with WFNA (white fuming nitric acid)

Tuesday, October 8, 2013

How to use WHAM to obtain a free energy curve

WHAM is a program to be used to generate an relative free energy (FE) curve. Relative means you need specify a reference as zero.
1. Install WHAM.
2. Run your umbrella sampling (US) molecular dynamics simulations with PLUMED add-in. You should have a series of results. For example, if you want to obtain FE vs distances, you need manually specify a series of distances and run US around these distances.
3. Once you have all the results, you can use following script (a bash file):
#!/bin/bash

usfile=wham_usfile
fesout=fes.out

rm -rf $usfile $fesout
points=500  #there are 500 points/COLVAR.

for file in shortp? longp? longp??; do

tail -n $points $file/COLVAR | awk '{print $1,$2}' > $file/whamcv;
##get k constant
kappa=`grep UMBRELLA $file/plumed.dat  | head -n 1 | awk '{print $5}'`
## get umbrella center
PV=`grep UMBRELLA $file/plumed.dat  | head -n 1 | awk '{print $7}'`
echo $file/whamcv $PV $kappa >> wham_usfile
done;

first=`sort -n -k2 wham_usfile | awk '{print $2}' | head -n 1 `
last=`sort -n -k2 wham_usfile | awk '{print $2}' | tail -n 1 `
num=`wc -l wham_usfile | awk '{print $1}'`

wham $first $last $num 0.0001 500 0 $usfile $fesout
## above line shows command, min, max, number of points, tolerance, points of sampling around one distance, US input file, free energy outputfile. 

4. The output file will look like below.
#Coor           Free    +/-             Prob            +/-
9.410909        0.000000        nan     0.112293        nan
9.592727        0.228147        nan     0.076523        nan
9.774545        0.130469        nan     0.090179        nan
9.956364        0.022609        nan     0.108106        nan
10.138182       0.309783        nan     0.066711        nan
10.320000       0.200620        nan     0.080147        nan
10.501818       0.169518        nan     0.084449        nan
10.683636       0.125105        nan     0.090995        nan
10.865455       0.268023        nan     0.071562        nan
11.047273       0.013260        nan     0.109818        nan
11.229091       0.016527        nan     0.109217        nan
#Window         Free    +/-  
#0      0.000000        nan
#1      0.140395        nan
#2      -0.095729       nan
#3      -0.155083       nan
#4      -0.186455       nan
#5      -0.196517       nan
#6      -0.188120       nan
#7      -0.159148       nan
#8      -0.103205       nan
#9      -0.011637       nan
#10     0.124413        nan

We can have a FE curve using the first part. At the same time, we can obtain the probability distribution function based on the Boltzmann distribution equation (the fourth column).
The last part: these are the final F values from the wham calculation, and can be used
for computing weighted averages for properties other than the free energy.

The default unit is kcal/mol. 

Sunday, September 29, 2013

As a Chinese, how to write good English papers

I think if, as a Chinese scholar, you are not very confident to think in English, you should think in Chinese first. After you have clear logic and ideas to know how to organize contents of your papers, you can write your English versions.

The following Chinese contents is from CCTHERE. Thanks for the author's sharing.
英语学习的另一视角:写和说的关系   

如何提高写作,特别是学术文章的写作呢。建议由以下几点入手,一步一步。
1. 彻底忘掉所谓的技巧和速成。这不是去参加语言考试,你的目的是要把你自己的观点优雅大方地和别人交流,不是去增加几个得分点。
2. 学习。学习什么呢?通过阅读别人的文章来学习。现在有互联网了,方便的很,去经常浏览一下诸如经济学家,卫报(社论和读者来信)等部分。新闻网站就免了。河里也有很好的介绍。注意其中的复杂的句子的运用。
3. 开始写。开始写的时候要使用平实而详细的语言把事实说清楚,先不要考虑什么优美词语之类的(我至今还有印象小学三四年级写作文的时候,每每从小册子里翻一些所谓“优美词语”给自己空洞的文章润色,而最遗憾的是一直没有机会在我的作文里嵌入我曾经最欣赏的一句“东方露出了鱼肚白…”)。注意学术文章的目的是把事实和你的理论说清楚,不是要显得故做高深(题外话:个人感觉国内很多文章和教科书的主要目的就是要让人看不懂,本人感觉而已,看了不要太认真)。这个状态要注意的是语法的时态和冠词。还有,千万千万不要直接翻译你脑海中的中文句子(如果有的话),用简单清晰的英文表达就行了。
4. 提高。你可以开始试着用一些你看到和学到的复杂的句式了。除非特别需要,短句子能说清楚的就用短句子,长了大家都头痛。另外,多次阅读学术类文章后你会发现其中也有一些“八股”的成分在里头,也讲究一些“起承转合”的。你写的文章也要尽量使用类似的结构,这样同行阅读起来就顺畅一些。
5. 反馈。这时,你的师友恐成受害者了。但要有信心,经过如此这般的交流后,他们会乐此不疲,你文章的水平也就相当可以。
如果你慢慢地写作水平能到了上面的第4步,你会发现你再也不会为写Email花费多余的一点时间了,当然个别情况还有例外(比如写给你的老板或那个她/他)。你应该能描述复杂的现象,做幻灯片报告的时候也应该不会满屏文字,照章宣读,而是游刃有余,滔滔不绝了。


In the writing, the most often common mistakes by Chinese scholars are the usage of articles. For example, I realized that 67% of my mistakes are due to the usage of articles.

The following is copied from following link:
https://owl.english.purdue.edu/owl/resource/540/01/

What is an article? Basically, an article is an adjective. Like adjectives, articles modify nouns.
English has two articles: the and a/an. The is used to refer to specific or particular nouns; a/an is used to modify non-specific or non-particular nouns. We call the the definite article and a/an the indefinite article.
the = definite article
a/an = indefinite article
For example, if I say, "Let's read the book," I mean a specific book. If I say, "Let's read a book," I mean any book rather than a specific book.
Here's another way to explain it: The is used to refer to a specific or particular member of a group. For example, "I just saw the most popular movie of the year." There are many movies, but only one particular movie is the most popular. Therefore, we use the.
"A/an" is used to refer to a non-specific or non-particular member of the group. For example, "I would like to go see a movie." Here, we're not talking about a specific movie. We're talking about any movie. There are many movies, and I want to see any movie. I don't have a specific one in mind.
Let's look at each kind of article a little more closely.

Indefinite Articles: a and an

"A" and "an" signal that the noun modified is indefinite, referring to any member of a group. For example:
  • "My daughter really wants a dog for Christmas." This refers to any dog. We don't know which dog because we haven't found the dog yet.
  • "Somebody call a policeman!" This refers to any policeman. We don't need a specific policeman; we need any policeman who is available.
  • "When I was at the zoo, I saw an elephant!" Here, we're talking about a single, non-specific thing, in this case an elephant. There are probably several elephants at the zoo, but there's only one we're talking about here.

Remember, using a or an depends on the sound that begins the next word. So...

  • a + singular noun beginning with a consonant: a boy; a car; a bike; a zoo; a dog
  • an + singular noun beginning with a vowel: an elephant; an egg; an apple; an idiot; an orphan
  • a + singular noun beginning with a consonant sound: a user (sounds like 'yoo-zer,' i.e. begins with a consonant 'y' sound, so 'a' is used); a university; a unicycle
  • an + nouns starting with silent "h": an hour
  • a + nouns starting with a pronounced "h": a horse
    • In some cases where "h" is pronounced, such as "historical," you can use an. However, a is more commonly used and preferred.
      A historical event is worth recording.
Remember that these rules also apply when you use acronyms:
Introductory Composition at Purdue (ICaP) handles first-year writing at the University. Therefore, an ICaP memo generally discusses issues concerning English 106 instructors.
Another case where this rule applies is when acronyms start with consonant letters but have vowel sounds:
An MSDS (material safety data sheet) was used to record the data. An SPCC plan (Spill Prevention Control and Countermeasures plan) will help us prepare for the worst.
If the noun is modified by an adjective, the choice between a and an depends on the initial sound of the adjective that immediately follows the article:
  • a broken egg
  • an unusual problem
  • a European country (sounds like 'yer-o-pi-an,' i.e. begins with consonant 'y' sound)
Remember, too, that in English, the indefinite articles are used to indicate membership in a group:
  • I am a teacher. (I am a member of a large group known as teachers.)
  • Brian is an Irishman. (Brian is a member of the people known as Irish.)
  • Seiko is a practicing Buddhist. (Seiko is a member of the group of people known as Buddhists.)

Definite Article: the

The definite article is used before singular and plural nouns when the noun is specific or particular. The signals that the noun is definite, that it refers to a particular member of a group. For example:
"The dog that bit me ran away." Here, we're talking about a specific dog, the dog that bit me.
"I was happy to see the policeman who saved my cat!" Here, we're talking about a particular policeman. Even if we don't know the policeman's name, it's still a particular policeman because it is the one who saved the cat.
"I saw the elephant at the zoo." Here, we're talking about a specific noun. Probably there is only one elephant at the zoo.

Count and Noncount Nouns

The can be used with noncount nouns, or the article can be omitted entirely.
  • "I love to sail over the water" (some specific body of water) or "I love to sail over water" (any water).
  • "He spilled the milk all over the floor" (some specific milk, perhaps the milk you bought earlier that day) or "He spilled milk all over the floor" (any milk).
"A/an" can be used only with count nouns.
  • "I need a bottle of water."
  • "I need a new glass of milk."
Most of the time, you can't say, "She wants a water," unless you're implying, say, a bottle of water.

Geographical use of the

There are some specific rules for using the with geographical nouns.
Do not use the before:
  • names of most countries/territories: Italy, Mexico, Bolivia; however, the Netherlands, the Dominican Republic, the Philippines, the United States
  • names of cities, towns, or states: Seoul, Manitoba, Miami
  • names of streets: Washington Blvd., Main St.
  • names of lakes and bays: Lake Titicaca, Lake Erie except with a group of lakes like the Great Lakes
  • names of mountains: Mount Everest, Mount Fuji except with ranges of mountains like the Andes or the Rockies or unusual names like the Matterhorn
  • names of continents (Asia, Europe)
  • names of islands (Easter Island, Maui, Key West) except with island chains like the Aleutians, the Hebrides, or the Canary Islands
Do use the before:
  • names of rivers, oceans and seas: the Nile, the Pacific
  • points on the globe: the Equator, the North Pole
  • geographical areas: the Middle East, the West
  • deserts, forests, gulfs, and peninsulas: the Sahara, the Persian Gulf, the Black Forest, the Iberian Peninsula

Omission of Articles

Some common types of nouns that don't take an article are:
  • Names of languages and nationalities: Chinese, English, Spanish, Russian (unless you are referring to the population of the nation: "The Spanish are known for their warm hospitality.")
  • Names of sports: volleyball, hockey, baseball
  • Names of academic subjects: mathematics, biology, history, computer science

Wednesday, September 25, 2013

umbrella sampling learning

Q1: what is umbrella sampling?
The umbrella sampling applies bias energy to an interested system on some CVs. It is similar to heating a system. The motion of particles starts accelerating. The bare events, i.e. the some un-accessible near ground states, could be explored. The benefits of umbrella sampling is that US can obtain the relative free energy profiles.

Q2: what is free energy in simulation? Why free energy is used in MD simulations?

The thermodynamic free energy is the amount of work that a thermodynamic system can perform. The concept is useful in the thermodynamics of chemical or thermal processes in engineering and science. The free energy is the internal energy of a system minus the amount of energy that cannot be used to perform work. This unusable energy is given by the entropy of a system multiplied by the temperature of the system.

Internal energy has two major components, kinetic energy and potential energy. The kinetic energy is due to the motion of the system's particles (translations, rotations, vibrations), and the potential energy is associated with the static rest mass energy of the constituents of matter, static electric energy of atoms within molecules or crystals, and the static energy of chemical bonds. 
Enthalpy:  It includes the system's internal energy or thermodynamic potential (a state function), as well as its volume and pressure (the energy required to "make room for it" by displacing its environment, which is an extensive quantity).

Entropy: Entropy is a measure of the number of specific ways in which a system may be arranged, often taken to be a measure of disorder, or a measure of progressing towards thermodynamic equilibrium. The entropy of an isolated system never decreases, because isolated systems spontaneously evolve towards thermodynamic equilibrium, which is the state of maximum entropy.  Entropy is a logarithmic measure of the number of states with significant probability of being occupied. If all microstates have equal probability, the entropy is k_b*ln(the number of micro states)

In MD simulations, there are several common free energy types.
Common Free Energy Type
● Solvation Free Energy / Transfer Free Energy
● Binding Free energy
● Confomational Free Energy 


Ergodic hypothesis
time average = ensemble average

free energy difference:
ΔG = -RT ln (P1/P0)

Accurate calculations of absolute free energy is nearly impossible due to insufficient sampling in a
finite length and time scale simulation.  Need different methods to estimate free energy.
● Common method
- Thermodynamical integration
- Free energy perturbation
- Umbrella sampling
- Potential of mean force

Running US simulation
● Choose the reaction coordinate
● Choose the number of windows and the biasing potential
● Run the simulations
● Compute time series for the value of the reaction coordinate (histograms)
● Apply the WHAM equations