code: public static List<Subunit> extractSubunits(Structure structure,
  			int absMinLen, double fraction, int minLen) {
  
  		// The extracted subunit container
  		List<Subunit> subunits = new ArrayList<Subunit>();
  
  		for (Chain c : structure.getPolyChains()) {
  			// Only take protein chains
  			if (c.isProtein()) {
  				Atom[] ca = StructureTools.getRepresentativeAtomArray(c);
  				logger.debug("Chain " + c.getId() + "; CA Atoms: " + ca.length + "; SEQRES: " + c.getSeqResSequence());
  				if (ca.length==0)
  					continue;
  				subunits.add(new Subunit(ca, c.getId(), null, structure));
  			}
  		}
  
  		// Calculate the minimum length of a Subunit
  		int adjustedMinLen = calcAdjustedMinimumSequenceLength(subunits,
  				absMinLen, fraction, minLen);
  		logger.debug("Adjusted minimum sequence length: " + adjustedMinLen);
  
  		// Filter out short Subunits
  		for (int s = subunits.size() - 1; s >= 0; s--) {
  			if (subunits.get(s).size() < adjustedMinLen)
  				subunits.remove(s);
  		}
  
  		return subunits;
  	}
docs: Extract the information of each protein Chain in a Structure and converts
  them into a List of Subunit. The name of the Subunits is set to
  {@link Chain#getId()}.
  
  
  @param structure
  Structure object with protein Chains
  @param absMinLen
  {@link SubunitClustererParameters#getAbsoluteMinimumSequenceLength()}
  @param fraction
  {@link SubunitClustererParameters#getMinimumSequenceLengthFraction()}
  @param minLen
  {@link SubunitClustererParameters#getMinimumSequenceLength()}
  @return List of Subunits