Formation of a crystal nucleus from liquid