Universidad

Week 4

weekmenu | week1 | week2 | week3 |week5 | week6 | Project

4th week (Feb 28th- March 6th): Filters

The molecular dynamics technique bring us a lot of information about the atomic behaviour in a material. Including atomic positions velocities and accelerations. For this, the kind of analysis that we can realize for a single simulations could be wide and deep depending of the interesting property that we want focus on.

In order to reduce the number of work in the analysis and on the variety of systems that we can analyze. The lpmd program use a new kind of plugins called filters.

The filters are plugins that can filter information about the simulation cell, made the analysis more easy on the structure. The best way to understand this is a simple example.

If we need calculate the pair distribution function of a extremely big cell, sometimes we are only interested in one atomic species. So previously we can discard a different atomic species using filter. Consider a GeO2 super-cell of 72 thousands atoms with one hundred different configurations. If we need only the Ge-Ge Pair distribution function. We can discard computational time with the oxygen atoms.

GeO2 simulation all atomsGeo2 simulation Ge atoms only.


A pair distribution function of the cell with all atoms take around 300 seconds and if we filter the oxygen analysis this calculation take 60 seconds. So for millions of atoms, this could be really important.

But the filter that lpmd program support is not only related to the atomic species we can use, different kind of filters too, between them we have :

  • box : We can select a box region of the space in the structure.
  • cylinder : We can select a cylindrical region of the space if the structure.
  • element : We can select specific element in the structure.
  • index : We can choose a group of atoms by their index number.
  • sphere : We can select a sphere region in the space.
  • tag : One of the more important filter. We can filter atoms by a tag with this tag we can assign different properties or modifications to this atomic group. We'll profound more in this filter in a couple of weeks. However a glance could be found in exercise 2.

Exercise number 1 - Filter by element and analyze.

Like every week, create your special folder for this week. Then copy the files from ~/claudial/tutor/week4/ex1.tgz to this week and unzip it!!. :)

The exercise 1 consist in realize a single filter conversion from a very big file of GeO2 with 72 thousands atoms. This file is called geo2.lpmd.

We will convert this file in a new one, using the filter-ge.control. Edit this file and take a look!! What do you specter that this file do? Execute with :

 lpmd-converter -r filter-ge.control

When the conversion has been finalized, take a look to the size of both files with the command

 ls -lh

What file is bigger? Why? Visualize both files using lpvisual with:

 lpmd-visualizer -i lpmd:file=geo2.lpmd -u lpvisual -r

and

 lpmd-visualizer -i lpmd:file=geo2-filter.lpmd -u lpvisual -r

you can note that the filter only keep the germanium atoms and eliminate the oxygen atoms in the simulation cell. Why is useful this? Because if we need for example only calculate properties related to the germanium atoms, will be faster analyze the filtered structure ;).

Run now the pair distribution function analysis for each structure, but this time we will use a special command ahead of the standard lpmd command, the idea is that this special command determine the exact time of execution :

 /usr/bin/time lpmd-analyzer -r gdr-full.control

Note that for this case, this can take around 5 minutes. Finally run for the filter structure, but before ensure that the analysis will be similar, check the each value in the file gdr-filter.control ensure that is the same that for the full case.

 /usr/bin/time lpmd-analyzer -r gdr-filter.control

Are different the times? Comment in the comment section :D. So if you have to do a long number of analysis: Will you use filters first?

Exercise number 2 - Filter different geometrical form and look, mixing filters.

But the filters, are not only by species, and we can mix different kind of filters using the special tag filter. Copy the file ~/claudial/tutor/week4/ex2.tgz to your week4 directory and unzip it.

First, this are some specific option of each kind of properties, you can check this with : lpmd -p plugin-name

  • sphere : radius, center
  • cylinder : origin, endpoint, rmax, rmin
  • box : x,y,z
  • tag : name, value
  • element : symbol
  • index : index

Now take a look to the files, you will found different control files and a structure.xyz file. The goal is apply different filters to this file and visualize.

Visualize first the original structure!!

 lpmd-visualizer -i xyz:file=structure.xyz,inside=true -u lpvisual -L 36.15

or

 vmd structure.xyz

