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 demo; 022 023import java.io.IOException; 024 025import org.biojava.nbio.structure.Structure; 026import org.biojava.nbio.structure.StructureException; 027import org.biojava.nbio.structure.StructureIO; 028import org.biojava.nbio.structure.align.quaternary.QsAlign; 029import org.biojava.nbio.structure.align.quaternary.QsAlignParameters; 030import org.biojava.nbio.structure.align.quaternary.QsAlignResult; 031import org.biojava.nbio.structure.cluster.SubunitClustererParameters; 032 033/** 034 * Demo on how to use programatically {@link QsAlign} for the alignment of 035 * quaternary structures. 036 * <p> 037 * Small oligomers: proliferating cell nuclear antigens (1PLR, 3HI8, 3IFV), 038 * photosynthetic reaction centers (2JIY, 1DXR) 039 * <p> 040 * Big oligomers: cytochrome bc1 complexes (1bcc, 1kb9, 1qcr), phycocyanin 041 * (2VML, 2BV8), bacterial ribosome (1FJG, 4V54). 042 * 043 * 044 * @author Aleix Lafita 045 * @since 5.0.0 046 * 047 */ 048public class DemoQsAlign { 049 050 public static void main(String[] args) throws IOException, 051 StructureException { 052 053 // Align two trimeric DNA clamps 054 Structure s1 = StructureIO.getStructure("1bcc"); 055 Structure s2 = StructureIO.getStructure("1kb9"); 056 057 // Select the parameters for clustering and alignment 058 SubunitClustererParameters clusterParams = new SubunitClustererParameters(); 059 QsAlignParameters alignParams = new QsAlignParameters(); 060 061 QsAlignResult result = QsAlign 062 .align(s1, s2, clusterParams, alignParams); 063 064 System.out.println(result); 065 066 } 067}