private void	updateResidueMap(String structure) {
		String model = structureToModelMap.get(getStructure(structure));
		String chain = getChain(structure);
		String spec = " #"+model+":."+chain;
		Map<Integer, String> sequenceNumberMap = new HashMap<Integer, String>();
		// This requires Java 7
		/* Pattern p = Pattern.compile("residue id #(\\d+):(\\d*)(?<insertion>[A-Z]?)(?<chain>\\.?[0-9A-Za-z]*) type ([A-Z][A-Z][A-Z])( index )?(?<seqnum>\\d*)");
		List<String> residueList = sendCommand(LISTRESIDUES+spec);
		int firstResidue = residueList.size();
		for (String line: residueList) {
			Matcher m = p.matcher(line);
			// System.out.println("From Chimera: "+line);
			if (m.find()) {
				if (m.group("seqnum") != null && m.group("seqnum").length() > 0) {
					int seqNumber = Integer.parseInt(m.group("seqnum"));
					// System.out.println("Found seqnum: "+seqNumber);
					if (m.group("insertion") != null && m.group("insertion").length() > 0)
						sequenceNumberMap.put(seqNumber, m.group(2)+m.group("insertion"));
					else
						sequenceNumberMap.put(seqNumber, m.group(2));
				} else {
					// TODO: Handle insertion codes!
					int res = Integer.parseInt(m.group(2));
					if (res < firstResidue)
						firstResidue = res;
				}
			}
		}
		*/
		// Java 6 version
		Pattern p = Pattern.compile("residue id #(\\d+):(\\d*)([A-Z])?(\\.?[0-9A-Za-z]*)? type ([A-Z]{3})( index )?(\\d*)?");
		List<String> residueList = sendCommand(LISTRESIDUES+spec);
		int firstResidue = residueList.size();
		for (String line: residueList) {
			Matcher m = p.matcher(line);
			if (m.find()) {
				if (m.group(7) != null && m.group(7).length() > 0) {
					int seqNumber = Integer.parseInt(m.group(7));
					if (m.group(3) != null && m.group(3).length() > 0)
						sequenceNumberMap.put(seqNumber, m.group(2)+m.group(3));
					else
						sequenceNumberMap.put(seqNumber, m.group(2));
				} else {
					int residueNumber = Integer.parseInt(m.group(2));
					if (residueNumber < firstResidue)
						firstResidue = residueNumber;
				}
			}
		}
		if (sequenceNumberMap.size() > 0)
			chainToSequenceNumberMap.put(structure, sequenceNumberMap);
		// System.out.println("First residue for "+structure+" is "+firstResidue);
		chainToFirstResidueMap.put(structure, firstResidue); // structure includes chain!
	}