pygauss.isosurface module¶
Created on Mon May 25 15:23:49 2015
@author: chris based on add_isosurface function from chemview
-
pygauss.isosurface.
calc_normals
(verts, faces)[source]¶ from; https://sites.google.com/site/dlampetest/python/calculating-normals-of-a-triangle-mesh-using-numpy
-
pygauss.isosurface.
get_isosurface
(coordinates, function, isolevel=0.03, color=(255, 0, 0, 255), extents=(5, 5, 5), resolution=100)[source]¶ Add an isosurface to the current scene.
Parameters: - coordinates (numpy.array) – the coordinates of the system
- function (func) – A function that takes x, y, z coordinates as input and is broadcastable
using numpy. Typically simple functions that involve standard
arithmetic operations and functions such as
x**2 + y**2 + z**2
ornp.exp(x**2 + y**2 + z**2)
will work. If not sure, you can first pass the function throughnumpy.vectorize
. Example:mv.add_isosurface(np.vectorize(f))
- isolevel (float) – The value for which the function should be constant.
- color ((int, int, int, int)) – The color given in RGBA format
- extents ((float, float, float)) – +/- x,y,z to extend the molecule geometrty when constructing the surface
- resolution (int) – The number of grid point to use for the surface. An high value will give better quality but lower performance.