Hi,

I got both the MD and the BD to work, but there is something I don't understand about the wlc. 

If I set it up and like this (with both MD and BD):
l_max = 100.0
lp = 5.0
wlc = IMP.misc.WormLikeChain(l_max, lp)
sd = IMP.core.SphereDistancePairScore(wlc)
crw = IMP.container.PairsRestraint(sd, cpc)
crw.set_weight(kforce)
m.add_restraint(crw)

And then check the l_max and lp values with:
sl_max = wlc.evaluate_with_derivative(l_max)
slp = wlc.evaluate_with_derivative(lp)
print "l_max %f\nlp %f" % (sl_max[0], slp[0])

I get "out of scale" values, even if wlc is the only score applied, e.g.:
l_max 590.102905
lp 0.022517

Another thing that I noticed is that, apparently, only l_max has a influence on the final structure (it constrains the occupancy). Is that expected?

Thanks,
Davide






On Nov 11, 2013, at 11:07 PM, Daniel Russel wrote:

Or just not marking the particles as optimizable? At least if you use a thermostat, things should move even with no forces. It is a bit confusing (making sure particles are optimized).... You can also pass the list of particles to be optimized explicitly to the optimizer, I kind of prefer that way.


On Mon, Nov 11, 2013 at 7:18 AM, Davide Bał <davide.bau@gmail.com> wrote:
Ah! 
I think I was missing the forcefield (particles were not being optimized).



On Nov 11, 2013, at 4:16 PM, Daniel Russel wrote:

What aspect of MD would you like an example of? The MD class basically has two functions: one to set the time step and one to optimize. For the force field side there are already the charmm_forcefield examples. The bencmark_md_charmm.cpp provides a pretty simple example of using them together.


On Mon, Nov 11, 2013 at 3:44 AM, Davide Bał <davide.bau@gmail.com> wrote:
Thanks Daniel!

Could you please provide a MD example too?

Davide


On Nov 7, 2013, at 6:31 PM, Daniel Russel wrote:
Yes, you make a pair score from WLC (using either SphereDistancePairScore or DistancePairScore) and then create a restraint. The first part you would have to do with the create_restraint function anyway. Although it might be cool to add a create_distance_restraint function. But we don't have such a thing.


On Thu, Nov 7, 2013 at 8:51 AM, Davide Bał <davide.bau@gmail.com> wrote:
Do I need to create a new PairScore class to use a WLC score with, e.g. container::PairsRestraint? 
I'm asking because the code works with existing PairScores, but they are mainly distance scores.

Davide




 
On Nov 7, 2013, at 5:21 PM, Daniel Russel wrote:

Just to add, for now just create a core::PairRestraint or containerPairsRestraint. The functionality is identical to what create_restraint would do in python (in C++ create_restraint can do cooler things with compile time binding).


On Thu, Nov 7, 2013 at 6:09 AM, Davide Bał <davide.bau@gmail.com> wrote:
That would help, thanks!


On Nov 6, 2013, at 7:08 PM, Daniel Russel wrote:

Sorry, the function is C++-only (as it is a template function). I could add a python version (at least should fix the docs).


On Wed, Nov 6, 2013 at 9:50 AM, Davide Bał <davide.bau@gmail.com> wrote:
There's something I don't understand: if I use IMP.container.create_restraint(), I get the attribute error "AttributeError: 'module' object has no attribute 'create_restraint'", which I wasn't expecting.

Davide




On Nov 4, 2013, at 6:42 PM, Daniel Russel wrote:

It is used like any other pair score. core:: create_restraint and container::create_restraint or core::PairRrestraint/container::PairsRestraint can be used to bind it to particle pairs to make a Restraint. The container::ConsecutivePairContainer is probably useful for generating a particle pairs list.

On Monday, November 4, 2013, Davide Bał wrote:
Thanks Daniel!

The WLC class hasn't been used in forever as far as I know, but worked fine last I looked at it.

Any possibility of having a example of how to use the WLC? I looked around but did not find any.

Thanks,
Davide





On Wed, Oct 30, 2013 at 7:19 AM, Davide Bał <davide.bau@gmail.com> wrote:
Hi,

I would like to start using the MD and WormLikeChain functions in IMP, but I don't know what their current state is.
Are they safe to use?

Thanks,
Davide
_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev

_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev

_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev