jonasfrantz/gdpc2
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
gdpc2 - a program for visualising molecular dynamic simulations
Copyright (C) 2012 Jonas Frantz
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
My email : jonas@frantz.fi
GDPC Documentation
------------------
Contents
1. Background
2. Usage
3. Input file formats
4. Source files and compiling
5. Disclaimer
1. Background
gdpc2 has it's origins in the gdpc project. gdpc2 is the result of an effort
to port gdpc to gtk+ 3.x compatibility and to clean up the code.
gdpc was written as a replacement for dpc, a visualising tool for molecular
dynamics. dpc was written in the beginning of the nineties by Kai Nordlund
and had various problems with event handling. Kai asked me to take a look at
it, and fix it if I could. After writing the original sourcecode, Kai had
added many different features, leaving the code as a total mess. There was no
way of figuring out what was wrong with it, so I decided to try to write it
from scratch using gtk+.
2. Usage
gdpc2 is mainly and most easily used from the graphical initialization
window but for faster usage I recommend the command prompt. Using gdpc2:s
setupwindow is almost selfexplanatory, if you cant figure out what an option
does test it. From the command prompt the only necessary options to run gdpc2
are the column representations and the input file.
The column representations describe from what column gdpc2 tries to read
certain data, the first column respresents x, the second y, the third z and
the fourth t. If the input file s in xyz format the t column will be skipt
and the time will be read from the input datas headers.
The usage of the program is pretty easy to learn and by doing some testing
with it you should learn to master it.
To demonstrate gdpc2 I have included som example input files liquid.out and
md.movie, the first being in general file format and the other in xyz file
format.
They can best be tested with the commands:
gdpc2 cube 30 m 2 d 20 erase 1 2 3 4 liquid.test
gdpc2 m 2 d 10 erase xyz 2 3 4 5 md.test
gdpc2 m 2 d 10 erase usetypes xyz 2 3 4 5 manytypes.test
3. Input file formats
The general file format consists of at least four coulmns of data, x,y,z and t.
gdpc2 will read data to each frame as long as the t column data stays the same,
after that it will plot the frame and start reading the next frames data.
The xyz file format consists of several frames with their own headers.
The header consists of two lines, the first consists of only one number the
number of atoms. The second line is a comment line and it is from this line
that gdpc2 searches for the time, actually it searches for the string "fs" and
when found it, takes the number before this string.
Then follows as many lines of atom data as was declared on the first row of
the header. After reading the data it expects another header directly after the
atomdata has ended.
4. Source files and compiling
main.c The programs main code can be found in this file. The confi-
guration of the window and calling other important functions
is handled here.
drawatoms.c This file contains functions relevant to the drawing of the
atoms to the pixmap and the rotating of the coordinates.
readinput.c This file contains the functions which handles reading the
data from the inputfile.
rotate.c This files contain functions that handle the buttons of the
rotations.
sort.c This file contains a function for sorting the coordinates.
colors.c In this file the settings of the colorschemes are made.
setup.c This file contains the functions for the graphical initialization
and setup window and everything related to it.
parameters.h This file contains default parameters for most options, the
version number and some basic structures.
To compile gdpc2 you have to have gtk+ 3.x installed on your system.
You can get gtk+ from http://www.gtk.org.
5. Disclaimer
I can not be held responsible if this program fucks up your computer. gdpc2 comes
with no warranty.