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

Functions to modify atom order in PDB linked list. More...

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

Go to the source code of this file.

Functions

PDBblFixOrderPDB (PDB *pdb, BOOL Pad, BOOL Renum)
 
PDBblShuffleResPDB (PDB *start, PDB *end, BOOL Pad)
 
BOOL blGetAtomTypes (char *resnam, char **AtomTypes)
 
PDBblShuffleBB (PDB *pdb)
 

Detailed Description

Functions to modify atom order in PDB linked list.

Version
V1.6
Date
05.03.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:

Usage:

Revision History:

Definition in file OrderPDB.c.

Function Documentation

PDB* blFixOrderPDB ( PDB pdb,
BOOL  Pad,
BOOL  Renum 
)
Parameters
[in]*pdbPDB linked list to fix atom order
[in]PadTRUE: Create dummy coordinate atoms for any missing atoms in standard residues
[in]RenumTRUE: Renumber the atoms
Returns
Corrected PDB linked list

Runs through a PDB linked list and corrects the atom order to match the N,CA,C,O,s/c standard. Only standard amino acids are processed. The input linked list is modified (i.e. a new list is not built), but the return value from the routine should be used for the corrected list rather than the input PDB pointer, since the start of the list may have changed. i.e. the routine should be called with the form:

           pdb = FixOrderPDB(pdb,TRUE,TRUE);

Definition at line 169 of file OrderPDB.c.

BOOL blGetAtomTypes ( char *  resnam,
char **  AtomTypes 
)
Parameters
[in]*resnamResidue name for which to search
[out]**AtomTypesArray of atom names contained in the residue
Returns
Success

Fill in atom types for a given residue. AtomTypes must be pre-allocated and must be set up as an array of character pointers using Array2D() (or equivalent) rather than being created as a simple char types[][] - THIS WILL NOT WORK!

  • 08.07.93 Original By: ACRM
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 349 of file OrderPDB.c.

PDB* blShuffleBB ( PDB pdb)
Parameters
[in]*pdbInput PDB linked list
Returns
Start of shuffled PDB linked list

Shuffles the PDB list to match the standard of N,CA,C,O,CB,other. Basically designed to be used with backbones only since the sidechain order is not modified. Returns the start of the shuffled PDB linked list.

  • 13.05.92 Original
  • 22.06.08 Fixed to use FindNextResidue(). It was continuing to search out of the current residue, so if the same residue number in a different chain was of the same type, it ended up changing that instead!
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 389 of file OrderPDB.c.

PDB* blShuffleResPDB ( PDB start,
PDB end,
BOOL  Pad 
)
Parameters
[in]*startStart of residue to be shuffled
[in]*endStart of next residue in linked list (NULL for last residue)
[in]PadTRUE: Create dummy records for missing atoms
Returns
Pointer to new start of linked list

Shuffle atoms within a residue into the standard order. Returns a pointer to the new first atom in the residue. Atoms not in the known list are discarded. If we fail to allocate memory for extra atom records, no action is taken.

  • 08.07.93 Original By: ACRM
  • 09.03.94 Correctly handles residues not found in the standard list (i.e. returns them unmodified)
  • 17.03.94 If no atoms are found, then we return start. This is the case when partial occupancy atoms are named as "N A", "N B", etc.
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 228 of file OrderPDB.c.