Class FileParsingParameters

java.lang.Object
org.biojava.nbio.structure.io.FileParsingParameters
All Implemented Interfaces:
Serializable

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    By default the parser will read in all atoms (unless using the CAonly switch).
    int
    The maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file.
    int
    The maximum numbers of atoms to load in a protein structure (prevents memory overflows)
    boolean
    Flag if the SEQRES amino acids should be aligned with the ATOM amino acids.
    boolean
    Parse only the PDB file header out of the files
    boolean
    Should the biological assembly info (REMARK 350) be parsed from the PDB file?
    boolean
    The flag if only the C-alpha atoms of the structure should be parsed.
    boolean
    Is secondary structure assignment being parsed from the file?
    void
    setAcceptedAtomNames(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
     
    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. do NOT parse.
    boolean
    Should we create bonds between atoms when parsing a file?
    boolean
    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 Details

    • 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:
    • 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:
  • Constructor Details

  • Method Details

    • 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 -
    • 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(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:
      fullAtomNames - 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:
    • 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