fmod BASEDOPS is
  inc PROTEINOPS .   **** has PeptideOps incl THEOPS incl Site Peptide
  inc MODIFICATIONOPS .
  inc CELLOPS .
  inc HANDLEOPS .
  inc DOMAINOPS .
  inc MUTATIONOPS .
  inc STRING .

*** Modifications are in theops

*** Mutations--
 
  sorts Mutation Mutations .
  subsort Mutation < Mutations .
  op none : -> Mutations [ctor] .
  op __ : Mutations Mutations -> Mutations [ctor assoc comm id: none] .

  sort MutationsA .  subsort Mutations < MutationsA . *** annotated mutations
  op _!_  : Mutations String -> MutationsA [ctor] .

***  sort Domain .
  subsort Domain < Mutation .

  op  del(_)   : Domain                  -> Mutation [ctor] .
  op (___)     : AminoAcid Nat AminoAcid -> Mutation [ctor] .


*** Origins 

  sort Origin .
  ops endogenous expressed recombinant purified knockin synthetic : -> Origin [ctor] .
  op  external : -> Origin [ctor] .

*** MProteins

  sort MProtein .   --- with mutations/modifications
  op m : BProtein  MutationsA ModSet -> MProtein [ctor]  .
  op m : Composite ModSet -> MProtein [ctor]  .

*** OProteins

  sort OProtein .   --- with origin and mutations/modifications
  op o : MProtein Origin -> OProtein [ctor]  .

*** SProteins   --- subject proteins

  sort SProtein .   --- with OP with handle and ip
  op s : OProtein Handle IPSource -> SProtein [ctor]  .

  sort  NoProteins . 
  op none : -> NoProteins [ctor] .
  
  sorts AProteins OProteins SProteins MProteins .
  subsort MProtein < MProteins .
  subsort OProtein < OProteins .
  subsort SProtein < SProteins .
  subsorts NoProteins < MProteins  < AProteins .
  subsorts NoProteins <  OProteins  < AProteins .
  subsorts NoProteins <  SProteins  < AProteins .
  
  op __ : AProteins AProteins -> AProteins [ctor assoc comm id: none] .
  op __ : NoProteins NoProteins -> NoProteins [ctor ditto] .
  op __ : MProteins MProteins -> MProteins [ctor ditto] .
  op __ : OProteins OProteins -> OProteins [ctor ditto] .
  op __ : SProteins SProteins -> SProteins [ctor ditto] .



***** Cell Environment Elements --   
  sorts Medium EnvironmentName .

  op enr : -> EnvironmentName [ctor] .
  op TestTube : -> EnvironmentName [ctor] .
  ops BMS BMLS BSS BMHIS BugMedium : -> Medium [ctor] .

  sorts CellEnv CellEnvA . subsort CellEnv < CellEnvA .
  op _!_ : CellEnv String -> CellEnvA [ctor] .
  op _in_ : Cells Medium -> CellEnv [ctor] .
  op _{_}in_ : Cells MProteins Medium -> CellEnv [ctor] .
  

****IPs
***(
IPfrom:   refers to subject or treatment when only one is is an IP
IP1from:  refers to subject when both subject and treatment are IPs
IP2from:  refers to treatment when both subject and treatment are IPs
IPsfrom:  used when both subject and treatment are IPs but IP source is the same
)
  sort IPSource .
  op ips : String -> IPSource [ctor] .
  op ips : EnvironmentName -> IPSource [ctor] .
  op ips : CellEnvA -> IPSource [ctor] .
  op noIP : -> IPSource [ctor] .
  op IP : -> IPSource [ctor] .

endfm
