/// <summary> /// Refereshes molecules, leaving those already assigned intact /// </summary> public void RefreshMolecules() { foreach (Molecule molecule in Molecules.ToList()) { molecule.Refresh(); } AddNewMols(); }
/// <summary> /// Refereshes molecules, leaving those already assigned intact /// </summary> public void RefreshMolecules() { foreach (Molecule molecule in Molecules.ToList()) { if (molecule.Atoms.Count == 0) { //it's empty, trash it Molecules.Remove(molecule); } else { molecule.Refresh(); } } AddNewMols(); }