PERL Programming III: Modelling DNA Thermodynamics

After a long pause, the adventure in the PERL programming language series continues with another example of biophysics and molecular biology science application.This time, we are going to make a program to model the effect of the temperature on DNA stability in solution.

The effect of temperature DNA structure integrity plays an important role in molecular biology applications. For example, the DNA amplification method based on polymerase (the PCR method) is based on a series of temperature cycles to separate the two strand of DNA to replicate. DNA primers are used to initiate the process and the knowledge of their melting temperature (Tm) play an important role in optimizing the DNA amplification process.

The first attempts to create a model of DNA thermodynamics date back to the beginnings of 1960. Studies pionered by the groups of Zimm [1] and Tinoco [2], have shown that the relative stability of a double-stranded DNA molecule depends primarily on the nature of the nearest-neighbor bases along the sequence. This finding brought to the formulation of a simple mathematical model (called the nearest-neighbor (NN) model) to predict relative stabilities of double stranded DNA according to the nucleotide sequence [see Cantor]. Subseguently, the NN model was further improved by the contribution of several research groups. In particular, Santalucia and co-workers. proposed a set of parameters for the NN model that provides an excellent prediction of the thermodynamic properties of short DNA homo oligonucleotides and are commonly used to calculate the stability of DNA primers used for PCR applications.

In this third article on PERL programming, I will give some indication on how to implement a simple version of the NN model. To make more fancy the programming task, we are also going to provide the program with a simple Graphical user interface using PERL/Tk.

Continue reading

Exploring the Lotus Effect using Candle Soot

Also, this Instructable is the results of some home experiments that I did some time ago (see also my previous article). It shows how to prepare these simple surfaces and make some interesting observations with them. Like the previous two Instructables, my family help me a lot in preparing it in the very short time of one day. So a big thank you to my wife, Francesco, and, in particular, to Leonardo.

Hydrophobic and super-hydrophobic surfaces are ubiquitous in the natural world. You do not need to search much to find good examples: just walk out in your garden after a light rain and look at the plenty of weed leaves pearly decorated by water droplets. If you have an ornamental pond, you may have even the chance to see floating better examples of plants having a super-hydrophobic surface. Notably, wettability in Nature is present in a different form that subtle differences in the function and effect on the water droplets. Plant leaves need to keep their surfaces clean for light-harvesting efficiency. A water repellent leaves let water drops roll over its surface and mechanically remove dust particles. This effect was first noted on leaves of the Lotus plant, and for that reason, it is also called the Lotus effect.

Several novel technological materials exploit the properties of super-hydrophobic. For example, in your kitchen, Teflon pans are used to avoid sticking food residuals and therefore easily cleaned. Your car windows are teated to let the water easily roll over the surface. 

Candle soot is an artificial material that is easy to produce and can be used to demonstrate some of the properties of the (super)-hydrophobic surface existing in nature.

The Mighty Roto-Microscope

I am happy to announce our second Instructable project. Like the first one, it was a long-standing idea that was rolling in my mind for a long time. The current limited travelling mobility due to the COVID offered more time to develop this idea during my vacation. In a joyful collaboration with my son Leonardo, we managed to realize this useful device in a very short time.

This project aimed to develop a device that integrated with a cheap USB microscope allows taking 3D pictures of small samples. The project is meant to be an education STEM activity to learn using Arduino, 3D image reconstruction, and 3D printing by creating a useful piece of equipment for doing some exciting science activity. Like my previous project, it is also a moment to share good and educative time with my family and in particular, my elder son Leonardo that helped me in creating this instructable and evaluating the device as an enthusiastic STEM student. This time, also my lovely wife helps me to make a video of the assembly of the equipment!

The roto-microscope allows controlling the position of a simple USB microscope around the sample. This allows to take accurate pictures from different angles and not just from the top as in the traditional microscopes. This is not a new idea as there are professional microscopes. However, this device means to be affordable for a student and still provides some similar results and a lot of fun in building it. Other similar and excellent OpenSource projects are available (see, for example, the Ladybug microscope, the Lego microscope, and the OpenScan project), our project adds an additional option and I hope that you enjoy making it as we did!

If you find it an interesting device then instructions on how to build it are on our Instructable.

The Magic Sand Slicer

We have published for the first time a project on Instructables: a website specialised in publishing interesting DIY projects by an effervescent community of makers and educators.

