User:Kullito/sandbox

Introduction
Molden is a visualization program developed by Gijs Shaftenaar in Centre for Molecular and Biomolecular Informatics (CMBI), the Netherlands. It was created as a package for visualization of Molecular Density from computational chemistry software: GAMESS and Gaussian. It can also be used with other packages via the Molden file format: ORCA, MOLPRO. It can be used to visualize reaction pathways and vibrations apart from the Molecular Density. This package also offers the calculation and visualization of the Laplacian of the density and the fitting of partial atomic charges to the electrostatic potential among other features.

It also offers pre-processing capabilities like preparing a Z-matrix for a calculation.

Z-matrix editor
A usual problem for a computational chemist is the preparation of the input for a given program.

Usually the coordinates of all the atoms of the system must be included in the input file with other information like the basis set or the method and that will be used. The most difficult part of this work, especially when the molecule has a large number of atoms, is the specification of the geometry of the system and for do this, the Cartesian coordinates of all the atoms can be used, but there are another technique which is the Z-matrix. In the Z-matrix the position of all the atoms are defined by the internal coordinates that means bond distances, bond angles and dihedral angles.

When the system is small enough, Z-matrix can be built by hand, but when the system has a lot of atoms, this is a very hard work. Nevertheless, Molden has  Z-matrix editor that is a powerful tool to construct the Z-matrix and with this editor, the user can modify the internal coordinates directly or move the atoms in the graphical interface and the internal coordinate will be modify itself automatically. Then, the geometry of the system created with this editor can be saved as Cartesian coordinates or Z-matrix.

Molden as a post-processor
Using the output files of different programs, Molden can process all this information and visualize the result in the graphical interface. In the following sections, some important examples of visualization will be shown.

Visualization of reaction paths and normal modes
One use which is very useful is the visualization of the reactions paths for one chemical reaction or for a geometrical optimization. In this cases, the total energy of the system changes with the conformation of the molecule and with Molden the user can see this geometrical changes.

Other important example of this use of Molden , is the possibility of visualize the normal modes of vibration of the molecules, and the program allows the user to create animation files like GIF files.

Difference density
The change in the electron density due to the bond formation can be analysed by studying the difference density. The previous value can be obtained and visualized in Molden by two ways: applying an algorithm that uses spherical symmetrically atomic densities or another one that employs oriented non spherically symmetric atomic densities. The most common situation is the one that requires the first cited algorithm. However, the presence of degenerate ground states defined as a linear combination with non spherically oriented terms can even induce an orientation in the free atom and therefore it requests the need of the oriented non spherically algorithm.

Molecular orbitals
Molden allows the visualization of any molecular orbital and displays directly the HOMO orbital. The orbitals are listed from lowest to highest energies along with their electronic occupation. Furthermore, the electron density contour can be modified just by changing the space value.

The Laplacian of the electron density
The importance of the Laplacian resides in the information that arises respect to the bond between two atoms such as the depletion or concentration of the charge. Molden computed the Laplacian electron density by extracting the trace of the Hessian matrix. To perform the correspondent derivatives to the atomic orbitals, the latters are described as Gaussian type orbitals expressed in Cartesian Coordinates.

Distributed multipole analysis
The calculation of the interaction energy of two molecules, as implemented in all force field based programs, is crucially dependent on a correct description of the electrostatic contribution. Most force field methods describe this term as a sum of Coulomb interactions between partial atomic charges. This however does not take into account the fact that an atom in the field of other atoms is polarized and exerts an electric force which is not equal in all directions. By representing the molecular charge distribution by a set of point multipoles on a number of centers (often atomic centers), the electrostatic interaction can be modeled far more accurately. Such a model automatically  includes the effect of lone pair and π electron density on the intermolecular forces and is widely used to model complex of polar and aromatic molecules, for prediction of protein pairs, and crystal structures. Calculations in the references quoted were performed with the Orient and DMAREL packages, where the latter is specifically designed of crystal structure simulations.

