Implement python equivalents of the structure building functions.
genlattice might not exist anymore, as it has no real equivalent, instead being replaced with direct calls to object constructors. However, genmagst will need to be implemented in some form. This will be good for testing the work done in #73