Zaslat SMS: Theory and design of charged particle beams