JPRED-2 Add sources of all binaries (except alscript) to Git
[jpred.git] / sources / multicoil / hmm.h
diff --git a/sources/multicoil/hmm.h b/sources/multicoil/hmm.h
new file mode 100644 (file)
index 0000000..9af6bc5
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef __hmm_h__
+#define __hmm_h__
+
+typedef int (*fint)();
+/******************************************************************************
+  Data structure for hidden Markov model.  Entries are the number of states,
+  the initial probabilities, the transition probabilities, and a function
+  which computes the normalized probabilities of the output symbols.  The
+  transition probabilities are listed for each nonzero transition.  Included
+  are the number of such transitions, the from state, the to state, and the
+  probability.
+  A prototype of normalized probabilities function is normprob() below.
+  This function is also passed a pointer to some data which it might use.
+******************************************************************************/
+
+/******************************************************************************
+  Given a sequence, for each residue for each state fill in the normalized
+  probability that that state outputs that residue given its surroundings.
+  nprobs[nstates*i+q] contains the data for position i in state q.
+******************************************************************************/
+/*normprob (double *nprobs, char *seq, int length, void *data);*/
+
+typedef struct {
+  int nstates;
+  double *initprob, *finprob;
+  int *transf, *transt, ntrans;
+  double *transprob;
+  fint outprobs;
+/*  void *data; */
+} HMM;
+
+/* Score sequence using the hidden Markov model */
+void HMMScore (char *seq, int length, HMM *hmm, 
+               double scores[MAXSEQLEN][POSNUM+1], int table,
+              int offset_to_use);
+/* Create the CC HMM given the files to the frquency tables */
+HMM *CCHMM (/*FILE *fgin, FILE *fpin*/);
+
+#endif
+