fmod PROTEIN is pr NAT .

sort Protein .
sort BProtein .
subsort BProtein < Protein .

sort Chimera .
subsort Chimera < BProtein .

sort Peptide .
subsort Peptide < BProtein .

sort Marble .
sort Gcode .
sorts AminoAcid .
subsort AminoAcid < Protein . 

ops A C T Y S K P N L M V I F D E R H Q W G : -> AminoAcid [ctor] . 
ops pT pY pS : -> AminoAcid [ctor] .  *** modified amino acids 
 
endfm 
****************************************************************************
fmod THING is pr PROTEIN .

sorts Thing Composite Complex .
sorts DNA RNA Gene Chemical Signature Stress Pathogen .
sort SimpleThing .
subsort Protein Gene Composite DNA RNA Chemical < SimpleThing .
subsort  Pathogen Signature Peptide Stress Marble < SimpleThing .
subsort Complex SimpleThing < Thing .

op (_:_) : Thing Thing -> Complex [ctor assoc comm] .           

endfm
****************************************************************************
fmod SOUP is pr THING .

sort MtSoup .
op empty : -> MtSoup [ctor] .  

sort Soup .
subsort MtSoup < Soup .
op __ : Soup Soup -> Soup [ctor assoc comm id: empty] .
op __ : MtSoup MtSoup -> MtSoup [ctor ditto] .

**** Soup sorts

sort Things .  **** soup of things
subsort MtSoup < Things .
subsorts Thing < Things < Soup .
op __ : Things Things -> Things [ctor ditto] .

sort Location .
sort Locations .  **** soup of locations
subsort MtSoup < Locations .
subsorts Location < Locations < Soup . 
op __ : Locations Locations -> Locations [ctor ditto] .

endfm
****************************************************************************
fmod MODIFICATION is pr SOUP .  
 
sorts Site  Modification ModSet .
subsort Modification < ModSet . 

****16apr09
sorts AAMOD FRAG SMBIND ACT OTHER .
subsort AAMOD FRAG SMBIND ACT OTHER < Modification .

***( 19jan15 clt
op not : AAMOD -> Modification .
op not : SMBIND -> Modification .
op not : ACT -> Modification .
)

op not : Modification -> Modification .
eq not(not(m:Modification)) = m:Modification .

op none : -> ModSet . 
op __ : ModSet ModSet -> ModSet [ctor assoc comm id: none] . 

op __ : AminoAcid Nat -> Site  .

op [_-_] : Marble   ModSet -> Marble   [ctor right id: none ] .

op [_-_] : Protein   ModSet -> Protein   [ctor right id: none ] .
*** op [_-_] : Family    ModSet -> Family    [ctor right id: none ] . 
op [_-_] : Composite ModSet -> Composite [ctor right id: none ] . 
op [_-_] : DNA       ModSet -> DNA       [ctor right id: none ] .
op [_-_] : RNA       ModSet -> RNA       [ctor right id: none ] .
op [_-_] : Chemical  ModSet -> Chemical  [ctor right id: none ] .
op [_-_] : Gene      ModSet -> Gene      [ctor right id: none ] .

endfm
****************************************************************************
fmod LOCATION is inc MODIFICATION .

sort LocName .

op {_|_} : LocName Soup -> Location [ctor format (n d d d d d)] .

sort CompName .
subsort CompName < LocName .

endfm
****************************************************************************

***(
fmod CELL is inc LOCATION .

sort Cell CellType .
subsort Cell < Soup .

op [_|_] : CellType Soup -> Cell [ctor] .

op Cell : -> CellType [ctor] .

endfm
)
****************************************************************************
*** fmod DISH is inc CELL .
fmod DISH is inc LOCATION .

sort Dish .
op PD : Soup -> Dish [ctor] .

sort Contents .
subsort Contents < Soup .

endfm
*******************************************************************************
fmod THEOPS is inc DISH .

endfm
****************************************************************
