Surfaces

class SurfaceHandle

TODO

Attach(entity, cutoff)

Attach an EntityHandle or EntityView 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 (see gfx.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 surface

  • cutoff (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) – position

  • cutoff (float) – distance cutoff

Return type:

SurfaceVertexList

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:

SurfaceVertex

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 position

  • norm (geom.Vec3) – vertex normal vector

  • type (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:

AtomHandle

Normal

Normal vector of the surface vertex.

Type:

Vec3

Position

Spatial position of the surface vertex.

Type:

Vec3

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

class SurfaceTriIDList
append(id)

Add a single triangle ID.

Parameters:

id (int) – trinangle vertex id

Return type:

None

extend(list)

Add a list of triangle IDs.

Parameters:

list (list of ints) – list of triangle vertex ids

Return type:

None

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

(Currently viewing dev) / 2.9.0 / 2.8 / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / 1.2 / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.