code: public static double getAvgTMScore(MultipleAlignment alignment)
  			throws StructureException {
  
  		List<Atom[]> trans = MultipleAlignmentTools.transformAtoms(alignment);
  
  		List<Integer> lengths = new ArrayList<Integer>(alignment.size());
  		for (Atom[] atoms : alignment.getAtomArrays()) {
  			lengths.add(atoms.length);
  		}
  		return getAvgTMScore(trans, lengths);
  	}
docs: Calculates the average TMScore of all the possible pairwise structure
  comparisons of the given alignment.
  <p>
  Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment
  length.
  
  @param alignment
  @return double Average TMscore
  @throws StructureException