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

Write in C (Let it Be)

When I find my code in tons of trouble,
Friends and colleagues come to me,
Speaking words of wisdom:
“Write in C.”

As the deadline fast approaches,
And bugs are all that I can see,
Somewhere, someone whispers:
“Write in C.”

Write in C, write in C,
Write in C, oh, write in C.
LISP is dead and buried,
Write in C.

I used to write a lot of FORTRAN,
For science, it worked flawlessly.
Try using it for graphics!
Write in C.

If you’ve just spent nearly 30 hours
Debugging some assembly,
Soon you will be glad to
Write in C.

Write in C, write in C,
Write in C, yeah, write in C.
Only wimps use BASIC.
Write in C.

Write in C, write in C,
Write in C, oh, write in C.
Pascal won’t quite cut it.
Write in C.

Write in C, write in C,
Write in C, yeah, write in C.
Don’t even mention COBOL.
Write in C.

Parody Song by 
Brian Marshall

This series of tutorials will provide a short and practical introduction to the C language aiming students with interest in computational or physical chemistry. At the end of this tutorial, you will be able to write simple programs that can read data from files elaborate them and write the results of the calculations in output files. This tutorial is not a course in C programming language, therefore the motivated readers are encouraged to look for more comprehensive introductions to this language.

The tutorial is also based on OS based Unix systems such as Linux or MacOSX. Therefore, I recommed to give a look to my introductions to Unix OS:

Continue reading

Notes on the Quasi-Gaussian Entropy Theory Applied to Complex Systems

INTRODUCTION

The Quasi-Gaussian Entropy theory (QGE) is a theoretical method based on a novel statistical mechanics reformulation of the free energy distributions. It was originally developed by Dr. Andrea Amadei (University of Rome “Tor Vergata”, Italy) in collaboration with Prof Herman Berendsen, Dr. Emil Apol (the University of Groningen, The Netherlands) and Prof Alfredo Di Nola (University of Rome “La Sapienza”, Italy).  The foundations of the QGE theory are reported in a series of papers collected in the Ph.D. thesis of both Dr. Amadei and Dr. Apol cited in the bibliography. The theory was further developed and applied to different systems spanning from simple fluids to proteins.

In these brief note, the mathematical basis of QGE for the study of the thermodynamics of proteins in solution as in the Ref. [1] is detailed. 

Continue reading

Retro Programming Nostalgia: Commodore Amiga and Molecular Visualization

Italy 1989, it was the age of Commodore Amiga with its BOING demo, the bouncing ball that conquest the heart of the millions of young people living the microcomputer revolution.

Continue reading

Le Forze Intermolecolari

Le forze interatomiche o intermolecolari che tengono uniti i cristalli molecolari sono di origine elettrostatica e possono essere classificate in forze a corto e lungo raggio a seconda di quanto si estende nello spazio la loro azione. Essendo funzione della distanza tra gli atomi (o molecule), queste forze sono dei campi vettoriali conservativi e sono pertanto derivabili dal gradiente di un potenziale di energia scalare, ovvero {\mathbf{F} = - grad V}. Questi potenziali di energia  intermolecolari possono essere classificati in base al tipo di interazioni che descrivono. Continue reading

Il calcolo della costante di Madelung


In un precedente articolo è stato mostrato che il termine elettrostatico dell’energia reticolare di un cristallo contiene un fattore (A) che dipende dal tipo di reticolo cristallino. Ora esamineremo più in dettaglio come calcolare questo termine e il suo valore per un semplice sistema ionico.

L’energia potenziale totale di un cristallo ionico è uguale alla somma dei contributi di interazione elettrostatica del tipo

\displaystyle V_{AB} = \frac{1}{4\pi\epsilon_0} \frac{q_Aq_B}{r_{AB}}=k_e e^2   \frac{Z_AZ_B}{r_{AB}}\hfill (1)

degli ioni (A,B) di carica {q_A}=eZ_A e {q_B}=eZ_B (con e il valore dell’unita’ di carica elettronica e Z_{A,B} la carica netta dello ione)  separati dalla distanza {r_{AB}} .

Continue reading

PERL Programming II: Applications to Bioinformatics

This article is the second part of my previous introduction to the PERL language. Here, I am going to show the use of the Perl language in simple bioinformatics applications. I will introduce by examples other aspects of this powerful language.

Continue reading

Introduction to the PERL Language

PERL is an acronym for Practical Extraction and Report Language. This scripting language was initially developed by Larry Wall with the intent to extend the potentiality of the awk and sed program for text manipulation and for Unix system administration tool. It takes the best features of many other languages, such as C, sed, and awk. In addition, Perl supports both procedural and object-oriented programming. Perl is the most popular web programming language due to its capability with text manipulation and rapid development cycle. The same capabilities began a precious support to bioinformatician to data mining the rapid accumulation of a large amount of genetic information from the molecular biology research. Continue reading

COMPUTER SIMULATIONS STUDIES OF PEPTIDES IN ORGANIC SOLVENTS AND COSOLVENTS: A SIMPLE DATABASE

SIMPEOS_LOGO
SIMPEOS is a simple hypertextual database that provides a list of peptides that have been studied using molecular dynamics simulations in non-aqueous solvents. Continue reading

The Molecular Dynamics Docking Method

Understanding the mechanisms of the molecular recognition has fundamental impacts in medicine and biotechnology. It plays an important role in discovering new drugs and in developing new biocatalyst. The theoretical study of these mechanisms has boosted the development of approximated but fast methods for screening large compound libraries and protein-protein complexes. Continue reading