Persistent
grasp_surface
Features >  Grasp_surface >  Persistent      [ site map ]
News
Features
Features
Download
Tutorials
Links
   

This example shows a simple animation using a grasp_surface object which is persistent from frame to frame. This means the surface data and properties are parsed only once at the beginning of the animation. This is very useful for big surfaces to be animated in a rigid-body manner, say using translations, rotations, or scaling.

This feature has been inspired from the MegaPOVweb  development, but adapted only to the grasp_surface object to make it very simple to use (and hopefully without bugs). However there are currently strong limitations since the grasp_surface must be a frame-level object. Typically you cannot define a persistent grasp_surface as a variable (so template surfaces won't work) or in a CSG block (e.g. union). As such, this feature is not designed to compete with MegaPOV.

Okay, now let's see how to simply rotate a molecular surface (and its bound ligand) around the vertical y axis. The rotation will be complete over the animation (360 degrees) in order to make it cylic. In POV-Ray, animations are performed using the clock variable (usually running from 0 to 1); this allows to get the same result for any number of frames. Rotations of the objects are thus simply controlled by this rotate y*360*clock instruction. Optimally we should use a single union, as following:

union
{
  #include "ligands.inc"
  grasp_surface{ ...  persistent }
  rotate y*360*clock
}  // this is not valid due to 'persistent'
but as mentionned this construction won't work (current limitation).

  A simple animation

Model used:

ligands.inc   stro3-grasp.p4g   stro3-scene.inc   stro3.srf.gz (9.6 Mbytes)
Crystal structure of the Stromelysin-3 (MMP-11) catalytic domain complexed with a phosphinic inhibitor mimicking the transition-state.

Anne-Laure Gall ¹, Marc Ruff ¹, Rama Kannan ², Philippe Cuniasse ³, A. Yiotakis, Vincent Dive ³, Marie-Christine Rio ², Paul Basset ²º and Dino Moras ¹*

¹ Structural Biology and Genomics Laboratory and
² Molecular and Cellular Biology of Breast Cancer,
I.G.B.M.C. (CNRS/INSERM/ULP), B.P. 163 F-67404 Illkirch Cedex, France
³ Protein's Study and Engineering Department, C.E.A. - Saclay, F-91191 Gif/Yvette Cedex, France

º Deceased April 18th, 1999.

J Mol Biol 2001 Mar 23;307(2):577-86
stro3
Actual size preview (352x288)

Download animation:
MPEG-1 stream (1.7 Mbytes)
10 seconds cyclic animation in PAL VideoCD format (352x288 @ 25 fps).

Pov4Grasp script:

#version 3.1;
#include "stro3-scene.inc"

// transformations
#declare view = transform
{
  scale <1,1,-SYSTEM>  // insure we are in the proper coordinates system
  translate -z*46      // translate to the space origin
  rotate y*360*clock   // perform a 360 degrees rotation around the y axis
}

// ligands
union
{
  #declare f = finish{ specular 0.75  roughness 0.01 }
  #include "ligands.inc"
  transform view
}

// molecular surface
grasp_surface
{
  "stro3.srf"
  colored_by potentials
  range <-15,0,15>
  persistent
  finish{ diffuse 0.7  specular 0.75  roughness 0.005 }
  transform view
}

Notes:
To perform a cyclic animation, the first and last frame must be different. POV-Ray provides a command-line parameter to do it automatically (+kc). Here are the full options used to render the animation of 250 frames in compressed Targa (TGA) format:

x-pov4grasp +i stro3-grasp.p4g +w352 +h288 +a0.3 +am2 +r2 +fc +b500 +kff250 +kc
 


Back to the examples and benchmarks


Valid HTML 4.01! Page last updated: Jun 20, 2002
Any comment or suggestion ?