001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 * Created on May 1, 2012
021 * Created by Andreas Prlic
022 *
023 * @since 3.0.2
024 */
025package org.biojava.nbio.structure.domain;
026
027import java.io.IOException;
028import java.util.SortedSet;
029
030import org.biojava.nbio.structure.Structure;
031import org.biojava.nbio.structure.StructureException;
032import org.biojava.nbio.structure.align.util.AtomCache;
033
034/**
035 * Decomposes a structure into representative PDP domains.
036 *
037 * Implementations will probably want to also implement {@link DomainProvider},
038 * which provides a very similar set of methods for general structure domain
039 * decomposition.
040 * @author Andreas Prlic
041 * @since 3.0.2
042 */
043public interface PDPProvider {
044
045        /**
046         * Get a list of all PDP domains for a given PDB entry
047         * @param pdbId PDB ID
048         * @return Set of domain names, e.g. "PDP:4HHBAa"
049         * @throws IOException
050         */
051        public SortedSet<String> getPDPDomainNamesForPDB(String pdbId) throws IOException;
052        /**
053         * Get the structure for a particular PDP domain
054         * @param pdpDomainName PDP identifier, e.g. "PDP:4HHBAa"
055         * @param cache AtomCache, responsible for fetching and storing the coordinates
056         * @return Structure representing the PDP domain
057         * @throws IOException For IO errors, e.g. when parsing PDP information
058         * @throws StructureException For errors creating the structure
059         */
060        public Structure getDomain(String pdpDomainName, AtomCache cache) throws IOException, StructureException;
061        /**
062         * Get a StructureIdentifier representing the specified PDP domain.
063         *
064         * @param pdpDomainName PDP domain name
065         * @return a PDPDomain representing this domain name
066         * @throws IOException
067         */
068        public PDPDomain getPDPDomain(String pdpDomainName) throws IOException;
069}