Friday, 27 November 2009

TwirlyMol (2)

It looks like I cannot show more than two molecules on one page. Here is the third one I wanted to show (you may have to click the header of this post to see it):

For molecules that are not in their data base I can enter the molecule as InChI (which I can create through open babel).

This is the molecule of my Master's thesis [2,2'-bipyridyl]-3,3'-diol with the InChI 'InChI=1/C10H8N2O2/c13-7-3-1-5-11-9(7)10-8(14)4-2-6-12-10/h1-6,13-14H'.

[To correctly translate it into a form that the browser interprets correctly, I can convert it on their homepage (I enter the InChI and take the converted one from the link it produces). Then it looks like this: 'InChI%3D1/C10H8N2O2/c13-7-3-1-5-11-9%287%2910-8%2814%294-2-6-12-10/h1-6%2C13-14H']
[Edit:] The problem was that I did not put the 'InChI=' prefix and it is not necessary to do this conversion.




In fact the molecule should be all in one plane and have intramolecular hydrogen bonds but it is still cool that the tool can create the structure from just one line.

TwirlyMol

The Chemical Identifier Resolver-TwirlyMol tool (for more information: Noel's post) is pretty cool. All I have to do is enter two lines of code to get an interactive look at my molecule.

For example this would be 'adenine' (the tool recognizes the word and produces the correct structure)


Or 'acetylcholine':



So far I have been using jmol for these things. jmol is more powerful but it also takes much longer to load and it has some problems when several applets are open on the same page. And for me there is the problem right now that all my applets will stop working when they delete my account at my old university (and I don't know if I feel like setting it up somewhere else and rewriting the links). Check them out a last time at the images label. On a bad day firefox may freeze if you do so ... but it is still worth it.

Monday, 16 November 2009

Density (2)

For a long time I did not understand the connection between density matrices as shown in my other post and density matrices as they are used in quantum chemical programs. On first sight it is not quite apparent that you can get the matrix representation of the 1-particle density matrix in an orbital basis in the following way:



The operators in the second expression are the creation and annihilation operators from second quantization. The expression means: you take an electron out of orbital j, put it in orbital i, and overlap this wave function with the original wave function. Note that the first scalar product is in 1-particle space, the second one in n-particle space.

To reach this conclusion you just have to write it out explicitely and rotate the integrals a little bit. With the definition from the other post, it looks like this.



As a next step you also write out the n-1 integrations that are involved in the density matrix definition.



You rearrange it a little bit:



The crucial point is the interpretation of the terms in the parentheses. To do this, we expand our wave function in Slater determinants constructed from an orthonormal orbital set including φi and φj. Formally we can construct any wave function in this way in a complete CI expansion.

The question reduces to: How does multiplying with an orbital and integration change one such n-particle determinant? - If the determinant contains the orbital, one obtains the (n-1)-particle determinant where this orbital is taken out. If it does not contain the orbital (and therefore only orthonormal orbitals) one obtains 0. This operator is usually called annihilation operator and written as ai.



We may rewrite this equation with the adjoint operator.[1]



This offers an expression that can be efficiently evaluated. In a determinant basis all you would have to do is check whether the orbitals are present for every pair of determinants - no explicit integrations or things of that sort are needed.



[1] The adjoint operator is usually called creation operator. It adds an orbital to a determinant or makes it 0 if the orbital is already there. The explicit definition would be something like multiplying with the orbital and antisymmetrizing the expression.

Another interesting point here is that we have scalar products (= matrix elements) with different numbers of particles. For every k, the k-particle space is constructed as a Hilbert space, i.e. you can form scalar products. It is not possible to have a scalar product between wavefunctions of different particle numbers. Therefore the direct sum of all k-particle spaces (called Fock space) is indeed a vector space but not a Hilbert space. edit: you can construct the Fock space as a hilbert space if scalar products with different numbers of particles are just zero.