There will be an outage of up to 10 hours between 28th February 2025 10pm (GMT) and 1st March 2025 10am while our ISP performs maintenance on a fibre cable during roadworks.
Bioplib
Protein Structure C Library
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
Pages
src
FindHetatmResidue.c
Go to the documentation of this file.
1
/************************************************************************/
2
/**
3
4
\file FindHetatmResidue.c
5
6
\version V1.4
7
\date 07.07.14
8
\brief Parse a residue specification
9
10
\copyright 2011-2014
11
\author Dr. Andrew C. R. Martin
12
\par
13
Institute of Structural & Molecular Biology,
14
University College London,
15
Gower Street,
16
London.
17
WC1E 6BT.
18
\par
19
andrew@bioinf.org.uk
20
andrew.martin@ucl.ac.uk
21
22
**************************************************************************
23
24
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied
25
according to the conditions laid out in the accompanying file
26
COPYING.DOC.
27
28
The code may be modified as required, but any modifications must be
29
documented so that the person responsible can be identified.
30
31
The code may not be sold commercially or included as part of a
32
commercial product except as described in the file COPYING.DOC.
33
34
**************************************************************************
35
36
Description:
37
============
38
39
40
**************************************************************************
41
42
Usage:
43
======
44
45
**************************************************************************
46
47
Revision History:
48
=================
49
- V1.0 26.10.11 Original based on FindResidue.c
50
- V1.1 24.02.14 Added BiopFindHetatmResidue() By: CTP
51
- V1.2 25.02.14 Added error message for FindHetatmResidue(). By: CTP
52
- V1.3 07.05.14 Moved FindHetatmResidue() to deprecated.h By: CTP
53
- V1.4 07.07.14 Use bl prefix for functions By: CTP
54
55
56
*************************************************************************/
57
/* Doxygen
58
-------
59
#GROUP Handling PDB Data
60
#SUBGROUP Searching the PDB linked list
61
#FUNCTION blFindHetatmResidue()
62
Finds a pointer to the start of a residue in a PDB linked list, but
63
requires the residue is a HETATM record
64
*/
65
/************************************************************************/
66
/* Includes
67
*/
68
#include <ctype.h>
69
#include <stdio.h>
70
#include <string.h>
71
72
#include "
pdb.h
"
73
#include "
SysDefs.h
"
74
#include "
MathType.h
"
75
#include "
macros.h
"
76
77
78
/************************************************************************/
79
/* Defines and macros
80
*/
81
82
/************************************************************************/
83
/* Globals
84
*/
85
86
/************************************************************************/
87
/* Prototypes
88
*/
89
90
91
/************************************************************************/
92
/*>PDB *blFindHetatmResidue(PDB *pdb, char *chain, int resnum,
93
char *insert)
94
-----------------------------------------------------------
95
*/
/**
96
\param[in] pdb PDB linked list
97
\param[in] chain Chain label
98
\param[in] resnum Residue number
99
\param[in] insert Insert code
100
\return Pointer to start of HET residue
101
102
Finds a pointer to the start of a residue in a PDB linked list, but
103
requires the residue is a HETATM record
104
Uses string for chain and insert.
105
106
- 24.02.14 Original. By: CTP
107
- 07.07.14 Renamed to FindHetatmResidue().
108
Use bl prefix for functions By: CTP
109
110
*/
111
PDB
*
blFindHetatmResidue
(
PDB
*pdb,
char
*chain,
int
resnum,
char
*insert)
112
{
113
PDB
*p;
114
115
for
(p=pdb; p!=
NULL
;
NEXT
(p))
116
{
117
if
((!strncmp(p->
record_type
,
"HETATM"
,6)) &&
118
(p->
resnum
== resnum) &&
119
!strncmp(p->
insert
,insert,1) &&
120
CHAINMATCH
(p->
chain
,chain))
121
{
122
return
(p);
123
}
124
}
125
return
(
NULL
);
126
}
127
pdb.h
Include file for PDB routines.
pdb_entry::resnum
int resnum
Definition:
pdb.h:310
NULL
#define NULL
Definition:
array2.c:99
pdb_entry
Definition:
pdb.h:298
NEXT
#define NEXT(x)
Definition:
macros.h:249
pdb_entry::record_type
char record_type[8]
Definition:
pdb.h:315
macros.h
Useful macros.
blFindHetatmResidue
PDB * blFindHetatmResidue(PDB *pdb, char *chain, int resnum, char *insert)
Definition:
FindHetatmResidue.c:111
CHAINMATCH
#define CHAINMATCH(chain1, chain2)
Definition:
pdb.h:495
SysDefs.h
System-type variable type definitions.
MathType.h
Type definitions for maths.
pdb_entry::chain
char chain[blMAXCHAINLABEL]
Definition:
pdb.h:321
pdb_entry::insert
char insert[8]
Definition:
pdb.h:320
Generated on Tue Oct 24 2017 10:57:06 for Bioplib by
1.8.8