The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
IndexPDB.c File Reference

Create an array of pointers into a PDB linked list. More...

#include <math.h>
#include <stdlib.h>
#include "MathType.h"
#include "SysDefs.h"
#include "pdb.h"
#include "macros.h"

Go to the source code of this file.

Functions

PDB ** blIndexPDB (PDB *pdb, int *natom)
 
PDB ** blIndexAtomNumbersPDB (PDB *pdb, int *indexSize)
 

Detailed Description

Create an array of pointers into a PDB linked list.

Version
V2.2
Date
19.04.15
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:

IndexPDB() creates an array of pointers to each PDB record in a linked list. This allows random access to atoms without having to step through the PDB linked list.

Usage:

pdb.h must be included before using this routine.

PDB **indx,
*pdb;
int natom;
indx = IndexPDB(pdb, &natom);

Revision History:

Definition in file IndexPDB.c.

Function Documentation

PDB** blIndexAtomNumbersPDB ( PDB pdb,
int *  indexSize 
)
Parameters
[in]*pdbPDB linked list
[out]*indexSizeIndex size
Returns
malloc'd array of PDB pointers indexed by atom number

Creates an array of pointers to PDB from a linked list. This is used to allow array style access to items in the linked list by atom number: e.g. (indx[23])->x will give the x coordinate of atom number 23

  • 19.04.15 Original By: ACRM

Definition at line 156 of file IndexPDB.c.

PDB** blIndexPDB ( PDB pdb,
int *  natom 
)
Parameters
[in]*pdbPointer to the start of a PDB linked list.
[out]*natomNumber of atoms in the PDB linked list.
Returns
An array of pointers to the PDB records. NULL if unable to allocate memory.

Creates an array of pointers to PDB from a linked list. This is used to allow array style access to items in the linked list: e.g. (indx[23])->x will give the x coordinate of the 23rd item

  • 19.07.90 Original
  • 01.06.92 ANSIed and documented.
  • 24.02.94 Re-written. Now allocates and returns the index.
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 117 of file IndexPDB.c.