Macromolecular Self-Assembly: Simulation and Optimization