[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-users] restraint based on pre-calculated scores



OK, clear, will do this way!
Thanks,
Jan

On 28 Oct 2015, at 19:58, Ben Webb <> wrote:

> On 10/27/15 12:33 PM, Jan Kosinski wrote:
>> I have a custom MonteCarlo mover that randomly samples positions of a
>> rigid body from predefined list of transformations. Each transformation
>> corresponds to some position, and for each position I have precalculated
>> a score. Now I would like to have a restraint that scores the positions
>> generated by the mover according to these precalculated scores. The
>> restraint would have to find out which transformation was used for the
>> move, get the index of the transformation in the list and then get the
>> score. Would you have a suggestion how to implement this? I can store
>> the current index in the mover object but then I don't know how to
>> access the movers from the restraint object.
> 
> The simplest way to do it would be to have your custom restraint constructor take a pointer to your custom mover, and then store it in a PointerMember<CustomMover> member within CustomRestraint.
> 
> See also the IMP::domino module which has lots of functionality for discrete sampling.
> 
> 	Ben
> -- 
>                       https://salilab.org/~ben/
> "It is a capital mistake to theorize before one has data."
> 	- Sir Arthur Conan Doyle
> _______________________________________________
> IMP-users mailing list
> 
> https://salilab.org/mailman/listinfo/imp-users