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.model;
022
023import org.biojava.nbio.structure.jama.Matrix;
024
025import java.io.Serializable;
026
027/**
028 * A class to represent a FATCAT aligned fragment pair (AFP)
029 *
030 * @author Andreas Prlic
031 *
032 */
033public class AFP implements Serializable {
034
035        private static final long serialVersionUID = 3901209995477111829L;
036
037        private int p1;
038        private int p2;
039        private int fragLen;
040        private double rmsd;
041        private Matrix m;
042        private double[] t;
043        private double score;
044
045        private long id;
046
047        @Override
048        public String toString(){
049
050                // we use the metric of
051                // Manfred J. Sippl
052                // On Distance and Similarity in Fold Space
053                // Bioinformatics, 24, pp. 872-873  (2008)
054
055                StringBuffer buf = new StringBuffer();
056                buf.append("AFP: p1:");
057                buf.append(p1);
058                buf.append(" p2: ");
059                buf.append(p2);
060                buf.append(" len " );
061                buf.append(fragLen);
062                buf.append(" rmsd ");
063                buf.append(rmsd);
064                buf.append(" score ");
065                buf.append(score);
066                return buf.toString();
067        }
068
069
070        public long getId()
071        {
072                return id;
073        }
074
075        public void setId(long id)
076        {
077                this.id = id;
078        }
079
080        public int getP1() {
081                return p1;
082        }
083        public void setP1(int p1) {
084                this.p1 = p1;
085        }
086        public int getP2() {
087                return p2;
088        }
089        public void setP2(int p2) {
090                this.p2 = p2;
091        }
092        public int getFragLen() {
093                return fragLen;
094        }
095        public void setFragLen(int fragLen) {
096                this.fragLen = fragLen;
097        }
098        public double getRmsd() {
099                return rmsd;
100        }
101        public void setRmsd(double rmsd) {
102                this.rmsd = rmsd;
103        }
104        public Matrix getM() {
105                return m;
106        }
107        public void setM(Matrix m) {
108                this.m = m;
109        }
110        public double[] getT() {
111                return t;
112        }
113        public void setT(double[] t) {
114                this.t = t;
115        }
116        public double getScore() {
117                return score;
118        }
119        public void setScore(double score) {
120                this.score = score;
121        }
122
123}