Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
ResolPDB.c File Reference

Get resolution and R-factor information out of a PDB file. More...

#include <stdio.h>
#include <string.h>
#include "pdb.h"
#include "macros.h"

Go to the source code of this file.

Macros

#define MAXBUFF   160
 

Functions

BOOL blGetResolPDB (FILE *fp, REAL *resolution, REAL *RFactor, int *StrucType)
 
BOOL blGetResolWholePDB (WHOLEPDB *wpdb, REAL *resolution, REAL *RFactor, int *StrucType)
 
BOOL blGetExptlPDB (FILE *fp, REAL *resolution, REAL *RFactor, REAL *FreeR, int *StrucType)
 
BOOL blGetExptlWholePDB (WHOLEPDB *wpdb, REAL *resolution, REAL *RFactor, REAL *FreeR, int *StrucType)
 
char * blReportStructureType (int StrucType)
 
BOOL blGetExptlOld (FILE *fp, REAL *resolution, REAL *RFactor, REAL *FreeR, int *StrucType)
 

Detailed Description

Get resolution and R-factor information out of a PDB file.

Version
V1.8
Date
07.07.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

Usage:

See documentation for details

Revision History:

Definition in file ResolPDB.c.

Macro Definition Documentation

#define MAXBUFF   160

Definition at line 121 of file ResolPDB.c.

Function Documentation

BOOL blGetExptlOld ( FILE *  fp,
REAL resolution,
REAL RFactor,
REAL FreeR,
int *  StrucType 
)
Parameters
[in]*fpPDB file pointer
[out]*resolutionThe resolution (0.0 if not applicable)
[out]*RFactorThe R-factor (0.0 if not found)
[out]*FreeRThe Free R-factor (0.0 if not found)
[out]*StrucTypeStructure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN
Returns
TRUE if resolution found (even if not applicable)

This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.

N.B. The resolution information returned by the routine is reliable; the R-factor information is stored in so many forms that it is difficult to read without some form of natural language parsing, but we manage to handle most situations. The routine assumes the R-factor to be the first number after the words `R-value' (or one of the other keys - see the case statement in the code for the valid keywords). Thus we cannot handle records of the form: THE R-VALUE FOR 7142 REFLECTIONS BETWEEN 10.0 AND 1.97 ANGSTROMS REFINEMENT CYCLE 73 IS 0.254. as appears in entries such as 1LZT. Here, the first number is the number of reflections. There is thus a kludge which sets the R-factor to zero if it was read as greater than 0.5 to avoid this situation. In these cases, we lose the R-factor information. This occurs in approx 3.5% of the 1XXX PDB entries.

  • 25.02.94 Original By: ACRM
  • 28.02.94 Added " R = " and check that VALUE wasn't B-VALUE
  • 17.07.96 Added check for EXPERIMENT TYPE : THEORETICAL MODEL Also fixed bug in searching REMARK record
  • 27.06.97 Added handing of RESOLUTION records which point you to another record for the experiment type. Fixed some calls to FindNextNumber() which were checking an 80 character width Fixed EXPERIMENT TYPE to look for NMR as well Looks for EXPDTA NMR record
  • 23.03.98 Added check that RESOLUTION record is in a REMARK 2
  • 08.03.99 Renamed to GetExptl() from GetResolPDB() and added FreeR parameter. GetResolPDB() is now a wrapper to this routine. Added additional pass which looks for the structured REMARK 3 records
  • 28.04.99 Initialise FindRefRecord et al. to zero
  • 18.06.99 Added other strings to the valid structured block for pass 0 Added check for -ve R-factor
  • 08.09.99 Now takes the first FREE R-factor followed by 17 spaces rather than the last
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 666 of file ResolPDB.c.

BOOL blGetExptlPDB ( FILE *  fp,
REAL resolution,
REAL RFactor,
REAL FreeR,
int *  StrucType 
)
Parameters
[in]*fpPDB file pointer
[out]*resolutionThe resolution (0.0 if not applicable)
[out]*RFactorThe R-factor (0.0 if not found)
[out]*FreeRThe Free R-factor (0.0 if not found)
[out]*StrucTypeStructure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN
Returns
TRUE if resolution found or valid structure type found

This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.

  • 12.12.11 Original By: ACRM New implementation for remediated PDB files. The old version is available as GetExptlOld() which handles old format files. NOTE If multiple methods specified in EXPDTA record, only the first is used If multiple R-factors are provided in different sections, then the first one is returned.
  • 07.07.14 Use bl prefix for functions By: CTP
  • 02.03.15 Moved the actual work into ReadData() By: ACRM Renamed from blGetExptl()

Definition at line 289 of file ResolPDB.c.

BOOL blGetExptlWholePDB ( WHOLEPDB wpdb,
REAL resolution,
REAL RFactor,
REAL FreeR,
int *  StrucType 
)
Parameters
[in]*wpdbWHOLEPDB structure pointer
[out]*resolutionThe resolution (0.0 if not applicable)
[out]*RFactorThe R-factor (0.0 if not found)
[out]*FreeRThe Free R-factor (0.0 if not found)
[out]*StrucTypeStructure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN
Returns
TRUE if resolution found or valid structure type found

This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.

Definition at line 350 of file ResolPDB.c.

BOOL blGetResolPDB ( FILE *  fp,
REAL resolution,
REAL RFactor,
int *  StrucType 
)
Parameters
[in]*fpPDB file pointer
[out]*resolutionThe resolution (0.0 if not applicable)
[out]*RFactorThe R-factor (0.0 if not found)
[out]*StrucTypeStructure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN
Returns
TRUE if resolution found (even if not applicable)

This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.

N.B. The resolution information returned by the routine is reliable; the R-factor information is stored in so many forms that it is difficult to read without some form of natural language parsing, but we manage to handle most situations. The routine assumes the R-factor to be the first number after the words `R-value' (or one of the other keys - see the case statement in the code for the valid keywords). Thus we cannot handle records of the form: THE R-VALUE FOR 7142 REFLECTIONS BETWEEN 10.0 AND 1.97 ANGSTROMS REFINEMENT CYCLE 73 IS 0.254. as appears in entries such as 1LZT. Here, the first number is the number of reflections. There is thus a kludge which sets the R-factor to zero if it was read as greater than 0.5 to avoid this situation. In these cases, we lose the R-factor information. This occurs in approx 3.5% of the 1XXX PDB entries.

  • 25.02.94 Original By: ACRM
  • 28.02.94 Added " R = " and check that VALUE wasn't B-VALUE
  • 17.07.96 Added check for EXPERIMENT TYPE : THEORETICAL MODEL Also fixed bug in searching REMARK record
  • 27.06.97 Added handing of RESOLUTION records which point you to another record for the experiment type. Fixed some calls to FindNextNumber() which were checking an 80 character width Fixed EXPERIMENT TYPE to look for NMR as well Looks for EXPDTA NMR record
  • 23.03.98 Added check that RESOLUTION record is in a REMARK 2
  • 08.02.99 Now a wrapper to GetExptl() which also returns FreeR
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 193 of file ResolPDB.c.

