open2c / polychrom

Chromosome polymer simulations and in silico capture experiments
MIT License
46 stars 16 forks source link

Keep forces that are too specific in a separate module? #13

Closed golobor closed 4 years ago

golobor commented 5 years ago

We had this issue before with opemmlib that the space of standard forces was too loaded with project-specific forces. I'd suggest to either create a separate module for "special" forces or even keeping them in a separate repo. The only question is which forces are "special" and which are general. My suggestion would be to (a) check if there will be more than two-three consumers for the force and (b) see if a force can be defined outside of a specific biological context in general geometric terms https://github.com/mirnylab/polychrom/blob/5cfc312252a7158a4c88eaeef92b1fc4116e6ab4/polychrom/forces.py#L413

mimakaev commented 5 years ago

Agreed on this issue.

This force was already used by at least 2 people, and it looks like a valuable force to have. I was thinking it may be nice to have a multi-compartment force in the library, so decided to go with this one.

golobor commented 5 years ago

Ah, I/c. How about then generalizing it to N interactions (the energy expression can be populated automatically) and calling it something like heteropolymer?

mimakaev commented 5 years ago

I'll offer it to Simon!

On Thu, Oct 3, 2019 at 9:20 AM Anton Goloborodko notifications@github.com wrote:

Ah, I/c. How about then generalizing it to N interactions (the energy expression can be populated automatically) and calling it something like heteropolymer?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mirnylab/polychrom/issues/13?email_source=notifications&email_token=ACIEI6YYPV4HHE3EAOGUWFDQMXWRZA5CNFSM4I5BN732YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAIFVJQ#issuecomment-537942694, or mute the thread https://github.com/notifications/unsubscribe-auth/ACIEI65VAQG5BNPUS6ICPTDQMXWRZANCNFSM4I5BN73Q .

SGrosse-Holz commented 5 years ago

Thanks for the suggestion Anfon!

golobor commented 5 years ago

!!awesome!! (1) Should we test if the energy term is non-zero before adding it? The downside is that we won't be able to change it dynamically. :( (2) should we rename it to something in the language of polymer physics, i.e. heteropolymer_ssw? Compartments is just one of the infinite applications of this force and we don't have to necessarily lock ourselves into the biological domain. Besides, we're dealing with abstractions, so I find that it's nice to separate what we're doing from what we're trying to model. I.e. what if it turns out that compartments are produced by some other physical mechanism? Of course, it's unlikely, but that's the idea. Besides, other forces so far are named via the abstraction they are implementing and not what they are trying to achive (i.e. spherical_confinement and not lamina confinement). Same argument applies to the other force (laminaAttraction)

mimakaev commented 5 years ago

There could be a flag keep_0_terms that should be false by default.

On Fri, Oct 4, 2019 at 10:28 AM Anton Goloborodko notifications@github.com wrote:

!!awesome!! (1) Should we test if the energy term is non-zero before adding it? The downside is that we won't be able to change it dynamically. :( (2) should we rename it to something in the language of polymer physics, i.e. heteropolymer_ssw? Compartments is just one of the infinite applications of this force and we don't have to necessarily lock ourselves into the biological domain. Besides, we're dealing with abstractions, so I find that it's nice to separate what we're doing from what we're trying to model. I.e. what if it turns out that compartments are produced by some other physical mechanism? Of course, it's unlikely, but that's the idea. Besides, other forces so far are named via the abstraction they are implementing and not what they are trying to achive (i.e. spherical_confinement and not lamina confinement). Same argument applies to the other force (laminaAttraction)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mirnylab/polychrom/issues/13?email_source=notifications&email_token=ACIEI6ZGAHDJXWDBIHCEUODQM5HHXA5CNFSM4I5BN732YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAL2KZY#issuecomment-538420583, or mute the thread https://github.com/notifications/unsubscribe-auth/ACIEI6ZHMJNBW5V47EB6VCTQM5HHXANCNFSM4I5BN73Q .

SGrosse-Holz commented 5 years ago

Added the suggestions to the compartment-force branch (which is now a misnomer I guess:D)

golobor commented 5 years ago

looks really good, thank you! one minor suggestion - should it be spherical_shell_well? :)

On Fri, 4 Oct 2019 at 18:37, SGrosse-Holz notifications@github.com wrote:

Added the suggestions to the compartment-force branch (which is now a misnomer I guess:D)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mirnylab/polychrom/issues/13?email_source=notifications&email_token=AAG64CTOOMHT7DXKJ7KLTOLQM5WNXA5CNFSM4I5BN732YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAMG5BQ#issuecomment-538472070, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG64CQT56B4UOUPW3FGDALQM5WNXANCNFSM4I5BN73Q .