The project is called the Magic-Sand Slicer and it is an education project initially conceived as a STEM activity to learn using Arduino, a 3D printer, and some exciting science. It is also a collaboration with my son Leonardo who helped me in evaluating the device as a STEM student. We have learned a lot together, and we want to share the results of this long journey. This project aims to create a device that automatically makes sections of a cylinder of easy-to-cut coloured material. That can be used for practising 3D image reconstruction of the coloured blogs hidden in the column. The so-called Magic-Sand (c), also known with other trademarks names, becomes suitable for this experiment.
What is the point of making pictures of thin layers of sand and then reconstructing it digitally? Is it just for the fun of it? It varies on who is using it. However, students and teachers from different disciplines (e.g. geology, biology, medical) can find it a helpful education device to practice with image reconstruction from the serial sections. It could also be of interest to a geologist interested in sedimentary material plasticity to study rock and the secrets it beholds, or to a process, engineering to emulate the packing of fine granular materials. Finally, an artist can make a fantastic program of unravelling magic forms generated by packing coloured sand. 

I was surprised that the project got so much interest in a very short time and I thank the Instructable community for their nice welcome! If you like to know more about the project (and try it!) then you can read our instructable here.

I also just realized that the Instructable was reviewed on the Arduino blog site by the Arduino team!

Seminar Series: Molecular Dynamics Simulation of Biomolecules (Bremen 2004)

In this new series of posts, I will report the slides of some of the seminars/lessons that I have delivered in the past years. Some of the information is updated but still, there is a wealth of useful information. In some cases, I have also added descriptions of the contents of the slides for others you can refer to other posts or the original paper that I describe my research results.

I hope you enjoy them and remember to add your feedback and to subscribe to have email notifications about my new blog posts.

In the year 1648, Isaac Newton published his first edition of the Principia Mathematica, one of the greatest scientific masterpieces of all time. On page 12 of this magnum opus, the famous three laws that bear his name and from which classical mathematical physics evolved are enunciated. More than 350 years after that publication, the same laws, formulated to explain the motion of stars and planets, still remain valuable for us, when trying to simplify the description of the atomic world. In the first decades of the last century, the birth of quantum mechanics marked the beginning of the exact description of atomic physics. The equation of Schrödinger, to the same extent as Newton’s equations, allowed for the mathematically elegant formulation of the shining theoretical intuitions and the experimental data accumulated in the previous decades. Although in principle, this equation could be used in order to describe the physicochemical behaviour of any molecular system, it turns out to be impossible to resolve analytically, when the number of electrons in-game is larger than two. The invention of electronic computers, after World War II, facilitated the numerical solution of this equation for polyatomic systems. However, despite the continuous and rapid development of computer performance, the ab-initio quantum-mechanical approach to describe static and dynamic properties of molecules containing hundreds or even thousands of atoms, as for biological macromolecules, is still far from becoming a routine computational tool. In fact, this approach requires a number of calculations that can be proportional to N^{3-5}, where N is the total number of electrons in the system. To overcome this problem, it was clear since the beginning that a reduction, by means of ad hoc approximations, of the description of the dynamic behavior of atoms, using a classic physics model would be necessary. In the classical representation, the electrons on the atoms are not explicitly considered but their mean-field effect is taken into account. The first simulation of an atomic fluid using this approximation was performed approximately 63 years ago by Alder and Wainwright (1957). They developed and used the method in order to study simple fluids by means of a model that represented atoms as discs and rigid spheres. These first pioneer studies mark the birth of the classical molecular dynamics (MD) simulation technique. The successive use of more realistic interaction potentials has allowed obtaining simulations comparable to experimental data, showing that MD can be used as a valid tool for surveying the microscopical properties of real systems. The first simulations of this type were carried out by Rahman and Verlet (1964): in these simulations, a Lennard-Jones type potential was used in order to describe the atomic interactions of argon in the liquid state. Another very important hallmark in this field was the simulation of the first protein (the bovine pancreatic trypsin inhibitor) by McCammon and Karplus in 1977. In the following years, the success obtained in reproducing structural properties of proteins and other macromolecules led to a great spread of the MD within the studies of structural biology. The continuous increase of computer power and improvement of programming languages has concurred to a further refinement of the technique. Its application was progressively expanded to more complex biological systems, comprising large protein complexes in a membrane environment. In this way, MD is becoming a powerful and flexible tool with application in disparate fields reaching from structural biology to material science.

