protected Set<NucleotideInteraction> parseInteractions(
			Map<String, Sequence> aSequenceMap, File aPdbFile)
			throws IOException {
		Set<NucleotideInteraction> interactions = new LinkedHashSet<NucleotideInteraction>();

		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;
			}
		}

		String line;
		boolean beginInteractionParsing = false;
		BufferedReader in = new BufferedReader(new FileReader(aPdbFile));

		while ((line = in.readLine()) != null) {

			if (line.startsWith("BEGIN_base-pair")) {
				beginInteractionParsing = true;
			} else if (line.startsWith("END_base-pair")) {
				break;
			} else if (beginInteractionParsing) {
				NucleotideInteraction interaction = this.parseInteraction(
						aSequenceMap, line);

				if (interaction != null) {
					interactions.add(interaction);
				}
			}
		}

		in.close();

		return interactions;
	}