Bioplib
Protein Structure C Library
|
Include file for PDB routines. More...
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "MathType.h"
#include "SysDefs.h"
#include "general.h"
#include "hash.h"
#include "deprecated.h"
Go to the source code of this file.
Data Structures | |
struct | _blAtomInfo |
struct | pdb_entry |
struct | pdbresidue |
struct | pdbchain |
struct | PDBSTRUCT |
struct | sec_entry |
struct | _wholepdb |
struct | _compnd |
struct | _pdbsource |
struct | _modres |
struct | _biomt |
struct | _biomolecule |
struct | _disulphide |
struct | HADDINFO |
Macros | |
#define | MAXSTDAA 21 /* Number of standard amino acids (w/ PCA) */ |
#define | MAXATINAA 14 /* Max number of (heavy) atoms in a standard aa */ |
#define | MAXATINRES |
#define | MAXCONECT 8 /* Max number of CONECT connections */ |
#define | DEFCONECTTOL 0.1 /* Default CONECT tolerence */ |
#define | MAXPDBANNOTATION |
#define | blMAXCHAINLABEL 8 |
#define | SELECT(x, w) |
#define | SEC (The_type_SEC_is_now_called_SECSTRUC_You_must_change_your_code *) |
#define | CLEAR_PDB(p) |
#define | ISWATER(z) |
#define | CHAINMATCH(chain1, chain2) !strcmp(chain1, chain2) |
#define | INSERTMATCH(ins1, ins2) !strcmp(ins1, ins2) |
#define | PDBCHAINMATCH(p, q) !strcmp((p)->chain, (q)->chain) |
#define | PDBINSERTMATCH(p, q) !strcmp((p)->insert, (q)->insert) |
#define | CREATEPDBEXTRAS(x, y) |
#define | FREEPDBEXTRAS(x) |
#define | PDBEXTRASPTR(p, type) ((type *)((p)->extras)) |
#define | MAKERESID(x, p) |
#define | RESIDMATCH(p, q) |
#define | STRUCTURE_TYPE_UNKNOWN 0 |
#define | STRUCTURE_TYPE_XTAL 1 |
#define | STRUCTURE_TYPE_NMR 2 |
#define | STRUCTURE_TYPE_MODEL 3 |
#define | STRUCTURE_TYPE_ELECTDIFF 4 |
#define | STRUCTURE_TYPE_FIBER 5 |
#define | STRUCTURE_TYPE_SSNMR 6 |
#define | STRUCTURE_TYPE_NEUTRON 7 |
#define | STRUCTURE_TYPE_EM 8 |
#define | STRUCTURE_TYPE_SOLSCAT 9 |
#define | STRUCTURE_TYPE_IR 10 |
#define | STRUCTURE_TYPE_POWDER 11 |
#define | STRUCTURE_TYPE_FRET 12 |
#define | CTER_STYLE_STD 0 |
#define | CTER_STYLE_GROMOS 1 |
#define | CTER_STYLE_CHARMM 2 |
#define | XTAL_DATA_CRYST 0x0001 |
#define | XTAL_DATA_ORIGX 0x0002 |
#define | XTAL_DATA_SCALE 0x0004 |
#define | ZONE_MODE_RESNUM 0 |
#define | ZONE_MODE_SEQUENTIAL 1 |
#define | FORCEXML_NOFORCE 0 |
#define | FORCEXML_PDB 1 |
#define | FORCEXML_XML 2 |
#define | FORCEPDB gPDBXMLForce = FORCEXML_PDB |
#define | FORCEXML gPDBXMLForce = FORCEXML_XML |
#define | ATOMTYPE_NONRESIDUE 128 |
#define | ATOMTYPE_UNDEF 0 |
#define | ATOMTYPE_ATOM 1 |
#define | ATOMTYPE_NUC 2 |
#define | ATOMTYPE_MODPROT 3 |
#define | ATOMTYPE_MODNUC 4 |
#define | ATOMTYPE_NONSTDAA 5 |
#define | ATOMTYPE_NONSTDNUC 6 |
#define | ATOMTYPE_HETATM (7 | ATOMTYPE_NONRESIDUE) |
#define | ATOMTYPE_METAL (8 | ATOMTYPE_NONRESIDUE) |
#define | ATOMTYPE_WATER (9 | ATOMTYPE_NONRESIDUE) |
#define | ATOMTYPE_BOUNDHET (10 | ATOMTYPE_NONRESIDUE) |
#define | ATOMTYPE_BOUNDPOLYHET (11 | ATOMTYPE_NONRESIDUE) |
#define | _PDB_H_DEPRECATED |
Typedefs | |
typedef struct _blAtomInfo | blATOMINFO |
typedef struct pdb_entry | PDB |
typedef struct pdbresidue | PDBRESIDUE |
typedef struct pdbchain | PDBCHAIN |
typedef struct sec_entry | SECSTRUC |
typedef struct _wholepdb | WHOLEPDB |
typedef struct _compnd | COMPND |
typedef struct _pdbsource | PDBSOURCE |
typedef struct _modres | MODRES |
typedef struct _biomt | BIOMT |
typedef struct _biomolecule | BIOMOLECULE |
typedef struct _disulphide | DISULPHIDE |
Functions | |
PDB * | blReadPDB (FILE *fp, int *natom) |
PDB * | blReadPDBAll (FILE *fp, int *natom) |
PDB * | blReadPDBAtoms (FILE *fp, int *natom) |
PDB * | blReadPDBOccRank (FILE *fp, int *natom, int OccRank) |
PDB * | blReadPDBAtomsOccRank (FILE *fp, int *natom, int OccRank) |
WHOLEPDB * | blDoReadPDB (FILE *fp, BOOL AllAtoms, int OccRank, int ModelNum, BOOL DoWhole) |
WHOLEPDB * | blDoReadPDBML (FILE *fp, BOOL AllAtoms, int OccRank, int ModelNum, BOOL DoWhole) |
BOOL | blCheckFileFormatPDBML (FILE *fp) |
int | blWritePDB (FILE *fp, PDB *pdb) |
int | blWritePDBAsPDBorGromos (FILE *fp, PDB *pdb, BOOL doGromos) |
BOOL | blWritePDBAsPDBML (FILE *fp, PDB *pdb) |
void | blWriteTerCard (FILE *fp, PDB *p) |
BOOL | blFormatCheckWritePDB (PDB *pdb) |
BOOL | blWriteWholePDB (FILE *fp, WHOLEPDB *wpdb) |
BOOL | blWriteWholePDBNoConect (FILE *fp, WHOLEPDB *wpdb) |
void | blWriteWholePDBHeader (FILE *fp, WHOLEPDB *wpdb) |
void | blWriteWholePDBTrailer (FILE *fp, WHOLEPDB *wpdb, int numTer) |
void | blWriteWholePDBHeaderNoRes (FILE *fp, WHOLEPDB *wpdb) |
BOOL | blBuildConectData (PDB *pdb, REAL tol) |
BOOL | blAddConect (PDB *p, PDB *q) |
BOOL | blAddOneDirectionConect (PDB *p, PDB *q) |
BOOL | blDeleteConect (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) |
BOOL | blIsBonded (PDB *p, PDB *q, REAL tol) |
PDB * | blDeleteAtomPDB (PDB *pdb, PDB *atom) |
PDB * | blDeleteAtomRangePDB (PDB *pdb, PDB *start, PDB *stop) |
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) |
void | blWritePDBRecord (FILE *fp, PDB *pdb) |
void | blWritePDBRecordAtnam (FILE *fp, PDB *pdb) |
void | blWriteGromosPDB (FILE *fp, PDB *pdb) |
void | blWriteGromosPDBRecord (FILE *fp, PDB *pdb) |
void | blGetCofGPDB (PDB *pdb, VEC3F *cg) |
void | blGetCofGPDBRange (PDB *start, PDB *stop, VEC3F *cg) |
void | blGetCofGPDBSCRange (PDB *start, PDB *stop, VEC3F *cg) |
void | blOriginPDB (PDB *pdb) |
void | blRotatePDB (PDB *pdb, REAL rm[3][3]) |
void | blTranslatePDB (PDB *pdb, VEC3F tvect) |
BOOL | blFitPDB (PDB *ref_pdb, PDB *fit_pdb, REAL rm[3][3]) |
BOOL | blFitCaPDB (PDB *ref_pdb, PDB *fit_pdb, REAL rm[3][3]) |
BOOL | blFitNCaCPDB (PDB *ref_pdb, PDB *fit_pdb, REAL rm[3][3]) |
BOOL | blFitCaCbPDB (PDB *ref_pdb, PDB *fit_pdb, REAL rm[3][3]) |
REAL | blCalcRMSPDB (PDB *pdb1, PDB *pdb2) |
int | blGetPDBCoor (PDB *pdb, COOR **coor) |
BOOL | blFindZonePDB (PDB *pdb, int start, char *startinsert, int stop, char *stopinsert, char *chain, int mode, PDB **pdb_start, PDB **pdb_stop) |
int | blHAddPDB (FILE *fp, PDB *pdb) |
int | blReadPGP (FILE *fp) |
FILE * | blOpenPGPFile (char *pgpfile, BOOL AllHyd) |
PDB * | blSelectAtomsPDBAsCopy (PDB *pdbin, int nsel, char **sel, int *natom) |
PDB * | blStripHPDBAsCopy (PDB *pdbin, int *natom) |
SECSTRUC * | blReadSecPDB (FILE *fp, int *nsec) |
SECSTRUC * | blReadSecWholePDB (WHOLEPDB *wpdb, int *nsec) |
void | blRenumAtomsPDB (PDB *pdb, int offset) |
PDB * | blFindEndPDB (PDB *start) |
PDB * | blFixOrderPDB (PDB *pdb, BOOL Pad, BOOL Renum) |
PDB * | blShuffleResPDB (PDB *start, PDB *end, BOOL Pad) |
BOOL | blGetAtomTypes (char *resnam, char **AtomTypes) |
PDB * | blKillPDB (PDB *pdb, PDB *prev) |
void | blCopyPDB (PDB *out, PDB *in) |
BOOL | blMovePDB (PDB *move, PDB **from, PDB **to) |
PDB * | blAppendPDB (PDB *first, PDB *second) |
PDB * | blShuffleBB (PDB *pdb) |
REAL | blCalcChi (PDB *pdb, int type) |
PDB * | blGetPDBByN (PDB *pdb, int n) |
void | blSetChi (PDB *pdb, PDB *next, REAL chi, int type) |
BOOL | blKillSidechain (PDB *ResStart, PDB *NextRes, BOOL doCB) |
PDB * | blDeleteResiduePDB (PDB **pPDB, PDB *res) |
void | blSetResnam (PDB *ResStart, PDB *NextRes, char *resnam, int resnum, char *insert, char *chain) |
void | blApplyMatrixPDB (PDB *pdb, REAL matrix[3][3]) |
BOOL | blGetResolPDB (FILE *fp, REAL *resolution, REAL *RFactor, int *StrucType) |
BOOL | blGetResolWholePDB (WHOLEPDB *wpdb, REAL *resolution, REAL *RFactor, int *StrucType) |
BOOL | blGetExptlPDB (FILE *fp, REAL *resolution, REAL *RFactor, REAL *FreeR, int *StrucType) |
BOOL | blGetExptlWholePDB (WHOLEPDB *wpdb, REAL *resolution, REAL *RFactor, REAL *FreeR, int *StrucType) |
BOOL | blGetExptlOld (FILE *fp, REAL *resolution, REAL *RFactor, REAL *FreeR, int *StrucType) |
char * | blReportStructureType (int type) |
PDB ** | blIndexPDB (PDB *pdb, int *natom) |
PDB ** | blIndexAtomNumbersPDB (PDB *pdb, int *indexSize) |
DISULPHIDE * | blReadDisulphidesPDB (FILE *fp, BOOL *error) |
DISULPHIDE * | blReadDisulphidesWholePDB (WHOLEPDB *wpdb, BOOL *error) |
BOOL | blParseResSpec (char *spec, char *chain, int *resnum, char *insert) |
void | blPrintResSpecHelp (FILE *fp) |
void | blBuildResSpec (PDB *p, char *resspec) |
BOOL | blDoParseResSpec (char *spec, char *chain, int *resnum, char *insert, BOOL uppercaseresspec) |
BOOL | blRepSChain (PDB *pdb, char *sequence, char *ChiTable, char *RefCoords) |
PDB * | blFindNextChainPDB (PDB *pdb) |
BOOL | blFixCterPDB (PDB *pdb, int style) |
BOOL | blCalcCterCoords (PDB *p, PDB *ca_p, PDB *c_p, PDB *o_p) |
int | blCalcTetraHCoords (PDB *nter, COOR *coor) |
int | blAddNTerHs (PDB **ppdb, BOOL Charmm) |
char * | blFNam2PDB (char *filename) |
PDB * | blTermPDB (PDB *pdb, int length) |
char ** | blGetPDBChainLabels (PDB *pdb, int *nchains) |
PDB * | blGetPDBChainAsCopy (PDB *pdbin, char *chain) |
PDB * | blFindHetatmResidueSpec (PDB *pdb, char *resspec) |
PDB * | blFindResidueSpec (PDB *pdb, char *resspec) |
PDB * | blFindNextResidue (PDB *pdb) |
PDB * | blDupePDB (PDB *in) |
BOOL | blCopyPDBCoords (PDB *out, PDB *in) |
void | blCalcCellTrans (VEC3F UnitCell, VEC3F CellAngles, VEC3F *xtrans, VEC3F *ytrans, VEC3F *ztrans) |
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]) |
void | blWriteCrystPDB (FILE *fp, VEC3F UnitCell, VEC3F CellAngles, char *spacegroup, REAL OrigMatrix[3][4], REAL ScaleMatrix[3][4]) |
PDB * | blExtractZonePDBAsCopy (PDB *inpdb, char *chain1, int resnum1, char *insert1, char *chain2, int resnum2, char *insert2) |
PDB * | blExtractZoneSpecPDBAsCopy (PDB *pdb, char *firstRes, char *lastRes) |
PDB * | blExtractNotZonePDBAsCopy (PDB *inpdb, char *chain1, int resnum1, char *insert1, char *chain2, int resnum2, char *insert2) |
PDB * | blExtractNotZoneSpecPDBAsCopy (PDB *pdb, char *firstRes, char *lastRes) |
PDB * | blFindResidue (PDB *pdb, char *chain, int resnum, char *insert) |
PDB * | blFindHetatmResidue (PDB *pdb, char *chain, int resnum, char *insert) |
PDB * | blFindAtomInRes (PDB *pdb, char *atnam) |
BOOL | blInPDBZone (PDB *p, char *chain, int resnum1, char *insert1, int resnum2, char *insert2) |
BOOL | blInPDBZoneSpec (PDB *p, char *resspec1, char *resspec2) |
BOOL | blAtomNameMatch (char *atnam, char *spec, BOOL *ErrorWarn) |
BOOL | blAtomNameRawMatch (char *atnam, char *spec, BOOL *ErrorWarn) |
BOOL | blLegalAtomSpec (char *spec) |
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) |
char ** | blReadSeqresPDB (FILE *fp, int *nchains) |
char ** | blReadSeqresWholePDB (WHOLEPDB *wpdb, int *nchains) |
PDB * | blSelectCaPDB (PDB *pdb) |
char * | blFixAtomName (char *name, REAL occup) |
void | blFreeWholePDB (WHOLEPDB *wpdb) |
WHOLEPDB * | blReadWholePDB (FILE *fpin) |
WHOLEPDB * | blReadWholePDBAtoms (FILE *fpin) |
BOOL | blAddCBtoGly (PDB *pdb) |
BOOL | blAddCBtoAllGly (PDB *pdb) |
PDB * | blStripGlyCB (PDB *pdb) |
PDB * | blRemoveAlternates (PDB *pdb) |
PDB * | blBuildAtomNeighbourPDBListAsCopy (PDB *pdb, PDB *pRes, REAL NeighbDist) |
PDB * | blFindAtomWildcardInRes (PDB *pdb, char *pattern) |
PDB * | blDupeResiduePDB (PDB *in) |
PDB * | blStripWatersPDBAsCopy (PDB *pdbin, int *natom) |
PDBSTRUCT * | blAllocPDBStructure (PDB *pdb) |
PDB * | blFindNextChain (PDB *pdb) |
void | blFreePDBStructure (PDBSTRUCT *pdbstruct) |
void | blSetElementSymbolFromAtomName (char *element, char *atom_name) |
BOOL | blGetHeaderWholePDB (WHOLEPDB *wpdb, char *header, int maxheader, char *date, int maxdate, char *pdbcode, int maxcode) |
char * | blGetTitleWholePDB (WHOLEPDB *wpdb) |
BOOL | blGetCompoundWholePDBChain (WHOLEPDB *wpdb, char *chain, COMPND *compnd) |
int | blFindMolID (WHOLEPDB *wpdb, char *chain) |
BOOL | blGetSpeciesWholePDBChain (WHOLEPDB *wpdb, char *chain, PDBSOURCE *source) |
BOOL | blGetCompoundWholePDBMolID (WHOLEPDB *wpdb, int molid, COMPND *compnd) |
BOOL | blGetSpeciesWholePDBMolID (WHOLEPDB *wpdb, int molid, PDBSOURCE *source) |
char * | blGetSeqresAsStringWholePDB (WHOLEPDB *wpdb, char **chains, MODRES *modres, BOOL doNucleic) |
HASHTABLE * | blGetSeqresByChainWholePDB (WHOLEPDB *wpdb, MODRES *modres, BOOL doNucleic) |
MODRES * | blGetModresWholePDB (WHOLEPDB *wpdb) |
void | blFindOriginalResType (char *orig, char *new, MODRES *modres) |
BIOMOLECULE * | blGetBiomoleculeWholePDB (WHOLEPDB *wpdb) |
void | blFreeBiomolecule (BIOMOLECULE *biomolecule) |
STRINGLIST * | blSetPDBAtomTypes (PDB *pdb) |
Variables | |
char | gRSCError [80] |
BOOL | gPDBPartialOcc |
int | gPDBMultiNMR |
BOOL | gPDBXML |
BOOL | gPDBModelNotFound |
int | gPDBXMLForce |
Include file for PDB routines.
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.
Definition in file pdb.h.
#define ATOMTYPE_BOUNDHET (10 | ATOMTYPE_NONRESIDUE) |
#define ATOMTYPE_BOUNDPOLYHET (11 | ATOMTYPE_NONRESIDUE) |
#define ATOMTYPE_HETATM (7 | ATOMTYPE_NONRESIDUE) |
#define ATOMTYPE_METAL (8 | ATOMTYPE_NONRESIDUE) |
#define ATOMTYPE_WATER (9 | ATOMTYPE_NONRESIDUE) |
#define CLEAR_PDB | ( | p | ) |
#define CREATEPDBEXTRAS | ( | x, | |
y | |||
) |
#define FORCEPDB gPDBXMLForce = FORCEXML_PDB |
#define FORCEXML gPDBXMLForce = FORCEXML_XML |
#define FREEPDBEXTRAS | ( | x | ) |
#define ISWATER | ( | z | ) |
#define MAKERESID | ( | x, | |
p | |||
) |
#define MAXATINAA 14 /* Max number of (heavy) atoms in a standard aa */ |
#define MAXATINRES |
#define MAXPDBANNOTATION |
#define MAXSTDAA 21 /* Number of standard amino acids (w/ PCA) */ |
#define PDBCHAINMATCH | ( | p, | |
q | |||
) | !strcmp((p)->chain, (q)->chain) |
#define PDBINSERTMATCH | ( | p, | |
q | |||
) | !strcmp((p)->insert, (q)->insert) |
#define RESIDMATCH | ( | p, | |
q | |||
) |
#define SEC (The_type_SEC_is_now_called_SECSTRUC_You_must_change_your_code *) |
#define SELECT | ( | x, | |
w | |||
) |
typedef struct _biomolecule BIOMOLECULE |
typedef struct _blAtomInfo blATOMINFO |
typedef struct _disulphide DISULPHIDE |
typedef struct pdbresidue PDBRESIDUE |
typedef struct _pdbsource PDBSOURCE |
[in,out] | *pdb | The PDB linked list |
Adds a CB atom to all glycines in a PDB linked list. This is used when one needs to orientate a residue in a common frame of reference which makes use of the CB.
[in,out] | *pdb | The PDB linked list for a Glycine |
Adds a CB atom to a glycine. This is used when one needs to orientate a residue in a common frame of reference which makes use of the CB.
[in,out] | *p | First PDB item |
[in,out] | *q | Second PDB item |
Adds a conect bteween p and q (i.e. in both directions) Fails if there are too many CONECTs
Definition at line 173 of file BuildConect.c.
[in,out] | **ppdb | Pointer to pointer to PDB linked list |
[in] | Charmm | Do Charmm style Nter |
Adds hydrogens onto the N-termini
Definition at line 123 of file AddNTerHs.c.
[in,out] | *p | First PDB item |
[in,out] | *q | Second PDB item |
Adds a conect from p to q (i.e. one direction only) Fails if there are too many CONECTs
Definition at line 200 of file BuildConect.c.
[in] | *pdb | PDB linked list |
Takes a PDB linked list and converts it into a hierarchical structure of chains, residues and atoms
Definition at line 109 of file StructurePDB.c.
[in] | *first | First linked list (may be NULL) |
[in] | *second | Second linked list |
Appends list second onto first. Returns start of new list (useful if first was NULL).
Definition at line 109 of file AppendPDB.c.
[in,out] | *pdb | PDB linked list |
[in] | matrix | Matrix to apply |
Apply a rotation matrix to a PDB linked list.
Definition at line 92 of file ApMatPDB.c.
[in] | *res1 | Start of first residue |
[in] | *res2 | Start of second residue |
[in] | tol | Tolerance for distances |
Tests whether two residue are bonded using pointers to start of residues
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 | ||
) |
[in] | *pdb | PDB linked list |
[in] | *chain1 | First chain label |
[in] | resnum1 | First residue number |
[in] | *insert1 | First insert code |
[in] | *chain2 | Second chain label |
[in] | resnum2 | Second residue number |
[in] | *insert2 | Second insert code |
[in] | tol | Tolerance for distances |
Tests whether two residue are bonded
Definition at line 360 of file BuildConect.c.
[in] | *atnam | The atom name to test |
[in] | *spec | The atom specification |
[in,out] | *ErrorWarn | On input, if TRUE, this routine will indicate errors. On output, indicates whether there was an error. Note that you must be careful to supply an lvalue here, you can't just use TRUE or FALSE since it's modified on return. NULL is allowed if you don't care about errors. |
Tests whether an atom name matches an atom name specification. ? or % is used to match a single character is used to match any trailing characters; it may not be used for leading characters or in the middle of a specification (e.g. B, C*2 are both illegal). Wildcards may be escaped with a backslash.
For example: C* matches all carbon atoms, O5* matches an atom called O5* ?B* matches all beta atoms
Definition at line 139 of file AtomNameMatch.c.
[in] | *atnam | The atom name to check |
[in] | *spec | The atom specification |
[in,out] | *ErrorWarn | On input, if TRUE, this routine will indicate errors. On output, indicates whether there was an error. Note that you must be careful to supply an lvalue here, you can't just use TRUE or FALSE since it's modified on return. NULL is allowed if you don't care about errors. |
Tests whether an atom name matches an atom name specification.
This version should be given the raw atom name rather than the massaged one. i.e. " CA " is C-alpha, "CA " is Calcium
Normally it checks against the second character onwards unless the spec starts with a < in which case it checks from the beginning of the string
Written as a wrapper to AtomNameMatch()
Definition at line 250 of file AtomNameMatch.c.
[in] | *pdb | PDB linked list of whole structure |
[in] | *pRes | Pointer to start of residue of interest (may be in a separate linked list providing it's in the same coordinate frame) |
[in] | NeighbDist | Cutoff neighbour distance |
Builds a PDB linked list of atoms neighbouring those in a specified residue. The input list is unmodified.
Definition at line 113 of file BuildAtomNeighbourPDBList.c.
[in,out] | *pdb | PDB linked list |
[in] | tol | Tolerence for distance between atoms |
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
Definition at line 251 of file BuildConect.c.
void blBuildResSpec | ( | PDB * | p, |
char * | resspec | ||
) |
[in] | *p | PDB record pointer |
Builds a residue specification string for a PDB record
Definition at line 352 of file ParseRes.c.
void blCalcCellTrans | ( | VEC3F | UnitCell, |
VEC3F | CellAngles, | ||
VEC3F * | xtrans, | ||
VEC3F * | ytrans, | ||
VEC3F * | ztrans | ||
) |
[in] | UnitCell | The unit cell dimensions |
[in] | CellAngles | The unit cell angles |
[out] | *xtrans | Translation to apply along X axis |
[out] | *ytrans | Translation to apply along Y axis |
[out] | *ztrans | Translation to apply along Z axis |
Calculates the offsets to apply in X, Y and Z directions for creating a crystal lattice from the unit cell parameters.
Definition at line 102 of file CalcCellTrans.c.
[in] | *pdb | PDB linked list |
[in] | type | Torsion type (see below) |
Calculates a sidechain torsion angle from a pdb linked list. The atoms to be included in the calculation are specified by type.
type Atom names Sequential atom numbers -------------------------------------------------- 0 N, CA, CB, XG (0 - 1 - 4 - 5) 1 CA, CB, XG, XD (1 - 4 - 5 - 6) 2 CB, XG, XD, XE (4 - 5 - 6 - 7) 3 XG, XD, XE, XZ (5 - 6 - 7 - 8)
Definition at line 111 of file CalcChiPDB.c.
[in,out] | *p | OT2 PDB record whose coords are to be fixed |
[in] | *ca_p | Antecedent CA PDB pointer |
[in] | *c_p | Antecedent C PDB pointer |
[in] | *o_p | Antecedent O PDB pointer |
Calculates the CTER OT2 coords
Definition at line 111 of file CalcCterCoords.c.
[in] | *pdb1 | First PDB linked list |
[in] | *pdb2 | Second PDB linked list |
Calculate the RMS deviation between two fitted PDB linked lists. No fitting is done. The two lists must contain equivalent structures (same atom types in same order). No checks are made on this.
Definition at line 110 of file CalcRMSPDB.c.
[in] | *nter | Pointer to the N-terminus |
[out] | *coor | Array of hydrogen coordinates |
Calculates coordinates for the extra hydrogens.
Definition at line 117 of file CalcTetraHCoords.c.
BOOL blCheckFileFormatPDBML | ( | FILE * | fp | ) |
[in] | *fp | A pointer to type FILE. |
Simple test to detect PDBML-formatted pdb file.
Todo: Consider replacement with general function to detect file format for uncompressed file returning file type (eg pdb/pdbml/unknown).
[out] | *out | PDB linked list containing new CONECT records |
[in] | *in | PDB linked list containing original CONECT records |
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.
Definition at line 574 of file BuildConect.c.
[in] | *in | Input PDB linked list |
[out] | *out | Output PDB linked list |
Applies the coordinates of `in' to `out'. Assumes that the structures are equivalent with identical atom ordering. Makes a simple check on resnam and atnam at each position.
Definition at line 112 of file CopyPDBCoords.c.
[in] | *pdb | PDB pointer |
[in] | cNum | Index into the ->conect[] array for the CONECT to be deleted |
Deletes the link for the specified CONECT. Other CONECTs are shuffled down.
Definition at line 500 of file BuildConect.c.
void blDeleteAtomConects | ( | PDB * | pdb | ) |
[in] | *pdb | PDB pointer |
Deletes all CONECT information associated with a PDB pointer. Also deletes the relevant CONECTs (back to this atom) from the partner atoms
Definition at line 536 of file BuildConect.c.
[in] | *pdb | Start of PDB linked list |
[in] | *atom | Atom to delete |
Deletes an atom from the PDB linked list. Should be called as pdb=blDeleteAtomPDB(pdb, atom); to allow for the first atom in the linked list being deleted.
Returns NULL of all atoms have been deleted. Returns the input pdb linked list unmodified if the atom isn't found.
[in] | *pdb | Start of PDB linked list |
[in] | *start | First atom to delete |
[in] | *stop | Atom after the one to be deleted |
Deletes a range of atoms from the linked list re-linking the list and returning the new start of the list (in case the first atom has been deleted)
[in,out] | *pPDB | Pointer to pointer to start of PDB linked list |
[in] | *res | Pointer to residue to be removed |
Remove a residue from the PDB linked list and re-link correctly. Returns the next item in the list, so will be NULL when the last residue has been deleted.
BOOL blDoParseResSpec | ( | char * | inSpec, |
char * | chain, | ||
int * | resnum, | ||
char * | insert, | ||
BOOL | uppercaseresspec | ||
) |
[in] | *inSpec | Residue specification |
[out] | *chain | Chain label |
[out] | *resnum | Residue number |
[out] | *insert | Insert label |
[in] | uppercaseresspec | Convert spec to upper case. |
Note that chain and insert must be arrays of at least 2 characters, not character pointers
Splits up a residue specification of the form [c][.]num[i] into chain, resnum and insert. Chain and insert are optional and will be set to spaces if not specified. If uppercaseresspec equals TRUE, the spec is upper cased before processing
Multi-letter chain IDs can be parsed. Additionally, chain IDs with numerical characters can be parsed if a period is used to separate the chain from the residue number.
Definition at line 214 of file ParseRes.c.
[in] | *fpin | A pointer to type FILE in which the .PDB file is stored. |
[in] | AllAtoms | TRUE: ATOM & HETATM records FALSE: ATOM records only |
[in] | OccRank | Occupancy ranking |
[in] | ModelNum | NMR Model number (0 = all) |
[in] | DoWhole | Read the whole PDB file rather than just the ATOM/HETATM records. |
Reads a PDB file into a PDB linked list. The OccRank value indicates occupancy ranking to read for partial occupancy atoms. If any partial occupancy atoms are read the global flag gPDBPartialOcc is set to TRUE.
21.07.15 Changed atomType to atomInfo By: ACRM
We need to deal with freeing wpdb if we are returning null. Also need to deal with some sort of error code
[in] | *fpin | A pointer to type FILE in which the .PDB file is stored. |
[in] | AllAtoms | TRUE: ATOM & HETATM records FALSE: ATOM records only |
[in] | OccRank | Occupancy ranking |
[in] | ModelNum | NMR Model number (0 = all) |
[in] | DoWhole | Read the whole PDB file rather than just the ATOM/HETATM records. |
Reads a PDBML-formatted PDB file into a PDB linked list.
The OccRank value indicates occupancy ranking to read for partial occupancy atoms. If any partial occupancy atoms are read the global flag gPDBPartialOcc is set to TRUE.
The global multiple-models flag is set to true if more than one model is found.
Returns NULL if memory allocation fails or returns wpdb with wpdb->pdb set to NULL and wpdb->natoms set to -1.
[in] | *in | Input PDB linked list |
Duplicates a PDB linked list. Allocates new linked list with identical data. CONECT data are updated to point within the new list.
[in] | *in | PDB linked list pointing to residue to duplicate |
Makes a duplicate PDB linked list of just the residue pointed to by `in'. Note that CONECT data will not be preserved since it would not be valid.
Definition at line 100 of file DupeResiduePDB.c.
void blEndRepSChain | ( | void | ) |
PDB* blExtractNotZonePDBAsCopy | ( | PDB * | inpdb, |
char * | chain1, | ||
int | resnum1, | ||
char * | insert1, | ||
char * | chain2, | ||
int | resnum2, | ||
char * | insert2 | ||
) |
[in] | *inpdb | Input PDB linked list |
[in] | *chain1 | Start residue chain name |
[in] | resnum1 | Start residue number |
[in] | *insert1 | Start residue insert code |
[in] | *chain2 | End residue chain name |
[in] | resnum2 | End residue number |
[in] | *insert2 | End residue insert code |
Reduces a PDB linked list to those residues outside a specified zone. Note that the PDB linked list is duplicated before extraction so pointers do not match those in the input PDB linked list. Excess records in the new PDB linked list are freed.
Definition at line 341 of file ExtractZonePDB.c.
[in] | pdb | PDB linked list |
[in] | firstRes | Residue spec ([chain]resnum[insert]) |
[in] | lastRes | Residue spec ([chain]resnum[insert]) |
Extracts atoms outside a zone from a PDB linked list, making a copy of the original list.
Definition at line 417 of file ExtractZonePDB.c.
PDB* blExtractZonePDBAsCopy | ( | PDB * | inpdb, |
char * | chain1, | ||
int | resnum1, | ||
char * | insert1, | ||
char * | chain2, | ||
int | resnum2, | ||
char * | insert2 | ||
) |
[in] | *inpdb | Input PDB linked list |
[in] | *chain1 | Start residue chain name |
[in] | resnum1 | Start residue number |
[in] | *insert1 | Start residue insert code |
[in] | *chain2 | End residue chain name |
[in] | resnum2 | End residue number |
[in] | *insert2 | End residue insert code |
Reduces a PDB linked list to those residues within a specified zone. Note that the PDB linked list is duplicated before extraction so pointers do not match those in the input PDB linked list. Excess records in the new PDB linked list are freed.
17.02.16 Added fix on check for exact match - prev wasn't being set correctly if the match was to the first residue in the file
TODO - This doesn't deal with CONECT information properly! ***
Definition at line 158 of file ExtractZonePDB.c.
[in] | pdb | PDB linked list |
[in] | firstRes | Residue spec ([chain]resnum[insert]) |
[in] | lastRes | Residue spec ([chain]resnum[insert]) |
Extracts a zone from a PDB linked list, making a copy of the original list.
Definition at line 300 of file ExtractZonePDB.c.
[in] | *pdb | The beginning of a residue in a PDB linked list |
[in] | *atnam_in | An atom name to search for (doesn't need to be space-padded) |
Finds an atom within a residue
Definition at line 111 of file FindAtomInRes.c.
[in] | *pdb | Pointer to start of a residue |
[in] | *pattern | Atom name pattern to find |
Finds an atom within the residue given as a PDB pointer. Allows single character wildcards. Thus ?G? maybe used for any atom at the gamma position.
Returns the first atom which matches
Definition at line 100 of file FindAtomWildcardInRes.c.
[in] | pdb | PDB linked list |
[in] | chain | Chain label |
[in] | resnum | Residue number |
[in] | insert | Insert code |
Finds a pointer to the start of a residue in a PDB linked list, but requires the residue is a HETATM record Uses string for chain and insert.
Definition at line 111 of file FindHetatmResidue.c.
[in] | *pdb | PDB linked list |
[in] | *resspec | Residue specification |
Search a PDB linked list for a specified residue (given as [chain]num[insert]) but limits search to HETATM residues
Definition at line 105 of file FindHetatmResidueSpec.c.
int blFindMolID | ( | WHOLEPDB * | wpdb, |
char * | chain | ||
) |
[in] | *wpdb | WHOLEPDB structure |
[in] | *chain | Chain label |
Finds the MOL_ID for a specified chain
Definition at line 481 of file PDBHeaderInfo.c.
[in] | *pdb | PDB linked list |
Takes a PDB linked list and find the start of the next chain. This is similar to another Bioplib routine (blFindNextChainPDB()) which terminates the first chain, but this routines doesn't terminate.
Definition at line 252 of file StructurePDB.c.
[in,out] | *pdb | PDB linked list |
Terminates the linked list at the end of the current chain and returns a pointer to the start of the next chain. See blFindNextChain() for a routine which does not terminate the linked list.
Definition at line 112 of file FindNextChainPDB.c.
[in] | *pdb | PDB linked list |
Finds the next residue in a PDB linked list.
Definition at line 117 of file FindNextResidue.c.
void blFindOriginalResType | ( | char * | modAA, |
char * | stdAA, | ||
MODRES * | modres | ||
) |
[in] | *modAA | Non-standard (modified) amino acid name |
[out] | *stdAA | Standard amino acid from which it was derived |
[in] | *modres | MODRES linked list |
Uses the MODRES information to identify the original (standard) amino acid from which a modified amino acid was derived
Definition at line 940 of file PDBHeaderInfo.c.
[in] | pdb | PDB linked list |
[in] | chain | Chain label |
[in] | resnum | Residue number |
[in] | insert | Insert code |
Finds a pointer to the start of a residue in a PDB linked list. Uses string for chain and insert.
Definition at line 117 of file FindResidue.c.
[in] | *pdb | PDB linked list |
[in] | *resspec | Residue specification |
Search a PDB linked list for a specified residue (given as [chain][.]num[insert])
Definition at line 119 of file FindResidueSpec.c.
BOOL blFindZonePDB | ( | PDB * | pdb, |
int | start, | ||
char * | startinsert, | ||
int | stop, | ||
char * | stopinsert, | ||
char * | chain, | ||
int | mode, | ||
PDB ** | pdb_start, | ||
PDB ** | pdb_stop | ||
) |
[in] | *pdb | PDB linked list |
[in] | start | Resnum of start of zone |
[in] | *startinsert | Insert code for start of zone |
[in] | stop | Resnum of end of zone |
[in] | *stopinsert | Insert code for end of zone |
[in] | *chain | Chain name |
[in] | mode | ZONE_MODE_RESNUM: Use PDB residue numbers/chain ZONE_MODE_SEQUENTIAL: Use sequential numbering |
[out] | **pdb_start | Start of zone |
[out] | **pdb_stop | End of zone |
Finds pointers to the start and end of a zone in a PDB linked list. The end is the atom after the specified zone
Definition at line 105 of file FindZonePDB.c.
[in] | *ref_pdb | Reference PDB linked list |
[in,out] | *fit_pdb | PDB linked list to be fitted |
[out] | rm | Rotation matrix |
Does a weigthed fitting of 2 PDB linked lists. The CA and CB are given a weight of 1.0 while the other atoms are given a weight of 1.0/natom in the residue. Thus for N,CA,C,CB backbone only, this will be N and C with weights of 0.25
Definition at line 122 of file FitCaCbPDB.c.
[in] | *ref_pdb | Reference PDB linked list |
[in,out] | *fit_pdb | Mobile PDB linked list |
[out] | rm | Rotation matrix (May be input as NULL). |
Fits two PDB linked lists using only the CA atoms.
Actually fits fit_pdb onto ref_pdb and also returns the rotation matrix. This may be NULL if these data are not required.
Definition at line 117 of file FitCaPDB.c.
[in] | *ref_pdb | Reference PDB linked list |
[in,out] | *fit_pdb | Mobile PDB linked list |
[out] | rm | Rotation matrix (May be input as NULL). |
Fits two PDB linked lists using only the N, CA, C atoms.
Actually fits fit_pdb onto ref_pdb and also returns the rotation matrix. This may be NULL if these data are not required.
Definition at line 114 of file FitNCaCPDB.c.
[in] | *ref_pdb | Reference PDB linked list |
[in,out] | *fit_pdb | Mobile PDB linked list |
[out] | rm | Rotation matrix (May be input as NULL). |
Fits two PDB linked lists. Actually fits fit_pdb onto ref_pdb and also returns the rotation matrix. This may be NULL if these data are not required.
char* blFixAtomName | ( | char * | name, |
REAL | occup | ||
) |
[in] | *name | Atom name read from file |
[in] | occup | Occupancy to allow fixing of partial occupancy atom names |
Fixes an atom name by removing leading spaces, or moving a leading digit to the end of the string. Used by doReadPDB()
[in,out] | *pdb | PDB linked list to modify |
[in] | style | CTER_STYLE_STD, CTER_STYLE_GROMOS or CTER_STYLE_CHARMM |
Renames C-ter atoms in required style and calls CalcCterCoords() as required to calculate coordinates ans splices them in. The input PDB linked list may have standard, CHARMM or GROMOS style.
Definition at line 138 of file FixCterPDB.c.
[in] | *pdb | PDB linked list to fix atom order |
[in] | Pad | TRUE: Create dummy coordinate atoms for any missing atoms in standard residues |
[in] | Renum | TRUE: Renumber the atoms |
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.
char* blFNam2PDB | ( | char * | filename | ) |
[in] | *filename | A PDB filename containing a PDB code |
This routine attempts to convert a filename stem to a PDB code.
All the following inputs should produce the same output of 1fbj:
$A:[PDB]PDB1FBJ.ENT C:\P1FBJ.PDB /pdb/p1fbj.pdb /pdb/pdb1fbj.pdb 1fbj.pdb 1fbjL
The routine first removes characters from the start of the filename up to the last : ] / or . It then searches for the following possible patterns (where N is a digit and X is an alphanumeric)
pdbNXXX pNXXX NXXX XXXX.pdb XXXX.ent
This should cover just about any filename which includes a legal PDB code.
Definition at line 123 of file FNam2PDB.c.
[in] | *pdb | PDB linked list to write |
Checks PDB linked list is compatible with PDB-formatted text file.
Definition at line 269 of file WritePDB.c.
void blFreeBiomolecule | ( | BIOMOLECULE * | biomolecule | ) |
Definition at line 1252 of file PDBHeaderInfo.c.
void blFreePDBStructure | ( | PDBSTRUCT * | pdbstruct | ) |
[in] | *pdbstruct | PDBSTRUCT structure containing chain linked list |
Frees memory used by the hierarchical description of a PDB structure. Note this does not free the underlying PDB linked list
Definition at line 219 of file StructurePDB.c.
void blFreeWholePDB | ( | WHOLEPDB * | wpdb | ) |
[in] | *wpdb | WHOLEPDB structure to be freed |
Frees the header, trailer and atom content from a WHOLEPDB structure
BOOL blGetAtomTypes | ( | char * | resnam, |
char ** | AtomTypes | ||
) |
[in] | *resnam | Residue name for which to search |
[out] | **AtomTypes | Array of atom names contained in the residue |
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!
Definition at line 349 of file OrderPDB.c.
BIOMOLECULE* blGetBiomoleculeWholePDB | ( | WHOLEPDB * | wpdb | ) |
[in] | *wpdb | Pointer to WHOLEPDB structure |
Reads the biomolecule assembly data from REMARK 300 and REMARK 350 headers.
The returned pointer is a linked list of BIOMOLECULE structures. The first item in the list contains the information from REMARK 300: the total number of biomolecule assemblies and any additional information provided in REMARK 300 beyond the standard comments. The additional information (biomolecule->details) is a STRINGLIST linked list.
The list of chains will appear in biomolcule->chains as a comma separated list and the transformation to be applied to them will appear in the biomolecule->biomt structure. This is also a linked list so if multiple transformations are required these will appear in further entries to this list.
Additional entries will be found in the BIOMOLECULE linked list for each different biomolecule.
See the test code in PDBHeaderInfo.c for example usage.
Definition at line 1232 of file PDBHeaderInfo.c.
[in] | *pdb | Start of PDB linked list |
[out] | *cg | Centre of geometry of specified region |
Finds the CofG of a PDB linked list, ignoring NULL coordinates.
Definition at line 98 of file GetCGPDB.c.
[in] | *start | Start of region of interest in PDB list |
[in] | *stop | Beginning of next residue |
[out] | *cg | Centre of geometry of specified region |
Find CofG of a range in a PDB linked list, ignoring NULL coordinates (specified as all coords==9999.000)
Definition at line 99 of file GetCofGPDBRange.c.
[in] | *start | Start of region of interest in PDB list |
[in] | *stop | Beginning of next residue |
[out] | *cg | Centre of geometry of specified region |
Find CofG of a range in a PDB linked list, ignoring NULL coordinates Looks only at the sidechain atoms (specified as all coords==9999.000) and backbone (N,CA,C,O). For Glycine, returns the CA coordinates.
Definition at line 101 of file GetCofGPDBSCRange.c.
[in] | *wpdb | WHOLEPDB structure |
[in] | *chain | Chain label of interest |
[out] | *compnd | Data from the COMPND records |
Extracts the COMPND data for a specified chain. Returns FALSE if the chain isn't found
Definition at line 396 of file PDBHeaderInfo.c.
[in] | *wpdb | WHOLEPDB structure |
[in] | molid | MOL_ID from PDB-format COMPND record. |
[out] | *compnd | Data from the COMPND records |
Extracts the COMPND data for a specified MOL_ID. Returns FALSE if the MOL_ID isn't found
Definition at line 600 of file PDBHeaderInfo.c.
int blGetCrystPDB | ( | FILE * | fp, |
VEC3F * | UnitCell, | ||
VEC3F * | CellAngles, | ||
char * | spacegroup, | ||
REAL | OrigMatrix[3][4], | ||
REAL | ScaleMatrix[3][4] | ||
) |
[in] | *fp | Input file pointer |
[out] | *UnitCell | The unit cell dimensions |
[out] | *CellAngles | The unit cell angles |
[out] | *spacegroup | The spacegroup |
[out] | OrigMatrix | The origin matrix |
[out] | ScaleMatrix | The scale matrix |
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 122 of file GetCrystPDB.c.
int blGetCrystWholePDB | ( | WHOLEPDB * | wpdb, |
VEC3F * | UnitCell, | ||
VEC3F * | CellAngles, | ||
char * | spacegroup, | ||
REAL | OrigMatrix[3][4], | ||
REAL | ScaleMatrix[3][4] | ||
) |
[in] | *wpdb | Whole PDB pointer |
[out] | *UnitCell | The unit cell dimensions |
[out] | *CellAngles | The unit cell angles |
[out] | *spacegroup | The spacegroup |
[out] | OrigMatrix | The origin matrix |
[out] | ScaleMatrix | The scale matrix |
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.
[in] | *fp | PDB file pointer |
[out] | *resolution | The resolution (0.0 if not applicable) |
[out] | *RFactor | The R-factor (0.0 if not found) |
[out] | *FreeR | The Free R-factor (0.0 if not found) |
[out] | *StrucType | Structure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN |
This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.
N.B. The resolution information returned by the routine is reliable; the R-factor information is stored in so many forms that it is difficult to read without some form of natural language parsing, but we manage to handle most situations. The routine assumes the R-factor to be the first number after the words `R-value' (or one of the other keys - see the case statement in the code for the valid keywords). Thus we cannot handle records of the form: THE R-VALUE FOR 7142 REFLECTIONS BETWEEN 10.0 AND 1.97 ANGSTROMS REFINEMENT CYCLE 73 IS 0.254. as appears in entries such as 1LZT. Here, the first number is the number of reflections. There is thus a kludge which sets the R-factor to zero if it was read as greater than 0.5 to avoid this situation. In these cases, we lose the R-factor information. This occurs in approx 3.5% of the 1XXX PDB entries.
Definition at line 666 of file ResolPDB.c.
[in] | *fp | PDB file pointer |
[out] | *resolution | The resolution (0.0 if not applicable) |
[out] | *RFactor | The R-factor (0.0 if not found) |
[out] | *FreeR | The Free R-factor (0.0 if not found) |
[out] | *StrucType | Structure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN |
This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.
Definition at line 289 of file ResolPDB.c.
BOOL blGetExptlWholePDB | ( | WHOLEPDB * | wpdb, |
REAL * | resolution, | ||
REAL * | RFactor, | ||
REAL * | FreeR, | ||
int * | StrucType | ||
) |
[in] | *wpdb | WHOLEPDB structure pointer |
[out] | *resolution | The resolution (0.0 if not applicable) |
[out] | *RFactor | The R-factor (0.0 if not found) |
[out] | *FreeR | The Free R-factor (0.0 if not found) |
[out] | *StrucType | Structure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN |
This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.
Definition at line 350 of file ResolPDB.c.
BOOL blGetHeaderWholePDB | ( | WHOLEPDB * | wpdb, |
char * | header, | ||
int | maxheader, | ||
char * | date, | ||
int | maxdate, | ||
char * | pdbcode, | ||
int | maxcode | ||
) |
[in] | *wpdb | WHOLEPDB structure pointer |
[out] | *header | String containing header text |
[in] | maxheader | Max length for storing header |
[out] | *date | Date string |
[in] | maxdate | Max length for storing date |
[out] | *pdbcode | PDB code |
[in] | maxcode | Max length for storing PDB code |
Obtains information from the PDB HEADER record
Definition at line 182 of file PDBHeaderInfo.c.
[in] |
Definition at line 882 of file PDBHeaderInfo.c.
[in] | *pdb | PDB linked list |
[in] | n | Offset into linked list |
Gets a pointer to a pdb item by taking a PDB linked list and an integer. The pointer returned is the n'th item in the list
Definition at line 106 of file GetPDBByN.c.
[in] | *pdbin | PDB linked list |
[in] | *chain | Chain label |
Extracts a specified chain from a PDB linked list allocating a new list containing only that chain. The original list is unchanged.
Definition at line 95 of file GetPDBChainAsCopy.c.
char** blGetPDBChainLabels | ( | PDB * | pdb, |
int * | nChains | ||
) |
[in] | *pdb | PDB linked list |
[out] | nChains | Number of chains found. |
Scans a PDB linked list for chain names. Allocates memory for an array of strings containing these labels which is returned together with the number of chains found.
N.B. You must free the allocated memory for both the array of chains and for each individual chain label when you've finished with it!
Definition at line 118 of file GetPDBChainLabels.c.
[in] | *pdb | PDB linked list |
[out] | **coor | Array of coordinate structure pointers |
Get the coordinates out of a PDB linked list into an array of type COOR The COOR array is allocated for you
Definition at line 104 of file GetPDBCoor.c.
[in] | *fp | PDB file pointer |
[out] | *resolution | The resolution (0.0 if not applicable) |
[out] | *RFactor | The R-factor (0.0 if not found) |
[out] | *StrucType | Structure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN |
This routine attempts to obtain resolution and R-factor information out of a PDB file. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.
N.B. The resolution information returned by the routine is reliable; the R-factor information is stored in so many forms that it is difficult to read without some form of natural language parsing, but we manage to handle most situations. The routine assumes the R-factor to be the first number after the words `R-value' (or one of the other keys - see the case statement in the code for the valid keywords). Thus we cannot handle records of the form: THE R-VALUE FOR 7142 REFLECTIONS BETWEEN 10.0 AND 1.97 ANGSTROMS REFINEMENT CYCLE 73 IS 0.254. as appears in entries such as 1LZT. Here, the first number is the number of reflections. There is thus a kludge which sets the R-factor to zero if it was read as greater than 0.5 to avoid this situation. In these cases, we lose the R-factor information. This occurs in approx 3.5% of the 1XXX PDB entries.
Definition at line 193 of file ResolPDB.c.
[in] | *wpdb | WHOLEPDB structure pointer |
[out] | *resolution | The resolution (0.0 if not applicable) |
[out] | *RFactor | The R-factor (0.0 if not found) |
[out] | *StrucType | Structure type: STRUCTURE_TYPE_XTAL STRUCTURE_TYPE_NMR STRUCTURE_TYPE_MODEL STRUCTURE_TYPE_UNKNOWN |
This routine attempts to obtain resolution and R-factor information out of a WHOLEPDB structure. It returns TRUE or FALSE to indicate whether valid information was found. Resolution-not-applicable structures then have the resolution set to zero.
N.B. The resolution information returned by the routine is reliable; the R-factor information is stored in so many forms that it is difficult to read without some form of natural language parsing, but we manage to handle most situations. The routine assumes the R-factor to be the first number after the words `R-value' (or one of the other keys - see the case statement in the code for the valid keywords). Thus we cannot handle records of the form: THE R-VALUE FOR 7142 REFLECTIONS BETWEEN 10.0 AND 1.97 ANGSTROMS REFINEMENT CYCLE 73 IS 0.254. as appears in entries such as 1LZT. Here, the first number is the number of reflections. There is thus a kludge which sets the R-factor to zero if it was read as greater than 0.5 to avoid this situation. In these cases, we lose the R-factor information. This occurs in approx 3.5% of the 1XXX PDB entries.
Definition at line 244 of file ResolPDB.c.
char* blGetSeqresAsStringWholePDB | ( | WHOLEPDB * | wpdb, |
char ** | chains, | ||
MODRES * | modres, | ||
BOOL | doNucleic | ||
) |
[in] | *wpdb | Pointer to whole PDB structure |
[out] | **chains | Chain labels for the chains - may also be set to NULL if you don't want to record chain labels |
[in] | *modres | Linked list of MODRES information. May be NULL if you don't want to translate non-standard amino acids. |
[in] | doNucleic | Read sequence for nucleic acid chains |
Reads sequence from SEQRES records into a character string in 1-letter code. Chains are terminated by * characters.
Definition at line 759 of file PDBHeaderInfo.c.
[in] | *wpdb | Pointer to whole PDB structure |
[in] | *modres | Linked list of MODRES information. May be NULL if you don't want to translate non-standard amino acids. |
[in] | doNucleic | Read sequence for nucleic acid chains |
Reads sequence from SEQRES records in 1-letter code, storing the results in a hash indexed by chain label.
Definition at line 1300 of file PDBHeaderInfo.c.
[in] | *wpdb | WHOLEPDB structure |
[in] | *chain | Chain label |
[out] | *source | SOURCE information for chain |
Extracts the SOURCE data for a specified chain
Definition at line 534 of file PDBHeaderInfo.c.
[in] | *wpdb | WHOLEPDB structure |
[in] | molid | MOL_ID from PDB-format SOURCE record. |
[out] | *source | SOURCE information for chain |
Extracts the SOURCE data for a specified MOL_ID. Returns FALSE if not found.
Definition at line 679 of file PDBHeaderInfo.c.
char* blGetTitleWholePDB | ( | WHOLEPDB * | wpdb | ) |
[in] | *wpdb | WHOLEPDB structure |
Extracts the title from a PDB file malloc()ing a string in which to store the data. This must be freed by user code
Definition at line 228 of file PDBHeaderInfo.c.
int blHAddPDB | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | File pointer to PGP file |
[in,out] | *pdb | PDB Linked list to which Hs are added |
Globals: HADDINFO gHaddInfo Information on Hs added
This routine adds hydrogens to a PDB linked list. Performs all necessary functions.
N.B. Because of the variation in styles required for N-terminal Hs, this routine adds no hydrogens to the N-terminal residue. FixPDB() may be used for this purpose if CHARMM/CONGEN style hydrogens are required.
[in] | *pdb | PDB linked list |
[out] | *indexSize | Index size |
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
Definition at line 156 of file IndexPDB.c.
[in] | *pdb | Pointer to the start of a PDB linked list. |
[out] | *natom | Number of atoms in the PDB linked list. |
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
Definition at line 117 of file IndexPDB.c.
BOOL blInPDBZone | ( | PDB * | p, |
char * | chain, | ||
int | resnum1, | ||
char * | insert1, | ||
int | resnum2, | ||
char * | insert2 | ||
) |
[in] | *p | Pointer to a PDB record |
[in] | *chain | Chain name |
[in] | resnum1 | First residue |
[in] | *insert1 | First insert code |
[in] | resnum2 | Second residue |
[in] | *insert2 | Second insert code |
Checks that atom stored in PDB pointer p is within the specified residue range.
N.B. This assumes ASCII coding.
Definition at line 115 of file InPDBZone.c.
[in] | *p | Pointer to a PDB record |
[in] | *resspec1 | Res spec for first residue |
[in] | *resspec2 | Res spec for last residue |
Determines whether a PDB pointer is within a residue range specified using standard format: [c]nnn[i]
Also handles the residue spec of c* (i.e. chain name and a * to indicate all residues in a given chain). This must be given as resspec1 (resspec2 is then ignored).
Calls InPDBZone() to do the actual work
Definition at line 111 of file InPDBZoneSpec.c.
[in] | *p | First PDB atom |
[in] | *q | Second PDB atom |
[in] | tol | Telerance for separation between atoms |
Test whether two atoms are bonded
Definition at line 326 of file BuildConect.c.
[in] | *p | First atom |
[in] | *q | Second atom |
Tests whether there is a link between the specified atoms in the CONECT list
Definition at line 629 of file BuildConect.c.
[in] | *pdb | Pointer to item in PDB linked list to be removed |
[in] | *prev | Pointer to previous item in linked list |
Kill an item in the PDB linked list and re-link correctly. Returns the next item in the list, so will be NULL when the last item in the list is killed.
[in] | *ResStart | Start of a residue in linked list |
[in] | *NextRes | Start of next residue |
[in] | doCB | Flag to kill CB as part of s/c |
Kills sidechains by calls to KillPDB() for residues between ResStart and NextRes. If doCB is set, will kill the CB.
N.B. At least 1 backbone atom must occur in the linked list before the sidechain.
Definition at line 111 of file KillSidechain.c.
BOOL blLegalAtomSpec | ( | char * | spec | ) |
Partner routine for AtomNameMatch(). Checks whether a wildcard specfication is legal (i.e. will not return an error when used with AtomNameMatch()).
The only thing which is not legal is characters following a *
Definition at line 106 of file LegalAtomSpec.c.
[in] | *move | PDB record to be moved |
[in,out] | **from | Start of PDB linked list containing record |
[in,out] | **to | Start of output linked list |
Moves a PDB record from one linked list to another. from and to should point to the start of the 2 lists. If the to list hasn't been started, to should be NULL. Returns TRUE if moved, FALSE otherwise.
FILE* blOpenPGPFile | ( | char * | pgpfile, |
BOOL | AllHyd | ||
) |
[in] | *pgpfile | Name of a PGP file or NULL |
[in] | AllHyd | If name of PGP not specified, this flag specified whether all or explicit hydrogen file required |
Open the PGP file
void blOriginPDB | ( | PDB * | pdb | ) |
[in,out] | *pdb | PDB linked list to move |
Moves a PDB linked list to the origin, ignoring NULL coordinates.
Definition at line 96 of file OriginPDB.c.
BOOL blParseResSpec | ( | char * | spec, |
char * | chain, | ||
int * | resnum, | ||
char * | insert | ||
) |
[in] | *spec | Residue specification |
[out] | *chain | Chain label |
[out] | *resnum | Residue number |
[out] | *insert | Insert label |
Note that chain and insert must be arrays of at least 2 characters, not character pointers
Splits up a residue specification of the form [c][.]num[i] into chain, resnum and insert. Chain and insert are optional and will be set to spaces if not specified. Converts the resiude specification to upper case before processing.
Moved the code that was here to a new function, DoParseResSpec() and made this function just call that new function. See DoParseResSpec()'s comments for notes on previous changes. This move is to allow the underlying function to have an extra parameter to specify whether or not the residue specification should be upper cased (without affecting code that calls this function).
Definition at line 158 of file ParseRes.c.
void blPrintResSpecHelp | ( | FILE * | fp | ) |
Definition at line 330 of file ParseRes.c.
DISULPHIDE* blReadDisulphidesPDB | ( | FILE * | fp, |
BOOL * | error | ||
) |
[in] | *fp | PDB file pointer |
[out] | *error | Success |
Searches a PDB file for SSBOND records and constructs a linked list of information from these records. Returns NULL if no disulphide information found. If memory allocation fails, the DISULPHIDE linked list formed thus far is returned and the error flag is set to TRUE
DISULPHIDE* blReadDisulphidesWholePDB | ( | WHOLEPDB * | wpdb, |
BOOL * | error | ||
) |
[in] | *wpdb | Whole PDB structure |
[out] | *error | Success |
Searches the headers in a WHOLEPDB structure for SSBOND records and constructs a linked list of information from these records. Returns NULL if no disulphide information found. If memory allocation fails, the DISULPHIDE linked list formed thus far is returned and the error flag is set to TRUE
PDB* blReadPDB | ( | FILE * | fp, |
int * | natom | ||
) |
[in] | *fp | A pointer to type FILE in which the .PDB file is stored. |
[out] | *natom | Number of atoms read. -1 if error. |
Reads a PDB file into a PDB linked list
PDB* blReadPDBAll | ( | FILE * | fp, |
int * | natom | ||
) |
[in] | *fp | A pointer to type FILE in which the .PDB file is stored. |
[out] | *natom | Number of atoms read. -1 if error. |
Reads a PDB file into a PDB linked list. Reads all partial occupancy atoms. Reads both ATOM and HETATM records.
PDB* blReadPDBAtoms | ( | FILE * | fp, |
int * | natom | ||
) |
[in] | *fp | A pointer to type FILE in which the .PDB file is stored. |
[out] | *natom | Number of atoms read. -1 if error. |
Reads a PDB file into a PDB linked list. Atoms only (no HETATM cards).
PDB* blReadPDBAtomsOccRank | ( | FILE * | fp, |
int * | natom, | ||
int | OccRank | ||
) |
[in] | *fp | A pointer to type FILE in which the .PDB file is stored. |
[in] | OccRank | Occupancy ranking (>=1) |
[out] | *natom | Number of atoms read. -1 if error. |
Reads a PDB file into a PDB linked list ignoring HETATM records and selecting the OccRank'th highest occupancy atoms
PDB* blReadPDBOccRank | ( | FILE * | fp, |
int * | natom, | ||
int | OccRank | ||
) |
[in] | *fp | A pointer to type FILE in which the .PDB file is stored. |
[in] | OccRank | Occupancy ranking (>=1) |
[out] | *natom | Number of atoms read. -1 if error. |
Reads a PDB file into a PDB linked list selecting the OccRank'th highest occupancy atoms
int blReadPGP | ( | FILE * | fp | ) |
[in] | *fp | Pointer to PGP file. |
Read a proton generation parameter file. All data are placed in static arrays used by the hydrogen adding routines. Normally this routine is only called by the first call to HAddPDB(). It is only necessary to call this routine explicitly if the PGP file is changed between calls to HAddPDB() and thus needs re-reading.
SECSTRUC* blReadSecPDB | ( | FILE * | fp, |
int * | nsec | ||
) |
[in] | *fp | Pointer to PDB file |
[out] | *nsec | Number of sec struc regions identified |
Reads secondary structure information from the header of a PDB file. Returns a pointer to a linked list of type SECSTRUC.
On return, the variable nsec, or the value returned by the routine should be checked to ensure some secondary structure was returned. The secondary structure is stored together with ranges of residues to which it applies. The form of the structure should be checked in pdb.h
Definition at line 141 of file RdSecPDB.c.
[in] | *wpdb | WHOLEPDB structure |
[out] | *nsec | Number of sec struc regions identified |
Reads secondary structure information from the header of a PDB file stored in a WHOLEPDB structure. Returns a pointer to a linked list of type SECSTRUC.
On return, the variable nsec, or the value returned by the routine should be checked to ensure some secondary structure was returned. The secondary structure is stored together with ranges of residues to which it applies. The form of the structure should be checked in pdb.h
Definition at line 256 of file RdSecPDB.c.
char** blReadSeqresPDB | ( | FILE * | fp, |
int * | nchains | ||
) |
[in] | *fp | PDB file pointer |
[out] | *nchains | Number of chains found |
Reads the sequence from the SEQRES records of a PDB file. Creates an array of malloc()'d character arrays in which the sequence is stored. Can therefore cope with any size of sequence information from the PDB file.
This is not normally recommended to get the sequence for a PDB file this way, but is useful to detect discrepancies compared with the sequence described by the ATOM records.
Definition at line 113 of file RdSeqPDB.c.
char** blReadSeqresWholePDB | ( | WHOLEPDB * | wpdb, |
int * | nchains | ||
) |
[in] | wpdb | WHOLEPDB structure |
[out] | *nchains | Number of chains found |
Reads the sequence from the SEQRES records from the PDB header stored in a WHOLEPDB structure. Creates an array of malloc()'d character arrays in which the sequence is stored. Can therefore cope with any size of sequence information from the PDB file.
This is not normally recommended to get the sequence for a PDB file this way, but is useful to detect discrepancies compared with the sequence described by the ATOM records.
Definition at line 228 of file RdSeqPDB.c.
WHOLEPDB* blReadWholePDB | ( | FILE * | fpin | ) |
[in] | *fpin | File pointer |
Reads a PDB file, storing the header and trailer information as well as the coordinate data. Can read gzipped files as well as uncompressed files.
Coordinate data is accessed as linked list of type PDB as follows:
WHOLEPDB *wpdb; PDB *p; wpdb = ReadWholePDB(fp); for(p=wpdb->pdb; p!=NULL; p=p->next) { ... Do something with p ... }
WHOLEPDB* blReadWholePDBAtoms | ( | FILE * | fpin | ) |
[in] | *fpin | File pointer |
Reads a PDB file, storing the header and trailer information as well as the coordinate data. Can read gzipped files as well as uncompressed files.
Coordinate data is accessed as linked list of type PDB as follows:
WHOLEPDB *wpdb; PDB *p; wpdb = ReadWholePDB(fp); for(p=wpdb->pdb; p!=NULL; p=p->next) { ... Do something with p ... }
[in,out] | *pdb | PDB |
Remove alternate atoms - we keep only the highest occupancy or the first if there are more than one the same.
void blRenumAtomsPDB | ( | PDB * | pdb, |
int | offset | ||
) |
[in,out] | *pdb | PDB linked list to renumber |
[in] | offset | Number for the first atom |
Renumber the atoms throughout a PDB linked list
Definition at line 100 of file RenumAtomsPDB.c.
[in,out] | *pdb | PDB linked list to modify |
[in] | *ResSpec | Residue spec for residue to replace in the format [c]nnn[i] |
[in] | aa | The 1-letter code for the new sidechain |
[in] | *ChiTable | The equivalent Chi table |
[in] | *RefCoords | The reference coordinates file |
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.
[in,out] | *pdb | PDB linked list to modify |
[in] | *ResSpec | Residue spec for residue to replace in the format [c]nnn[i] |
[in] | aa | The 1-letter code for the new sidechain |
[in] | *ChiTable | The equivalent Chi table |
[in] | *RefCoords | The reference coordinates file |
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
char* blReportStructureType | ( | int | StrucType | ) |
[in] | StrucType | Stucture type returned by ResolPDB() |
Returns structure description.
STRUCTURE_TYPE_UNKNOWN Unknown STRUCTURE_TYPE_XTAL X-ray crystal structure STRUCTURE_TYPE_NMR NMR STRUCTURE_TYPE_MODEL Model STRUCTURE_TYPE_ELECTDIFF Electron Diffraction STRUCTURE_TYPE_FIBER Fiber Diffraction STRUCTURE_TYPE_SSNMR Solid State NMR STRUCTURE_TYPE_NEUTRON Neutron Scattering STRUCTURE_TYPE_EM Electron Miscroscopy STRUCTURE_TYPE_SOLSCAT Solution Scattering STRUCTURE_TYPE_IR Infra-red Spectroscopy STRUCTURE_TYPE_POWDER Powder Diffraction STRUCTURE_TYPE_FRET Fluorescence Transfer
Definition at line 410 of file ResolPDB.c.
[in,out] | *pdb | PDB linked list to modify |
[in] | *sequence | The 1-letter code required for the structure |
[in] | *ChiTable | The equivalent Chi table |
[in] | *RefCoords | The reference coordinates file |
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
[in,out] | *pdb | PDB linked list to rotate |
[in] | matrix | Rotation matrix |
Rotates a PDB linked list using ApplyMatrixPDB() which ignores coordinates of 9999.0. The structure is moved to the origin, the matrix is applied and the structure is moved back.
[in] | *pdbin | Input list |
[in] | nsel | Number of atom types to keep |
[in] | **sel | List of atom types to keep |
[out] | *natom | Number of atoms kept |
Take a PDB linked list and returns a list containing only those atom types specified in the sel array.
To set up the list of atoms to keep, define an array of pointers to char: e.g. char *sel[10] Then define the atoms in the list thus:
SELECT(sel[0],"N "); SELECT(sel[1],"CA "); SELECT(sel[2],"C "); SELECT(sel[3],"O ");
Ensure the spaces are used!!
N.B. The routine is non-destructive; i.e. the original PDB linked list is intact after the selection process
Definition at line 173 of file SelAtPDB.c.
[in] | *pdb | A PDB linked list |
[out] | * | The linked list reduced to CA atoms only |
Reduce a PDB linked list to CA atoms only. Returns the reduced PDB linked list. Note that the input linked list is modified (storage for non-CA atoms is freed) and that the pointer input to the routine is likely to become invalid since the first atom is generally no a CA and the first record will therefore be freed.
Normally you would call this routine with something like:
pdb = SelectCaPDB(pdb);
i.e. the same variable name is used for the input and the return.
This is used in place of the normal SelectAtomsPDB() since it is simpler and faster to call for this rather common requirement.
N.B. Unlike SelectAtomsPDB(), the routine is destructive; i.e. the original PDB linked list is NOT intact after the selection process.
Definition at line 124 of file SelectCaPDB.c.
[in,out] | *pdb | PDB linked list to change |
[in] | *next | If NULL, move all atoms in the linked list from the last atom in the torsion. Otherwise move atoms up to (but not including) next. Normally this would be the start of the next residue. |
[in] | chi | Sidechain chi angle to set |
[in] | type | Torsion angle to set (as defined below) |
Sets a sidechain torsion angle in a pdb linked list. The routine assumes standard atom ordering: N,CA,C,O,s/c with standard order in the s/c.
The type input parameter is defined as follows:
type Atom names Sequential atom numbers -------------------------------------------------- 0 N, CA, CB, XG (0 - 1 - 4 - 5) 1 CA, CB, XG, XD (1 - 4 - 5 - 6) 2 CB, XG, XD, XE (4 - 5 - 6 - 7) 3 XG, XD, XE, XZ (5 - 6 - 7 - 8)
void blSetElementSymbolFromAtomName | ( | char * | element, |
char * | atom_name | ||
) |
[out] | *element | Element symbol |
[in] | *atom_name | Atom name |
Set the element symbol (columns 77-78 of a pdb file) based on the atom name (columns 13-16 of a pdb file).
The atom name is stored in the PDB data stucture as atnam_raw.
Definition at line 1433 of file WritePDB.c.
STRINGLIST* blSetPDBAtomTypes | ( | PDB * | pdb | ) |
[in,out] | *pdb | PDB linked list |
Definition at line 95 of file atomtype.c.
void blSetResnam | ( | PDB * | ResStart, |
PDB * | NextRes, | ||
char * | resnam, | ||
int | resnum, | ||
char * | insert, | ||
char * | chain | ||
) |
[in,out] | *ResStart | Pointer to start of residue (linked list) |
[in] | *NextRes | Pointer to start of next residue |
[in] | *resnam | Residue name to set |
[in] | resnum | Residue number to set |
[in] | *insert | Insert label to set |
[in] | *chain | Chain label to set |
Change the residue name, number, insert and chain for an amino acid.
Definition at line 101 of file SetResnam.c.
[in] | *pdb | Input 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.
Definition at line 389 of file OrderPDB.c.
[in] | *start | Start of residue to be shuffled |
[in] | *end | Start of next residue in linked list (NULL for last residue) |
[in] | Pad | TRUE: Create dummy records for missing atoms |
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.
Definition at line 228 of file OrderPDB.c.
[in,out] | *pdb | The PDB linked list |
Removes all Glycine CB pseudo-atoms added by AddGlyCB() The linked list is modified in-place, but the return value should be used in case the very first item in the linked list is a Gly-CB which will be removed by the code.
[in] | *pdbin | Input list |
[out] | *natom | Number of atoms kept |
Take a PDB linked list and returns the PDB list minus hydrogens
N.B. The routine is non-destructive; i.e. the original PDB linked list is intact after the selection process
Definition at line 115 of file StripHPDB.c.
[in] | *pdbin | Input list |
[out] | *natom | Number of atoms kept |
Take a PDB linked list and returns the PDB list minus waters
Definition at line 99 of file StripWatersPDB.c.
[in] | *pdb | PDB linked list |
[in] | length | Number of residues after which to terminate |
Terminate a PDB linked list after length residues, returning a pointer to the next residue.
Note that the number of residues may cross chain boundaries.
[in,out] | *pdb | PDB linked list to move |
[in] | tvect | Translation vector |
Translates a PDB linked list, ignoring null (9999.0) coordinates.
Definition at line 95 of file TranslatePDB.c.
void blWriteCrystPDB | ( | FILE * | fp, |
VEC3F | UnitCell, | ||
VEC3F | CellAngles, | ||
char * | spacegroup, | ||
REAL | OrigMatrix[3][4], | ||
REAL | ScaleMatrix[3][4] | ||
) |
[in] | *fp | Output file pointet |
[in] | UnitCell | The unit cell dimensions |
[in] | CellAngles | The unit cell angles |
[in] | *spacegroup | The crystal's space group |
[in] | OrigMatrix | The origin matrix |
[in] | ScaleMatrix | The scale matrix |
Write crystal parameters (unit cell, space group, origin and scale matrices) to a PDB file.
Definition at line 102 of file WriteCrystPDB.c.
void blWriteGromosPDB | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list by calls to WritePDBRecord()
Definition at line 1491 of file WritePDB.c.
void blWriteGromosPDBRecord | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list record to write |
Write a PDB record
Definition at line 1517 of file WritePDB.c.
int blWritePDB | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list...
Definition at line 223 of file WritePDB.c.
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list in PDBML format.
Definition at line 525 of file WritePDB.c.
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list by calls to WritePDBRecord()
Definition at line 308 of file WritePDB.c.
void blWritePDBRecord | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list record to write |
Write a PDB record
Definition at line 415 of file WritePDB.c.
void blWritePDBRecordAtnam | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list record to write |
Write a PDB record using the data in atnam rather than atnam_raw
Definition at line 471 of file WritePDB.c.
void blWriteTerCard | ( | FILE * | fp, |
PDB * | p | ||
) |
[in] | *fp | File pointer |
[in] | *p | PDB record pointer |
Prints a TER card in the new PDB format - i.e. with the residue information for the previous ATOM/HETATM, rather than just printing TER
Definition at line 382 of file WritePDB.c.
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
Writes a PDB file including header and trailer information. Output in PDBML-format if flags set.
Definition at line 1557 of file WritePDB.c.
void blWriteWholePDBHeader | ( | FILE * | fp, |
WHOLEPDB * | wpdb | ||
) |
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
Writes the header of a PDB file
Definition at line 1608 of file WritePDB.c.
void blWriteWholePDBHeaderNoRes | ( | FILE * | fp, |
WHOLEPDB * | wpdb | ||
) |
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
Writes the header of a PDB file, but skips any records that include residue numbers for cases where these may have changed.
Skips: REMARK 500 DBREF HELIX SHEET SSBOND CISPEP SEQADV MODRES HET SITE REMARK 465 REMARK 470 REMARK 475 REMARK 480 REMARK 525 REMARK 610 REMARK 615 REMARK 620 REMARK 630 REMARK 3
Definition at line 1809 of file WritePDB.c.
void blWriteWholePDBTrailer | ( | FILE * | fp, |
WHOLEPDB * | wpdb, | ||
int | numTer | ||
) |
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
[in] | numTer | Number of TER cards |
Writes the trailer of a PDB file
Definition at line 1643 of file WritePDB.c.
BOOL gPDBModelNotFound |
int gPDBMultiNMR |
BOOL gPDBPartialOcc |
BOOL gPDBXML |
int gPDBXMLForce |
char gRSCError[80] |