forgi 2.0.0 documentation

«  forgi.threedee.model.coarse_grain module   ::   Contents   ::   forgi.threedee.model.descriptors module  »

forgi.threedee.model.linecloud module

class forgi.threedee.model.linecloud.CoordinateStorage(element_names, on_change=<function <lambda>>)[source]

Bases: _abcoll.Mapping

Provides a dictionary-like interface for the access to coordinates of elements, while the coordinates are actually stored as numpy array to allow for manipultion with array operations.

Parameters:
  • defines – The keys that will be used.
  • on_change – A function that will be called, whenever coordinates are changed. It will receive the key for which the coordinates are changed as sole argument.
get_array()[source]

Return a copy of the underlying numpy array.

is_filled

Returns True if all coordinates are set to somethiong different than nan.

on_change = None

on-change function is called whenever coordinates are modified.

rotate(rotation_matrix)[source]

Rotate all coordinates using the given rotation matrix.

class forgi.threedee.model.linecloud.LineSegmentStorage(*args, **kwargs)[source]

Bases: forgi.threedee.model.linecloud.CoordinateStorage

center()[source]
elements_closer_than(cutoff, ignore=[])[source]
Parameters:ignore – A set of tuples (element name-pairs) to ignore
get_direction(elem_name)[source]
rmsd_to(other)[source]
forgi.threedee.model.linecloud.profile(f)[source]

«  forgi.threedee.model.coarse_grain module   ::   Contents   ::   forgi.threedee.model.descriptors module  »