1 /* @include ajpdbio ***********************************************************
2 **
3 ** Data structures and functions for reading and writing PDB format files.
4 ** Includes functions for writing a Pdb object (defined in ajpdb.h).
5 **
6 ** @author Copyright (c) 2004 Jon Ison
7 ** @version $Revision: 1.12 $
8 ** @modified $Date: 2012/04/12 20:38:09 $ by $Author: mks $
9 ** @@
10 **
11 ** This library is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU Lesser General Public
13 ** License as published by the Free Software Foundation; either
14 ** version 2.1 of the License, or (at your option) any later version.
15 **
16 ** This library is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ** Lesser General Public License for more details.
20 **
21 ** You should have received a copy of the GNU Lesser General Public
22 ** License along with this library; if not, write to the Free Software
23 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
24 ** MA  02110-1301,  USA.
25 **
26 ******************************************************************************/
27 
28 #ifndef AJPDBIO_H
29 #define AJPDBIO_H
30 
31 /* ========================================================================= */
32 /* ============================= include files ============================= */
33 /* ========================================================================= */
34 
35 #include "ajdefine.h"
36 #include "ajstr.h"
37 #include "ajfile.h"
38 #include "ajdomain.h"
39 #include "ajpdb.h"
40 
41 AJ_BEGIN_DECLS
42 
43 
44 
45 
46 /* ========================================================================= */
47 /* =============================== constants =============================== */
48 /* ========================================================================= */
49 
50 
51 
52 
53 /* @enum AjEPdbioMode *********************************************************
54 **
55 ** AJAX PDB Input Output Mode enumeration for writing in PDB format
56 **
57 ** @value ajEPdbioModeHeaderDomain
58 ** Header line for domain PDB file
59 ** @value ajEPdbioModeSeqresDomain
60 ** SEQRES records for domain
61 ** @value ajEPdbioModeAtomPdbDomain
62 ** ATOM records for domain using original residue numbers
63 ** @value ajEPdbioModeAtomIdxDomain
64 ** ATOM records for domain using residues numbers that give  correct index
65 ** into SEQRES sequence
66 ** @value ajEPdbioModeSeqResChain
67 ** SEQRES records for a chain
68 ** @value ajEPdbioModeAtomPdbChain
69 ** ATOM records for chain using original residue numbers
70 ** @value ajEPdbioModeAtomIdxChain
71 ** ATOM records for domain using residues numbers that  give correct index
72 ** into SEQRES sequence
73 ** @value ajEPdbioModeHeterogen
74 ** ATOM line for a heterogen (small ligand)
75 ** @value ajEPdbioModeHeader
76 ** Header line
77 ** @value ajEPdbioModeTitle
78 ** Title line
79 ** @value ajEPdbioModeCompnd
80 ** COMPND records (info. on compound)
81 ** @value ajEPdbioModeSource
82 ** SOURCE records (info. on protein source)
83 ** @value ajEPdbioModeEmptyRemark
84 ** An empty REMARK record
85 ** @value ajEPdbioModeResolution
86 ** Record with resolution of the structure
87 ** @@
88 ******************************************************************************/
89 
90 typedef enum AjOPdbioMode
91 {
92     ajEPdbioModeHeaderDomain,
93     ajEPdbioModeSeqresDomain,
94     ajEPdbioModeAtomPdbDomain,
95     ajEPdbioModeAtomIdxDomain,
96     ajEPdbioModeSeqResChain,
97     ajEPdbioModeAtomPdbChain,
98     ajEPdbioModeAtomIdxChain,
99     ajEPdbioModeHeterogen,
100     ajEPdbioModeHeader,
101     ajEPdbioModeTitle,
102     ajEPdbioModeCompnd,
103     ajEPdbioModeSource,
104     ajEPdbioModeEmptyRemark,
105     ajEPdbioModeResolution
106 } AjEPdbioMode;
107 
108 
109 
110 
111 /* ========================================================================= */
112 /* ============================== public data ============================== */
113 /* ========================================================================= */
114 
115 
116 
117 
118 /* ========================================================================= */
119 /* =========================== public functions ============================ */
120 /* ========================================================================= */
121 
122 
123 
124 
125 /*
126 ** Prototype definitions
127 */
128 
129 /* ======================================================================= */
130 /* =========================== Pdb object ================================ */
131 /* ======================================================================= */
132 
133 AjPPdb ajPdbReadRawNew(AjPFile inf, const AjPStr pdbid, ajint min_chain_size,
134                        ajint max_mismatch, ajint max_trim, AjBool camask,
135                        AjBool camask1, AjBool atommask, AjPFile flog);
136 
137 AjBool ajPdbWriteAllRaw(AjEPdbMode mode, const AjPPdb pdb, AjPFile outf,
138                         AjPFile errf);
139 
140 AjBool ajPdbWriteDomainRaw(AjEPdbMode mode, const AjPPdb pdb,
141                            const AjPScop scop, AjPFile outf, AjPFile errf);
142 
143 AjBool ajPdbWriteRecordRaw(AjEPdbioMode mode, const AjPPdb pdb, ajint mod,
144                            ajint chn, AjPFile outf, AjPFile errf);
145 
146 AjBool ajPdbWriteDomainRecordRaw(AjEPdbioMode mode, const AjPPdb pdb,
147                                  ajint mod, const AjPScop scop,
148                                  AjPFile outf, AjPFile errf);
149 
150 /*
151 ** End of prototype definitions
152 */
153 
154 
155 
156 
157 AJ_END_DECLS
158 
159 #endif /* !AJPDBIO_H */
160