cadnano.part.part module

class Part(*args, **kwargs)

Bases: cadnano.cnobject.CNObject

A Part is a group of VirtualHelix items that are on the same lattice. Parts are the model component that most directly corresponds to a DNA origami design.

Parts are always parented to the document. Parts know about their oligos, and the internal geometry of a part Copying a part recursively copies all elements in a part: StrandSets, Strands, etc

PartInstances are parented to either the document or an assembly PartInstances know global position of the part Copying a PartInstance only creates a new PartInstance with the same Part(), with a mutable parent and position field.

changeInstanceProperty(part_instance, view, key, value, use_undostack=True)
destroy()
document()

Get this objects Document

Returns:Document
editable_properties = ['name', 'color', 'is_visible', 'grid_type']
getColor()
getInstanceProperty(part_instance, key)

Get an instance property

Parameters:
Returns:

object

getModelProperties()

Get the dictionary of model properties

Returns:dict – group properties
getName()
getOutlineProperties()

Convenience method for getting the properties used in the outlinerview

Returns:tuple – (<name>, <color>, <is_visible>)
getProperty(key)
Parameters:key (str) –
instanceProperties()

Generator yielding all instance properties

partActiveChangedSignal = <cadnano.cnproxy.DummySignal object>

self, is_active

partDocumentSettingChangedSignal = <cadnano.cnproxy.DummySignal object>

self, key, value

partInstanceAddedSignal = <cadnano.cnproxy.DummySignal object>

self

partInstancePropertySignal = <cadnano.cnproxy.DummySignal object>

self, view, key, val

partParentChangedSignal = <cadnano.cnproxy.DummySignal object>

self

partPropertyChangedSignal = <cadnano.cnproxy.DummySignal object>

self, property_name, new_value

partRemovedSignal = <cadnano.cnproxy.DummySignal object>

self

partSelectedChangedSignal = <cadnano.cnproxy.DummySignal object>

self, is_selected

partZDimensionsChangedSignal = <cadnano.cnproxy.DummySignal object>

self, id_min, id_max, zoom_to_fit

setDocument(document)

set this object’s Document

Parameters:document (Document) –
setInstanceProperty(part_instance, key, value)

Set an instance property

Parameters:
setProperty(key, value, use_undostack=True)

Get the value of the key model properties

Parameters:
  • key (str) –
  • value (object) –
  • use_undostack (bool, optional) – default True