Class FileParsingParameters

  • All Implemented Interfaces:
    java.io.Serializable

    public class FileParsingParameters
    extends java.lang.Object
    implements java.io.Serializable
    A class that configures parameters that can be sent to the PDB file parsers
    Author:
    Andreas Prlic
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ATOM_CA_THRESHOLD
      The maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file.
      static int MAX_ATOMS
      The maximum number of atoms we will add to a structure, this protects from memory overflows in the few really big protein structures.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String[] getAcceptedAtomNames()
      By default the parser will read in all atoms (unless using the CAonly switch).
      int getAtomCaThreshold()
      The maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file.
      int getMaxAtoms()
      The maximum numbers of atoms to load in a protein structure (prevents memory overflows)
      boolean isAlignSeqRes()
      Flag if the SEQRES amino acids should be aligned with the ATOM amino acids.
      boolean isHeaderOnly()
      Parse only the PDB file header out of the files
      boolean isParseBioAssembly()
      Should the biological assembly info (REMARK 350) be parsed from the PDB file?
      boolean isParseCAOnly()
      The flag if only the C-alpha atoms of the structure should be parsed.
      boolean isParseSecStruc()
      Is secondary structure assignment being parsed from the file? default is null
      boolean isUpdateRemediatedFiles()
      Deprecated.
      Properties which impact downloading and caching behavior have been moved to the StructureIOFile implementations.
      boolean isUseInternalChainId()
      Should we use internal (asym_id) or public facing (author) chain ids
      void setAcceptedAtomNames​(java.lang.String[] fullAtomNames)
      By default the parser will read in all atoms (unless using the CAonly switch).
      void setAlignSeqRes​(boolean alignSeqRes)
      Define if the SEQRES in the structure should be aligned with the ATOM records if yes, the AminoAcids in structure.getSeqRes will have the coordinates set.
      void setAtomCaThreshold​(int atomCaThreshold)
      The maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file.
      void setCreateAtomBonds​(boolean createAtomBonds)
      Should we create bonds between atoms when parsing a file.
      void setCreateAtomCharges​(boolean createAtomCharges)
      Should we create charges on atoms when parsing a file?
      void setDefault()  
      void setHeaderOnly​(boolean headerOnly)
      Parse only the PDB file header out of the files
      void setMaxAtoms​(int maxAtoms)
      The maximum numbers of atoms to load in a protein structure (prevents memory overflows)
      void setParseBioAssembly​(boolean parseBioAssembly)
      Should the biological assembly info (REMARK 350) be parsed from the PDB file?
      void setParseCAOnly​(boolean parseCAOnly)
      Flag if only the C-alpha atoms of the structure should be parsed.
      void setParseSecStruc​(boolean parseSecStruc)
      A flag to tell the parser to parse the Author's secondary structure assignment from the file default is set to false, i.e.
      void setUpdateRemediatedFiles​(boolean updateRemediatedFiles)
      Deprecated.
      Properties which impact downloading and caching behavior have been moved to the StructureIOFile implementations.
      void setUseInternalChainId​(boolean useInternalChainId)
      Set the useInternalChainId parsing mode.
      boolean shouldCreateAtomBonds()
      Should we create bonds between atoms when parsing a file?
      boolean shouldCreateAtomCharges()
      Should we create charges on atoms when parsing a file?
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ATOM_CA_THRESHOLD

        public static final int ATOM_CA_THRESHOLD
        The maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file. If this limit is exceeded also the SEQRES groups will be ignored.
        See Also:
        Constant Field Values
      • MAX_ATOMS

        public static final int MAX_ATOMS
        The maximum number of atoms we will add to a structure, this protects from memory overflows in the few really big protein structures.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FileParsingParameters

        public FileParsingParameters()
    • Method Detail

      • setDefault

        public void setDefault()
      • isParseSecStruc

        public boolean isParseSecStruc()
        Is secondary structure assignment being parsed from the file? default is null
        Returns:
        boolean if HELIX STRAND and TURN fields are being parsed
      • setParseSecStruc

        public void setParseSecStruc​(boolean parseSecStruc)
        A flag to tell the parser to parse the Author's secondary structure assignment from the file default is set to false, i.e. do NOT parse.
        Parameters:
        parseSecStruc - if HELIX STRAND and TURN fields are being parsed
      • isHeaderOnly

        public boolean isHeaderOnly()
        Parse only the PDB file header out of the files
        Returns:
        flag
      • setHeaderOnly

        public void setHeaderOnly​(boolean headerOnly)
        Parse only the PDB file header out of the files
        Parameters:
        headerOnly - flag
      • isParseCAOnly

        public boolean isParseCAOnly()
        The flag if only the C-alpha atoms of the structure should be parsed.
        Returns:
        the flag
      • setParseCAOnly

        public void setParseCAOnly​(boolean parseCAOnly)
        Flag if only the C-alpha atoms of the structure should be parsed.
        Parameters:
        parseCAOnly - boolean flag to enable or disable C-alpha only parsing
      • isAlignSeqRes

        public boolean isAlignSeqRes()
        Flag if the SEQRES amino acids should be aligned with the ATOM amino acids.
        Returns:
        flag if SEQRES - ATOM amino acids alignment is enabled
      • setAlignSeqRes

        public void setAlignSeqRes​(boolean alignSeqRes)
        Define if the SEQRES in the structure should be aligned with the ATOM records if yes, the AminoAcids in structure.getSeqRes will have the coordinates set.
        Parameters:
        alignSeqRes -
      • isUpdateRemediatedFiles

        @Deprecated
        public boolean isUpdateRemediatedFiles()
        Deprecated.
        Properties which impact downloading and caching behavior have been moved to the StructureIOFile implementations. See LocalPDBDirectory#getFetchBehavior(LocalPDBDirectory.FetchBehavior)
        A flag if local files should be replaced with the latest version of remediated PDB files. Default: false
      • setUpdateRemediatedFiles

        @Deprecated
        public void setUpdateRemediatedFiles​(boolean updateRemediatedFiles)
        Deprecated.
        Properties which impact downloading and caching behavior have been moved to the StructureIOFile implementations. See LocalPDBDirectory.setFetchBehavior(LocalPDBDirectory.FetchBehavior)
        A flag if local files should be replaced with the latest version of remediated PDB files. Default: false
        Parameters:
        updateRemediatedFiles -
      • getAcceptedAtomNames

        public java.lang.String[] getAcceptedAtomNames()
        By default the parser will read in all atoms (unless using the CAonly switch). This allows to specify a set of atoms to be read. e.g. {"CA", "CB" }. Returns null if all atoms are accepted.
        Returns:
        accepted atom names, or null if all atoms are accepted. default null
      • setAcceptedAtomNames

        public void setAcceptedAtomNames​(java.lang.String[] fullAtomNames)
        By default the parser will read in all atoms (unless using the CAonly switch). This allows to specify a set of atoms to be read. e.g. {"CA", "CB" }. Returns null if all atoms are accepted.
        Parameters:
        accepted - atom names, or null if all atoms are accepted. default null
      • getMaxAtoms

        public int getMaxAtoms()
        The maximum numbers of atoms to load in a protein structure (prevents memory overflows)
        Returns:
        maximum nr of atoms to load, default Integer.MAX_VALUE;
      • setMaxAtoms

        public void setMaxAtoms​(int maxAtoms)
        The maximum numbers of atoms to load in a protein structure (prevents memory overflows)
        Parameters:
        maxAtoms - maximun nr of atoms to load
      • getAtomCaThreshold

        public int getAtomCaThreshold()
        The maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file. If this limit is exceeded also the SEQRES groups will be ignored.
        Returns:
        atomCaThreshold.
      • setAtomCaThreshold

        public void setAtomCaThreshold​(int atomCaThreshold)
        The maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file. If this limit is exceeded also the SEQRES groups will be ignored.
        Parameters:
        atomCaThreshold - maximum number of atoms for all atom representation.
      • isParseBioAssembly

        public boolean isParseBioAssembly()
        Should the biological assembly info (REMARK 350) be parsed from the PDB file?
        Returns:
        boolean flag yes/no
      • setParseBioAssembly

        public void setParseBioAssembly​(boolean parseBioAssembly)
        Should the biological assembly info (REMARK 350) be parsed from the PDB file?
        Parameters:
        parseBioAssembly - boolean flag yes/no
      • shouldCreateAtomBonds

        public boolean shouldCreateAtomBonds()
        Should we create bonds between atoms when parsing a file?
        Returns:
        true if we should create the bonds, false if not
      • setCreateAtomBonds

        public void setCreateAtomBonds​(boolean createAtomBonds)
        Should we create bonds between atoms when parsing a file. Will create intra-group bonds from information available in chemical component files and some other bonds from struc_conn category in mmCIF file.
        Parameters:
        createAtomBonds - true if we should create the bonds, false if not
        See Also:
        BondMaker
      • shouldCreateAtomCharges

        public boolean shouldCreateAtomCharges()
        Should we create charges on atoms when parsing a file?
        Returns:
        true if we should create the charges, false if not
      • setCreateAtomCharges

        public void setCreateAtomCharges​(boolean createAtomCharges)
        Should we create charges on atoms when parsing a file?
        Parameters:
        createAtomCharges - true if we should create the charges, false if not
      • isUseInternalChainId

        public boolean isUseInternalChainId()
        Should we use internal (asym_id) or public facing (author) chain ids
        Returns:
        Since:
        4.2
      • setUseInternalChainId

        public void setUseInternalChainId​(boolean useInternalChainId)
        Set the useInternalChainId parsing mode. This is an experimental parsing mode that applies only to the mmCIF parser. It will create chains following the model specified in the mmCIF dictionary where both polymer and non-polymer entities are assigned separate chains. The chain identifiers used are the asym_ids specified in mmCIF file. Some BioJava features might not work properly in this parsing mode.
        Parameters:
        useInternalChainId -
        Since:
        4.2