Package org.biojava.nbio.structure
Class PDBHeader
- java.lang.Object
-
- org.biojava.nbio.structure.PDBHeader
-
- All Implemented Interfaces:
Serializable
,PDBRecord
public class PDBHeader extends Object implements PDBRecord
A class that contains PDB Header information. In contrast to what the name suggests, this class does not represent a direct mapping of the Header section of the PDB legacy file format. Instead, it holds the information that is not directly related to the structure data. Such information may exist in some cases and may not exist in other cases.- Since:
- 1.6
- Author:
- Andreas Prlic
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static float
DEFAULT_RESOLUTION
static float
DEFAULT_RFREE
static String
newline
-
Constructor Summary
Constructors Constructor Description PDBHeader()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(PDBHeader other)
Compare two PDBHeader objectsString
getAuthors()
Return the names of the authors as listed in the AUTHORS section of a PDB file.Map<Integer,BioAssemblyInfo>
getBioAssemblies()
Return the map of biological assemblies.String
getClassification()
PDBCrystallographicInfo
getCrystallographicInfo()
Date
getDepDate()
Return the deposition date of the structure in the PDB.String
getDescription()
Deprecated.will be removed later.Set<ExperimentalTechnique>
getExperimentalTechniques()
Return the Set of ExperimentalTechniques, usually the set is of size 1 except for hybrid experimental techniques when the Set will contain 2 or more valuesLong
getId()
Get the ID used by Hibernate.String
getIdCode()
Deprecated.usegetPdbId()
JournalArticle
getJournalArticle()
Get the associated publication as defined by the JRNL records in a PDB file.List<String>
getKeywords()
Gets the keywords (KEYWODS) record of the structureDate
getModDate()
Return the latest modification date of the structure.int
getNrBioAssemblies()
Get the number of biological assemblies available in the PDB headerPdbId
getPdbId()
Gets the PDB identifier for this protein structure.Date
getRelDate()
Return the release date of the structure in the PDB.float
getResolution()
Returns the resolution (or effective resolution) of the experiment.List<DatabasePDBRevRecord>
getRevisionRecords()
float
getRfree()
float
getRwork()
String
getTitle()
boolean
hasJournalArticle()
Return whether or not the entry has an associated journal article or publication.void
setAuthors(String authors)
void
setBioAssemblies(Map<Integer,BioAssemblyInfo> bioAssemblies)
void
setClassification(String classification)
void
setCrystallographicInfo(PDBCrystallographicInfo crystallographicInfo)
void
setDepDate(Date depDate)
The deposition date of the structure in the PDBvoid
setDescription(String description)
Deprecated.will be removed later.boolean
setExperimentalTechnique(String techniqueStr)
Adds the experimental technique to the set of experimental techniques of this header.void
setIdCode(String idCode)
Deprecated.usesetPdbId(PdbId)
void
setJournalArticle(JournalArticle journalArticle)
Set the associated publication as defined by the JRNL records in a PDB file.void
setKeywords(List<String> keywords)
Sets the KEYWODS record of the structure.void
setModDate(Date modDate)
The latest modification date of the structure.void
setPdbId(PdbId pdbId)
Sets the PDB identifier code for this protein structure.void
setRelDate(Date relDate)
The release date of the structure in the PDB.void
setResolution(float resolution)
void
setRevisionRecords(List<DatabasePDBRevRecord> revisionRecords)
void
setRfree(float rFree)
void
setRwork(float rWork)
void
setTitle(String title)
String
toPDB()
Return a PDB representation of the PDB Headervoid
toPDB(StringBuffer buf)
Appends a PDB representation of the PDB header to the provided StringBufferString
toString()
String representation
-
-
-
Field Detail
-
DEFAULT_RESOLUTION
public static final float DEFAULT_RESOLUTION
- See Also:
- Constant Field Values
-
DEFAULT_RFREE
public static final float DEFAULT_RFREE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDBHeader
public PDBHeader()
-
-
Method Detail
-
toPDB
public void toPDB(StringBuffer buf)
Appends a PDB representation of the PDB header to the provided StringBuffer
-
getId
public Long getId()
Get the ID used by Hibernate.- Returns:
- the ID used by Hibernate
- See Also:
setId(Long)
-
equals
public boolean equals(PDBHeader other)
Compare two PDBHeader objects- Parameters:
other
- a PDBHeader object to compare this one to.- Returns:
- true if they are equal or false if they are not.
-
getIdCode
@Deprecated public String getIdCode()
Deprecated.usegetPdbId()
The PDB code for this protein structure.- Returns:
- the PDB identifier
- See Also:
setIdCode(String)
-
setIdCode
@Deprecated public void setIdCode(String idCode)
Deprecated.usesetPdbId(PdbId)
The PDB code for this protein structure.- Parameters:
idCode
- the PDB identifier- See Also:
getIdCode()
-
getPdbId
public PdbId getPdbId()
Gets the PDB identifier for this protein structure.- Returns:
- the
PdbId
PDB identifier - Since:
- 6.0.0
- See Also:
setPdbId(PdbId)
-
setPdbId
public void setPdbId(PdbId pdbId)
Sets the PDB identifier code for this protein structure.- Parameters:
pdbId
- the PDB identifier- Since:
- 6.0.0
- See Also:
getPdbId()
-
getClassification
public String getClassification()
-
setClassification
public void setClassification(String classification)
-
getDepDate
public Date getDepDate()
Return the deposition date of the structure in the PDB.- Returns:
- the deposition date
-
setDepDate
public void setDepDate(Date depDate)
The deposition date of the structure in the PDB- Parameters:
depDate
- the deposition date
-
getExperimentalTechniques
public Set<ExperimentalTechnique> getExperimentalTechniques()
Return the Set of ExperimentalTechniques, usually the set is of size 1 except for hybrid experimental techniques when the Set will contain 2 or more values- Returns:
- the Set of ExperimentalTechniques or null if not set
-
setExperimentalTechnique
public boolean setExperimentalTechnique(String techniqueStr)
Adds the experimental technique to the set of experimental techniques of this header. Note that if input is not a recognised technique string then no errors will be produced but false will be returned- Parameters:
techniqueStr
-- Returns:
- true if the input corresponds to a recognised technique string (see
ExperimentalTechnique
) and it was not already present in the current set of ExperimentalTechniques
-
getCrystallographicInfo
public PDBCrystallographicInfo getCrystallographicInfo()
-
setCrystallographicInfo
public void setCrystallographicInfo(PDBCrystallographicInfo crystallographicInfo)
-
getResolution
public float getResolution()
Returns the resolution (or effective resolution) of the experiment. This is related to_refine.ls_d_res_high
(DIFFRACTION) or_em_3d_reconstruction.resolution
(ELECTRON MICROSCOPY) for mmCif format, or toREMARK 2
orREMARK 3
for PDB legacy format. If more than one value is available (in rare cases), the last one is reported. If no value is available, it defaults toDEFAULT_RESOLUTION
(99.0f).- Returns:
- The reported experiment resolution,
DEFAULT_RESOLUTION
(99.0f) if no value is available.
-
setResolution
public void setResolution(float resolution)
-
getRfree
public float getRfree()
-
setRfree
public void setRfree(float rFree)
-
getModDate
public Date getModDate()
Return the latest modification date of the structure.- Returns:
- the latest modification date
-
setModDate
public void setModDate(Date modDate)
The latest modification date of the structure.- Parameters:
modDate
- the latest modification date
-
getRelDate
public Date getRelDate()
Return the release date of the structure in the PDB.- Returns:
- the release date
-
setRelDate
public void setRelDate(Date relDate)
The release date of the structure in the PDB.- Parameters:
relDate
- the release date
-
getDescription
@Deprecated public String getDescription()
Deprecated.will be removed later. UsegetKeywords()
if you usedescription
to keep the keywords.- Returns:
-
setDescription
@Deprecated public void setDescription(String description)
Deprecated.will be removed later. UsegetKeywords()
if you usedescription
to keep the keywords.- Parameters:
description
-
-
getAuthors
public String getAuthors()
Return the names of the authors as listed in the AUTHORS section of a PDB file. Not necessarily the same authors as listed in the AUTH section of the primary citation!- Returns:
- Authors as a string
-
setAuthors
public void setAuthors(String authors)
-
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.- 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.- Returns:
- a JournalArticle
-
setJournalArticle
public void setJournalArticle(JournalArticle journalArticle)
Set the associated publication as defined by the JRNL records in a PDB file.- Parameters:
journalArticle
- the article
-
getBioAssemblies
public Map<Integer,BioAssemblyInfo> getBioAssemblies()
Return the map of biological assemblies. The keys are the biological assembly identifiers (starting at 1). Non-numerical identifiers such as PAU or XAU are not supported.- Returns:
-
setBioAssemblies
public void setBioAssemblies(Map<Integer,BioAssemblyInfo> bioAssemblies)
-
getNrBioAssemblies
public int getNrBioAssemblies()
Get the number of biological assemblies available in the PDB header- Returns:
-
getRevisionRecords
public List<DatabasePDBRevRecord> getRevisionRecords()
-
setRevisionRecords
public void setRevisionRecords(List<DatabasePDBRevRecord> revisionRecords)
-
getRwork
public float getRwork()
- Returns:
- the R-work for this structure.
-
setRwork
public void setRwork(float rWork)
- Parameters:
rWork
- the R-work for this structure.
-
getKeywords
public List<String> getKeywords()
Gets the keywords (KEYWODS) record of the structure- Returns:
- The keywords in a
List<String>
- Since:
- 6.0.0
-
setKeywords
public void setKeywords(List<String> keywords)
Sets the KEYWODS record of the structure.- Parameters:
keywords
- The keywords in aList<String> to set.
- Since:
- 6.0.0
-
-