Merge release-4-6 into master
[alexxy/gromacs.git] / src / gromacs / gmxana / hxprops.h
1 /*
2  *
3  *                This source code is part of
4  *
5  *                 G   R   O   M   A   C   S
6  *
7  *          GROningen MAchine for Chemical Simulations
8  *
9  *                        VERSION 3.2.0
10  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12  * Copyright (c) 2001-2004, The GROMACS development team,
13  * check out http://www.gromacs.org for more information.
14
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  *
20  * If you want to redistribute modifications, please consider that
21  * scientific software is very special. Version control is crucial -
22  * bugs must be traceable. We will be happy to consider code for
23  * inclusion in the official distribution, but derived work must not
24  * be called official GROMACS. Details are found in the README & COPYING
25  * files - if they are missing, get the official version at www.gromacs.org.
26  *
27  * To help us fund GROMACS development, we humbly ask that you cite
28  * the papers on the package - you can find them in the top README file.
29  *
30  * For more info, check our website at http://www.gromacs.org
31  *
32  * And Hey:
33  * Green Red Orange Magenta Azure Cyan Skyblue
34  */
35
36 #ifndef _hxprops_h
37 #define _hxprops_h
38
39 #include <stdio.h>
40 #include "typedefs.h"
41
42 #define PHI_AHX (-55.0)
43 #define PSI_AHX (-45.0)
44 /* Canonical values of the helix phi/psi angles */
45
46
47 typedef struct {
48     real     phi, psi, pprms2;
49     real     jcaha;
50     real     d3, d4, d5, rmsa;
51     gmx_bool bHelix;
52     int      nhx;
53     int      nrms, resno;
54     int      Cprev, N, H, CA, C, O, Nnext;
55     char     label[32];
56 } t_bb;
57
58 enum {
59     efhRAD,  efhTWIST, efhRISE, efhLEN,
60     efhDIP,  efhRMS,   efhRMSA, efhCD222,
61     efhPPRMS, efhCPHI,  efhPHI,  efhPSI,
62     efhHB3,  efhHB4,   efhHB5,  efhJCA,
63     efhAHX,  efhNR
64 };
65
66 extern real ahx_len(int gnx, atom_id index[], rvec x[], matrix box);
67 /* Assume we have a list of Calpha atoms only! */
68
69 extern real ellipticity(int nres, t_bb bb[]);
70
71 extern real radius(FILE *fp, int nca, atom_id ca_index[], rvec x[]);
72 /* Assume we have calphas */
73
74 extern real twist(FILE *fp, int nca, atom_id caindex[], rvec x[]);
75 /* Calculate the twist of the helix */
76
77 extern real pprms(FILE *fp, int nbb, t_bb bb[]);
78 /* Calculate the average RMS from canonical phi/psi values
79  * and the distance per residue
80  */
81
82 extern real ca_phi(int gnx, atom_id index[], rvec x[], matrix box);
83 /* Assume we have a list of Calpha atoms only! */
84
85 extern real dip(int nbb, atom_id bbind[], rvec x[], t_atom atom[]);
86
87 extern real rise(int gnx, atom_id index[], rvec x[]);
88 /* Assume we have a list of Calpha atoms only! */
89
90 extern void av_hblen(FILE *fp3, FILE *fp3a,
91                      FILE *fp4, FILE *fp4a,
92                      FILE *fp5, FILE *fp5a,
93                      real t, int nres, t_bb bb[]);
94
95 extern void av_phipsi(FILE *fphi, FILE *fpsi, FILE *fphi2, FILE *fpsi2,
96                       real t, int nres, t_bb bb[]);
97
98 extern t_bb *mkbbind(const char *fn, int *nres, int *nbb, int res0,
99                      int *nall, atom_id **index,
100                      char ***atomname, t_atom atom[],
101                      t_resinfo *resinfo);
102
103 extern void do_start_end(int nres, t_bb bb[], rvec x[], int *nbb,
104                          atom_id bbindex[], int *nca, atom_id caindex[],
105                          gmx_bool bRange, int rStart, int rEnd);
106
107 extern void calc_hxprops(int nres, t_bb bb[], rvec x[], matrix box);
108
109 extern void pr_bb(FILE *fp, int nres, t_bb bb[]);
110
111 #endif