Package mekano :: Package atoms :: Module atomfactory
[hide private]
[frames] | no frames]

Module atomfactory

source code

Classes and functions for creating and managing unique atoms.

The main exposed class is AtomFactory.

Useful functions: convertAtom and convertAtomVector.

Classes [hide private]
  AtomFactory
A single AtomFactory makes unique atoms for the given objects.
Functions [hide private]
 
convertAtom(oldAF, newAF, atom)
Convert an atom from one AtomFactory to another.
source code
 
convertAtomVector(oldAF, newAF, av)
Convert an AtomVector from one AtomFactory to another.
source code
Variables [hide private]
  __package__ = 'mekano.atoms'
Function Details [hide private]

convertAtom(oldAF, newAF, atom)

source code 

Convert an atom from one AtomFactory to another.

Parameters:
  • oldAF - The old AtomFactory to which atom belongs
  • newAF - The new AtomFactory
  • atom - The atom to convert
Returns:
The converted atom
Raises:
  • Exception - If atom cannot be found in oldAF

convertAtomVector(oldAF, newAF, av)

source code 

Convert an AtomVector from one AtomFactory to another.

Parameters:
  • oldAF - The old AtomFactory to which AtomVector av belongs
  • newAF - The new AtomFactory
  • av - The AtomVector to convert
Returns:
The converted AtomVector