Fix to_dict and from_dict for Molecule to retian charge.