@Override
	protected Set<NucleotideInteraction> parseInteractions(
			Map<String, Sequence> aSequenceMap, File anOutputFile)
			throws IOException {
		// check that the sequence map is not empty
		if (aSequenceMap.isEmpty()) {
			throw new IOException("Empty sequence map! Nothing to do!");
		}
		Set<NucleotideInteraction> interactions = new LinkedHashSet<NucleotideInteraction>();
		// add phosphodiester bonds
		for (String chain : aSequenceMap.keySet()) {
			Nucleotide previousNucleotide = null;
			for (Nucleotide nucleotide : aSequenceMap.get(chain)) {
				if (previousNucleotide != null) {
					try {
						interactions.add(new PhosphodiesterBond(
								previousNucleotide, nucleotide));
					} catch (NonConsecutiveNucleotideException e) {
						e.printStackTrace();
					}
				}
				previousNucleotide = nucleotide;
			}
		}// for
		// add other interactions (adj stackings, non-adj stackings and
		// basepairs
		BufferedReader input = new BufferedReader(new FileReader(anOutputFile));
		String strLine;
		while ((strLine = input.readLine()) != null) {
			if (strLine.startsWith("Adjacent stackings")) {
				interactions.addAll(this.parseAdjacentStackings(aSequenceMap,
						input));
			} else if (strLine.startsWith("Non-Adjacent stackings")) {
				interactions.addAll(this.parseNonAdjacentStackings(
						aSequenceMap, input));
			} else if (strLine.startsWith("Base-pairs")) {
				interactions.addAll(this.parseBasePairs(aSequenceMap, input));
			}
		}

		return interactions;
	}