Surfaces¶
- class SurfaceHandle¶
TODO
- Attach(entity, cutoff)¶
Attach an
EntityHandle
orEntityView
to a molecular surface. For each vertex of the surface, the atom which is closest to this vertex and within the cutoff distance is attached. Like this, the atom and its properties can be retrieved efficiently, which is e.g. used for coloring a surface according to the underlying entity (seegfx.Surface.ColorBy()
).Be aware that increasing the cutoff distance will significantly increase the time needed to attach an entity to the surface.
- Parameters:
entity (
EntityHandle
,EntityView
) – entity to be attached to the surfacecutoff (float) – distance cutoff
- Return type:
None
- FindWithin(position, cutoff)¶
Returns all
surface vertices
within a certain cutoff distance of a specified position.- Parameters:
position (
Vec3
) – positioncutoff (float) – distance cutoff
- Return type:
- GetTriIDList()¶
Returns a list containing all IDs of all triangles of a surface.
- Return type:
list of ints
- GetVertex(id)¶
Returns a
SurfaceVertex
with the specified ID.- Parameters:
id (int) – vertex id
- Return type:
- GetVertexIDList()¶
Returns a list containing all IDs of all vertices of a surface.
- Return type:
list of ints
- Invert()¶
Does an in place inversion of all vertex normal vectors.
- Return type:
None
- class SurfaceVertex¶
TODO
- SurfaceVertex()¶
- SurfaceVertex(pos, norm, type, atom)
Creates a new SurfaceVertex.
- Parameters:
pos (
geom.Vec3
) – vertex positionnorm (
geom.Vec3
) – vertex normal vectortype (int) – vertex type
atom (
AtomHandle
) – attached atom
- Atom¶
AtomHandle
attached to the surface vertex.The AtomHandle is invalid, if no
EntityHandle
has been attached or if no atom was found within the cutoff distance.See
SurfaceHandle.Attach()
for further details.- Type:
- class SurfaceVertexList¶
- append(vertex)¶
Add a single surface vertex.
- Parameters:
vertex (
SurfaceVertex
) – surface vertex- Return type:
None
- extend(list)¶
Add a list of surface vertices.
- Parameters:
list (
SurfaceVertexList
) – list of surface vertices- Return type:
None