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;
022
023import java.io.Serializable;
024import java.util.List;
025
026/**
027 * Representation of a Biological Assembly annotation as provided by the PDB.
028 * Contains all the information required to build the Biological Assembly from
029 * the asymmetric unit.
030 * Note that the PDB allows for 1 or more Biological Assemblies for a given entry. They
031 * are identified by the id field.
032 *
033 * @author Jose Duarte
034 */
035public class BioAssemblyInfo implements Serializable {
036
037
038        private static final long serialVersionUID = 1L;
039
040        private int id;
041        private List<BiologicalAssemblyTransformation> transforms;
042        private int macromolecularSize;
043
044        /**
045         * Empty constructor
046         */
047        public BioAssemblyInfo() {
048
049        }
050
051        /**
052         * The identifier for this Biological Assembly, from 1 to n
053         * @return
054         */
055        public int getId() {
056                return id;
057        }
058
059        public void setId(int id) {
060                this.id = id;
061        }
062
063        /**
064         * Return the list of {@link BiologicalAssemblyTransformation}s needed to generate
065         * the biological assembly. There is one transformation per internal chain id.
066         * @return
067         */
068        public List<BiologicalAssemblyTransformation> getTransforms() {
069                return transforms;
070        }
071
072        public void setTransforms(List<BiologicalAssemblyTransformation> transforms) {
073                this.transforms = transforms;
074        }
075
076        /**
077         * Returns the macromolecular size of this biological assembly, i.e.
078         * the number of polymeric chains (protein or nucleotide chains, not sugars) 
079         * in the biological assembly.
080         * @return
081         */
082        public int getMacromolecularSize() {
083                return macromolecularSize;
084        }
085
086        public void setMacromolecularSize(int macromolecularSize) {
087                this.macromolecularSize = macromolecularSize;
088        }
089
090        @Override
091        public String toString() {
092                return "[BioAssembly "+id+": "+transforms.size()+" transforms, mm size "+macromolecularSize+"]";
093        }
094}