Module gengeo :: Class ShapeList
[hide private]
[frames] | no frames]

Class ShapeList

 object --+    
          |    
??.instance --+
              |
             ShapeList

A list of 3D shapes to be inserted into a packing by replacing spheres with scaled versions of the specified shape. Shapes may be read from a shape database file and the probability with which a given shape is inserted into a packing may be specified.

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__reduce__(...)
helper for pickle
 
addGenericShape(...)
Adds a shape from a database file into the list
 
addHexShape(...)
Adds a hexagonal aggregate to the ShapeList

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 40
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__reduce__(...)

 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

addGenericShape(...)

 

Adds a shape from a database file into the list

Parameters:
  • db (string) - The filename of the database file
  • name (string) - The name of the shape to be added, as per database file
  • bias (int) - The bias of the new shape; in other words, how often it will be added
  • random (int) - Whether the shape should be orientated randomly at each insertion: 0 for not random, 1 for always random
  • particleTag (int) - the ID of each particle inside each inserted shape
  • bondTag (int) - the ID of each bond internal to each shape

addHexShape(...)

 

Adds a hexagonal aggregate to the ShapeList

Parameters:
  • bias (int) - How often the shape should be added
  • random (int) - 1 to randomly orientate this shape, 0 to have all constant