- NAME
- tsurf — Computes the isosurface given a set of points.
- SYNOPSIS
- DESCRIPTION
- -sample number
- -expand number
- -contract number
- -smooth number
- -asa boolean
- ALGORITHM
- NOTES
tsurf — Computes the isosurface from a set of points.
tsurf ?options-value? listOfPoints
This command will compute the isosurface associated with a set of atoms or points. It first creates a mesh and places the atoms on it given their radius. It then creates the isosurface using the "marching cube" algorithm. It outputs a list containing all triangles and all normals required to draw the surface.
The input atoms or points are given as a list like :
{{x1 y1 z1 na1 id1} {x2 y2 z2 na2 id2} ... {xn yn zn nan idn}}
where x,y,z is the coordinate of the atom, na is the atomic number, and id is a unique id for the atom. Id is not used at present but will be
used in further developpements to calculate the contribution of atoms to a given triangle. In case of points, all na's will have the same value.
Below are described the parameters allowed :
- -sample number
- This defines the resolution of the grid, number being an integer. By default, sampling is set to 1 unit. A sampling of 3 means the grid step is 1/3 of unit.
- -expand number
-
Expands the mask number times. A mask expansion consists in counting for every non-mask point, the
number of neighbours which ARE in the mask. If this number (0-26) is greater than 1, the point is included in the mask. This adds one layer of points to the mask.
- -contract number
-
Contracts the mask number times. A mask contraction consists in counting for all points IN the mask the number of neighbours which are not in the mask. If the count is >=1, the point is excluded from the mask. This peels one layer of point to the mask.
- -smooth
-
Same as expand with a count >= 15.
- -asa
-
'asa' stands for 'accessible surface area'.
This option makes a crude approximation of the asa. Given a water molecule radius of 1.4A (the probe radius) and a grid sampling, it expands the mask until reaching the water radius.
The set of points is first transfered on a mesh which resolution is set through the -sample option. Each atom radius is converted into grid unit offsets. Each atom is then placed on the mesh, and the surrounding points correspoinding to its radius are set on. The smooth, expand, contract, and asa options are then carried out. The mesh is finally transfered to a "marching cube" algorithm to extract the isosurface.
The output is composed of two lists : the first one contains the description of all the triangles composing the isosurface. {x1 y1 z1 x2 y2 z2 ... xn yn zn}, and the second contains all the normals for each vertice of the triangle, i.e. the list is like {nx1 ny1 nz1 nx2 ny2 nz2 ... nxn nyn nzn}. The format of these lists is well suitad when using OpenGL vertex arrays.
Next version will include more parameters to control the "marching cube" part of the package.
Copyright © 2012 L. Moulinier & N. Wicker <luc.dot.moulinier(at)igbmc.fr>. All rights reserved.