module Abstract: sig end
Contains the lightweight, live internal representation of an
abstract protein. This representation should not be confused with
genetic representations of proteins, which are not live data
structures. This representation is used to feed the protein compiler,
to output graphical representations of the protein, for some genetic
manipulations, etc.
The module contains functions to create abstract proteins and,
conversely, to deconstruct them in order to probe their
structure.
type t
An abstract protein.
type d
An opaque handle to a domain within an abstract protein.
type interf
An opaque handle to an (arbitrary) interface of an abstract
protein.
type interf_direction =
| |
Acceptor |
(* | or input interface | *) |
| |
Expressor |
(* | of output interface | *) |
The direction of an interface.
type interf_type =
| |
IFBool |
(* | Boolean-valued | *) |
| |
IFInt |
(* | Integer-valued | *) |
| |
IFString |
(* | String-valued | *) |
| |
IFMatcher |
(* | Matcher-valued | *) |
The type of an interface.
type conn_value =
The possible values of a connection.
type interf_character = interf_direction * interf_type
Combines the type and the direction of an arbitrary protein
interface. One can obtain the character of any particular
interface by calling get_interf_character
.
module type DOMDEF = sig end
Contains the model which defines the essential
characteristics of each module flavor.
module SLBD: sig end
Characteristics of the abstract Simple Ligand Binding
Domain.
module BMD: sig end
Characteristics of the abstract Boolean Multiplexor Domain.
module LID: sig end
Characteristics of the abstract Logical Integration Domain.
module PDMatcher: sig end
Characteristics of the abstract Matcher Pseudo-Domain.
module LBDR: sig end
Characteristics of the abstract Ligand Binding Domain with
Remapping.
module LBDE: sig end
Characteristics of the abstract Ligand Binding Domain with
Extraction.
val make : unit -> t
make ()
returns a new abstract protein which does not
contain any domain or any connection. Use add_domain
and
add_???_connection
below to gradually construct the domain in
a safe manner.
type domaincons =
| |
D_SLBD of SLBD.cons |
(* | Simple Ligand Binding Domain | *) |
| |
D_PDMatcher of PDMatcher.cons |
(* | Matcher Pseudo-Domain | *) |
| |
D_BMD of BMD.cons |
(* | Boolean Multiplexor Domain | *) |
| |
D_LID of LID.cons |
(* | Logical Integration Domain | *) |
| |
D_LBDR of LBDR.cons |
(* | Ligand Binding Domain with Remapping | *) |
| |
D_LBDE of LBDE.cons |
(* | Ligand Binding Domain with Extraction | *) |
A domain constructor.
val add_domain : domaincons -> t -> d
add_domain d p
adds a new domain defined by the
constructor d
to the protein p
, and returns an opaque handle
to the new domain which may be used to extract interfaces.
exception Wrong_domain_type
Raised by get_interf
below when the interface which is
asked for is not an interface of the parameter domain.
type interfid =
A synthetic type to capture all the possible interface
identifiers across all domain flavors.
val get_interf : d -> interfid -> interf
Use get_interf dp id
to obtain an opaque handle to the
interface identified by id
of the domain referenced by dp
.
dp
should be a return value from the add_domain
function.
get_interf
will raise Wrong_domain_type
if the interface
which is asked for is not an interface of the domain passed as
parameter.
exception Interface_already_set
Raised by
add_connection
below.
Raised by add_connection
below.
exception Wrong_type
Raised by add_connection
below.
exception Wrong_direction
Raised by add_connection
below.
exception Different_proteins
val add_connection : interf ->
interf -> conn_value -> unit
add_connection i1 i2 v
adds a new connection between the
two interfaces i1
and i2
, which have been previously
obtained using the get_interf
function above. If either
interface has already been set, Interface_already_set
is
raised. If the types of the two interfaces are not equal, or do
not equal the type of the value v
, then Wrong_type
is
raised. i1
should be an expressor interface, and i2
an
acceptor interface, otherwise Wrong_direction
is raised.
Finally, both interfaces should be part of domains which have
been added to the same protein, otherwise Different_proteins
is raised.