public static Map<String, CyIdentifiable> getPDBChains(String queryString, 
	                                                       Map<String, CyIdentifiable>reverseMap,
	                                                       Map<CyIdentifiable, List<PDBStructure>>chainMap)
					                                               throws Exception{
		Map<String, CyIdentifiable> newReverseMap = new HashMap<String, CyIdentifiable>();
		Map<String, PDBStructure> structureMap = new HashMap<String, PDBStructure>();

		URL url = new URL(RCSB_DESCRIBE+"?"+queryString);
		// System.out.println("Querying "+RCSB_DESCRIBE+" with query: \n-->"+queryString);
		Pattern r = Pattern.compile("<chain id=\"([A-Z])\"");
		Pattern s = Pattern.compile("<structureId id=\"(.*?)\"");
		String structure = null;
		HttpURLConnection con = (HttpURLConnection) url.openConnection();
		con.setDoOutput(false);
		con.setDoInput(true);

		BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String line;
		while ((line = in.readLine()) != null) {
			// System.out.println("DESCRIBE line from RCSB: "+line);
			Matcher mr = r.matcher(line);
			Matcher ms = s.matcher(line);
			String chain = null;
			if (ms.find()) structure = ms.group(1);
			if (mr.find()) chain = mr.group(1);
			if (structure != null && chain != null) {
				// System.out.println("Id for "+structure);
				CyIdentifiable id = reverseMap.get(structure);
				// System.out.println("Adding "+structure+"."+chain+" to id "+id.toString());
				newReverseMap.put(structure+"."+chain, id);
				if (!chainMap.containsKey(id))
					chainMap.put(id, new ArrayList<PDBStructure>());

				if (!structureMap.containsKey(structure))
					structureMap.put(structure, new PDBStructure(structure, null));

				structureMap.get(structure).addChain(chain);
				if (!chainMap.get(id).contains(structureMap.get(structure)))
					chainMap.get(id).add(structureMap.get(structure));
			}
		}
		in.close();
		return newReverseMap;
	}