JPRED-2 Add sources of all binaries (except alscript) to Git
[jpred.git] / sources / multicoil / hmm.h
1 #ifndef __hmm_h__
2 #define __hmm_h__
3
4 typedef int (*fint)();
5 /******************************************************************************
6   Data structure for hidden Markov model.  Entries are the number of states,
7   the initial probabilities, the transition probabilities, and a function
8   which computes the normalized probabilities of the output symbols.  The
9   transition probabilities are listed for each nonzero transition.  Included
10   are the number of such transitions, the from state, the to state, and the
11   probability.
12   A prototype of normalized probabilities function is normprob() below.
13   This function is also passed a pointer to some data which it might use.
14 ******************************************************************************/
15
16 /******************************************************************************
17   Given a sequence, for each residue for each state fill in the normalized
18   probability that that state outputs that residue given its surroundings.
19   nprobs[nstates*i+q] contains the data for position i in state q.
20 ******************************************************************************/
21 /*normprob (double *nprobs, char *seq, int length, void *data);*/
22
23 typedef struct {
24   int nstates;
25   double *initprob, *finprob;
26   int *transf, *transt, ntrans;
27   double *transprob;
28   fint outprobs;
29 /*  void *data; */
30 } HMM;
31
32 /* Score sequence using the hidden Markov model */
33 void HMMScore (char *seq, int length, HMM *hmm, 
34                 double scores[MAXSEQLEN][POSNUM+1], int table,
35                int offset_to_use);
36 /* Create the CC HMM given the files to the frquency tables */
37 HMM *CCHMM (/*FILE *fgin, FILE *fpin*/);
38
39 #endif
40