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 26.04.2004
021 * @author Andreas Prlic
022 *
023 */
024package org.biojava.nbio.structure;
025
026import org.biojava.nbio.structure.io.FileConvert;
027import org.biojava.nbio.structure.io.PDBFileReader;
028
029import java.io.Serializable;
030import java.util.List;
031
032
033/**
034 *
035 * Interface for a structure object. Provides access to the data of a PDB file.
036 *
037 * A structure object allows to access the PDB header information as well
038 * as to the data from the ATOM records. The header information is
039 * currently available through the following objects:
040 * <ul>
041 * <li>{@link PDBHeader}</li>
042 * <li>{@link DBRef}</li>
043 * <li>{@link EntityInfo}</li>
044 * </ul>
045 *
046 * The structure object provides access to the data from the ATOM records through
047 * a hierarchy of sub-object:
048 * <pre>
049 * Structure
050 *         |
051 *         {@link Chain}
052 *             |
053 *             {@link Group}
054 *                 |
055 *                 {@link Atom}
056 * </pre>
057 *
058 * For more documentation on how to work with the Structure API please
059 * see <a href="http://biojava.org/wiki/BioJava:CookBook#Protein_Structure" target="_top">
060 * http://biojava.org/wiki/BioJava:CookBook#Protein_Structure</a>
061 *
062 * <p>
063 *  The tutorial for the BioJava structure modules can be found at <a href="https://github.com/biojava/biojava3-tutorial/tree/master/structure">github</a>.
064 * </p>
065 *
066 *
067 * <hr/>
068 * </hr>
069 * <p>
070 * Q: How can I get a Structure object from a PDB file?
071 * </p>
072 * <p>
073 * A:
074 * </p>
075 * <pre>
076 *  {@link Structure} loadStructure(String pathToPDBFile){
077 *              {@link PDBFileReader} pdbreader = new {@link PDBFileReader}();
078 *
079 *              {@link Structure} structure = null;
080 *              try{
081 *                      structure = pdbreader.getStructure(pathToPDBFile);
082 *                      System.out.println(structure);
083 *              } catch (IOException e) {
084 *                      e.printStackTrace();
085 *              }
086 *              return structure;
087 *      }
088 *  </pre>
089 *
090 * <hr>
091 * </hr>
092 * <p>
093 * Q: How can I calculate Phi and Psi angles of AminoAcids?
094 * </p>
095 * <p>
096 * A:
097 * </p>
098 * <pre>
099 *  void calcPhiPsi({@link Structure} structure){
100 *
101 *
102 *              // get the first chain from the structure
103 *
104 *              {@link Chain} chain  = structure.getChain(0);
105 *
106 *              // A protein chain consists of a number of groups. These can be either
107 *              // {@link AminoAcid}, {@link HetatomImpl Hetatom} or {@link NucleotideImpl Nucleotide} groups.
108 *              //
109 *              // Note: BioJava provides access to both the ATOM and SEQRES data in a PDB file.
110 *              // since we are interested in doing calculations here, we only request the groups
111 *              // from the ATOM records
112 *
113 *              //  get the Groups of the chain that are AminoAcids.
114 *              List<Group> groups = chain.getAtomGroups(GroupType.AMINOACID);
115 *
116 *              {@link AminoAcid} a;
117 *              {@link AminoAcid} b;
118 *              {@link AminoAcid} c ;
119 *
120 *              for ( int i=0; i < groups.size(); i++){
121 *
122 *                      // since we requested only groups of type AMINOACID they will always be amino acids
123 *                      // Nucleotide and Hetatom groups will not be present in the groups list.
124 *
125 *                      b = ({@link AminoAcid})groups.get(i);
126 *
127 *                      double phi =360.0;
128 *                      double psi =360.0;
129 *
130 *                      if ( i > 0) {
131 *                              a = ({@link AminoAcid})groups.get(i-1) ;
132 *                              try {
133 *
134 *                                      // the Calc class provides utility methods for various calculations on
135 *                                      // structures, groups and atoms
136 *
137 *                                      phi = {@link Calc}.getPhi(a,b);
138 *                              } catch ({@link StructureException} e){
139 *                                      e.printStackTrace();
140 *                                      phi = 360.0 ;
141 *                              }
142 *                      }
143 *                      if ( i < groups.size()-1) {
144 *                              c = ({@link AminoAcid})groups.get(i+1) ;
145 *                              try {
146 *                                      psi = {@link Calc}.getPsi(b,c);
147 *                              }catch ({@link StructureException} e){
148 *                                      e.printStackTrace();
149 *                                      psi = 360.0 ;
150 *                              }
151 *                      }
152 *
153 *                      System.out.print(b.getPDBCode() + " " + b.getPDBName() + ":"  );
154 *
155 *                      System.out.println(String.format("\tphi: %+7.2f psi: %+7.2f", phi, psi));
156 *
157 *              }
158 * </pre>
159 * <hr>
160 * </hr>
161 *
162 *
163 *
164 *
165 * @author Andreas Prlic
166 * @since 1.4
167 * @version %I% %G%
168 */
169public interface Structure extends Cloneable, Serializable {
170
171
172        /**
173         * Return an identical copy of this Structure object
174         *
175         * @return identical copy of this Structure object
176         */
177        Structure clone();
178
179        /**
180         * String representation of object.
181         */
182        @Override
183        String toString();
184
185        /**
186         * Set PDB code of structure .
187         *
188         * @param pdb_id  a String specifying the PDBCode
189         * @see #getPDBCode
190         */
191        void setPDBCode (String pdb_id) ;
192
193        /**
194         * Get PDB code of structure.
195         *
196         * @return a String representing the PDBCode value
197         * @see #setPDBCode
198         */
199        String  getPDBCode () ;
200
201        /**
202         * Set biological name of Structure .
203         *
204         * @param name  a String specifying the biological name of the Structure
205         * @see #getName
206         */
207        void setName(String name);
208
209        /**
210         * Get biological name of Structure.
211         *
212         * @return a String representing the biological name of the Structure
213         * @see #setName
214         */
215        String getName();
216
217        /**
218         * Get an identifier corresponding to this structure
219         * @return The StructureIdentifier used to create this structure
220         */
221        StructureIdentifier getStructureIdentifier();
222
223        /**
224         * Set the identifier corresponding to this structure
225         * @param structureIdentifier the structureIdentifier corresponding to this structure
226         */
227        void setStructureIdentifier(StructureIdentifier structureIdentifier);
228
229        /**
230         * Return number of polymer Chains in this Structure for first model.
231         * @return the number of polymer Chains in this Structure
232         */
233        int size() ;
234
235        /**
236         * Return number of chains of model.
237         *
238         * @param modelnr  an int specifying the number of the Model that should be used
239         * @return an int representing the number of Chains in this Model
240         */
241        int size(int modelnr);
242
243        /**
244         * Return the number of models .
245         * In this implementation also XRAY structures have "1 model", since
246         * model is the container for the chains.
247         * to test if a Structure is an NMR structure use {@link #isNmr()}.
248         *
249         * @return an int representing the number of models in this Structure
250         * @see #isNmr()
251         */
252        int nrModels() ;
253
254        /**
255         * Test if this structure is an NMR structure.
256         *
257         * @return true if this Structure has been solved by NMR
258         * @see #nrModels()
259         */
260        boolean isNmr() ;
261
262        /**
263         * Test if this structure is a crystallographic structure, i.e. it is an asymmetric unit
264         * from which it is possible to reconstruct the crystal lattice given cell parameters and
265         * space group.
266         *
267         * @return true if crystallographic, false otherwise
268         */
269        boolean isCrystallographic();
270
271        /**
272         * Add a new model.
273         *
274         * @param model  a List object containing the Chains of the new Model
275         */
276        void addModel(List<Chain> model);
277
278
279        /**
280         * A convenience function if one wants to edit and replace the
281         * models in a structure. Allows to set (replace) the model at position
282         * with the new List of Chains.
283         * @param position starting at 0
284         * @param model list of chains representing a model
285         */
286        void setModel(int position, List<Chain> model);
287
288        /**
289         * Retrieve all Chains belonging to a model .
290         * @see #getChains(int modelnr)
291         *
292         * @param modelnr  an int
293         * @return a List object containing the Chains of Model nr. modelnr
294         */
295        List<Chain> getModel(int modelnr);
296
297        /**
298         * Retrieve all chains for the first model.
299         * This is the same as getChains(0);
300         * @see #getModel(int modelnr)
301         * @see #getChains(int modelnr)
302         *
303         * @return a List object containing the Chains of Model nr. modelnr
304         */
305        List<Chain> getChains();
306
307        /**
308         * Set the chains of a structure, if this is a NMR structure,
309         * this will only set model 0.
310         *
311         * @see #setChains(int, List)
312         *
313         * @param chains the list of chains for this structure.
314         */
315        void setChains(List<Chain> chains);
316
317        /**
318         * Retrieve all chains of a model.
319         * @see #getModel
320         *
321         * @param modelnr  an int
322         * @return a List object containing the Chains of Model nr. modelnr
323         */
324        List<Chain> getChains(int modelnr);
325
326        /**
327         * Set the chains for a model
328         * @param chains the chains for a model
329         * @param modelnr the number of the model
330         */
331        void setChains( int modelnr, List<Chain> chains);
332
333        /**
334         * Return all polymeric chains for the first model
335         *
336         * @return all polymeric chains.
337         * @since 5.0
338         */
339        List<Chain> getPolyChains();
340
341        /**
342         * Return all polymeric chains for the given model index.
343         * @param modelIdx the model index
344         * @return all polymeric chains.
345         * @since 5.0
346         */
347        List<Chain> getPolyChains(int modelIdx);
348
349        /**
350         * Return all non-polymeric chains for the first model
351         *
352         * @return all non-polymeric chains.
353         * @since 5.0
354         */
355        List<Chain> getNonPolyChains();
356
357        /**
358         * Return all non-polymeric chains for the given model index.
359         *
360         * @param modelIdx the model index
361         * @return all non-polymeric chains.
362         * @since 5.0
363         */
364        List<Chain> getNonPolyChains(int modelIdx);
365
366        /**
367         * Return all water chains for the first model
368         * @return
369         * @since 5.0
370         */
371        List<Chain> getWaterChains();
372
373        /**
374         * Return all water chains for the given model index
375         * @param modelIdx
376         * @return
377         * @since 5.0
378         */
379        List<Chain> getWaterChains(int modelIdx);
380
381        /**
382         * Add a new chain to the first model
383         *
384         * @param chain  a Chain object
385         */
386        void addChain(Chain chain);
387
388        /**
389         * Add a new chain to the model specified by the given index
390         *
391         * @param chain    a Chain object
392         * @param modelnr  an int specifying to which model the Chain should be added
393         */
394        void addChain(Chain chain, int modelnr);
395
396        /**
397         * Retrieve a chain by its index within the Structure .
398         *
399         * @param chainIndex the index of the desired chain in the structure
400         * @return a Chain object
401         */
402        Chain getChainByIndex(int chainIndex);
403
404        /**
405         * Retrieve a chain by its indices within the Structure and model.
406         *
407         * @param chainIndex the index of the desired chain in the structure
408         * @param modelnr the model the desired chain is in
409         * @return a Chain object
410         */
411        Chain getChainByIndex(int modelnr, int chainIndex);
412
413        /**
414         * Request a particular chain from a structure.
415         * by default considers only the first model.
416         * @param authId name of a chain that should be returned
417         * @return Chain the requested chain
418         * @throws StructureException
419         * @Deprecated use {@link #getPolyChainByPDB(String)} or {@link #getNonPolyChainsByPDB(String)} instead
420         */
421        @Deprecated
422        Chain findChain(String authId) throws StructureException;
423
424        /**
425         * Request a particular chain from a particular model
426         * @param authId the name of a chain that should be returned
427         * @param modelnr the number of the model to use
428         * @return Chain the requested chain
429         * @throws StructureException
430         * @Deprecated use {@link #getPolyChainByPDB(String, int)} or {@link #getNonPolyChainsByPDB(String, int)} instead
431         */
432        @Deprecated
433        Chain findChain(String authId, int modelnr) throws StructureException;
434
435
436        /**
437         * Check if a chain with the chainId aymId is contained in this structure.
438         *
439         * @param asymId the Id of the chain
440         * @return true if a chain with the id asymId is found
441         */
442        boolean hasChain(String asymId);
443
444        /**
445         * Check if a non polymeric chain with chainId asymId is contained in the structure.
446         *
447         * @param asymId the id of the chain
448         * @return true if a nonpolymeric chain with the asymId is found
449         * @since 5.0
450         */
451        boolean hasNonPolyChain(String asymId);
452
453
454        /**
455         * Check if a chain  with chain name authId is contained in the structure
456         *
457         * @param authId the chain name
458         * @return true if a chain with the name authId is found
459         */
460        boolean hasPdbChain(String authId) ;
461
462        /**
463         * Request a particular group from a structure.
464         * by default considers only the first model in the structure.
465         * @param authId the name of the chain to use
466         * @param pdbResnum the PDB residue number of the requested group
467         * @return Group the requested Group
468         * @throws StructureException
469         */
470        Group findGroup(String authId, String pdbResnum) throws StructureException;
471
472        /**
473         * Request a particular group from a structure.
474         * considers only model nr X. count starts with 0.
475         * @param authId the chain name of the chain to use
476         * @param pdbResnum the PDB residue number of the requested group
477         * @param modelnr the number of the model to use
478         * @return Group the requested Group
479         * @throws StructureException
480         */
481        Group findGroup(String authId, String pdbResnum, int modelnr) throws StructureException;
482
483
484        /**
485         * Request a chain by its public id (author id) for the first model.
486         * Before 5.0 it returned a Chain that had both polymeric and non-polymeric groups
487         * following the PDB-file data model.
488         * Since 5.0 it only returns the polymeric part of the chain.
489         *
490         * @param authId the author id (chainName, public chain id)
491         * @return the Chain that matches the authId
492         * @throws StructureException if chain can't be found
493         * @deprecated use {@link #getPolyChainByPDB(String)} instead
494         */
495        @Deprecated
496        Chain getChainByPDB(String authId) throws StructureException;
497
498        /**
499         * Request a chain by its public id (author id) for the given model index.
500         * Before 5.0 it returned a Chain that had both polymeric and non-polymeric groups
501         * following the PDB-file data model.
502         * Since 5.0 it only returns the polymeric part of the chain.
503         *
504         * @param authId the author id (chainName, public chain id)
505         * @param modelIdx the index of the required model (0-based)
506         * @return the Chain that matches the authId in the model
507         * @throws StructureException if chain can't be found
508         * @deprecated use {@link #getPolyChainByPDB(String,int)} instead
509         */
510        @Deprecated
511        Chain getChainByPDB(String authId, int modelIdx) throws StructureException;
512
513        /**
514         * Retrieve a Chain (polymeric, non-polymeric or water) based on
515         * the 'internal' chain id (asymId) for the first model
516         * @param asymId the asymId (chainId)
517         * @return
518         * @see #getPolyChain(String)
519         * @see #getNonPolyChain(String)
520         * @see #getWaterChain(String)
521         */
522        Chain getChain(String asymId);
523
524        /**
525         * Retrieve a Chain (polymeric, non-polymeric or water) based on
526         * the 'internal' chain id (asymId) for the given model index
527         * @param asymId the asymId (chainId)
528         * @param modelIdx the index of the required model (0-based)
529         * @return
530         * @see #getPolyChain(String, int)
531         * @see #getNonPolyChain(String, int)
532         * @see #getWaterChain(String, int)
533         */
534        Chain getChain(String asymId, int modelIdx);
535
536        /**
537         * Retrieve a polymeric Chain based on the 'internal' chain
538         * id (asymId) for the first model
539         *
540         * <p>See {@link #getPolyChainByPDB(String)} for a similar
541         * method using the chain name (authId).
542         * @param asymId the asymId (chainId)
543         * @return a polymeric Chain or null if it can't be found
544         * @since 5.0
545         */
546        Chain getPolyChain(String asymId);
547
548        /**
549         * Retrieve a polymeric Chain based on the 'internal' chain
550         * id (asymId) for the given model index
551         *
552         * <p>See {@link #getPolyChainByPDB(String, int)} for a similar
553         * method using the chain name (authId).
554         * @param asymId the asymId (chainId)
555         * @param modelIdx the index of the required model (0-based)
556         * @return a polymeric Chain or null if it can't be found
557         * @since 5.0
558         */
559        Chain getPolyChain(String asymId, int modelIdx);
560
561        /**
562         * Retrieve a polymeric Chain based on the 'public' chain
563         * name (authId) for the first model
564         *
565         * <p>See {@link #getPolyChain(String)} for a similar
566         * method using the chain id (asymId).
567         * @param authId the author id (chainName, public chain id)
568         * @return a polymeric Chain or null if it can't be found
569         * @since 5.0
570         */
571        Chain getPolyChainByPDB(String authId);
572
573        /**
574         * Retrieve a polymeric Chain based on the 'public' chain
575         * name (authId) for the given model index.
576         *
577         * <p>See {@link #getPolyChain(String, int)} for a similar
578         * method using the chain id (asymId).
579         * @param authId the author id (chainName, public chain id)
580         * @param modelIdx the index of the required model (0-based)
581         * @return a polymeric Chain or null if it can't be found
582         * @since 5.0
583         *
584         */
585        Chain getPolyChainByPDB(String authId, int modelIdx);
586
587
588        /**
589         * Retrieve a non-polymeric Chain based on the 'internal' chain
590         * id (asymId) for the first model
591         * @param asymId the asymId (chainId)
592         * @return a non-polymeric chain or null if it can't be found
593         * @since 5.0
594         */
595        Chain getNonPolyChain(String asymId);
596
597        /**
598         * Retrieve a non-polymeric Chain based on the 'internal' chain
599         * id (asymId) for the given model index
600         * @param asymId the asymId (chainId)
601         * @param modelIdx the index of the required model (0-based)
602         * @return a non-polymeric Chain or null if it can't be found
603         * @since 5.0
604         */
605        Chain getNonPolyChain(String asymId, int modelIdx);
606
607        /**
608         * Retrieve all non-polymeric Chains corresponding to the given 'public' chain
609         * name (authId) for the first model.
610         * @param authId the author id (chainName, public chain id)
611         * @return a list of non-polymeric Chains, if none found the list will be empty
612         * @since 5.0
613         */
614        List<Chain> getNonPolyChainsByPDB(String authId);
615
616        /**
617         * Retrieve all non-polymeric Chains corresponding to the 'public' chain
618         * name (authId) and the given model index.
619         * @param authId the author id (chainName, public chain id)
620         * @param modelIdx the index of the required model (0-based)
621         * @return a list of non-polymeric Chains, if none found the list will be empty
622         * @since 5.0
623         */
624        List<Chain> getNonPolyChainsByPDB(String authId, int modelIdx);
625
626        /**
627         * Retrieve a water Chain based on the 'internal' chain id (asymId)
628         * for the first model
629         * @param asymId the asymId (chainId)
630         * @return a water Chain or null if it can't be found
631         * @since 5.0
632         */
633        Chain getWaterChain(String asymId);
634
635        /**
636         * Retrieve a water chain based on the 'internal' chain id (asymId)
637         * for the given model index
638         * @param asymId the asymId (chainId)
639         * @param modelIdx the index of the required model (0-based)
640         * @return
641         * @since 5.0
642         */
643        Chain getWaterChain(String asymId, int modelIdx);
644
645        /**
646         * Retrieve a water Chain based on the 'public' chain name (authId)
647         * for the first model
648         * @param authId the author id (chainName, public chain id)
649         * @return
650         * @since 5.0
651         */
652        Chain getWaterChainByPDB(String authId);
653
654        /**
655         * Retrieve a water Chain based on the 'public' chain name (authId)
656         * for the given model index
657         * @param authId the author id (chainName, public chain id)
658         * @param modelIdx the index of the required model (0-based)
659         * @return
660         * @since 5.0
661         */
662        Chain getWaterChainByPDB(String authId, int modelIdx);
663
664
665        /**
666         * Create a String that contains this Structure's contents in PDB file format.
667         *
668         * @return a String that looks like a PDB file
669         * @see FileConvert
670         */
671        String toPDB();
672
673        /**
674         * Create a String that contains this Structure's contents in MMCIF file format.
675         * @return a String representation of the Structure object in mmCIF.
676         */
677        String toMMCIF();
678
679        /**
680         * Set the EntityInfo
681         *
682         * @param molList list of entityinfo objects
683         */
684        void setEntityInfos(List<EntityInfo> molList);
685
686        /**
687         * Get all the EntityInfo for this Structure.
688         *
689         * @return a list of EntityInfos
690         */
691        List<EntityInfo> getEntityInfos();
692
693        /**
694         * Add an EntityInfo to this Structure
695         */
696        void addEntityInfo(EntityInfo entityInfo);
697
698        /**
699         * Set the list of database references for this structure
700         * @param dbrefs list of DBRef objects
701         *
702         */
703        void setDBRefs(List<DBRef> dbrefs);
704
705        /**
706         * Get the list of database references
707         *
708         * @return list of DBRef objects
709         */
710        List<DBRef> getDBRefs();
711
712        /**
713         * Request a particular entity by its entity id (mol id in legacy PDB format)
714         *
715         * @param entityId the number of the entity
716         * @return a entityInfo
717         * @deprecated use {@link #getEntityById(int)} instead
718         */
719        @Deprecated
720        EntityInfo getCompoundById(int entityId);
721
722        /**
723         * Request a particular entity by its entity id (mol id in legacy PDB format)
724         *
725         * @param entityId the number of the entity
726         * @return an entity, or null if the molId was not found
727         */
728        EntityInfo getEntityById(int entityId);
729
730        /**
731         * Return the header information for this PDB file
732         *
733         * @return the PDBHeader object
734         */
735        PDBHeader getPDBHeader();
736
737        /**
738         * Return whether or not the entry has an associated journal article
739         * or ation. The JRNL section is not mandatory and thus may not be
740         * present.
741         * @return flag if a JournalArticle has been found.
742         */
743        boolean hasJournalArticle();
744
745        /**
746         * Get the associated publication as defined by the JRNL records in a PDB
747         * file.
748         * @return a JournalArticle
749         */
750        JournalArticle getJournalArticle();
751
752        /**
753         * Set the associated publication as defined by the JRNL records in a PDB
754         * file.
755         * @param journalArticle a JournalArticle object
756         */
757        void setJournalArticle(JournalArticle journalArticle);
758
759        /**
760         * Get the list of disulfide Bonds as they have been defined in the PDB files
761         *
762         * @return a list of Bonds
763         */
764        List<Bond> getSSBonds();
765
766        /**
767         * Set the list of SSBonds for this structure
768         *
769         * @param ssbonds
770         */
771        void setSSBonds(List<Bond> ssbonds);
772
773        /**
774         * Add a single disulfide Bond to this structure
775         *
776         * @param ssbond a disulfide bond
777         */
778        void addSSBond(Bond ssbond);
779
780        /**
781         * Set the the header information for this PDB file
782         *
783         * @param header the PDBHeader object
784         */
785        void setPDBHeader(PDBHeader header);
786
787        /**
788         * Get the ID used by Hibernate
789         *
790         * @return the ID used by Hibernate
791         */
792        Long getId() ;
793
794        /** set the ID used by Hibernate
795         *
796         * @param id the id
797         */
798        void setId(Long id) ;
799
800        /**
801         * @param sites the sites to set in the structure
802         */
803        void setSites(List<Site> sites);
804
805        /**
806         * @return the sites contained in this structure
807         */
808        List<Site> getSites();
809
810        /**
811         * Set a flag to indicate if this structure is a biological assembly
812         * @param biologicalAssembly true if biological assembly, otherwise false
813         * @since 3.2
814         */
815        void setBiologicalAssembly(boolean biologicalAssembly);
816
817        /**
818         * Get flag that indicates if this structure is a biological assembly
819         * @return  true if biological assembly, otherwise false
820         * @since 3.2
821         */
822        boolean isBiologicalAssembly();
823
824        /**
825         * Set crystallographic information for this structure
826         * @param crystallographicInfo crystallographic information
827         * @since 3.2
828         */
829        void setCrystallographicInfo(PDBCrystallographicInfo crystallographicInfo);
830
831        /**
832         * Get crystallographic information for this structure
833         * @return PDBCrystallographicInfo crystallographic information
834         * @since 3.2
835         */
836        PDBCrystallographicInfo getCrystallographicInfo();
837
838        /**
839         * Resets all models of this Structure
840         * @since 4.0.1
841         */
842        void resetModels();
843
844        /**
845         * Returns the PDB identifier associated with this StructureIdentifier.
846         * @deprecated From BioJava 4.2, use {@link #getPDBCode()} or
847         *  <code>getStructureIdentifier().toCanonical().getPdbId()</code>
848         */
849        @Deprecated
850        String getPdbId();
851
852        /**
853         * Returns the list of {@link ResidueRange ResidueRanges} that this StructureIdentifier defines.
854         * This is a unique representation.
855         * @deprecated From BioJava 4.2, use
856         *  <code>getStructureIdentifier().toCanonical().getResidueRanges()</code>
857         */
858        @Deprecated
859        List<? extends ResidueRange> getResidueRanges();
860
861        /**
862         * Returns a list of residue ranges. For example:
863         * <pre>
864         * getRanges().get(0): 'A'
865         * getRanges().get(1): 'B_5-100'
866         * </pre>
867         * This is a unique representation.
868         * @deprecated From BioJava 4.2, use
869         *  <code>getStructureIdentifier().toCanonical().getRanges()</code>
870         */
871        @Deprecated
872        List<String> getRanges();
873
874        /**
875         * Get a string representing this structure's contents. The following places
876         * are searched for a non-null value, with the first being returned:
877         * <ol>
878         * <li>{@link #getStructureIdentifier()}.getIdentifier(), which should give
879         *     the string originally used to create the structure
880         * <li>{@link #getName()}
881         * <li>A combination of {@link #getPDBCode()} with a heuristic description
882         *     of the residue ranges, in {@link SubstructureIdentifier} format.
883         * </ol>
884         * @return A {@link SubstructureIdentifier}-format string describing the residue ranges in this structure
885         * @since The behavior of this method changed in BioJava 4.2. Previously it
886         *  returned the same value as {@link #getPDBCode()}
887         */
888        String getIdentifier();
889}