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 */ 021package org.biojava.nbio.structure.quaternary.io; 022 023import org.biojava.nbio.structure.Structure; 024import org.biojava.nbio.structure.align.util.AtomCache; 025import org.biojava.nbio.structure.quaternary.BiologicalAssemblyTransformation; 026 027import java.util.List; 028 029/** Provides access to the data that is needed in order to rebuild the correct biological assembly of a protein. 030 * 031 * This is probably the simpler approach of accessing the necessary information. There is a second access layer, which is 032 * closer to the way the PDB is representing the files, it is defined by the interface RawBioUnitDataProvider. 033 * 034 * @author Andreas Prlic 035 * 036 */ 037public interface BioUnitDataProvider { 038 039 /** get the data for a particular assembly, counting starts at 1... 040 * 041 * @param pdbId the PDB ID. E.g. 1STP 042 * @param biolAssemblyNr the number of the assembly, the first one is nr 1. 0 refers to the asym unit 043 * @return list of transformations. 044 */ 045 public List<BiologicalAssemblyTransformation> getBioUnitTransformationList(String pdbId, int biolAssemblyNr); 046 047 /** Returns the number of available biological assemblies. 048 * @param pdbId the PDB ID. E.g. 1STP 049 * @return nr of available assemblies. 050 */ 051 public int getNrBiolAssemblies(String pdbId); 052 053 054 /** Does the PDB ID have biological assembly information? 055 * 056 * @param pdbId the PDB ID. E.g. 1STP 057 * @return boolean flag 058 */ 059 public boolean hasBiolAssembly(String pdbId); 060 061 062 /** load the asym unit, but set the info how to re-create the bio unit in the PdbHeader object 063 * 064 * @param pdbId 065 * @return 066 */ 067 public Structure getAsymUnit(String pdbId); 068 069 public void setAsymUnit(Structure asymUnit); 070 071 /** 072 * Set an AtomCache to use when fetching asymmetric units. If null, a new 073 * cache will be created with default parameters. 074 * @param cache 075 */ 076 public void setAtomCache(AtomCache cache); 077 078 /** 079 * 080 * @return The current cache, or null if no cache has been initialized 081 */ 082 public AtomCache getAtomCache(); 083 084}