Continue reading

Modelling Forms in Nature: Easter Chocolate Eggs 2021

This year, your Highness, we will be featuring square eggs.
Peter Carl Fabergé

The Easter Math Bunny is back again, and he is talking again of … eggs!


Two years ago, I ended my blog with a question, “What about chocolate egg shapes?” It is now the time to give some answer. If you have read my previous articles, I and many scientists and artists have been caught by the shape of the bird eggs. Several models have been proposed to reproduce the silhouette of bird eggs. Baker [1] proposed a simple two-parameters mathematical model based on projection geometry that was revealed to be versatile and accurate in producing the shapes of a large variety of bird eggs [1]. More recently, the model was used to perform a systematic and comparative study of the shape of 1400 bird eggs species [2].

Continue reading

Retro programming nostalgia V: L’Equilibrio e la Titolazione Acido/Base (Parte II)

Questo secondo articolo continua il mio personale viaggio retro-computazionale delle titolazioni acido/base. Nell’articolo precedente, ho mostrato come calcolare un equilibrio acido base per acidi e basi forti. In questo articolo, vengono descritte anche le subroutines per le titolazioni di acidi e basi deboli monoprotici. Il metodo che ho usato risolve in modo esatto il calcolo dei pH e si basa su articolo pubblicato sulla rivista di chimica “Rassegna chimica” da Prof Luigi Campanella (e Dr G. Visco) nel 1985. Ricevetti dall’autore stesso una copia dell’articolo quando frequentavo il suo corso di chimica analitica presso l’Università “la Sapienza” di Roma. Ricordo che scrivere un programma per lo studio delle titolazioni non solo fu divertente e stimolante ma mi aiutò molto a capire a fondo l’argomento. Pertanto raccomando il giovane lettore di provare a convertire il programma in un linguaggio moderno a voi più familiare (per esempio il Python) per meglio comprenderne il funzionamento.

Continue reading

Physical Chemistry: The Simple Hückel Method (Part II)

In the previous article, we have learned how to set up the Hückel determinant for an aromatic molecule based on the topology of the pi-bonds. In this second part, we are going to learn how to calculate from the determinantal equation both the eigenvalues and the eigenvectors, corresponding to the orbital energy and orbital functions of the molecular system.

Continue reading

A Practical Introduction to the C Language for Computational Chemistry. Part 3

Sphere. From Space, from Space, Sir: whence else?

Square. Pardon me, my Lord, but is not your Lordship already in Space, your Lordship and his humble servant, even at this moment?

Sphere. Pooh! what do you know of Space? Define Space.

Square. Space, my Lord, is height and breadth indefinitely prolonged.

Sphere. Exactly: you see you do not even know what Space is. You think it is of Two Dimensions only; but I have come to announce to you a Third — height, breadth, and length.

Square. Your Lordship is pleased to be merry. We also speak of length and height, or breadth and thickness, thus denoting Two Dimensions by four names.

Sphere. But I mean not only three names, but Three Dimensions.

Adapted from: 
Flatland: A romance of many dimensions by Edwin A. Abbott

ADVENTURE IN SPACELAND

In part 2 of this tutorial, we have learned how to use arrays and how to read atomic coordinates from a file. In the appendix, you can find an example of the solution to the exercises given in the previous tutorial.

In this third part, we are going to learn how to generate three-dimensional coordination of atoms in a cubic crystal lattice and how to calculate non-bonded molecular potential and the force acting among them.

Continue reading

A Practical Introduction to the C Language for Computational Chemistry. Part 2

In the first part of this introduction to C language, we have learnt the basic of the C language by writing simple programs for the calculation of the non-bonded interaction between two particles at variable distances. Some solutions to the first part exercises are reported in the appendix of this article.

In this second tutorial, we will learn how to use arrays data types and how to load them with a set of data read from a file. We will also use these data to perform numerical calculations and write results in output files.

Arrays and Pointers Datatypes

The program that calculate the energy of interaction between two particle doe not take in account the actual position in space of the two particle but only their distance. If we want to study the dynamics of a system composed by multiple atoms in a tridimensional space, it is way more convenient to represent the and calculate their interactions by using the coordinates directly to evaluate the distances.

Continue reading