code: private Group getCorrectAltLocGroup(Character altLoc) {
  		// see if we know this altLoc already;
  		List<Atom> atoms = group.getAtoms();
  		if (atoms.size() > 0) {
  			Atom a1 = atoms.get(0);
  			// we are just adding atoms to the current group
  			// probably there is a second group following later...
  			if (a1.getAltLoc().equals(altLoc)) {
  				return group;	}
  		}
  
  		// Get the altLocGroup
  		Group altLocgroup = group.getAltLocGroup(altLoc);
  		if (altLocgroup != null) {
  			return altLocgroup;
  		}
  		// If the group already exists (microheterogenity).
  		Group oldGroup = getGroupWithSameResNumButDiffPDBName();
  		if (oldGroup!= null){
  			Group altLocG = group;
  			group = oldGroup;
  			group.addAltLoc(altLocG);
  			chain.getAtomGroups().remove(altLocG);
  			return altLocG;
  		}
  		// no matching altLoc group found.
  		// build it up.
  		if (group.getAtoms().size() == 0) {
  			return group;
  		}
  		Group altLocG = (Group) group.clone();
  		// drop atoms from cloned group...
  		// https://redmine.open-bio.org/issues/3307
  		altLocG.setAtoms(new ArrayList<Atom>());
  		altLocG.getAltLocs().clear();
  		group.addAltLoc(altLocG);
  		return altLocG;
  
  	}
docs: Generates Alternate location groups.
  
  @param altLoc the alt loc
  @return the correct alt loc group