biocrnpyler.Complex

class biocrnpyler.Complex(*args, **keywords)[source]

Metaclass for creating chemical complexes.

Complex is not a class that gets instantiated - it creates ComplexSpecies and OrderedComplexSpecies. The Logic encoded in the __new__ function is used to insert these classes into the binding sites of OrderedPolymerSpecies.

arguments: species: a list of species to put into ComplexSpecies or OrderedComplexSpecies

keywords: ordered: whether to produce an OrderedComplexSpecies (default = False)

This function effectively produces the instance of the correct Species Class based upon the arguments passed in.

Cases: Here species refer to the Species in the Species list passed into the construct. 1. No Species have parents.

Produces: an ComplexSpecies or an OrderedComplexSepcies

  1. A single Species S has a parent which is an OrderedPolymerSpecies with no parent. Produces: an OrderedPolymerSpecies with a ComplexSpecies or OrderedComplexSpecies containing S in S’s location in the OrderedPolymerSpecies.

  2. [Error Case] Multiple Species S have parents which are OrderedPolymerSpecies without parents.

  3. [Error Case] Entire OrderedPolymerSpecies inside PolymerConformations are being Complexed Together

  4. One or More Species S have parents which are OrderedPolymerSpecies with parents and/or PolymerConformations Produces: a (Ordered)ComplexSpecies containing all S inside a PolymerConformation which merges all PolymerComformation Complexes.

__init__()

Methods

__init__()