Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
GetCrystPDB.c File Reference
#include <stdio.h>
#include <math.h>
#include "SysDefs.h"
#include "MathType.h"
#include "pdb.h"
#include "fsscanf.h"

Go to the source code of this file.

Macros

#define MAXBUFF   160
 

Functions

int blGetCrystPDB (FILE *fp, VEC3F *UnitCell, VEC3F *CellAngles, char *spacegroup, REAL OrigMatrix[3][4], REAL ScaleMatrix[3][4])
 
int blGetCrystWholePDB (WHOLEPDB *wpdb, VEC3F *UnitCell, VEC3F *CellAngles, char *spacegroup, REAL OrigMatrix[3][4], REAL ScaleMatrix[3][4])
 

Detailed Description

Version
V1.1
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:

Revision History:

Definition in file GetCrystPDB.c.

Macro Definition Documentation

#define MAXBUFF   160

Definition at line 78 of file GetCrystPDB.c.

Function Documentation

int blGetCrystPDB ( FILE *  fp,
VEC3F UnitCell,
VEC3F CellAngles,
char *  spacegroup,
REAL  OrigMatrix[3][4],
REAL  ScaleMatrix[3][4] 
)
Parameters
[in]*fpInput file pointer
[out]*UnitCellThe unit cell dimensions
[out]*CellAnglesThe unit cell angles
[out]*spacegroupThe spacegroup
[out]OrigMatrixThe origin matrix
[out]ScaleMatrixThe scale matrix
Returns
Flags for elements read.
                                Flags for elements read:
                                    0: Nothing at all
                                    XTAL_DATA_CRYST: Unit cell
                                    XTAL_DATA_ORIGX: Origin matrix
                                    XTAL_DATA_SCALE: Scale matrix
                                    (These are ORed together)

Read the crystal parameters (unit cell, spacegroup, origin and scale matrices) out of a PDB file.

Stops searching as soon as an ATOM or HETATM record is hit and leaves the file in a state ready for ReadPDB() to do it's stuff (i.e. with the current file pointer at the first ATOM or HETATM record).

  • 12.10.95 Original By: ACRM
  • 17.10.95 Correctly returns retval if no ATOM/HETATM records not found
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 122 of file GetCrystPDB.c.

int blGetCrystWholePDB ( WHOLEPDB wpdb,
VEC3F UnitCell,
VEC3F CellAngles,
char *  spacegroup,
REAL  OrigMatrix[3][4],
REAL  ScaleMatrix[3][4] 
)
Parameters
[in]*wpdbWhole PDB pointer
[out]*UnitCellThe unit cell dimensions
[out]*CellAnglesThe unit cell angles
[out]*spacegroupThe spacegroup
[out]OrigMatrixThe origin matrix
[out]ScaleMatrixThe scale matrix
Returns
Flags for elements read.
                                Flags for elements read:
                                    0: Nothing at all
                                    XTAL_DATA_CRYST: Unit cell
                                    XTAL_DATA_ORIGX: Origin matrix
                                    XTAL_DATA_SCALE: Scale matrix
                                    (These are ORed together)

Read the crystal parameters (unit cell, spacegroup, origin and scale matrices) out of a PDB file.

Stops searching as soon as an ATOM or HETATM record is hit and leaves the file in a state ready for ReadPDB() to do it's stuff (i.e. with the current file pointer at the first ATOM or HETATM record).

Definition at line 293 of file GetCrystPDB.c.