Sphere: edit the control file select-sphere.control, analyze and then run this with

 lpmd-converter select-sphere.control

Visualize the input and output structure using :

 lpmd-visualizer -i xyz:file=file.xyz,inside=true -u lpvisual -L 36.15

Where file.xyz could be the input file (structure.xyz) or the outputfile (sphere.xyz). You can use the vmd visualizer if you want. Upload a figure of the structure here, If you don’t remember how take a picture, let me know ;).

Run the cylinder filter and the box filter control files. Edit and check the files in order to understand more about each filter. What means all in the box filter?

 lpmd-converter select-cylinder.control
 lpmd-converter select-box.control

Now take pictures of this structures and put here

Finally mix some filters. The mix of filters is a more complicated process. The reasons of this complication is because when you filter once the full structure change, so if you try filter again, the second filter will be realized after the first filter. In order to avoid this problem the tag filter could be used.

Take a look to the file select-mix.control. Edit this file, Can you understand the idea of the tag plugin? Explain in the comment section. If you don’t understand ask me ;).

Run this control file

 lpmd-converter select-mix.control

Visualize the output file. Is like you expected?. Upload the file here

Atomic colors

Usually the programs that you will use for visualize tha configurations of a system have specific colors for each atom. One characteristic of the ".lpmd" file format is that allow that you can allocate information of the color of the atom.

Why we'll need paint atoms? Easy! imagine that you want highlight some specific properties of all atoms, for example the kinetic energy = (1/2) m/v^2 where v is the atomic velocity of the atom. In order to distinguish what atom is moving 'more' that others. Interesting! Is isn't?

For this kind of analysis lpmd program have a special plugin called propertycolor. This plugin allow that you can paint atoms by some specific property. Unfortunately this format until now is only supported by lpvisual, so you can't see this colors in others programs like vmd. The plugin property color support the temperature property, that like probably you remember is related with the velocity of the atoms.

Exercise number 3 - High initial temperature.

Copy from ~/claudial/tutor/week4/ex3.tgz to your week4 directory, now untar the files, you will see one simulation file called high-temp.control. Edit and check the section about propertycolor. If is not clear to you, let me know.

Run the simulation with :

 lpmd high-temp.control

This simulation take around 5 minutes. Now you can see the output file with :

 lpmd-visualizer -i lpmd:file=high-temp.lpmd -u lpvisual:paused=true -r 

The display window will star paused, so in order to start to visualize you can press the key p. You will note that the big difference between the initial state and the later state starter immediately in the simulation. We reach some ‘kind’ of thermodynamical equilibrium immediately. So take a better look in the next example.

Exercise number 4 - Heating a sample and colors.

Copy from ~/claudial/tutor/week4/ex4.tgz to your week 4 directory, uncompressed the files. you will see 1 simulation file called high-temp-scaled.control. Edit and take a look in this control file we will heat a sample and then frozen (two temperature scaling process).

Run the simulation with :

 lpmd high-temp-scaled.control

This simulation will take around 10 min.

If you check correctly the file, the first process (heating) take the sample and apply temperature from 0 to 500 K in 20 thousands steps. Later in the step 25 thousands we start to frozen the sample from 450K to 80K until 45thousands and finally ‘free’ the sample until 60 thousands steps.

You can see all simulation with :

 lpmd-visualizer -i lpmd:file=high-temp-scaled.lpmd -u lpvisual:paused=true -r -O delay=0.1

The option delay is used to ‘delay’ the visualization of the file in 0.1 seconds each step.

Try with different views (key o) and look the temperature during the visualization (key F3). Is more order or disorder movement when the temperature increase?

The visualization was like you expected? comment in the comment section.

hannah?03 March 2011, 12:29

Using the filters greatly reduced the time when analyzing the different sets of data (like pair distribution functions). I would definitely use filters to make the whole process run quicker.

The disorder in the sample when up as temperature did, so yes, this visualization went as I expected it to.

''.Keep(str_replace(array('$Chrono','$PostTo','$AccessCode'), array('chrono','',RandomAccess()), FmtPageName($GLOBALS['CommentBoxFmt'],$pagename)))

University

Personal

edit SideBar