1 //
2 //  BCAminoAcid.h
3 //  BioCocoa
4 //
5 //  Created by Koen van der Drift on Sat May 10 2003.
6 //  Copyright (c) 2003-2009 The BioCocoa Project.
7 //  All rights reserved.
8 //
9 //  Redistribution and use in source and binary forms, with or without
10 //  modification, are permitted provided that the following conditions
11 //  are met:
12 //  1. Redistributions of source code must retain the above copyright
13 //  notice, this list of conditions and the following disclaimer.
14 //  2. Redistributions in binary form must reproduce the above copyright
15 //  notice, this list of conditions and the following disclaimer in the
16 //  documentation and/or other materials provided with the distribution.
17 //  3. The name of the author may not be used to endorse or promote products
18 //  derived from this software without specific prior written permission.
19 //
20 //  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 //  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 //  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 //  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 //  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 //  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 //  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 //  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 //  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 //  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 /*!
32 @header
33 @abstract Provides in-memory representations of amino acids.
34 */
35 
36 #import <Foundation/Foundation.h>
37 #import "BCSymbol.h"
38 
39 
40 /*!
41 @class BCAminoAcid
42 @abstract    All amino acids are handled through this single class
43 @discussion  This class provides in-memory representations of amino acids.
44 */
45 
46 @interface BCAminoAcid : BCSymbol
47 {
48 	NSString		*threeLetterCode;
49 
50 	float			kyteDoolittleValue;
51 	float			hoppWoodsValue;
52 	float			pKaValue;
53 }
54 
55 /*!
56     @method     initAminoAcids
57     @abstract   Used internaly to generate the full set of amino acid objects.
58 */
59 + (void) initAminoAcids;
60 
61 /*!
62     @method     objectForSavedRepresentation: (NSString *)aSymbol
63     @abstract   Returns a BCAminoAcid object representing the amino acid submitted
64     @discussion all BC classes should implement a "savableRepresentation" and an
65     *  "objectForSavedRepresentation" method to allow archiving/uncarchiving in
66     *  .plist formatted files.
67 */
68 + (id) objectForSavedRepresentation: (NSString *)aSymbol;
69 
70 /*!
71     @method      aaPropertiesDict
72     @abstract	Returns a singleton NSDictionary holding the information for an amino acid
73 */
74 + (NSMutableDictionary *) aaPropertiesDict;
75 
76 /*!
77     @method     symbolForChar: (unsigned char)symbol
78     @abstract   Returns a BCAminoAcid item representing the amino acid submitted
79 */
80 + (id) symbolForChar: (unsigned char)symbol;
81 
82 /*!
83     @method     alanine
84     @abstract   Obtains a reference to the single alanine representation
85 */
86 + (BCAminoAcid *) alanine;
87 
88 /*!
89     @method     arginine
90     @abstract   Obtains a reference to the single arginine representation
91 */
92 + (BCAminoAcid *) arginine;
93 
94 /*!
95     @method     asparagine
96     @abstract   Obtains a reference to the single asparagine representation
97 */
98 + (BCAminoAcid *) asparagine;
99 
100 /*!
101     @method     asparticacid
102     @abstract   Obtains a reference to the single asparticacid representation
103 */
104 + (BCAminoAcid *) asparticacid;
105 
106 /*!
107     @method     cysteine
108     @abstract   Obtains a reference to the single cysteine representation
109 */
110 + (BCAminoAcid *) cysteine;
111 
112 /*!
113     @method     glutamicacid
114     @abstract   Obtains a reference to the single glutamicacid representation
115 */
116 + (BCAminoAcid *) glutamicacid;
117 
118 /*!
119     @method     glutamine
120     @abstract   Obtains a reference to the single glutamine representation
121 */
122 + (BCAminoAcid *) glutamine;
123 
124 /*!
125     @method     glycine
126     @abstract   Obtains a reference to the single glycine representation
127 */
128 + (BCAminoAcid *) glycine;
129 
130 /*!
131     @method     histidine
132     @abstract   Obtains a reference to the single histidine representation
133 */
134 + (BCAminoAcid *) histidine;
135 
136 /*!
137     @method     isoleucine
138     @abstract   Obtains a reference to the single isoleucine representation
139 */
140 + (BCAminoAcid *) isoleucine;
141 
142 /*!
143     @method     leucine
144     @abstract   Obtains a reference to the single leucine representation
145 */
146 + (BCAminoAcid *) leucine;
147 
148 /*!
149     @method     lysine
150     @abstract   Obtains a reference to the single lysine representation
151 */
152 + (BCAminoAcid *) lysine;
153 
154 /*!
155     @method     methionine
156     @abstract   Obtains a reference to the single methionine representation
157 */
158 + (BCAminoAcid *) methionine;
159 
160 /*!
161     @method     phenylalanine
162     @abstract   Obtains a reference to the single phenylalanine representation
163 */
164 + (BCAminoAcid *) phenylalanine;
165 
166 /*!
167     @method     proline
168     @abstract   Obtains a reference to the single proline representation
169 */
170 + (BCAminoAcid *) proline;
171 
172 /*!
173     @method     serine
174     @abstract   Obtains a reference to the single serine representation
175 */
176 + (BCAminoAcid *) serine;
177 
178 /*!
179     @method     threonine
180     @abstract   Obtains a reference to the single threonine representation
181 */
182 + (BCAminoAcid *) threonine;
183 
184 /*!
185     @method     tryptophan
186     @abstract   Obtains a reference to the single tryptophan representation
187 */
188 + (BCAminoAcid *) tryptophan;
189 
190 /*!
191     @method     tyrosine
192     @abstract   Obtains a reference to the single tyrosine representation
193 */
194 + (BCAminoAcid *) tyrosine;
195 
196 /*!
197     @method     valine
198     @abstract   Obtains a reference to the single valine representation
199 */
200 + (BCAminoAcid *) valine;
201 
202 /*!
203     @method     asx
204     @abstract   Obtains a reference to the single asx amino acid representation
205 */
206 + (BCAminoAcid *) asx;
207 
208 /*!
209     @method     glx
210     @abstract   Obtains a reference to the single glx amino acid representation
211 */
212 + (BCAminoAcid *) glx;
213 
214 /*!
215     @method     gap
216     @abstract   Obtains a reference to the single gap amino acid representation
217 */
218 + (BCAminoAcid *) gap;
219 
220 /*!
221     @method     undefined
222     @abstract   Obtains a reference to the single undefined amino acid representation
223 */
224 + (BCAminoAcid *) undefined;
225 
226 /*!
227     @method     threeLetterCode
228     @abstract   Returns an NSString containg the three letter code for the amino acid
229 */
230 - (NSString *)threeLetterCode;
231 
232 - (float)kyteDoolittleValue;
233 - (void)setKyteDoolittleValue:(float)value;
234 
235 - (float)hoppWoodsValue;
236 - (void)setHoppWoodsValue:(float)value;
237 
238 - (float)pKaValue;
239 - (void)setpKaValue:(float)value;
240 
241 @end
242