Collective Variable search using likelihood maximization