Class StructureImpl

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Structure

    public class StructureImpl
    extends java.lang.Object
    implements Structure
    Implementation of a PDB Structure. This class provides the data contained in a PDB file. to get structure objects from different sources see io package.
    Since:
    1.4
    Version:
    %I% %G%
    Author:
    Andreas Prlic, Jules Jacobsen
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      StructureImpl()
      Constructs a StructureImpl object.
      StructureImpl​(Chain c)
      construct a Structure object that contains a particular chain
      StructureImpl​(Group g)
      Construct a Structure object that only contains a single group
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addChain​(Chain chain)
      Add a new chain to the first model
      void addChain​(Chain chain, int modelnr)
      Add a new chain to the model specified by the given index
      void addEntityInfo​(EntityInfo entityInfo)
      Add an EntityInfo to this Structure
      void addModel​(java.util.List<Chain> modelChains)
      Add a new model.
      void addSSBond​(Bond ssbond)
      Adds a single disulfide Bond to this structure
      Structure clone()
      returns an identical copy of this structure .
      Chain findChain​(java.lang.String chainId)
      Request a particular chain from a structure.
      Chain findChain​(java.lang.String chainName, int modelnr)
      Request a particular chain from a particular model
      Group findGroup​(java.lang.String chainName, java.lang.String pdbResnum)
      Request a particular group from a structure.
      Group findGroup​(java.lang.String chainName, java.lang.String pdbResnum, int modelnr)
      Request a particular group from a structure.
      Chain getChain​(java.lang.String asymId)
      Retrieve a Chain (polymeric, non-polymeric or water) based on the 'internal' chain id (asymId) for the first model
      Chain getChain​(java.lang.String asymId, int modelnr)
      Retrieve a Chain (polymeric, non-polymeric or water) based on the 'internal' chain id (asymId) for the given model index
      Chain getChainByIndex​(int number)
      Retrieve a chain by its index within the Structure .
      Chain getChainByIndex​(int modelnr, int number)
      Retrieve a chain by its indices within the Structure and model.
      Chain getChainByPDB​(java.lang.String chainId)
      Request a chain by its public id (author id) for the first model.
      Chain getChainByPDB​(java.lang.String authId, int modelnr)
      Request a chain by its public id (author id) for the given model index.
      java.util.List<Chain> getChains()
      Retrieve all chains for the first model.
      java.util.List<Chain> getChains​(int modelIdx)
      Retrieve all chains of a model.
      EntityInfo getCompoundById​(int molId)
      Request a particular entity by its entity id (mol id in legacy PDB format)
      PDBCrystallographicInfo getCrystallographicInfo()
      Gets crystallographic information for this structure
      java.util.List<DBRef> getDBRefs()
      Get the list of database references
      EntityInfo getEntityById​(int entityId)
      Request a particular entity by its entity id (mol id in legacy PDB format)
      java.util.List<EntityInfo> getEntityInfos()
      Get all the EntityInfo for this Structure.
      java.lang.Long getId()
      get the ID used by Hibernate
      java.lang.String getIdentifier()
      Get a string representing this structure's contents.
      JournalArticle getJournalArticle()
      get the associated publication as defined by the JRNL records in a PDB file.
      java.util.List<Chain> getModel​(int modelnr)
      Retrieve all Chains belonging to a model .
      java.lang.String getName()
      Get biological name of Structure.
      Chain getNonPolyChain​(java.lang.String asymId)
      Retrieve a non-polymeric Chain based on the 'internal' chain id (asymId) for the first model
      Chain getNonPolyChain​(java.lang.String asymId, int modelIdx)
      Retrieve a non-polymeric Chain based on the 'internal' chain id (asymId) for the given model index
      java.util.List<Chain> getNonPolyChains()
      Return all non-polymeric chains for the first model
      java.util.List<Chain> getNonPolyChains​(int modelIdx)
      Return all non-polymeric chains for the given model index.
      java.util.List<Chain> getNonPolyChainsByPDB​(java.lang.String authId)
      Retrieve all non-polymeric Chains corresponding to the given 'public' chain name (authId) for the first model.
      java.util.List<Chain> getNonPolyChainsByPDB​(java.lang.String authId, int modelIdx)
      Retrieve all non-polymeric Chains corresponding to the 'public' chain name (authId) and the given model index.
      java.lang.String getPDBCode()
      Get PDB code of structure.
      PDBHeader getPDBHeader()
      Return the header information for this PDB file
      java.lang.String getPdbId()
      Deprecated.
      Chain getPolyChain​(java.lang.String asymId)
      Retrieve a polymeric Chain based on the 'internal' chain id (asymId) for the first model
      Chain getPolyChain​(java.lang.String asymId, int modelIdx)
      Retrieve a polymeric Chain based on the 'internal' chain id (asymId) for the given model index
      Chain getPolyChainByPDB​(java.lang.String authId)
      Retrieve a polymeric Chain based on the 'public' chain name (authId) for the first model
      Chain getPolyChainByPDB​(java.lang.String authId, int modelIdx)
      Retrieve a polymeric Chain based on the 'public' chain name (authId) for the given model index.
      java.util.List<Chain> getPolyChains()
      Return all polymeric chains for the first model
      java.util.List<Chain> getPolyChains​(int modelIdx)
      Return all polymeric chains for the given model index.
      java.util.List<java.lang.String> getRanges()
      Deprecated.
      java.util.List<ResidueRange> getResidueRanges()
      Deprecated.
      java.util.List<Site> getSites()  
      java.util.List<Bond> getSSBonds()
      Get the list of disulfide Bonds as they have been defined in the PDB files
      StructureIdentifier getStructureIdentifier()
      Get an identifier corresponding to this structure
      Chain getWaterChain​(java.lang.String asymId)
      Retrieve a water Chain based on the 'internal' chain id (asymId) for the first model
      Chain getWaterChain​(java.lang.String asymId, int modelIdx)
      Retrieve a water chain based on the 'internal' chain id (asymId) for the given model index
      Chain getWaterChainByPDB​(java.lang.String authId)
      Retrieve a water Chain based on the 'public' chain name (authId) for the first model
      Chain getWaterChainByPDB​(java.lang.String authId, int modelIdx)
      Retrieve a water Chain based on the 'public' chain name (authId) for the given model index
      java.util.List<Chain> getWaterChains()
      Return all water chains for the first model
      java.util.List<Chain> getWaterChains​(int modelIdx)
      Return all water chains for the given model index
      boolean hasChain​(java.lang.String authId)
      Check if a chain with the chainId aymId is contained in this structure.
      boolean hasJournalArticle()
      Return whether or not the entry has an associated journal article or publication.
      boolean hasNonPolyChain​(java.lang.String asymId)
      Check if a non polymeric chain with chainId asymId is contained in the structure.
      boolean hasPdbChain​(java.lang.String authId)
      Check if a chain with chain name authId is contained in the structure
      boolean isBiologicalAssembly()
      Gets flag that indicates if this structure is a biological assembly
      boolean isCrystallographic()
      Whether this Structure is a crystallographic structure or not.
      boolean isNmr()
      Whether this Structure is a NMR structure or not.
      int nrModels()
      return number of models.
      void resetModels()
      Resets all models of this Structure
      void setBiologicalAssembly​(boolean biologicalAssembly)
      Sets a flag to indicate if this structure is a biological assembly
      void setChains​(int modelnr, java.util.List<Chain> chains)
      Set the chains for a model
      void setChains​(java.util.List<Chain> chains)
      Set the chains of a structure, if this is a NMR structure, this will only set model 0.
      void setCrystallographicInfo​(PDBCrystallographicInfo crystallographicInfo)
      Sets crystallographic information for this structure
      void setDBRefs​(java.util.List<DBRef> dbrefs)
      Set the list of database references for this structure
      void setEntityInfos​(java.util.List<EntityInfo> molList)
      Set the EntityInfo
      void setId​(java.lang.Long id)
      set the ID used by Hibernate
      void setJournalArticle​(JournalArticle journalArticle)
      set the associated publication as defined by the JRNL records in a PDB file.
      void setModel​(int position, java.util.List<Chain> modelChains)
      A convenience function if one wants to edit and replace the models in a structure.
      void setName​(java.lang.String nam)
      Set biological name of Structure .
      void setPDBCode​(java.lang.String pdb_id_)
      Set PDB code of structure .
      void setPDBHeader​(PDBHeader pdbHeader)
      Set the the header information for this PDB file
      void setSites​(java.util.List<Site> sites)  
      void setSSBonds​(java.util.List<Bond> ssbonds)
      Set the list of SSBonds for this structure
      void setStructureIdentifier​(StructureIdentifier structureIdentifier)
      Set the identifier corresponding to this structure
      int size()
      Return number of polymer Chains in this Structure for first model.
      int size​(int modelnr)
      return number of chains of model.
      java.lang.String toMMCIF()
      Create a String that contains this Structure's contents in MMCIF file format.
      java.lang.String toPDB()
      Create a String that contains this Structure's contents in PDB file format.
      java.lang.String toString()
      String representation.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StructureImpl

        public StructureImpl()
        Constructs a StructureImpl object.
      • StructureImpl

        public StructureImpl​(Group g)
        Construct a Structure object that only contains a single group
        Parameters:
        g - group object
      • StructureImpl

        public StructureImpl​(Chain c)
        construct a Structure object that contains a particular chain
        Parameters:
        c - chain
    • Method Detail

      • getId

        public java.lang.Long getId()
        get the ID used by Hibernate
        Specified by:
        getId in interface Structure
        Returns:
        the ID used by Hibernate
      • setId

        public void setId​(java.lang.Long id)
        set the ID used by Hibernate
        Specified by:
        setId in interface Structure
        Parameters:
        id - the hibernate ID
      • clone

        public Structure clone()
        returns an identical copy of this structure .
        Specified by:
        clone in interface Structure
        Overrides:
        clone in class java.lang.Object
        Returns:
        an identical Structure object
      • findGroup

        public Group findGroup​(java.lang.String chainName,
                               java.lang.String pdbResnum,
                               int modelnr)
                        throws StructureException
        Request a particular group from a structure. considers only model nr X. count starts with 0.
        Specified by:
        findGroup in interface Structure
        Parameters:
        chainName - the chain name of the chain to use
        pdbResnum - the PDB residue number of the requested group
        modelnr - the number of the model to use
        Returns:
        Group the requested Group
        Throws:
        StructureException
      • findGroup

        public Group findGroup​(java.lang.String chainName,
                               java.lang.String pdbResnum)
                        throws StructureException
        Request a particular group from a structure. by default considers only the first model in the structure.
        Specified by:
        findGroup in interface Structure
        Parameters:
        chainName - the name of the chain to use
        pdbResnum - the PDB residue number of the requested group
        Returns:
        Group the requested Group
        Throws:
        StructureException
      • findChain

        public Chain findChain​(java.lang.String chainName,
                               int modelnr)
                        throws StructureException
        Request a particular chain from a particular model
        Specified by:
        findChain in interface Structure
        Parameters:
        chainName - the name of a chain that should be returned
        modelnr - the number of the model to use
        Returns:
        Chain the requested chain
        Throws:
        StructureException
      • findChain

        public Chain findChain​(java.lang.String chainId)
                        throws StructureException
        Request a particular chain from a structure. by default considers only the first model.
        Specified by:
        findChain in interface Structure
        Parameters:
        chainId - name of a chain that should be returned
        Returns:
        Chain the requested chain
        Throws:
        StructureException
      • setPDBCode

        public void setPDBCode​(java.lang.String pdb_id_)
        Set PDB code of structure .
        Specified by:
        setPDBCode in interface Structure
        Parameters:
        pdb_id_ - a String specifying the PDBCode
        See Also:
        Structure.getPDBCode()
      • setName

        public void setName​(java.lang.String nam)
        Set biological name of Structure .
        Specified by:
        setName in interface Structure
        Parameters:
        nam - a String specifying the biological name of the Structure
        See Also:
        Structure.getName()
      • getStructureIdentifier

        public StructureIdentifier getStructureIdentifier()
        Description copied from interface: Structure
        Get an identifier corresponding to this structure
        Specified by:
        getStructureIdentifier in interface Structure
        Returns:
        The StructureIdentifier used to create this structure
      • setStructureIdentifier

        public void setStructureIdentifier​(StructureIdentifier structureIdentifier)
        Description copied from interface: Structure
        Set the identifier corresponding to this structure
        Specified by:
        setStructureIdentifier in interface Structure
        Parameters:
        structureIdentifier - the structureIdentifier corresponding to this structure
      • addChain

        public void addChain​(Chain chain)
        Add a new chain to the first model
        Specified by:
        addChain in interface Structure
        Parameters:
        chain - a Chain object
      • addChain

        public void addChain​(Chain chain,
                             int modelnr)
        Add a new chain to the model specified by the given index
        Specified by:
        addChain in interface Structure
        Parameters:
        chain - a Chain object
        modelnr - an int specifying to which model the Chain should be added
      • getChainByIndex

        public Chain getChainByIndex​(int number)
        Retrieve a chain by its index within the Structure .
        Specified by:
        getChainByIndex in interface Structure
        Parameters:
        number - the index of the desired chain in the structure
        Returns:
        a Chain object
      • getChainByIndex

        public Chain getChainByIndex​(int modelnr,
                                     int number)
        Retrieve a chain by its indices within the Structure and model.
        Specified by:
        getChainByIndex in interface Structure
        Parameters:
        modelnr - the model the desired chain is in
        number - the index of the desired chain in the structure
        Returns:
        a Chain object
      • addModel

        public void addModel​(java.util.List<Chain> modelChains)
        Add a new model.
        Specified by:
        addModel in interface Structure
        Parameters:
        modelChains - a List object containing the Chains of the new Model
      • setChains

        public void setChains​(java.util.List<Chain> chains)
        Set the chains of a structure, if this is a NMR structure, this will only set model 0.
        Specified by:
        setChains in interface Structure
        Parameters:
        chains - the list of chains for this structure.
        See Also:
        Structure.setChains(int, List)
      • setModel

        public void setModel​(int position,
                             java.util.List<Chain> modelChains)
        A convenience function if one wants to edit and replace the models in a structure. Allows to set (replace) the model at position with the new List of Chains.
        Specified by:
        setModel in interface Structure
        Parameters:
        position - starting at 0
        modelChains - list of chains representing a model
      • toString

        public java.lang.String toString()
        String representation.
        Specified by:
        toString in interface Structure
        Overrides:
        toString in class java.lang.Object
      • size

        public int size()
        Description copied from interface: Structure
        Return number of polymer Chains in this Structure for first model.
        Specified by:
        size in interface Structure
        Returns:
        the number of polymer Chains in this Structure
      • size

        public int size​(int modelnr)
        return number of chains of model.
        Specified by:
        size in interface Structure
        Parameters:
        modelnr - an int specifying the number of the Model that should be used
        Returns:
        an int representing the number of Chains in this Model
      • nrModels

        public int nrModels()
        return number of models.
        Specified by:
        nrModels in interface Structure
        Returns:
        an int representing the number of models in this Structure
        See Also:
        Structure.isNmr()
      • isCrystallographic

        public boolean isCrystallographic()
        Whether this Structure is a crystallographic structure or not. It will first check the experimental technique and if not present it will try to guess from the presence of a space group and sensible cell parameters
        Specified by:
        isCrystallographic in interface Structure
        Returns:
        true if crystallographic, false otherwise
      • isNmr

        public boolean isNmr()
        Whether this Structure is a NMR structure or not. It will first check the experimental technique and if not present it will try to guess from the presence of more than 1 model and from b-factors being 0 in first chain of first model
        Specified by:
        isNmr in interface Structure
        Returns:
        true if NMR, false otherwise
        See Also:
        Structure.nrModels()
      • getChains

        public java.util.List<Chain> getChains​(int modelIdx)
        Retrieve all chains of a model.
        Specified by:
        getChains in interface Structure
        Parameters:
        modelIdx - an int
        Returns:
        a List object containing the Chains of Model nr. modelnr
        See Also:
        Structure.getModel(int)
      • getPolyChains

        public java.util.List<Chain> getPolyChains()
        Description copied from interface: Structure
        Return all polymeric chains for the first model
        Specified by:
        getPolyChains in interface Structure
        Returns:
        all polymeric chains.
      • getPolyChains

        public java.util.List<Chain> getPolyChains​(int modelIdx)
        Description copied from interface: Structure
        Return all polymeric chains for the given model index.
        Specified by:
        getPolyChains in interface Structure
        Parameters:
        modelIdx - the model index
        Returns:
        all polymeric chains.
      • getNonPolyChains

        public java.util.List<Chain> getNonPolyChains()
        Description copied from interface: Structure
        Return all non-polymeric chains for the first model
        Specified by:
        getNonPolyChains in interface Structure
        Returns:
        all non-polymeric chains.
      • getNonPolyChains

        public java.util.List<Chain> getNonPolyChains​(int modelIdx)
        Description copied from interface: Structure
        Return all non-polymeric chains for the given model index.
        Specified by:
        getNonPolyChains in interface Structure
        Parameters:
        modelIdx - the model index
        Returns:
        all non-polymeric chains.
      • getWaterChains

        public java.util.List<Chain> getWaterChains()
        Description copied from interface: Structure
        Return all water chains for the first model
        Specified by:
        getWaterChains in interface Structure
        Returns:
      • getWaterChains

        public java.util.List<Chain> getWaterChains​(int modelIdx)
        Description copied from interface: Structure
        Return all water chains for the given model index
        Specified by:
        getWaterChains in interface Structure
        Returns:
      • setChains

        public void setChains​(int modelnr,
                              java.util.List<Chain> chains)
        Set the chains for a model
        Specified by:
        setChains in interface Structure
        Parameters:
        modelnr - the number of the model
        chains - the chains for a model
      • getChainByPDB

        public Chain getChainByPDB​(java.lang.String authId,
                                   int modelnr)
                            throws StructureException
        Request a chain by its public id (author id) for the given model index. Before 5.0 it returned a Chain that had both polymeric and non-polymeric groups following the PDB-file data model. Since 5.0 it only returns the polymeric part of the chain.
        Specified by:
        getChainByPDB in interface Structure
        Parameters:
        authId - the author id (chainName, public chain id)
        modelnr - the index of the required model (0-based)
        Returns:
        the Chain that matches the authId in the model
        Throws:
        StructureException - if chain can't be found
      • getChainByPDB

        public Chain getChainByPDB​(java.lang.String chainId)
                            throws StructureException
        Request a chain by its public id (author id) for the first model. Before 5.0 it returned a Chain that had both polymeric and non-polymeric groups following the PDB-file data model. Since 5.0 it only returns the polymeric part of the chain.
        Specified by:
        getChainByPDB in interface Structure
        Parameters:
        chainId - the author id (chainName, public chain id)
        Returns:
        the Chain that matches the authId
        Throws:
        StructureException - if chain can't be found
      • getPolyChain

        public Chain getPolyChain​(java.lang.String asymId)
        Description copied from interface: Structure
        Retrieve a polymeric Chain based on the 'internal' chain id (asymId) for the first model

        See Structure.getPolyChainByPDB(String) for a similar method using the chain name (authId).

        Specified by:
        getPolyChain in interface Structure
        Parameters:
        asymId - the asymId (chainId)
        Returns:
        a polymeric Chain or null if it can't be found
      • getPolyChain

        public Chain getPolyChain​(java.lang.String asymId,
                                  int modelIdx)
        Description copied from interface: Structure
        Retrieve a polymeric Chain based on the 'internal' chain id (asymId) for the given model index

        See Structure.getPolyChainByPDB(String, int) for a similar method using the chain name (authId).

        Specified by:
        getPolyChain in interface Structure
        Parameters:
        asymId - the asymId (chainId)
        modelIdx - the index of the required model (0-based)
        Returns:
        a polymeric Chain or null if it can't be found
      • getNonPolyChain

        public Chain getNonPolyChain​(java.lang.String asymId)
        Description copied from interface: Structure
        Retrieve a non-polymeric Chain based on the 'internal' chain id (asymId) for the first model
        Specified by:
        getNonPolyChain in interface Structure
        Parameters:
        asymId - the asymId (chainId)
        Returns:
        a non-polymeric chain or null if it can't be found
      • getNonPolyChain

        public Chain getNonPolyChain​(java.lang.String asymId,
                                     int modelIdx)
        Description copied from interface: Structure
        Retrieve a non-polymeric Chain based on the 'internal' chain id (asymId) for the given model index
        Specified by:
        getNonPolyChain in interface Structure
        Parameters:
        asymId - the asymId (chainId)
        modelIdx - the index of the required model (0-based)
        Returns:
        a non-polymeric Chain or null if it can't be found
      • getPolyChainByPDB

        public Chain getPolyChainByPDB​(java.lang.String authId)
        Description copied from interface: Structure
        Retrieve a polymeric Chain based on the 'public' chain name (authId) for the first model

        See Structure.getPolyChain(String) for a similar method using the chain id (asymId).

        Specified by:
        getPolyChainByPDB in interface Structure
        Parameters:
        authId - the author id (chainName, public chain id)
        Returns:
        a polymeric Chain or null if it can't be found
      • getPolyChainByPDB

        public Chain getPolyChainByPDB​(java.lang.String authId,
                                       int modelIdx)
        Description copied from interface: Structure
        Retrieve a polymeric Chain based on the 'public' chain name (authId) for the given model index.

        See Structure.getPolyChain(String, int) for a similar method using the chain id (asymId).

        Specified by:
        getPolyChainByPDB in interface Structure
        Parameters:
        authId - the author id (chainName, public chain id)
        modelIdx - the index of the required model (0-based)
        Returns:
        a polymeric Chain or null if it can't be found
      • getNonPolyChainsByPDB

        public java.util.List<Chain> getNonPolyChainsByPDB​(java.lang.String authId)
        Description copied from interface: Structure
        Retrieve all non-polymeric Chains corresponding to the given 'public' chain name (authId) for the first model.
        Specified by:
        getNonPolyChainsByPDB in interface Structure
        Parameters:
        authId - the author id (chainName, public chain id)
        Returns:
        a list of non-polymeric Chains, if none found the list will be empty
      • getNonPolyChainsByPDB

        public java.util.List<Chain> getNonPolyChainsByPDB​(java.lang.String authId,
                                                           int modelIdx)
        Description copied from interface: Structure
        Retrieve all non-polymeric Chains corresponding to the 'public' chain name (authId) and the given model index.
        Specified by:
        getNonPolyChainsByPDB in interface Structure
        Parameters:
        authId - the author id (chainName, public chain id)
        modelIdx - the index of the required model (0-based)
        Returns:
        a list of non-polymeric Chains, if none found the list will be empty
      • getWaterChain

        public Chain getWaterChain​(java.lang.String asymId)
        Description copied from interface: Structure
        Retrieve a water Chain based on the 'internal' chain id (asymId) for the first model
        Specified by:
        getWaterChain in interface Structure
        Parameters:
        asymId - the asymId (chainId)
        Returns:
        a water Chain or null if it can't be found
      • getWaterChain

        public Chain getWaterChain​(java.lang.String asymId,
                                   int modelIdx)
        Description copied from interface: Structure
        Retrieve a water chain based on the 'internal' chain id (asymId) for the given model index
        Specified by:
        getWaterChain in interface Structure
        Parameters:
        asymId - the asymId (chainId)
        modelIdx - the index of the required model (0-based)
        Returns:
      • getWaterChainByPDB

        public Chain getWaterChainByPDB​(java.lang.String authId)
        Description copied from interface: Structure
        Retrieve a water Chain based on the 'public' chain name (authId) for the first model
        Specified by:
        getWaterChainByPDB in interface Structure
        Parameters:
        authId - the author id (chainName, public chain id)
        Returns:
      • getWaterChainByPDB

        public Chain getWaterChainByPDB​(java.lang.String authId,
                                        int modelIdx)
        Description copied from interface: Structure
        Retrieve a water Chain based on the 'public' chain name (authId) for the given model index
        Specified by:
        getWaterChainByPDB in interface Structure
        Parameters:
        authId - the author id (chainName, public chain id)
        modelIdx - the index of the required model (0-based)
        Returns:
      • toPDB

        public java.lang.String toPDB()
        Create a String that contains this Structure's contents in PDB file format.
        Specified by:
        toPDB in interface Structure
        Returns:
        a String that looks like a PDB file
        See Also:
        FileConvert
      • toMMCIF

        public java.lang.String toMMCIF()
        Create a String that contains this Structure's contents in MMCIF file format.
        Specified by:
        toMMCIF in interface Structure
        Returns:
        a String representation of the Structure object in mmCIF.
      • hasChain

        public boolean hasChain​(java.lang.String authId)
        Check if a chain with the chainId aymId is contained in this structure.
        Specified by:
        hasChain in interface Structure
        Parameters:
        authId - the Id of the chain
        Returns:
        true if a chain with the id asymId is found
      • hasNonPolyChain

        public boolean hasNonPolyChain​(java.lang.String asymId)
        Check if a non polymeric chain with chainId asymId is contained in the structure.
        Specified by:
        hasNonPolyChain in interface Structure
        Parameters:
        asymId - the id of the chain
        Returns:
        true if a nonpolymeric chain with the asymId is found
      • hasPdbChain

        public boolean hasPdbChain​(java.lang.String authId)
        Check if a chain with chain name authId is contained in the structure
        Specified by:
        hasPdbChain in interface Structure
        Parameters:
        authId - the chain name
        Returns:
        true if a chain with the name authId is found
      • setEntityInfos

        public void setEntityInfos​(java.util.List<EntityInfo> molList)
        Set the EntityInfo
        Specified by:
        setEntityInfos in interface Structure
        Parameters:
        molList - list of entityinfo objects
      • getEntityInfos

        public java.util.List<EntityInfo> getEntityInfos()
        Get all the EntityInfo for this Structure.
        Specified by:
        getEntityInfos in interface Structure
        Returns:
        a list of EntityInfos
      • getCompoundById

        public EntityInfo getCompoundById​(int molId)
        Request a particular entity by its entity id (mol id in legacy PDB format)
        Specified by:
        getCompoundById in interface Structure
        Parameters:
        molId - the number of the entity
        Returns:
        a entityInfo
      • getEntityById

        public EntityInfo getEntityById​(int entityId)
        Request a particular entity by its entity id (mol id in legacy PDB format)
        Specified by:
        getEntityById in interface Structure
        Parameters:
        entityId - the number of the entity
        Returns:
        an entity, or null if the molId was not found
      • getDBRefs

        public java.util.List<DBRef> getDBRefs()
        Get the list of database references
        Specified by:
        getDBRefs in interface Structure
        Returns:
        list of DBRef objects
      • setDBRefs

        public void setDBRefs​(java.util.List<DBRef> dbrefs)
        Set the list of database references for this structure
        Specified by:
        setDBRefs in interface Structure
        Parameters:
        dbrefs - list of DBRef objects
      • getPDBHeader

        public PDBHeader getPDBHeader()
        Return the header information for this PDB file
        Specified by:
        getPDBHeader in interface Structure
        Returns:
        the PDBHeader object
      • setPDBHeader

        public void setPDBHeader​(PDBHeader pdbHeader)
        Set the the header information for this PDB file
        Specified by:
        setPDBHeader in interface Structure
        Parameters:
        pdbHeader - the PDBHeader object
      • getSSBonds

        public java.util.List<Bond> getSSBonds()
        Get the list of disulfide Bonds as they have been defined in the PDB files
        Specified by:
        getSSBonds in interface Structure
        Returns:
        a list of Bonds
      • setSSBonds

        public void setSSBonds​(java.util.List<Bond> ssbonds)
        Set the list of SSBonds for this structure
        Specified by:
        setSSBonds in interface Structure
      • addSSBond

        public void addSSBond​(Bond ssbond)
        Adds a single disulfide Bond to this structure
        Specified by:
        addSSBond in interface Structure
        Parameters:
        ssbond - the SSBond.
      • hasJournalArticle

        public boolean hasJournalArticle()
        Return whether or not the entry has an associated journal article or publication. The JRNL section is not mandatory and thus may not be present.
        Specified by:
        hasJournalArticle in interface Structure
        Returns:
        flag if a JournalArticle could be found.
      • getJournalArticle

        public JournalArticle getJournalArticle()
        get the associated publication as defined by the JRNL records in a PDB file.
        Specified by:
        getJournalArticle in interface Structure
        Returns:
        a JournalArticle
      • setJournalArticle

        public void setJournalArticle​(JournalArticle journalArticle)
        set the associated publication as defined by the JRNL records in a PDB file.
        Specified by:
        setJournalArticle in interface Structure
        Parameters:
        journalArticle - the article
      • getSites

        public java.util.List<Site> getSites()
        Specified by:
        getSites in interface Structure
        Returns:
        the sites contained in this structure
      • setSites

        public void setSites​(java.util.List<Site> sites)
        Specified by:
        setSites in interface Structure
        Parameters:
        sites - the sites to set in the structure
      • setBiologicalAssembly

        public void setBiologicalAssembly​(boolean biologicalAssembly)
        Sets a flag to indicate if this structure is a biological assembly
        Specified by:
        setBiologicalAssembly in interface Structure
        Parameters:
        biologicalAssembly - true if biological assembly, otherwise false
        Since:
        3.2
      • isBiologicalAssembly

        public boolean isBiologicalAssembly()
        Gets flag that indicates if this structure is a biological assembly
        Specified by:
        isBiologicalAssembly in interface Structure
        Returns:
        the sites contained in this structure
        Since:
        3.2
      • setCrystallographicInfo

        public void setCrystallographicInfo​(PDBCrystallographicInfo crystallographicInfo)
        Sets crystallographic information for this structure
        Specified by:
        setCrystallographicInfo in interface Structure
        Parameters:
        crystallographicInfo - crystallographic information
        Since:
        3.2
      • getPdbId

        @Deprecated
        public java.lang.String getPdbId()
        Deprecated.
        Returns the PDB identifier associated with this StructureIdentifier.
        Specified by:
        getPdbId in interface Structure
      • resetModels

        public void resetModels()
        Resets all models of this Structure
        Specified by:
        resetModels in interface Structure
      • getResidueRanges

        @Deprecated
        public java.util.List<ResidueRange> getResidueRanges()
        Deprecated.
        Returns the list of ResidueRanges that this StructureIdentifier defines. This is a unique representation.
        Specified by:
        getResidueRanges in interface Structure
      • getRanges

        @Deprecated
        public java.util.List<java.lang.String> getRanges()
        Deprecated.
        Returns a list of residue ranges. For example:
         getRanges().get(0): 'A'
         getRanges().get(1): 'B_5-100'
         
        This is a unique representation.
        Specified by:
        getRanges in interface Structure