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.align.multiple.util;
022
023import java.util.List;
024
025import org.biojava.nbio.structure.StructureException;
026import org.biojava.nbio.structure.align.multiple.BlockSet;
027import org.biojava.nbio.structure.align.multiple.MultipleAlignment;
028
029/**
030 * Interface for Multiple Alignment superposition algorithms.
031 * <p>
032 * There can be several implementations of a superimposer,
033 * because there is not a unique superposition of multiple
034 * structures given their residue equivalencies, and their
035 * running times are asymptotically different.
036 *
037 * @author Spencer Bliven
038 * @author Aleix Lafita
039 * @since 4.1.0
040 *
041 */
042public interface MultipleSuperimposer {
043
044        /**
045         * Superimpose all structures from a {@link MultipleAlignment}. The
046         * superposition is done for all individual BlockSets. If there is
047         * only one BlockSet.
048         * <p>
049         * At a minimum, this should set the transformation matrices for
050         * the individual {@link BlockSet#setTransformations(List) BlockSet}s.
051         * <p>
052         * This method only calculates and sets the transformation 4D Matrices.
053         * If any score is needed it should be calculated and set separately
054         * afterwards with {@link MultipleAlignmentScorer}.
055         *
056         * @param alignment MultipleAlignment specifying the aligned residues (via
057         *              the {@link MultipleAlignment#getBlockSets() blocksets}) and the
058         *              atoms to align (via the {@link MultipleAlignment#getEnsemble()
059         *              ensemble}).
060         *
061         * @throws StructureException
062         */
063        public void superimpose(MultipleAlignment alignment)
064                        throws StructureException;
065}