Bioplib
Protein Structure C Library
|
Add hydrogens to a PDB linked list. More...
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "MathType.h"
#include "SysDefs.h"
#include "pdb.h"
#include "fsscanf.h"
#include "macros.h"
#include "general.h"
Go to the source code of this file.
Macros | |
#define | MAXTYPE 300 /* Max number of H definitions in PGP file */ |
#define | MAXLABEL 8 /* Max chars in a label */ |
#define | MAXBUFF 160 /* Buffer size */ |
#define | DATAENV "DATADIR" /* Unix environment variable for data */ |
#define | DATADIR "AMDATA:" /* VMS/AMigaDOS assign for data */ |
#define | EXPLPGP "Explicit.pgp" /* The PGP filename */ |
#define | ALLHPGP "AllH.pgp" /* The PGP filename */ |
Functions | |
int | blHAddPDB (FILE *fp, PDB *pdb) |
int | blReadPGP (FILE *fp) |
FILE * | blOpenPGPFile (char *pgpfile, BOOL AllHyd) |
Variables | |
HADDINFO | gHaddInfo |
Add hydrogens to a PDB linked list.
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.
Routine to add hydrogens to a protein linked list of type PDB. The routine allocates space for the new atoms and inserts them into the list at the appropriate positions within the residues.
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] | *fp | File containing proton generation parameters. |
[in,out] | *pdb | Linked list of protein structure. |
The globally defined structure gHaddInfo gives information on the number of each hydrogen type created. This structure is defined as follows:
To examine these values in your code, reference the structure as: extern HADDINFO gHaddInfo;
Definition in file HAddPDB.c.
#define DATADIR "AMDATA:" /* VMS/AMigaDOS assign for data */ |
#define DATAENV "DATADIR" /* Unix environment variable for data */ |
#define MAXTYPE 300 /* Max number of H definitions in PGP file */ |
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.
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
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.