A machine learning algorithm for studying how molecules self-assemble and function - Nature Computational Science