Practical Session 03

Note that you can install the course download script cdl in your own bin directory and use it like any other shell command:

mkdir ~/bin
cd ~/bin
curl -O
echo 'export PATH=${PATH}:${HOME}/bin' >> ~/.profile

When you open a new shell (or reload you bash configuration file with . ~/.profile) you will have updated your PATH and the shell will find cdl. To download a file:

cdl 03

These files will be available for the duration of the course.

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]test_06_1.xyz2013-01-24 18:39 2.7K 
[   ]test_06_0.xyz2013-01-24 18:39 1.4K 
[   ]python.vimrc2013-01-23 17:46 421  
[TXT]pdb_downloader.sh2016-06-09 17:22 2.7K 
[TXT]p03_class.txt2013-01-24 17:38 11K 
[   ]cdl2013-01-23 18:22 1.6K 
[TXT]assignment_06.txt2013-01-24 18:39 6.6K 
[   ]Practical03IntroductiontoPython.pdf2013-01-24 21:18 119K 
[DIR]IntroductiontoPython/2013-01-24 17:37 -  
[   ]Ar_L16_N64.xyz2013-01-23 17:48 2.7K 

The notes for today's practical can be accessed in your browser Introduction to Python or as a PDF or text file, p03_class.txt.


The Python programming language is versatile, not too hard to learn, and very useful. For learning Python see

XYZ file format

The XYZ file format is a very simple format to store positions of particles. It is described in VMD's XYZ Plugin. Basically, a XYZ file looks like this:

title text
atom1   x y z
atom2   x y z
atomN   x y z

The first line is the number of atoms. The second a string. From the third line onwards, each line contains a symbol for the particle ("atomX") and the cartesian coordinates. All entries are white-space separated.