void applySymmetry() {
    if (!needToApplySymmetry || !iHaveUnitCell) {
      initializeSymmetry();
      return;
    }
    atomSetCollection.setCoordinatesAreFractional(iHaveFractionalCoordinates);
    atomSetCollection.setNotionalUnitCell(notionalUnitCell);
    atomSetCollection.setAtomSetSpaceGroupName(spaceGroup);
    if (doConvertToFractional || fileCoordinatesAreFractional) {
      atomSetCollection.setLatticeCells(latticeCells);
      if (ignoreFileSpaceGroupName || !iHaveSymmetryOperators) {
        SpaceGroup sg = SpaceGroup.createSpaceGroup(desiredSpaceGroupIndex,
            spaceGroup, notionalUnitCell);
        if (sg != null) {
          if (Logger.isActiveLevel(Logger.LEVEL_DEBUG))
            Logger.debug("using generated space group " + sg.dumpInfo());
          atomSetCollection.setAtomSetSpaceGroupName(sg.getName());
          atomSetCollection.applySymmetry(sg);
        }
      } else {
        atomSetCollection.applySymmetry();
      }
    }
    initializeSymmetry();
  }