-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKINhdr.h
360 lines (302 loc) · 11 KB
/
PKINhdr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
/*PKINANGL*/
void idealizedCalphaAngles(char[4],float*,float*,float*,float*,float*,float*);
int constructbeta(float*,char[4],float*,float*,char*);
int constructgamma(float*,char,char);
void constructfourth(float (*)[3],float,float,float);
void construct4th(float[4],float[4],float[4],float[4],float,float,float);
void perpendicular(float[4],float[4],float[4],float[4]);
void docrossproduct( double,double,double
,double,double,double
,double*,double*,double*);
void crossproduct(double ,double ,double ,double ,double ,double );
void crossproduct3array(double*,double*,double*); /*040705*/
double dotproduct(double ,double ,double ,double ,double ,double );
double dotproduct3array(double* ,double*); /*050403*/
double dihedral4pt( double ,double ,double
,double ,double ,double
,double ,double ,double
,double ,double ,double );
double angle3pt( double ,double ,double
,double ,double ,double
,double ,double ,double );
void doaxisrot( double *,double *,double *,float
,double,double,double,double,double,double);
int constructcircle(float C[12][3], float A[3], float B[3], float r);
/*PKINFILE*/
void openafile(char[256] ,int);
void selectfiles(void);
void prepareinputfile(void);
void prepareoutputfile(void);
void makeoutputfilename(void);
/*____FILE*/
int getfilename(char[256], int);
int openscriptin(void);
/*int openhelpout(void); prototyped under ____OUTP*/
int getnewfile(char[256], int); /*moved here from PC & Mac 061020*/
/*PKININIT*/
void mainlooprouter(void); /*990402 common routing in mainloop*/
void getversion(void);
void initialvalues(void);
void aboutprekin(void);
void doexplanation(void);
void dissectcommandline(char*);
void parsecommandline(int*, char**);
void writehelptohtmlfile(int); /*040425*/
/*PKINMENU*/
void menuabout(void);
void aboutlaunching(void);
void aboutoptions(void);
int menuaboutmutations(int); /*040425*/
/*____MENU*/
void launchcurrentkinemage(void);
/*PKININPT*/
void textstringin(void);
int Getonescriptline(void);
int Getoneinputline(void);
int Getonescratchline(void);
int Getoneaalibline(void);
int Getoneline(FILE *);
int pdbInOutprocessing(char[256]); /*040304*/
void rotatepdbatomrecord(char[256], float[10], float[4]); /*040304*/
/*PKINRSUB*/
void cleartexts(void);
void setuptexts(void);
void cleanuptexts(void);
int dot3numbertexts(void);
void cleanupfoveatexts(void);
void cleanupmarkertexts(void);
/*PKINUTIL*/
int CompArgStr(char*, char*, int);
float floatfromstr(char[256]);
int intfromstr(char[256]);
int matrixinvert(int);
void DoPerpendicularToPlane(float[3][7]);
void DoPerpendicularToLine(float[3], float[3], float[3], float[3]); /*050125*/
/*PKINHBND*/
void getmchbatoms(void);
void storemchbatoms(void);
void connecthbonds(void);
/*PKINRIBN*/
int getribbonatoms(void); /*make int instead of void 010511*/
void ribmak(void);
void outputinterval(int*,int,int[5],int,int,float,int
,float[5][4],float[5][4],char[5][4],char[5][2],char[5][2],float[5]
,float[5][4],float[5][4],int[5],float[5],float[5]
,float[5],float[5],float[5],float[5]); /*omega 041023 */
/*PKINSPOS*/
int superpos(void);
/*PKINRNGE*/
void getranges(void);
void finishranges(void);
void rangestartinitialize(void);
void builtinscripts(void);
void scriptout(void);
void startarange(void);
void endarange(void);
void getatommarker(void);
void focusoption(void);
void focusoptionend(void);
/*PKINCRTL*/
void flowControl(void);
/*PKINCSUB*/
void setsubunitconditions(void);
void rangecontrol(void);
int checkline(char[256]);
void evalnonatmrecord(void);
void convertcase(char[256]);
void readbrkatmrecord(void);
void evalatomrecord(void);
void screenaltconf(void);
void checkfocus(void);
void connecthydrogen(void);
void connecthydrogenbyname(void);/*130318 supersede connecthydrogen(by dist)*/
void connectheavyatom(int,int);
void storecyssg(int);
void connecthetatms(void);
void connectcaca(void);
int storeconnectingatom(int,int); /*rtn int and 2nd int arg 061001*/
int notawater(void); /* res[MAXARR][4] && called with maxatm == 1 */
int isawater(void); /* res[MAXARR][4] && called with maxatm == 1 */
int isahydrogen(char[7],char[6],char[3]); /*revised pdb atom names 070520*/
int isahydrogenname(char[6]); /*revised pdb atom names 071222*/
int iselement(char[3],char[3]); /*070520*/
void whatelement(char[7],char[6],char[3]); /*int 070520, void 070730*/
void connectssbonds(void);
void getresiduename(void);
void readbrkaalibrecord(char[256]);
void mutateresidue(void);
int getinteger(int,int,int*);
int getbracketed(char,int,int,char[256]);
void accumsiteranges(char[256]);
void computesiteranges(void);
/*PKINCSBS*/
float distan(double,double,double,double,double,double);
float distanfa4(float[4],float[4]);
void uctolctexts(char[256]);
char lctouc(char);
char uctolc(char);
void oldcon(int, float, int);
void tacker(int,int);
void muttacker(int,int);
void sstapler(int,int);
int creatm(int);
void mutadder(int,int);
int screenatompair(int);
int screenhetpairs(int);
int decidemainside(int);
int decidemutmainside(int);
void writescratch(int);
void writeatomscratch(int);
void writelabelscratch(void);
void pperptobase(int); /*030515*/
int pperpoutlier(float, float); /*040705*/
int epsilonoutlier(float); /*070521*/
void drawclaw(float*, float*, float*, char*, char*); /*040705, 070731 colr*/
void Bcoloredoutput(char* color, float Avalue); /*separate routine 050704*/
void makemetalsymbol(void);
/*PKINROTL*/
void getresiduerotations(void);
char getresiduecode(char, char, char); /*returns 1-letter code*/
float findrotationangle(char[5][6]);
void findrotationaxis(int, int, char[5][6]);
void findrotationriders(int, int, char[5][6]);
void writescrotscratch(void);
void rotamerhypertext(char[4]);
void mutatepdbrecords(int[2],float,float,double[3],double[3],double[3]);
int getoldlibraryline(int,int); /*071215 was getonelibraryline()*/
int getnewlibraryline(int,int); /*071215*/
int getonekinemageline(int);
int getonerotamerline(int);
/*PKINCOUT*/
void transferout(char[13],char[5],char[20],char[20]);
void writeoutput(void);
void writeVRMLvectortoscratch(char[5],char[16],float,char[32],float,float,float,float,float,float); /*050211*/
/*PKINSCRT*/
int countpoints(char[5], int);
void inittextblock(textblock*);
void rewindtextblock(textblock*);
void buildtextblock(textblock*, size_t);
void disposetextblock(textblock*);
void putonetextblockline(textblock*, char*);
void getonetextblockline(textblock*, char*);
/*____TEXT*/
void pkintextinsert(char[256]);
void inserttexts(char[256], int);
void pkintextreplace(char[256]);
void adjusttext(int );
void cleanuptextwindow(void);
/*____MAIN*/
void HandleEvent(void);
void makecursorwait(void);
void makecursoractive(void);
/*____OUTP*/
int openoutput(void);
int openscriptout(void);
int openhelpout(void);
/*____DLOG*/
void DogenericDialog();
/*PKPCINIT or PKMCINIT or PUXMOSX,PUXMLNX,PUXMSGI*/
char* operatingsystem(void); /*051201*/
/*general declarations 130121 etc... copied here... */
void mainsetup(int *, char **); /*130121*/
void getmactextselect(void); /*130121*/
void AdjustMenus(void); /*130121*/
int getkeydownstate(void); /*130121*/
long TickCount(void); /*130121*/
#ifdef MACINTOSH
void waste(long); /*for number of seconds as originally written*/
/*PKMCFILE*/
/*static void ConvertFilename(FSSpec *) ;*/
void ConvertFilename(FSSpec *) ;
#ifdef SYSTEM6
int ifilelaunched(void);
void getnamestroffile(void);
#endif /*SYSTEM6*/
/*PKMCINIT*/
/*void mainsetup(void); 130121 declare this outside of ifdef MACINTOSH*/
void beginnings(void);
void InitMacintosh(void);
void setdemo(void);
void SetUptextWindow(void);
void updatethetextwindow(void);
pascal void textScroller(ControlHandle , short);
void DotextContentClick(Point );
void settextScrollBar(void);
void gettextTextarea(void);
void settextTextarea(void);
/* Apple Event Handler Prototypes! */
pascal OSErr HandleAEOpenDoc( AppleEvent*, AppleEvent*, long); /*980917*/
pascal OSErr HandleAEQuitApp( AppleEvent*, AppleEvent*, long); /*980917*/
pascal OSErr HandleAEIgnore( AppleEvent*, AppleEvent*, long); /*980917*/
/*pascal OSErr HandleAEOpenDoc(AppleEvent, AppleEvent, long );*/
/*pascal OSErr HandleAEQuitApp(AppleEvent, AppleEvent, long );*/
/*pascal OSErr HandleAEIgnore(AppleEvent, AppleEvent, long ); */
pascal OSErr HandleAECommandLine(AppleEvent*, AppleEvent*, long);/*971223*/
void DoINITreport(void);
void INITreport(void);
pascal Boolean reportFilter(DialogPtr, EventRecord *, int *);
/*PKMCMAIN*/
void main(void);
void HandleMouseDown(EventRecord *);
void cursorstandard(void);
void cursorshowwait(void);
int HandleloopEvent(void);
/*int getkeydownstate(void);130121 declare this outside of ifdef MACINTOSH*/
/*PKMCMENU*/
OSErr FindAProcess(OSType,OSType,ProcessSerialNumber*);
OSErr OpenSelection(FSSpecPtr);
void SetUpMenus(void);
/*void AdjustMenus(void);130121 declare this outside of ifdef MACINTOSH*/
void enable(MenuHandle , int , int );
int exec(char *, ...);
void HandleMenu (long );
/*PKMCTEXT*/
/*void getmactextselect(void); 130121 declare this outside of ifdef MACINTOSH*/
#endif /*MACINTOSH*/
#ifdef PCWINDOWS
/* PKPCMAIN.C */
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
/*long TickCount(void);130121 declare this outside of ifdef...*/
char* dirstrip(char[256]);
/*int getkeydownstate(void);130121 declare this outside of ifdef...*/
/* PKPCINIT.C */
void beginnings(void);
BOOL InitInstance(HINSTANCE, int);
/* PKPCFILE.C */
int getoutfilename(char[256], int);
void SetPrekinCaption(void);
/* routines to handle menu choices */
int getnextchar(void);
void PKIN_FileOpenFile(void);
void PKIN_FileQuit(void);
void PKIN_NewPass(void);
/* PKPCTEXT.C (text.c) */
/*void getmactextselect(void);130121 declare this outside of ifdef...*/
void SetTextCaption(HWND, LPSTR);
void SystemFontSize(void);
long totalbufferlines(HWND, HDC, LPSTR);
long linefrooffest(HWND, unsigned long*, long);
long makelinestarts(HWND);
int linesonascreen(HWND);
void resetscrollbarvalues(HWND);
int RePaint(HWND, HDC);
int nlinebreaks(LPSTR, LPSTR*);
int sizeoftextline(HDC, int, char*);
void completetext(void);
/* PKPCMENU.C (pkmenu.c) */
/*void AdjustMenus(void);130121 declare this outside of ifdef...*/
void checkamenuitem(int, int);
void enableamenuitem(int, int);
void openfilebyname(LPSTR);
void findpdb(void);
void openpdbfile(LPSTR);
int openkinfile(LPSTR);
void PKIN_FileNewPass(void);
void PKIN_FileQuit(void);
void PKIN_OptionsAboutOptions(void);
void PKIN_OptionsMutations(void);
/*PKPCDLOG.C*/
void adjustgenericradios(char);
BOOL CALLBACK genericDialog(HWND, UINT, WPARAM, LPARAM);
#endif /*PCWINDOWS*/