Skip to content

Emergent Site example - #12

Draft
paulflang wants to merge 3 commits into
mainfrom
pl/emergent-site
Draft

Emergent Site example#12
paulflang wants to merge 3 commits into
mainfrom
pl/emergent-site

Conversation

@paulflang

@paulflang paulflang commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

This is an implementation of the emergent site example discussed July 09.

I'm not planning to work further along that thread atm. But here are the open issues with the generated network for future reference:

  • There is no R2 present in the output and increasing generator.transitions(2) to 3 takes forever.
  • Idk why we have a bond_peptide [e_SiteR1R1 []] composite. This should not be possible, since their (co)domain does not match.
  • We have a dimerization of non-polymerized R1 R1. This dimerization should only be possible after polymerization, which creates the required CN site (needed for further restriction to SiteR1R1). But I don't see the CN site in the output:
let bond [] in
    let i_SiteR1R1 [0.0] in
        (C [1.1], polymerization [e_C [], i_R1 [0.0], i_R1 [0.2], e_N [], 0.1])
    : let bond [] in
    let i_SiteR1R1 [0.0] in
        (
        C [1.1],
        (
            M [i_aminoacid [e_N [], i_R1 [0.0], e_C []]],
            M [i_aminoacid [e_N [], i_R1 [0.0], e_C []]]
        )
        )
    → let bond [] in
    let i_SiteR1R1 [0.0] in
        (
        C [1.1],
        let bond_peptide [0.1] in
            (
            M [i_aminoacid [e_N [], i_R1 [1.0], 0.0]],
            M [i_aminoacid [0.1, i_R1 [1.2], e_C []]]
            )
        )

Comment thread tests/emergent-sites.rs
let dimer = PatTm::let_(
[ObTm::var("cn"), ObTm::var("s4")],
MorTm::app("bond", []),
PatTm::tensor([polymer.clone(), PatTm::res("C", [MorTm::var("s4")])]),

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

polymer.clone() is wrong here. First create a new variable polymer_free. Then you can use polymer_free.subst(&mut vec![name("e_SiteR1R1"), MorTm::var("s3")]) here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant