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

Modify sequence of a PDB linked list. More...

#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "SysDefs.h"
#include "MathType.h"
#include "seq.h"
#include "pdb.h"
#include "macros.h"
#include "array.h"
#include "angle.h"
#include "general.h"

Go to the source code of this file.

Macros

#define RSC_MAIN
 
#define NUMAAKNOWN   20
 
#define MAXBUFF   80 /* Used by ReadRefCoords() */
 
#define ERROR_OK   0
 
#define ERROR_NOMEM   1
 
#define ERROR_ATOMS   2
 
#define ERROR_UNKNOWNAA   3
 

Functions

BOOL blRepSChain (PDB *pdb, char *sequence, char *ChiTable, char *RefCoords)
 
BOOL blRepOneSChain (PDB *pdb, char *ResSpec, char aa, char *ChiTable, char *RefCoords)
 
BOOL blRepOneSChainForce (PDB *pdb, char *ResSpec, char aa, char *ChiTable, char *RefCoords)
 
void blEndRepSChain (void)
 

Detailed Description

Modify sequence of a PDB linked list.

Version
V1.17
Date
23.03.17
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:

Takes a PDB linked list and replaces sidechains

Usage:

The main entry point is RepSChain() which takes a PDB linked list, the sequence, and names of the equivalent chi table and the reference coordinate file. These files are only opened on the first call.

Revision History:

Definition in file rsc.c.

Macro Definition Documentation

#define ERROR_ATOMS   2

Definition at line 129 of file rsc.c.

#define ERROR_NOMEM   1

Definition at line 128 of file rsc.c.

#define ERROR_OK   0

Definition at line 127 of file rsc.c.

#define ERROR_UNKNOWNAA   3

Definition at line 130 of file rsc.c.

#define MAXBUFF   80 /* Used by ReadRefCoords() */

Definition at line 126 of file rsc.c.

#define NUMAAKNOWN   20

Definition at line 125 of file rsc.c.

#define RSC_MAIN

Definition at line 83 of file rsc.c.

Function Documentation

void blEndRepSChain ( void  )

Cleans up open files and memory used by the sidechain replacement routines.

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

Definition at line 479 of file rsc.c.

BOOL blRepOneSChain ( PDB pdb,
char *  ResSpec,
char  aa,
char *  ChiTable,
char *  RefCoords 
)
Parameters
[in,out]*pdbPDB linked list to modify
[in]*ResSpecResidue spec for residue to replace in the format [c]nnn[i]
[in]aaThe 1-letter code for the new sidechain
[in]*ChiTableThe equivalent Chi table
[in]*RefCoordsThe reference coordinates file
Returns
Success?

Replace a single sidechain. Takes a PDB linked list, a residues specfication (in the form [c]nnn[i] where [c] is an optional chain name, nnn is a residue number and [i] is an optional insert code) and a 1-letter code of the required sidechain and does a simple maximum overlap replacement of the sidechain. Also requires filenames of the two datafiles.

  • 12.08.96 Original based on RepSChain()
  • 15.08.96 Removed unused variables
  • 07.07.14 Use bl prefix for functions By: CTP
  • 23.02.15 Modified for new blRenumAtomsPDB() which takes an offset
  • 29.09.15 Now just a wrapper to doRepOneSChain()

Definition at line 319 of file rsc.c.

BOOL blRepOneSChainForce ( PDB pdb,
char *  ResSpec,
char  aa,
char *  ChiTable,
char *  RefCoords 
)
Parameters
[in,out]*pdbPDB linked list to modify
[in]*ResSpecResidue spec for residue to replace in the format [c]nnn[i]
[in]aaThe 1-letter code for the new sidechain
[in]*ChiTableThe equivalent Chi table
[in]*RefCoordsThe reference coordinates file
Returns
Success?

Replace a single sidechain. Takes a PDB linked list, a residues specfication (in the form [c]nnn[i] where [c] is an optional chain name, nnn is a residue number and [i] is an optional insert code) and a 1-letter code of the required sidechain and does a simple maximum overlap replacement of the sidechain. Also requires filenames of the two datafiles.

Replaces even if the sidechain was coorect already

  • 29.09.15 Original - wrapper to doRepOneSChain()

Definition at line 350 of file rsc.c.

BOOL blRepSChain ( PDB pdb,
char *  sequence,
char *  ChiTable,
char *  RefCoords 
)
Parameters
[in,out]*pdbPDB linked list to modify
[in]*sequenceThe 1-letter code required for the structure
[in]*ChiTableThe equivalent Chi table
[in]*RefCoordsThe reference coordinates file
Returns
Success?

Replace sidechains. Takes a PDB linked list and a 1-letter code sequence and replaces the sidechains. Also requires filenames of the two datafiles. DEL residues in the pdb linked list will be skipped as will -'s in the sequence

  • 12.05.92 Original
  • 14.05.92 Corrected handling of matching DEL and -
  • 21.06.93 Changed to allocate chitab using Array2D
  • 14.03.94 Changed logic of return value. Now places error messages in gRSCError.
  • 09.11.94 Uses OpenFile() to look in /home/bsm/martin/data is the file wasn't found as specified.
  • 12.08.96 Made static variables external to this routine as they are shared by RepOneSChain(). sChiTab was being allocated on every call instead of just the first one.
  • 07.07.14 Use bl prefix for functions By: CTP
  • 23.02.15 Modified for new blRenumAtomsPDB() which takes an offset

Definition at line 193 of file rsc.c.