Designed magnetic nanostructures