BOOL blGetResolWholePDB ( WHOLEPDB wpdb,
REAL resolution,
REAL RFactor,
int *  StrucType 
)
Parameters
[in]*wpdbWHOLEPDB structure pointer
[out]*resolutionThe resolution (0.0 if not applicable)
[out]*RFactorThe R-factor (0.0 if not found)
[out]*StrucTypeStructure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN
Returns
TRUE if resolution found or valid structure type found

This routine attempts to obtain resolution and R-factor information out of a WHOLEPDB structure. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.

N.B. The resolution information returned by the routine is reliable; the R-factor information is stored in so many forms that it is difficult to read without some form of natural language parsing, but we manage to handle most situations. The routine assumes the R-factor to be the first number after the words `R-value' (or one of the other keys - see the case statement in the code for the valid keywords). Thus we cannot handle records of the form: THE R-VALUE FOR 7142 REFLECTIONS BETWEEN 10.0 AND 1.97 ANGSTROMS REFINEMENT CYCLE 73 IS 0.254. as appears in entries such as 1LZT. Here, the first number is the number of reflections. There is thus a kludge which sets the R-factor to zero if it was read as greater than 0.5 to avoid this situation. In these cases, we lose the R-factor information. This occurs in approx 3.5% of the 1XXX PDB entries.

  • 02.03.15 Original By: ACRM

Definition at line 244 of file ResolPDB.c.

char* blReportStructureType ( int  StrucType)
Parameters
[in]StrucTypeStucture type returned by ResolPDB()
Returns
Stucture type description.

Returns structure description.

  STRUCTURE_TYPE_UNKNOWN     Unknown
  STRUCTURE_TYPE_XTAL        X-ray crystal structure
  STRUCTURE_TYPE_NMR         NMR
  STRUCTURE_TYPE_MODEL       Model
  STRUCTURE_TYPE_ELECTDIFF   Electron Diffraction
  STRUCTURE_TYPE_FIBER       Fiber Diffraction
  STRUCTURE_TYPE_SSNMR       Solid State NMR
  STRUCTURE_TYPE_NEUTRON     Neutron Scattering
  STRUCTURE_TYPE_EM          Electron Miscroscopy
  STRUCTURE_TYPE_SOLSCAT     Solution Scattering
  STRUCTURE_TYPE_IR          Infra-red Spectroscopy
  STRUCTURE_TYPE_POWDER      Powder Diffraction
  STRUCTURE_TYPE_FRET        Fluorescence Transfer
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 410 of file ResolPDB.c.