The Distributed Multipole Analysis has been described by Stone in general way, but explicit formulae for the required integrals have not been reported in the literature. Molden has incorporated the calculation of multipole moments according to the following formalism.

The Coulomb interaction of two charge distributions can be expressed as a multipole expansion in the form:

$$U_{elec}=(4\pi\epsilon_0)^{-1}\sum_{l_1l_2m_1m_2}[l_1l_2]R^{-(l_1+l_2+1)}Q_{l_1m_1}Q_{l_2m_2}S_{l_1,l_2,l_1+l_2}^{m_1m_2}$$    (1)

where $$[l_1,l_2]$$ denotes the numerical factor $$[(2l_1+2l_2+1)!(2l_2)!]^{1/2}$$, the $$Q_{lm}$$ describe the charge distributions, and S is a function of the relative orientation of molecules. The $$Q_{lm}$$ are complex for $$m > 0:$$

$$Q_{l,m}=(-)^{m}{1 \over \sqrt{2}}(Q_{lmc}+iQ_{lms}),$$$$Q_{l,-m}={1 \over \sqrt{2}}(Q_{lmc}-iQ_{lms})$$   (2)

A molecular charge distribution can be described as a set of multipole expansion at centers T, where T consiste of atomic centers and centers due to interatomic overlap density. According to the gaussian product theorem, the product of two gaussian type orbitals $$\phi^{A} $$ and $$\phi^{B} $$ centered at atomic positions A and B and with exponents α and β. is itself a gaussian function, centered at point T given by:

$$\overline{T}=(\alpha\overline{A}\beta\overline{B})/(\alpha+\beta) $$  (3)

In modern Ab Initio programs the AO`s are grouped in shells, where the s, p and/or d orbitals in a shell are a fixed linear combinations of the same primitive gaussians, and therefore all contibute to a given site T associated with a product of primitive gaussians. The $$Q_{lm}$$ are calculated as the expectation value of the regular spherical harmonics:

$$Q_{lmc}(T)=\textstyle \sum_{rs} \displaystyle P_{rs}d_{ri}d_{sj}\langle\phi_i|R_{lmc}|\phi_j\rangle $$      (4)

$$Q_{lms}(T)=\textstyle \sum_{rs} \displaystyle P_{rs}d_{ri}d_{sj}\langle\phi_i|R_{lms}|\phi_j\rangle $$

Here $$P_{rs}$$ is an element of the density matrix, r and s  run over all AO`s whithin shell I and II respectively and each AO  is expressed as a linear combination of gaussian primitive functions $$\phi_i:AO_i=\textstyle \sum_{r} \displaystyle d_{ri}\phi_i $$.

A multipole expansion about the point T can be represented as a multipole expansion about any other point S by means of the formula:

$$Q_{lm}(S)=\sum_{k=0}^l\sum_{q=-k}^k\left [ \binom{l+m}{k+q} \binom{l-m}{k-q}\right ]^{1/2}Q_{kq}(T)R_{l-k,m,q}(S-T) $$   (5)

Thus the proliferation of expansion centers can be reduced by shifting some or all the overlap charge distribution to the atomic centers. Molden offers three schemes for shifting the overlap charge distribution: Molden calculates the multipole moments up to the hexadecapole (rank=4), since explicit terms in Equation 1 are only available up to the hexadecapole moment.
 * shift all overlap density to the atomic sites (default)
 * shift all overlap density to the nearest atomic site or to a site halfway between the bonds
 * only shift overlap density between non bounded atoms

We now turn to explicit formulae for the integrals of type $$\langle\phi_i|R_{lmc}|\phi_j\rangle $$. The regular spherical harmonics cana be written as a linear combination of powers of Cartesian coordinates $$R=\textstyle \sum_{r}r_rx^{l_r}y^{m_r}z^{n_r} \displaystyle $$ and

