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 * Created on 22.01.2007
021 *
022 */
023
024
025package org.biojava.nbio.structure;
026
027
028import org.biojava.nbio.structure.io.FileParsingParameters;
029import org.slf4j.Logger;
030import org.slf4j.LoggerFactory;
031
032import java.io.Serializable;
033import java.util.ArrayList;
034import java.util.Collections;
035import java.util.HashMap;
036import java.util.List;
037import java.util.Map;
038import java.util.Set;
039import java.util.TreeSet;
040
041/**
042 * An object to contain the info from the PDB header for a Molecule.
043 * In mmCIF dictionary, it is called an Entity. In the case of polymers it
044 * is defined as each group of sequence identical NCS-related chains
045 *
046 * Now PDB file format 3.2 aware - contains the new TAX_ID fields for the
047 * organism studied and the expression system.
048 *
049 * @author Jules Jacobsen
050 * @author Jose Duarte
051 * @since 1.5
052 */
053public class Compound implements Serializable {
054
055        private final static Logger logger = LoggerFactory.getLogger(Compound.class);
056
057
058        //TODO we should consider having the data here as it is in mmCIF dictionary - JD 2014-12-11
059        //     Especially useful would be to have the polymer/non-polymer/water classification present in mmCIF
060        //     We could drop a lot of the stuff here that is PDB-file related (actually many PDB files don't contain many of these fields)
061        //     The only really essential part of a Compound is the member chains and the entity_id/mol_id
062        // See also issue https://github.com/biojava/biojava/issues/219
063
064        private static final long serialVersionUID = 2991897825657586356L;
065
066        /**
067         * The list of chains that are described by this Compound
068         */
069        private List<Chain> chains;
070
071        /**
072         * The Molecule identifier, called entity_id in mmCIF dictionary
073         */
074        private int molId;
075
076        /**
077         * A map to cache residue number mapping, between ResidueNumbers and index (1-based) in aligned sequences (SEQRES).
078         * Initialised lazily upon call to {@link #getAlignedResIndex(Group, Chain)}
079         */
080        private Map<String, Map<ResidueNumber,Integer>> chains2pdbResNums2ResSerials;
081
082        private String refChainId;
083
084        private String molName = null;
085        private String title = null;
086        private List<String> synonyms = null;
087        private List<String> ecNums = null;
088        private String engineered = null;
089        private String mutation = null;
090        private String biologicalUnit = null;
091        private String details = null;
092
093        private String numRes = null;
094        private String resNames = null;
095
096        private String headerVars = null;
097
098        private String synthetic = null;
099        private String fragment = null;
100        private String organismScientific = null;
101        private String organismTaxId = null;
102        private String organismCommon = null;
103        private String strain = null;
104        private String variant = null;
105        private String cellLine = null;
106        private String atcc = null;
107        private String organ = null;
108        private String tissue = null;
109        private String cell = null;
110        private String organelle = null;
111        private String secretion = null;
112        private String gene = null;
113        private String cellularLocation = null;
114        private String expressionSystem = null;
115        private String expressionSystemTaxId = null;
116        private String expressionSystemStrain = null;
117        private String expressionSystemVariant = null;
118        private String expressionSystemCellLine = null;
119        private String expressionSystemAtccNumber = null;
120        private String expressionSystemOrgan = null;
121        private String expressionSystemTissue = null;
122        private String expressionSystemCell = null;
123        private String expressionSystemOrganelle = null;
124        private String expressionSystemCellularLocation = null;
125        private String expressionSystemVectorType = null;
126        private String expressionSystemVector = null;
127        private String expressionSystemPlasmid = null;
128        private String expressionSystemGene = null;
129        private String expressionSystemOtherDetails = null;
130
131        private Long id;
132
133        public Compound () {
134                chains = new ArrayList<Chain>();
135                chains2pdbResNums2ResSerials = new HashMap<String, Map<ResidueNumber,Integer>>();
136                molId = -1;
137        }
138
139        /**
140         * Constructs a new Compound copying all data from the given one
141         * but not setting the Chains
142         * @param c
143         */
144        public Compound (Compound c) {
145
146                this.chains = new ArrayList<Chain>();
147
148                this.chains2pdbResNums2ResSerials = new HashMap<String, Map<ResidueNumber,Integer>>();
149
150                this.molId = c.molId;
151
152                this.refChainId = c.refChainId;
153
154                this.molName = c.molName;
155                this.title = c.title;
156
157                if (c.synonyms!=null) {
158                        this.synonyms = new ArrayList<String>();
159                        synonyms.addAll(c.synonyms);
160                }
161                if (c.ecNums!=null) {
162                        this.ecNums = new ArrayList<String>();
163                        ecNums.addAll(c.ecNums);
164                }
165
166                this.engineered = c.engineered;
167                this.mutation = c.mutation;
168                this.biologicalUnit = c.biologicalUnit;
169                this.details = c.details;
170
171                this.numRes = c.numRes;
172                this.resNames = c.resNames;
173
174                this.headerVars = c.headerVars;
175
176                this.synthetic = c.synthetic;
177                this.fragment = c.fragment;
178                this.organismScientific = c.organismScientific;
179                this.organismTaxId = c.organismTaxId;
180                this.organismCommon = c.organismCommon;
181                this.strain = c.strain;
182                this.variant = c.variant;
183                this.cellLine = c.cellLine;
184                this.atcc = c.atcc;
185                this.organ = c.organ;
186                this.tissue = c.tissue;
187                this.cell = c.cell;
188                this.organelle = c.organelle;
189                this.secretion = c.secretion;
190                this.gene = c.gene;
191                this.cellularLocation = c.cellularLocation;
192                this.expressionSystem = c.expressionSystem;
193                this.expressionSystemTaxId = c.expressionSystemTaxId;
194                this.expressionSystemStrain = c.expressionSystemStrain;
195                this.expressionSystemVariant = c.expressionSystemVariant;
196                this.expressionSystemCellLine = c.expressionSystemCellLine;
197                this.expressionSystemAtccNumber = c.expressionSystemAtccNumber;
198                this.expressionSystemOrgan = c.expressionSystemOrgan;
199                this.expressionSystemTissue = c.expressionSystemTissue;
200                this.expressionSystemCell = c.expressionSystemCell;
201                this.expressionSystemOrganelle = c.expressionSystemOrganelle;
202                this.expressionSystemCellularLocation = c.expressionSystemCellularLocation;
203                this.expressionSystemVectorType = c.expressionSystemVectorType;
204                this.expressionSystemVector = c.expressionSystemVector;
205                this.expressionSystemPlasmid = c.expressionSystemPlasmid;
206                this.expressionSystemGene = c.expressionSystemGene;
207                this.expressionSystemOtherDetails = c.expressionSystemOtherDetails;
208
209
210        }
211
212        @Override
213        public String toString(){
214                StringBuilder buf = new StringBuilder();
215                buf.append("Compound: ").append(molId).append(" ");
216                buf.append(molName==null?"(no name)":"("+molName+")");
217                buf.append(" chains: ");
218                if (chains!=null) {
219                        for (int i=0;i<chains.size();i++) {
220                                buf.append(chains.get(i).getChainID());
221                                if (i!=chains.size()-1) buf.append(",");
222                        }
223                } else {
224                        buf.append("no chains");
225                }
226                return buf.toString();
227        }
228
229        /**
230         * Get the representative Chain for this Compound.
231         * We choose the Chain with the first chain identifier after
232         * lexicographical sorting (case insensitive),
233         * e.g. chain A if Compound is composed of chains A,B,C,D,E
234         * @return
235         */
236        public Chain getRepresentative() {
237
238                List<String> chainIds = new ArrayList<String>();
239                for (Chain chain:chains) {
240                        chainIds.add(chain.getChainID());
241                }
242
243                Collections.sort(chainIds, String.CASE_INSENSITIVE_ORDER);
244
245                for (Chain chain:chains) {
246                        if (chain.getChainID().equals(chainIds.get(0))) {
247                                return chain;
248                        }
249                }
250
251                logger.error("Could not find a representative chain for compound '{}'", this.toString());
252
253                return null;
254        }
255
256        /** get the ID used by Hibernate
257         *
258         * @return the ID used by Hibernate
259         */
260        public Long getId() {
261                return id;
262        }
263
264        /** set the ID used by Hibernate
265         *
266         * @param id
267         */
268        public void setId(Long id) {
269                this.id = id;
270        }
271
272        /**
273         * Print some debug statements to System.out
274         *
275         *
276         */
277        public void showHeader(){
278                this.showCompound();
279                this.showSource();
280        }
281
282        public void showCompound() {
283                System.out.println("COMPOUND INFO:");
284                if (this.molId != -1) {
285                        System.out.println("Mol ID: " + this.molId);
286                }
287                if (this.chains != null) {
288                        StringBuilder buf = new StringBuilder();
289                        for (int i=0;i<chains.size();i++) {
290                                buf.append(chains.get(i).getChainID());
291                                if (i!=chains.size()-1) buf.append(",");
292                        }
293                        System.out.println("Chains: " + buf.toString());
294                }
295                if (this.molName != null) {
296                        System.out.println("Mol Name: " + this.molName);
297                }
298                if (this.title != null) {
299                        System.out.println("Title: " + this.title);
300                }
301                if (this.synonyms != null) {
302                        for (String x : this.synonyms) {
303                                System.out.println("Synomym: " + x);
304                        }
305                }
306                if (this.ecNums != null) {
307                        for (String x : this.ecNums) {
308                                System.out.println("EC: " + x);
309                        }
310                }
311                if (this.fragment != null) {
312                        System.out.println("Fragment? " + this.fragment);
313                }
314                if (this.engineered != null) {
315                        System.out.println("Engineered? " + this.engineered);
316                }
317                if (this.mutation != null) {
318                        System.out.println("Mutation? " + this.mutation);
319                }
320                if (this.biologicalUnit != null) {
321                        System.out.println("Biological Unit: " + this.biologicalUnit);
322                }
323                if (this.details != null) {
324                        System.out.println("Details: " + this.details);
325                }
326                if (this.numRes != null) {
327                        System.out.println("No. Residues: " + this.numRes);
328                }
329                //System.out.println( "\n"
330
331        }
332
333
334        public void showSource() {
335                System.out.println("SOURCE INFO:");
336                if (this.synthetic != null) {
337                        System.out.println("Synthetic? " + this.synthetic);
338                }
339                if (this.fragment != null) {
340                        System.out.println("Fragment? " + this.fragment);
341                }
342                if (this.organismScientific != null) {
343                        System.out.println("Organism Scientific: " + this.organismScientific);
344                }
345                if (this.organismTaxId != null) {
346                        System.out.println("Organism Tax Id: " + this.organismTaxId);
347                }
348                if (this.organismCommon != null) {
349                        System.out.println("Organism Common: " + this.organismCommon);
350                }
351                if (this.strain != null) {
352                        System.out.println("Strain: " + this.strain);
353                }
354                if (this.variant != null) {
355                        System.out.println("Variant: " + this.variant);
356                }
357                if (this.cellLine != null) {
358                        System.out.println("Cell Line: " + this.cellLine);
359                }
360                if (this.atcc != null) {
361                        System.out.println("ATCC: " + this.atcc);
362                }
363                if (this.organ != null) {
364                        System.out.println("Organ: " + this.organ);
365                }
366                if (this.tissue != null) {
367                        System.out.println("Tissue: " + this.tissue);
368                }
369                if (this.cell != null) {
370                        System.out.println("Cell: " + this.cell);
371                }
372                if (this.organelle != null) {
373                        System.out.println("Organelle: " + this.organelle);
374                }
375                if (this.secretion != null) {
376                        System.out.println("Secretion: " + this.secretion);
377                }
378                if (this.gene != null) {
379                        System.out.println("Gene: " + this.gene);
380                }
381                if (this.cellularLocation != null) {
382                        System.out.println("Cellular Location: " + this.cellularLocation);
383                }
384                if (this.expressionSystem != null) {
385                        System.out.println("Expression System: " + this.expressionSystem);
386                }
387                if (this.expressionSystemTaxId != null) {
388                        System.out.println("Expression System Tax Id: " + this.expressionSystemTaxId);
389                }
390                if (this.expressionSystemStrain != null) {
391                        System.out.println("Expression System Strain: " + this.expressionSystemStrain);
392                }
393                if (this.expressionSystemVariant != null) {
394                        System.out.println("Expression System Variant: " + this.expressionSystemVariant);
395                }
396                if (this.expressionSystemCellLine != null) {
397                        System.out.println("Expression System Cell Line: " + this.expressionSystemCellLine);
398                }
399                if (this.expressionSystemAtccNumber != null) {
400                        System.out.println("Expression System ATCC Number: " + this.expressionSystemAtccNumber);
401                }
402                if (this.expressionSystemOrgan != null) {
403                        System.out.println("Expression System Organ: " + this.expressionSystemOrgan);
404                }
405                if (this.expressionSystemTissue != null) {
406                        System.out.println("Expression System Tissue: " + this.expressionSystemTissue);
407                }
408                if (this.expressionSystemCell != null) {
409                        System.out.println("Expression System Cell: " + this.expressionSystemCell);
410                }
411                if (this.expressionSystemOrganelle != null) {
412                        System.out.println("Expression System Organelle: " + this.expressionSystemOrganelle);
413                }
414                if (this.expressionSystemCellularLocation != null) {
415                        System.out.println("Expression System Cellular Location: " + this.expressionSystemCellularLocation);
416                }
417                if (this.expressionSystemVectorType != null) {
418                        System.out.println("Expression System Vector Type: " + this.expressionSystemVectorType);
419                }
420                if (this.expressionSystemVector != null) {
421                        System.out.println("Expression System Vector: " + this.expressionSystemVector);
422                }
423                if (this.expressionSystemPlasmid != null) {
424                        System.out.println("Expression System Plasmid: " + this.expressionSystemPlasmid);
425                }
426                if (this.expressionSystemGene != null) {
427                        System.out.println("Expression System Gene: " + this.expressionSystemGene);
428                }
429                if (this.expressionSystemOtherDetails != null) {
430                        System.out.println("Expression System Other Details: " + this.expressionSystemOtherDetails);
431                }
432        }
433
434        /**
435         * Return the list of member chain IDs that are described by this Compound,
436         * only unique chain IDs are contained in the list.
437         * Note that in the case of multimodel structures this will return just the unique
438         * chain identifiers whilst {@link #getChains()} will return a corresponding chain
439         * per model.
440         * @return the list of unique ChainIDs that are described by this Compound
441         * @see #setChains(List)
442         * @see #getChains()
443         */
444        public List<String> getChainIds() {
445
446                Set<String> uniqChainIds = new TreeSet<String>();
447                for (int i=0;i<getChains().size();i++) {
448                        uniqChainIds.add(getChains().get(i).getChainID());
449                }
450
451                return new ArrayList<String>(uniqChainIds);
452        }
453
454        /**
455         * Given a Group g of Chain c (member of this Compound) return the corresponding position in the
456         * alignment of all member sequences (1-based numbering), i.e. the index (1-based) in the SEQRES sequence.
457         * This allows for comparisons of residues belonging to different chains of the same Compound (entity).
458         * <p>
459         * If {@link FileParsingParameters#setAlignSeqRes(boolean)} is not used or SEQRES not present, a mapping
460         * will not be available and this method will return {@link ResidueNumber#getSeqNum()} for all residues, which
461         * in some cases will be correctly aligned indices (when no insertion codes are
462         * used and when all chains within the entity are numbered in the same way), but
463         * in general they will be neither unique (because of insertion codes) nor aligned.
464         * </p>
465         * @param g
466         * @param c
467         * @return the aligned residue index (1 to n), if no SEQRES groups are available at all then {@link ResidueNumber#getSeqNum()}
468         * is returned as a fall-back, if the group is not found in the SEQRES groups then -1 is returned
469         * for the given group and chain
470         * @throws IllegalArgumentException if the given Chain is not a member of this Compound
471         * @see {@link Chain#getSeqResGroup(int)}
472         */
473        public int getAlignedResIndex(Group g, Chain c) {
474
475                boolean contained = false;
476                for (Chain member:getChains()) {
477                        if (c.getChainID().equals(member.getChainID())) {
478                                contained = true;
479                                break;
480                        }
481                }
482                if (!contained)
483                        throw new IllegalArgumentException("Given chain "+c.getChainID()+" is not a member of this Compound (entity): "+getChainIds().toString());
484
485                if (!chains2pdbResNums2ResSerials.containsKey(c.getChainID())) {
486                        // we do lazy initialisation of the map
487                        initResSerialsMap(c);
488                }
489                // if no seqres groups are available at all the map will be null
490                Map<ResidueNumber,Integer> map = chains2pdbResNums2ResSerials.get(c.getChainID());
491                int serial;
492                if (map!=null) {
493
494                        ResidueNumber resNum = g.getResidueNumber();
495                        // the resNum will be null for groups that are SEQRES only and not in ATOM,
496                        // still it can happen that a group is in ATOM in one chain but not in other of the same compound.
497                        // This is what we try to find out here (analogously to what we do in initResSerialsMap() ):
498                        if (resNum==null && c.getSeqResGroups()!=null && !c.getSeqResGroups().isEmpty()) {
499                                int index = -1;
500                                for (int i=0;i<c.getSeqResGroups().size();i++) {
501                                        if (g==c.getSeqResGroup(i)) {
502                                                index = i; break;
503                                        }
504                                }
505
506                                resNum = findResNumInOtherChains(index, c);
507
508                        }
509
510                        if (resNum == null) {
511                                // still null, we really can't map
512                                serial = -1;
513                        }
514                        else {
515
516                                Integer alignedSerial = map.get(resNum);
517
518                                if (alignedSerial==null) {
519                                        // the map doesn't contain this group, something's wrong: return -1
520                                        serial = -1;
521                                } else {
522                                        serial = alignedSerial;
523                                }
524                        }
525
526                } else {
527                        // no seqres groups available we resort to using the pdb residue numbers are given
528                        serial = g.getResidueNumber().getSeqNum();
529                }
530                return serial;
531        }
532
533        private void initResSerialsMap(Chain c) {
534                if (c.getSeqResGroups()==null || c.getSeqResGroups().isEmpty()) {
535                        logger.warn("No SEQRES groups found in chain {}, will use residue numbers as given (no insertion codes, not necessarily aligned). "
536                                        + "Make sure your structure has SEQRES records and that you use FileParsingParameters.setAlignSeqRes(true)",
537                                        c.getChainID());
538                        // we add a explicit null to the map so that we flag it as unavailable for this chain
539                        chains2pdbResNums2ResSerials.put(c.getChainID(), null);
540                        return;
541                }
542
543                Map<ResidueNumber,Integer> resNums2ResSerials = new HashMap<ResidueNumber, Integer>();
544                chains2pdbResNums2ResSerials.put(c.getChainID(), resNums2ResSerials);
545
546                for (int i=0;i<c.getSeqResGroups().size();i++) {
547
548                        // The seqres group will have a null residue number whenever its corresponding atom group doesn't exist
549                        // because it is missing in the electron density.
550                        // However, it can be observed in the density in other chains of the same compound,
551                        // to be complete we go and look for the residue number in other chains, so that we have a
552                        // seqres to atom mapping as complete as possible (with all known atom groups of any chain of this compound)
553
554                        ResidueNumber resNum = c.getSeqResGroup(i).getResidueNumber();
555
556                        if (resNum==null) {
557                                resNum = findResNumInOtherChains(i,c);
558                        }
559
560                        // NOTE that resNum will still be null here for cases where the residue
561                        // is missing in atom groups (not observed in density) in all chains
562                        // Thus the mapping will not be possible for residues that are only in SEQRES groups
563                        resNums2ResSerials.put(resNum, i+1);
564                }
565        }
566
567        private ResidueNumber findResNumInOtherChains(int i, Chain chain) {
568                for (Chain c: getChains()) {
569                        if (c == chain) continue;
570
571                        Group seqResGroup = c.getSeqResGroup(i);
572
573                        if (seqResGroup==null) {
574                                logger.warn("The SEQRES group is null for index {} in chain {}, whilst it wasn't null in chain {}",
575                                                 i, c.getChainID(), chain.getChainID());
576                                continue;
577                        }
578
579                        if (seqResGroup.getResidueNumber()!=null) return seqResGroup.getResidueNumber();
580
581                }
582
583                return null;
584        }
585
586        /**
587         * Return the ref chain id value.
588         * @return the RefChainID
589         * @see #setRefChainId(String)
590         */
591        public String getRefChainId() {
592                return refChainId;
593        }
594
595        /**
596         * Return the ref chain id value.
597         * @param refChainId the RefChainID
598         * @see #getRefChainId()
599         */
600        public void setRefChainId(String refChainId) {
601                this.refChainId = refChainId;
602        }
603
604        /**
605         * Return the molecule identifier, called entity_id in mmCIF dictionary.
606         * @return the molecule id
607         * @see #setMolId(int)
608         */
609        public int getMolId() {
610                return molId;
611        }
612
613        /**
614         * Set the molecule identifier, called entity_id in mmCIF dictionary.
615         * @param molId the molecule id
616         * @see #getMolId()
617         */
618        public void setMolId(int molId) {
619                this.molId = molId;
620        }
621
622        public String getMolName() {
623                return molName;
624        }
625
626        public void setMolName(String molName) {
627                this.molName = molName;
628        }
629
630        public String getTitle() {
631                return title;
632        }
633
634        public void setTitle(String title) {
635                this.title = title;
636        }
637
638        public List<String> getSynonyms() {
639                return synonyms;
640        }
641
642        public void setSynonyms(List<String> synonyms) {
643                this.synonyms = synonyms;
644        }
645
646        public List<String> getEcNums() {
647                return ecNums;
648        }
649
650        public void setEcNums(List<String> ecNums) {
651                this.ecNums = ecNums;
652        }
653
654        public String getEngineered() {
655                return engineered;
656        }
657
658        public void setEngineered(String engineered) {
659                this.engineered = engineered;
660        }
661
662        public String getMutation() {
663                return mutation;
664        }
665
666        public void setMutation(String mutation) {
667                this.mutation = mutation;
668        }
669
670        public String getBiologicalUnit() {
671                return biologicalUnit;
672        }
673
674        public void setBiologicalUnit(String biologicalUnit) {
675                this.biologicalUnit = biologicalUnit;
676        }
677
678        public String getDetails() {
679                return details;
680        }
681
682        public void setDetails(String details) {
683                this.details = details;
684        }
685
686        public String getNumRes() {
687                return numRes;
688        }
689
690        public void setNumRes(String numRes) {
691                this.numRes = numRes;
692        }
693
694        public String getResNames() {
695                return resNames;
696        }
697
698        public void setResNames(String resNames) {
699                this.resNames = resNames;
700        }
701
702        public String getHeaderVars() {
703                return headerVars;
704        }
705
706        public void setHeaderVars(String headerVars) {
707                this.headerVars = headerVars;
708        }
709
710        public String getSynthetic() {
711                return synthetic;
712        }
713
714        public void setSynthetic(String synthetic) {
715                this.synthetic = synthetic;
716        }
717
718        public String getFragment() {
719                return fragment;
720        }
721
722        public void setFragment(String fragment) {
723                this.fragment = fragment;
724        }
725
726        public String getOrganismScientific() {
727                return organismScientific;
728        }
729
730        public void setOrganismScientific(String organismScientific) {
731                this.organismScientific = organismScientific;
732        }
733
734        public String getOrganismTaxId() {
735                return organismTaxId;
736        }
737
738        public void setOrganismTaxId(String organismTaxId) {
739                this.organismTaxId = organismTaxId;
740        }
741
742        public String getOrganismCommon() {
743                return organismCommon;
744        }
745
746        public void setOrganismCommon(String organismCommon) {
747                this.organismCommon = organismCommon;
748        }
749
750        public String getStrain() {
751                return strain;
752        }
753
754        public void setStrain(String strain) {
755                this.strain = strain;
756        }
757
758        public String getVariant() {
759                return variant;
760        }
761
762        public void setVariant(String variant) {
763                this.variant = variant;
764        }
765
766        public String getCellLine() {
767                return cellLine;
768        }
769
770        public void setCellLine(String cellLine) {
771                this.cellLine = cellLine;
772        }
773
774        public String getAtcc() {
775                return atcc;
776        }
777
778        public void setAtcc(String atcc) {
779                this.atcc = atcc;
780        }
781
782        public String getOrgan() {
783                return organ;
784        }
785
786        public void setOrgan(String organ) {
787                this.organ = organ;
788        }
789
790        public String getTissue() {
791                return tissue;
792        }
793
794        public void setTissue(String tissue) {
795                this.tissue = tissue;
796        }
797
798        public String getCell() {
799                return cell;
800        }
801
802        public void setCell(String cell) {
803                this.cell = cell;
804        }
805
806        public String getOrganelle() {
807                return organelle;
808        }
809
810        public void setOrganelle(String organelle) {
811                this.organelle = organelle;
812        }
813
814        public String getSecretion() {
815                return secretion;
816        }
817
818        public void setSecretion(String secretion) {
819                this.secretion = secretion;
820        }
821
822        public String getGene() {
823                return gene;
824        }
825
826        public void setGene(String gene) {
827                this.gene = gene;
828        }
829
830        public String getCellularLocation() {
831                return cellularLocation;
832        }
833
834        public void setCellularLocation(String cellularLocation) {
835                this.cellularLocation = cellularLocation;
836        }
837
838        public String getExpressionSystem() {
839                return expressionSystem;
840        }
841
842        public String getExpressionSystemTaxId() {
843                return expressionSystemTaxId;
844        }
845
846        public void setExpressionSystemTaxId(String expressionSystemTaxId) {
847                this.expressionSystemTaxId = expressionSystemTaxId;
848        }
849
850        public void setExpressionSystem(String expressionSystem) {
851                this.expressionSystem = expressionSystem;
852        }
853
854        public String getExpressionSystemStrain() {
855                return expressionSystemStrain;
856        }
857
858        public void setExpressionSystemStrain(String expressionSystemStrain) {
859                this.expressionSystemStrain = expressionSystemStrain;
860        }
861
862        public String getExpressionSystemVariant() {
863                return expressionSystemVariant;
864        }
865
866        public void setExpressionSystemVariant(String expressionSystemVariant) {
867                this.expressionSystemVariant = expressionSystemVariant;
868        }
869
870        public String getExpressionSystemCellLine() {
871                return expressionSystemCellLine;
872        }
873
874        public void setExpressionSystemCellLine(String expressionSystemCellLine) {
875                this.expressionSystemCellLine = expressionSystemCellLine;
876        }
877
878        public String getExpressionSystemAtccNumber() {
879                return expressionSystemAtccNumber;
880        }
881
882        public void setExpressionSystemAtccNumber(String expressionSystemAtccNumber) {
883                this.expressionSystemAtccNumber = expressionSystemAtccNumber;
884        }
885
886        public String getExpressionSystemOrgan() {
887                return expressionSystemOrgan;
888        }
889
890        public void setExpressionSystemOrgan(String expressionSystemOrgan) {
891                this.expressionSystemOrgan = expressionSystemOrgan;
892        }
893
894        public String getExpressionSystemTissue() {
895                return expressionSystemTissue;
896        }
897
898        public void setExpressionSystemTissue(String expressionSystemTissue) {
899                this.expressionSystemTissue = expressionSystemTissue;
900        }
901
902        public String getExpressionSystemCell() {
903                return expressionSystemCell;
904        }
905
906        public void setExpressionSystemCell(String expressionSystemCell) {
907                this.expressionSystemCell = expressionSystemCell;
908        }
909
910        public String getExpressionSystemOrganelle() {
911                return expressionSystemOrganelle;
912        }
913
914        public void setExpressionSystemOrganelle(String expressionSystemOrganelle) {
915                this.expressionSystemOrganelle = expressionSystemOrganelle;
916        }
917
918        public String getExpressionSystemCellularLocation() {
919                return expressionSystemCellularLocation;
920        }
921
922        public void setExpressionSystemCellularLocation(String expressionSystemCellularLocation) {
923                this.expressionSystemCellularLocation = expressionSystemCellularLocation;
924        }
925
926        public String getExpressionSystemVectorType() {
927                return expressionSystemVectorType;
928        }
929
930        public void setExpressionSystemVectorType(String expressionSystemVectorType) {
931                this.expressionSystemVectorType = expressionSystemVectorType;
932        }
933
934        public String getExpressionSystemVector() {
935                return expressionSystemVector;
936        }
937
938        public void setExpressionSystemVector(String expressionSystemVector) {
939                this.expressionSystemVector = expressionSystemVector;
940        }
941
942        public String getExpressionSystemPlasmid() {
943                return expressionSystemPlasmid;
944        }
945
946        public void setExpressionSystemPlasmid(String expressionSystemPlasmid) {
947                this.expressionSystemPlasmid = expressionSystemPlasmid;
948        }
949
950        public String getExpressionSystemGene() {
951                return expressionSystemGene;
952        }
953
954        public void setExpressionSystemGene(String expressionSystemGene) {
955                this.expressionSystemGene = expressionSystemGene;
956        }
957
958        public String getExpressionSystemOtherDetails() {
959                return expressionSystemOtherDetails;
960        }
961
962        public void setExpressionSystemOtherDetails(String expressionSystemOtherDetails) {
963                this.expressionSystemOtherDetails = expressionSystemOtherDetails;
964        }
965
966        /**
967         * Get the list of chains that are part of this Compound. Note that for multi-model
968         * structures chains from all models are returned.
969         *
970         * @return a List of Chain objects
971         */
972         public List<Chain> getChains(){
973                return this.chains;
974        }
975
976         /**
977          * Add new Chain to this Compound
978          * @param chain
979          */
980        public void addChain(Chain chain){
981                this.chains.add(chain);
982        }
983
984        /**
985         * Set the chains for this Compound
986         * @param chains
987         */
988        public void setChains(List<Chain> chains){
989                this.chains = chains;
990        }
991}