Automation and computer-assisted planning for chemical synthesis