$$\langle\phi_i|R_{lmc}|\phi_j\rangle = \sum_{r}g_r\langle\phi_i|x^{l_r}y^{m_r}z^{n_r}|\phi_j\rangle $$    (6)

An expression for $$\langle\phi_i|x^{l_r}y^{m_r}z^{n_r}|\phi_j\rangle $$ can be derived inn alalogy fir that of the overlapintegrals as described by Saunders:

$$\langle\phi_{l_1m_1n_1}^{A}|x^{l_r}y^{m_r}z^{n_r}|\phi_{l_2m_2n_2}^{B}\rangle=exp [-\alpha\beta(\overline{AB})^2/(\alpha+\beta)]I_xI_yI_z $$   (7)

in which:

$$I_x=\sum_{i=0}^{l_1+l_2}f_i(l_1,l_2,\overline{TA_x},\overline{TB_x})\int\limits_{-\infty}^{\infty} x^{i+l_r}e^{-(\alpha+\beta)x^2}dx =\sum_{i=0}^{l_1+l_2}f_i(l_1,l_2,\overline{TA_x},\overline{TB_x})\frac{(2(i+l_r)-1)!!}{(2(\alpha+\beta))^{i+l_r}}(\frac{\pi}{\alpha+\beta})^{1/2}\delta(i+l_R) $$    (8)

with $$\delta(k)=0 $$ for odd k and $$\delta(k)=1 $$ for even k, $$\overline{TA_x} $$ is the x  component of the vector connecting atomic center A  with the center of the gaussian product T, $$\overline{TA_x}  $$ is the x component of the vector connecting atomic center B  with the center of the gaussian product T,$$(\overline{AB})^2=(\overrightarrow{A}-\overrightarrow{B})\centerdot(\overrightarrow{A}-\overrightarrow{B}, (2l-1)!!=1 \text{x}3\text{x}\text{5}\centerdot\centerdot\centerdot(2l-1) $$and

$$f_k(l_1,l_2,\overline{TA_x},\overline{TB_x})=\sum_{i=0,l_1}^{i+j=k}\sum_{j=0,l_2}(\overline{TA_x})_x^{l_1-i}\binom{l_1}{i}(\overline{TB_x})_x^{l_2-j}\binom{l_2}{j} $$  (9)

Expressions for $$I_y $$ and $$I_z $$ can be obtained by replacing l with m and n respectively and replacing x by y and z respectively. Molden can thus calculate distributed multipole moments for ab initio wavefunctions as read from the outputs of the befere mentioned Computational Chemistry packages. These distributed multipole moments can be used to calculate an approximate electrostatic potentials using the expression for the Coulomb interactions of two multipole expansions described above. The distributed multipole moments are also used to generate input for the DMAREL program.

The electrostatic potencial and ESP derived charges
An alternative to the distributed multipoles are the point atomic charges. The methodology consists simply in fitting, with the common least-squares procedure, a monopole cantered in an atom to the molecular electrostatic potential (MEP). First of all, the equation that described the MEP is constituted by two terms; one that describes the classical repulsion between a proton charge and the nuclei charge and another one called Nuclear Attraction Integral. The latter term is computed in Molden by the Rys Polinomial Method and the Merz-Singh-Kollman scheme.

Some Features
Molden program has been tested on different platforms, namely Linux, Windows NT, Windows95, Windows2000, WindowsXP, MacOSX, Silicon Graphics IRIX, Sun SunOS and Solaris.

Ambfor, the main force field module of Molden, is an external program that can be initialized from Molden. Ambfor admits protein force field Amber and GAFF (General Amber Force Field). Use of Ambfor is automatic when a protein is studied with Molden. The GAFF force field is used only small molecules. Both Amber and GAFF are based on atomic charges. The differences are largely in computational cost, with GAFF being very expensive.

Molden can read several file formats with crystal information.