/** * Expand a set of atoms into all groups from the same structure. * * If the structure is set, only the first atom is used (assuming all * atoms come from the same original structure). * If the atoms aren't linked to a structure (for instance, for cloned atoms), * searches all chains of all atoms for groups. * @param atoms Sample of atoms * @return All groups from all chains accessible from the input atoms */ public static Set<Group> getAllGroupsFromSubset(Atom[] atoms) { return getAllGroupsFromSubset(atoms,null); } /**
Set<Group> allGroups = StructureTools.getAllGroupsFromSubset(atoms, GroupType.HETATM); List<StructureIdentifier> repeatsId = symmetry.getRepeatsID(); List<Structure> repeats = new ArrayList<Structure>(order);