private String buildSelectionString(String structure, String domain) {
		if (structure == null || domain == null) return null;
		String model = getModel(structure);
		if (model == null) return null;
		String chain = getChain(structure);

		String[] range = domain.split("-");
		if (range.length == 2) {
			String from = convertResidueNumber(structure, range[0]);
			String to = convertResidueNumber(structure, range[1]);
			return "#"+model+":"+from+"-"+to+"."+chain;
		}

		String selectionString = "#"+model+":";
		String[] sites = domain.split(",");
		for (String site: sites) {
			selectionString += convertResidue(structure, site)+"."+chain+",";
		}
		return selectionString.substring(0, selectionString.length()-1);
	}