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

Build connectivity information in PDB linked list. More...

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

Go to the source code of this file.

Data Structures

struct  _covalentradii
 

Functions

BOOL blAddConect (PDB *p, PDB *q)
 
BOOL blAddOneDirectionConect (PDB *p, PDB *q)
 
BOOL blBuildConectData (PDB *pdb, REAL tol)
 
BOOL blIsBonded (PDB *p, PDB *q, REAL tol)
 
BOOL blAreResiduesBonded (PDB *pdb, char *chain1, int resnum1, char *insert1, char *chain2, int resnum2, char *insert2, REAL tol)
 
BOOL blAreResiduePointersBonded (PDB *res1, PDB *res2, REAL tol)
 
BOOL blDeleteAConect (PDB *p, PDB *q)
 
BOOL blDeleteAConectByNum (PDB *pdb, int cNum)
 
void blDeleteAtomConects (PDB *pdb)
 
BOOL blCopyConects (PDB *out, PDB *in)
 
BOOL blIsConected (PDB *p, PDB *q)
 

Detailed Description

Build connectivity information in PDB linked list.

Version
V1.5
Date
03.10.16
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 BuildConect.c.

Function Documentation

BOOL blAddConect ( PDB p,
PDB q 
)
Parameters
[in,out]*pFirst PDB item
[in,out]*qSecond PDB item
Returns
Success?

Adds a conect bteween p and q (i.e. in both directions) Fails if there are too many CONECTs

  • 19.02.15 Original By: ACRM

Definition at line 173 of file BuildConect.c.

BOOL blAddOneDirectionConect ( PDB p,
PDB q 
)
Parameters
[in,out]*pFirst PDB item
[in,out]*qSecond PDB item
Returns
Success?

Adds a conect from p to q (i.e. one direction only) Fails if there are too many CONECTs

  • 19.02.15 Original By: ACRM

Definition at line 200 of file BuildConect.c.

BOOL blAreResiduePointersBonded ( PDB res1,
PDB res2,
REAL  tol 
)
Parameters
[in]*res1Start of first residue
[in]*res2Start of second residue
[in]tolTolerance for distances
Returns
Are they bonded

Tests whether two residue are bonded using pointers to start of residues

  • 23.06.15 Original By: ACRM

Definition at line 394 of file BuildConect.c.

BOOL blAreResiduesBonded ( PDB pdb,
char *  chain1,
int  resnum1,
char *  insert1,
char *  chain2,
int  resnum2,
char *  insert2,
REAL  tol 
)
Parameters
[in]*pdbPDB linked list
[in]*chain1First chain label
[in]resnum1First residue number
[in]*insert1First insert code
[in]*chain2Second chain label
[in]resnum2Second residue number
[in]*insert2Second insert code
[in]tolTolerance for distances
Returns
Are they bonded

Tests whether two residue are bonded

  • 23.06.15 Original By: ACRM

Definition at line 360 of file BuildConect.c.

BOOL blBuildConectData ( PDB pdb,
REAL  tol 
)
Parameters
[in,out]*pdbPDB linked list
[in]tolTolerence for distance between atoms
Returns
Were all CONECTs added OK

Deletes all current connectivity data and rebuilds it using covalent radii data. A return of FALSE indicates that there were too many connections for an atom. If this happens, MAXCONECT needs to be increased in pdb.h

  • 19.02.15 Original By: ACRM
  • 26.02.15 Added tol paramater
  • 12.05.15 Conects are built involving backbone C and N if either atom is a HETATM

Definition at line 251 of file BuildConect.c.

BOOL blCopyConects ( PDB out,
PDB in 
)
Parameters
[out]*outPDB linked list containing new CONECT records
[in]*inPDB linked list containing original CONECT records
Returns
Success

Updates the CONECT information in the out PDB linked list based on those in the in linked list. This is used when we have copied a PDB linked list (e.g. in the bl...AsCopy() routines) to make sure the CONECT data points to records in the new linked list instead of the old one.

  • 17.04.15 Original By: ACRM

Definition at line 574 of file BuildConect.c.

BOOL blDeleteAConect ( PDB p,
PDB q 
)
Parameters
[in]*pFirst PDB pointer
[in]*qSecond PDB pointer
Returns
Success

Deletes the CONECT information between the two specified atoms

  • 16.03.15 Original By: ACRM

Definition at line 458 of file BuildConect.c.

BOOL blDeleteAConectByNum ( PDB pdb,
int  cNum 
)
Parameters
[in]*pdbPDB pointer
[in]cNumIndex into the ->conect[] array for the CONECT to be deleted
Returns
Success

Deletes the link for the specified CONECT. Other CONECTs are shuffled down.

  • 16.03.15 Original By: ACRM

Definition at line 500 of file BuildConect.c.

void blDeleteAtomConects ( PDB pdb)
Parameters
[in]*pdbPDB pointer

Deletes all CONECT information associated with a PDB pointer. Also deletes the relevant CONECTs (back to this atom) from the partner atoms

  • 17.03.15 Original By: ACRM

Definition at line 536 of file BuildConect.c.

BOOL blIsBonded ( PDB p,
PDB q,
REAL  tol 
)
Parameters
[in]*pFirst PDB atom
[in]*qSecond PDB atom
[in]tolTelerance for separation between atoms
Returns
Bonded?

Test whether two atoms are bonded

  • 19.02.15 Original By: ACRM
  • 26.02.15 Added tol parameter. Changed to used squared distances

Definition at line 326 of file BuildConect.c.

BOOL blIsConected ( PDB p,
PDB q 
)
Parameters
[in]*pFirst atom
[in]*qSecond atom
Returns
Connected?

Tests whether there is a link between the specified atoms in the CONECT list

  • 07.06.99 Original By: ACRM

Definition at line 629 of file BuildConect.c.