public Set<String> getChains() {
		Set<String> chains = new HashSet<String>();
		List<ResidueRange> rrs = ResidueRange.parseMultiple(getRanges());
		for (ResidueRange rr : rrs) chains.add(rr.getChainName());
		return chains;
	}

	@Override
	public String getIdentifier() {
		return getScopId();
	}

	public List<ResidueRange> getResidueRanges() {
		return ResidueRange.parseMultiple(ranges);
	}

	@Override
	public SubstructureIdentifier toCanonical() {
		return new SubstructureIdentifier(getPdbId(), ResidueRange.parseMultiple(getRanges()));
	}

	@Override
	public Structure reduce(Structure input) throws StructureException {
		return toCanonical().reduce(input);
	}

	@Override
	public Structure loadStructure(AtomCache cache) throws StructureException,
	IOException {
		return cache.getStructureForPdbId(pdbId);
	}

}
public Set < String > getChains ( ) { Set < String > chains = new HashSet < String > ( ) ; List < ResidueRange > rrs = ResidueRange . parseMultiple ( getRanges ( ) ) ; for ( ResidueRange rr : rrs ) chains . add ( rr . getChainName ( ) ) ; return chains ; } @ Override public String getIdentifier ( ) { return getScopId ( ) ; } public List < ResidueRange > getResidueRanges ( ) { return ResidueRange . parseMultiple ( ranges ) ; } @ Override public SubstructureIdentifier toCanonical ( ) { return new SubstructureIdentifier ( getPdbId ( ) , ResidueRange . parseMultiple ( getRanges ( ) ) ) ; } @ Override public Structure reduce ( Structure input ) throws StructureException { return toCanonical ( ) . reduce ( input ) ; } @ Override public Structure loadStructure ( AtomCache cache ) throws StructureException , IOException { return cache . getStructureForPdbId ( pdbId ) ; } }
Returns the chains this domain is defined over; contains more than 1 element only if this domains is a multi-chain domain.