sig
  type t
  and d
  and interf
  and interf_direction = Acceptor | Expressor
  and interf_type = IFBool | IFInt | IFString | IFMatcher
  and conn_value =
      C_Bool of bool
    | C_Int of int
    | C_String of string
    | C_Matcher of Ligand.Matcher.matcher
  and interf_character =
    Protein.Abstract.interf_direction * Protein.Abstract.interf_type
  module type DOMDEF =
    sig
      type interfid
      val input_defaults :
        Protein.Abstract.DOMDEF.interfid -> Protein.Abstract.conn_value
      val get_interf_character :
        Protein.Abstract.DOMDEF.interfid -> Protein.Abstract.interf_character
      type initstate
      and state
      val initmap :
        Protein.Abstract.DOMDEF.initstate -> Protein.Abstract.DOMDEF.state
      type config
      and cons =
        Protein.Abstract.DOMDEF.initstate * Protein.Abstract.DOMDEF.config
      val num_lbprojs : int
      val num_sbprojs : int
    end
  module SLBD :
    sig
      type interfid = Repress | Matcher | Bound
      val get_interf_character :
        Protein.Abstract.SLBD.interfid -> Protein.Abstract.interf_character
      type initstate = ActiveInitState | RepressedInitState
      and state = ActiveState | RepressedState | BoundState
      and config = unit
      and cons =
        Protein.Abstract.SLBD.initstate * Protein.Abstract.SLBD.config
      val num_lbprojs : int
      val num_sbprojs : int
    end
  module BMD :
    sig
      type interfid = Input | Output of int
      val get_interf_character :
        Protein.Abstract.BMD.interfid -> Protein.Abstract.interf_character
      type initstate = unit
      and state = unit
      and config = int
      and cons = Protein.Abstract.BMD.initstate * Protein.Abstract.BMD.config
      val num_lbprojs : int
      val num_sbprojs : int
    end
  module LID :
    sig
      type interfid = Input of int | Output
      val get_interf_character :
        Protein.Abstract.LID.interfid -> Protein.Abstract.interf_character
      type initstate = unit
      and state = unit
      and lidfunc = LIDNot | LIDAnd | LIDOr | LIDXor
      and config = {
        num_inputs : int;
        lidfunc : Protein.Abstract.LID.lidfunc;
      } 
      and cons = Protein.Abstract.LID.initstate * Protein.Abstract.LID.config
      val num_lbprojs : int
      val num_sbprojs : int
    end
  module PDMatcher :
    sig
      type interfid = Matcher
      val get_interf_character :
        Protein.Abstract.PDMatcher.interfid ->
        Protein.Abstract.interf_character
      type initstate = unit
      and state = unit
      and config = Ligand.Matcher.matcher
      and cons =
        Protein.Abstract.PDMatcher.initstate *
        Protein.Abstract.PDMatcher.config
      val num_lbprojs : int
      val num_sbprojs : int
    end
  module LBDR :
    sig
      type interfid =
          Matcher of int
        | Repress1
        | Repress2
        | Bound1
        | Bound2
        | PermuteIn
        | PermuteOut
      val get_interf_character :
        Protein.Abstract.LBDR.interfid -> Protein.Abstract.interf_character
      type singleinitstate = ActiveInitState | RepressedInitState
      and initstate =
        Protein.Abstract.LBDR.singleinitstate *
        Protein.Abstract.LBDR.singleinitstate
      and singlestate = ActiveState | RepressedState | BoundState of string
      and state = {
        permutestate : bool;
        proj1state : Protein.Abstract.LBDR.singlestate;
        proj2state : Protein.Abstract.LBDR.singlestate;
      } 
      and permstate = { proj1 : int array; proj2 : int array; } 
      and extremity_arrangement = AABB | ABBA
      and config = {
        num_matchers : int;
        permon : Protein.Abstract.LBDR.permstate;
        permoff : Protein.Abstract.LBDR.permstate;
        exarr : Protein.Abstract.LBDR.extremity_arrangement;
      } 
      and cons =
        Protein.Abstract.LBDR.initstate * Protein.Abstract.LBDR.config
      val num_lbprojs : int
      val num_sbprojs : int
    end
  module LBDE :
    sig
      type interfid = Matcher of int | Repress | Bound
      val get_interf_character :
        Protein.Abstract.LBDE.interfid -> Protein.Abstract.interf_character
      type initstate = ActiveInitState | RepressedInitState
      and state = ActiveState | RepressedState | BoundState of string
      and extraction = int array
      and config = {
        num_matchers : int;
        extraction : Protein.Abstract.LBDE.extraction;
      } 
      and cons =
        Protein.Abstract.LBDE.initstate * Protein.Abstract.LBDE.config
      val num_lbprojs : int
      val num_sbprojs : int
    end
  val make : unit -> Protein.Abstract.t
  type domaincons =
      D_SLBD of Protein.Abstract.SLBD.cons
    | D_PDMatcher of Protein.Abstract.PDMatcher.cons
    | D_BMD of Protein.Abstract.BMD.cons
    | D_LID of Protein.Abstract.LID.cons
    | D_LBDR of Protein.Abstract.LBDR.cons
    | D_LBDE of Protein.Abstract.LBDE.cons
  val add_domain :
    Protein.Abstract.domaincons -> Protein.Abstract.t -> Protein.Abstract.d
  exception Wrong_domain_type
  type interfid =
      I_SLBD of Protein.Abstract.SLBD.interfid
    | I_PDMatcher of Protein.Abstract.PDMatcher.interfid
    | I_BMD of Protein.Abstract.BMD.interfid
    | I_LID of Protein.Abstract.LID.interfid
    | I_LBDR of Protein.Abstract.LBDR.interfid
    | I_LBDE of Protein.Abstract.LBDE.interfid
  val get_interf :
    Protein.Abstract.d ->
    Protein.Abstract.interfid -> Protein.Abstract.interf
  exception Interface_already_set
  exception Wrong_type
  exception Wrong_direction
  exception Different_proteins
  val add_connection :
    Protein.Abstract.interf ->
    Protein.Abstract.interf -> Protein.Abstract.conn_value -> unit
end