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
DupeResiduePDB.c
Go to the documentation of this file.
1
/************************************************************************/
2
/**
3
4
\file DupeResiduePDB.c
5
6
\version V1.2
7
\date 07.07.14
8
\brief Create a new PDB linked list with a copy of a residue
9
10
\copyright (c) Dr. Andrew C. R. Martin, UCL, 1996-2007
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 27.08.96 Original from mutmodel By: ACRM
50
- V1.1 08.11.07 Initialize p and q; Moved into bioplib
51
- V1.2 07.07.14 Use bl prefix for functions By: CTP
52
53
*************************************************************************/
54
/* Doxygen
55
-------
56
#GROUP Handling PDB Data
57
#SUBGROUP Manipulating the PDB linked list
58
#FUNCTION blDupeResiduePDB()
59
Makes a duplicate PDB linked list of just one residue
60
Note that CONECT data will not be preserved since it would not
61
be valid.
62
*/
63
/************************************************************************/
64
/* Includes
65
*/
66
#include <stdlib.h>
67
#include "
pdb.h
"
68
#include "
macros.h
"
69
70
/************************************************************************/
71
/* Defines and macros
72
*/
73
74
/************************************************************************/
75
/* Globals
76
*/
77
78
/************************************************************************/
79
/* Prototypes
80
*/
81
82
/************************************************************************/
83
/*>PDB *blDupeResiduePDB(PDB *in)
84
----------------------------
85
*/
/**
86
87
\param[in] *in PDB linked list pointing to residue to duplicate
88
\return Duplicate linked list of residue at `in'
89
(NULL if allocation fails)
90
91
Makes a duplicate PDB linked list of just the residue pointed to by
92
`in'. Note that CONECT data will not be preserved since it would not
93
be valid.
94
95
- 27.08.96 Original By: ACRM
96
- 08.11.07 Initialize p and q
97
Moved into bioplib
98
- 07.07.14 Use bl prefix for functions By: CTP
99
*/
100
PDB
*
blDupeResiduePDB
(
PDB
*in)
101
{
102
PDB
*pNext,
103
*out =
NULL
,
104
*p =
NULL
,
105
*q =
NULL
;
106
107
/* Find the next residue */
108
pNext =
blFindNextResidue
(in);
109
110
for
(p=in; p!=pNext;
NEXT
(p))
111
{
112
if
(out==
NULL
)
113
{
114
INIT
(out,
PDB
);
115
q=out;
116
}
117
else
118
{
119
ALLOCNEXT
(q,
PDB
);
120
}
121
if
(q==
NULL
)
122
{
123
FREELIST
(out,
PDB
);
124
return
(
NULL
);
125
}
126
127
blCopyPDB
(q, p);
128
q->nConect=0;
129
}
130
131
return
(out);
132
}
133
134
ALLOCNEXT
#define ALLOCNEXT(x, y)
Definition:
macros.h:251
pdb.h
Include file for PDB routines.
NULL
#define NULL
Definition:
array2.c:99
pdb_entry
Definition:
pdb.h:298
NEXT
#define NEXT(x)
Definition:
macros.h:249
macros.h
Useful macros.
blDupeResiduePDB
PDB * blDupeResiduePDB(PDB *in)
Definition:
DupeResiduePDB.c:100
blCopyPDB
void blCopyPDB(PDB *out, PDB *in)
Definition:
CopyPDB.c:108
FREELIST
#define FREELIST(y, z)
Definition:
macros.h:264
INIT
#define INIT(x, y)
Definition:
macros.h:244
blFindNextResidue
PDB * blFindNextResidue(PDB *pdb)
Definition:
FindNextResidue.c:117
Generated on Tue Oct 24 2017 10:57:06 for Bioplib by
1.8.8