hi all,
i noticed that the connectivity restraint must have changed at some point: i want to impose a restraint on two proteins, each consisting of several particles. thus, i am interested in restraining the closest pair between the two proteins. whereas the following code did what i need previously it now calculates all against all distances (including intra-protein distances) - which is not what i want. i'd be grateful if anyone could tell me how i need to change my pseudo code:
prot1 = [part1,part2,part3] prot2 = [part4,part5,part6] ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) connrest = IMP.core.ConnectivityRestraint(pairsc) for pps in [prot1,prot2]: connrest.add_particles(pps)
to be explicit: the code now restrains distances in prot1 and prot2, which is what i do not want. i only want the inter-protein distances to be considered...
thanks
frido
--
Dr. Friedrich Foerster Max-Planck Institut fuer Biochemie Am Klopferspitz 18 D-82152 Martinsried
Tel: +49 89 8578 2651 Fax: +49 89 8578 2641
foerster@biochem.mpg.de
www.tomotronic.org
I think the problem is that the list of particles the connectivity restraint ends up with is [p0,p1...p5]. You should just give it two particles, one for each protein (with radius and center computed from a sphere cover, or with the distance computed using a particle refiner). I doubt the code below ever really did what you wanted (although it might have happened to agree:-)
I can explain better once I'm back in the US in two days.
On Sep 21, 2009, at 2:30 PM, Friedrich Foerster foerster@biochem.mpg.de wrote:
> hi all, > > i noticed that the connectivity restraint must have changed at some > point: > i want to impose a restraint on two proteins, each consisting of > several particles. thus, i am interested in restraining the closest > pair between the two proteins. whereas the following code did what i > need previously it now calculates all against all distances (including > intra-protein distances) - which is not what i want. > i'd be grateful if anyone could tell me how i need to change my > pseudo code: > > > prot1 = [part1,part2,part3] > prot2 = [part4,part5,part6] > ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) > pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) > connrest = IMP.core.ConnectivityRestraint(pairsc) > for pps in [prot1,prot2]: > connrest.add_particles(pps) > > to be explicit: the code now restrains distances in prot1 and prot2, > which is what i do not want. i only want the inter-protein distances > to be considered... > > thanks > > frido > > > -- > > Dr. Friedrich Foerster > Max-Planck Institut fuer Biochemie > Am Klopferspitz 18 > D-82152 Martinsried > > Tel: +49 89 8578 2651 > Fax: +49 89 8578 2641 > > foerster@biochem.mpg.de > > www.tomotronic.org > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev
On Sep 21, 2009, at 3:54 PM, Daniel Russel wrote:
> I think the problem is that the list of particles the connectivity > restraint ends up with is [p0,p1...p5]. You should just give it two > particles, one for each protein (with radius and center computed > from a sphere cover, or with the distance computed using a particle > refiner). could you give an example, please? i have no clue what a refiner does. the doc says it returns particles. no clue which ones ... what'd happen if i have different granularities in one protein (atoms and fragments).
> I doubt the code below ever really did what you wanted (although it > might have happened to agree:-)
yes, it did work fine. probably going back to brad, the syntax was simply to specify each protein as a list. pretty convenient ... at some point in the recent months, it started being ignored which particles are put into IMP.Particles. they seem to be just thrown into one basket, which they were not before. needless to say i'd prefer that simple syntax compared dealing with hyper-abstract classes etc unless someone convinces me of the necessity of those. anyway, help with getting that functionality would be greatly appreciated.
cheers
frido
> > I can explain better once I'm back in the US in two days. > > > On Sep 21, 2009, at 2:30 PM, Friedrich Foerster <foerster@biochem.mpg.de > > wrote: > >> hi all, >> >> i noticed that the connectivity restraint must have changed at some >> point: >> i want to impose a restraint on two proteins, each consisting of >> several particles. thus, i am interested in restraining the closest >> pair between the two proteins. whereas the following code did what i >> need previously it now calculates all against all distances >> (including >> intra-protein distances) - which is not what i want. >> i'd be grateful if anyone could tell me how i need to change my >> pseudo code: >> >> >> prot1 = [part1,part2,part3] >> prot2 = [part4,part5,part6] >> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >> pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) >> connrest = IMP.core.ConnectivityRestraint(pairsc) >> for pps in [prot1,prot2]: >> connrest.add_particles(pps) >> >> to be explicit: the code now restrains distances in prot1 and prot2, >> which is what i do not want. i only want the inter-protein distances >> to be considered... >> >> thanks >> >> frido >> >> >> -- >> >> Dr. Friedrich Foerster >> Max-Planck Institut fuer Biochemie >> Am Klopferspitz 18 >> D-82152 Martinsried >> >> Tel: +49 89 8578 2651 >> Fax: +49 89 8578 2641 >> >> foerster@biochem.mpg.de >> >> www.tomotronic.org >> _______________________________________________ >> 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 >
--
Friedrich Foerster Max-Planck Institut fuer Biochemie Am Klopferspitz 18 D-82152 Martinsried
Tel: +49 89 8578 2651 Fax: +49 89 8578 2641
foerster@biochem.mpg.de
www.biochem.mpg.de/foerster
On Sep 21, 2009, at 7:30 AM, Friedrich Foerster wrote:
> > On Sep 21, 2009, at 3:54 PM, Daniel Russel wrote: > >> I think the problem is that the list of particles the connectivity >> restraint ends up with is [p0,p1...p5]. You should just give it two >> particles, one for each protein (with radius and center computed >> from a sphere cover, or with the distance computed using a particle >> refiner). > could you give an example, please? i have no clue what a refiner > does. the doc says it returns particles. no clue which ones ... Depends which refiner :-) A LeavesRefiner returns the hierarchy leaves, the ChildrenRefiner returns the children... Basically it is a way of selecting a set of particles from a given one.
>> I doubt the code below ever really did what you wanted (although it >> might have happened to agree:-) > > yes, it did work fine. probably going back to brad, the syntax was > simply to specify each protein as a list. pretty convenient ... For the first month or so it allowed direct specification of the sets of particles, but not for well over a year (it was changed back when you complained about it being really slow...)
> at some point in the recent months, it started being ignored which > particles are put into IMP.Particles. they seem to be just thrown > into one basket, which they were not before. needless to say i'd > prefer that simple syntax compared dealing with hyper-abstract > classes etc unless someone convinces me of the necessity of those. Mostly it just keeps the interfaces uniform and simplifies the connectivity restraint a great deal (and makes is to that it can be fast when using rigid bodies). In general, if you want to refer to a particular feature, make sure there is a particle which relates to that feature.
Frido - this is how it should look like:
#create the two proteins ps=IMP.Particles() ps.append(IMP.Particle(m)) ps.append(IMP.Particle(m)) prot1= IMP.atom.Hierarchy.setup_particle(ps[0],IMP.atom.Hierarchy.PROTEIN) prot2= IMP.atom.Hierarchy.setup_particle(ps[1],IMP.atom.Hierarchy.PROTEIN) #make the parts fragments and add to the molecules for e in [part1,part2,part3]: fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) #also make sure the part has radius prot1.add_child(fh) for e in [part4,part5,part6]: fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) #also make sure the part has radius prot2.add_child(fh)
#create the restraint ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) connrest = IMP.core.ConnectivityRestraint(lrps) cr.set_particles(ps) m.add_restraint(connrest)
On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote:
> I think the problem is that the list of particles the connectivity > restraint ends up with is [p0,p1...p5]. You should just give it two > particles, one for each protein (with radius and center computed > from a sphere cover, or with the distance computed using a particle > refiner). I doubt the code below ever really did what you wanted > (although it might have happened to agree:-) > > I can explain better once I'm back in the US in two days. > > > On Sep 21, 2009, at 2:30 PM, Friedrich Foerster <foerster@biochem.mpg.de > > wrote: > >> hi all, >> >> i noticed that the connectivity restraint must have changed at some >> point: >> i want to impose a restraint on two proteins, each consisting of >> several particles. thus, i am interested in restraining the closest >> pair between the two proteins. whereas the following code did what i >> need previously it now calculates all against all distances >> (including >> intra-protein distances) - which is not what i want. >> i'd be grateful if anyone could tell me how i need to change my >> pseudo code: >> >> >> prot1 = [part1,part2,part3] >> prot2 = [part4,part5,part6] >> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >> pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) >> connrest = IMP.core.ConnectivityRestraint(pairsc) >> for pps in [prot1,prot2]: >> connrest.add_particles(pps) >> >> to be explicit: the code now restrains distances in prot1 and prot2, >> which is what i do not want. i only want the inter-protein distances >> to be considered... >> >> thanks >> >> frido >> >> >> -- >> >> Dr. Friedrich Foerster >> Max-Planck Institut fuer Biochemie >> Am Klopferspitz 18 >> D-82152 Martinsried >> >> Tel: +49 89 8578 2651 >> Fax: +49 89 8578 2641 >> >> foerster@biochem.mpg.de >> >> www.tomotronic.org >> _______________________________________________ >> 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
one correlation -
> Frido - this is how it should look like: > > #create the two proteins > prot_ps=IMP.Particles() > prot_ps.append(IMP.Particle(m)) > prot_ps.append(IMP.Particle(m)) > prot1= > IMP > .atom.Hierarchy.setup_particle(prot_ps[0],IMP.atom.Hierarchy.PROTEIN) > prot2= > IMP > .atom.Hierarchy.setup_particle(prot_ps[1],IMP.atom.Hierarchy.PROTEIN) > #make the parts fragments and add to the molecules > for e in [part1,part2,part3]: > fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) > #also make sure the part has radius > prot1.add_child(fh) > for e in [part4,part5,part6]: > fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) > #also make sure the part has radius > prot2.add_child(fh) > > #create the restraint > ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) > cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) > lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) > connrest = IMP.core.ConnectivityRestraint(lrps) > connrest.set_particles(prot_ps) > m.add_restraint(connrest) > > > On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote: > >> I think the problem is that the list of particles the connectivity >> restraint ends up with is [p0,p1...p5]. You should just give it two >> particles, one for each protein (with radius and center computed >> from a sphere cover, or with the distance computed using a particle >> refiner). I doubt the code below ever really did what you wanted >> (although it might have happened to agree:-) >> >> I can explain better once I'm back in the US in two days. >> >> >> On Sep 21, 2009, at 2:30 PM, Friedrich Foerster <foerster@biochem.mpg.de >> > wrote: >> >>> hi all, >>> >>> i noticed that the connectivity restraint must have changed at >>> some point: >>> i want to impose a restraint on two proteins, each consisting of >>> several particles. thus, i am interested in restraining the closest >>> pair between the two proteins. whereas the following code did what i >>> need previously it now calculates all against all distances >>> (including >>> intra-protein distances) - which is not what i want. >>> i'd be grateful if anyone could tell me how i need to change my >>> pseudo code: >>> >>> >>> prot1 = [part1,part2,part3] >>> prot2 = [part4,part5,part6] >>> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >>> pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) >>> connrest = IMP.core.ConnectivityRestraint(pairsc) >>> for pps in [prot1,prot2]: >>> connrest.add_particles(pps) >>> >>> to be explicit: the code now restrains distances in prot1 and prot2, >>> which is what i do not want. i only want the inter-protein distances >>> to be considered... >>> >>> thanks >>> >>> frido >>> >>> >>> -- >>> >>> Dr. Friedrich Foerster >>> Max-Planck Institut fuer Biochemie >>> Am Klopferspitz 18 >>> D-82152 Martinsried >>> >>> Tel: +49 89 8578 2651 >>> Fax: +49 89 8578 2641 >>> >>> foerster@biochem.mpg.de >>> >>> www.tomotronic.org >>> _______________________________________________ >>> 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 >
thanks. but the functionality is not sufficient for my needs as it is: i do not see any way to specify parts of a protein involved in an interaction. e.g., my proteins a and b each consist of 10 fragments. i have an interaction between A and B that involves the first 3 fragments of protein A and fragments 3,5,7 of protein B. how can i specify that restraint currently (it used to work previously ...). so i am not convinced why the old syntax had to go ...
thanks
frido
On Mon, Sep 21, 2009 at 6:37 PM, Keren Lasker kerenl@salilab.org wrote: > one correlation - > > Frido - this is how it should look like: > > #create the two proteins > prot_ps=IMP.Particles() > prot_ps.append(IMP.Particle(m)) > prot_ps.append(IMP.Particle(m)) > prot1= > IMP.atom.Hierarchy.setup_particle(prot_ps[0],IMP.atom.Hierarchy.PROTEIN) > > prot2= > IMP.atom.Hierarchy.setup_particle(prot_ps[1],IMP.atom.Hierarchy.PROTEIN) > > #make the parts fragments and add to the molecules > > for e in [part1,part2,part3]: > > fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) > > #also make sure the part has radius > prot1.add_child(fh) > > for e in [part4,part5,part6]: > > fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) > > #also make sure the part has radius > prot2.add_child(fh) > > > > #create the restraint > > ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) > > cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) > lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) > connrest = IMP.core.ConnectivityRestraint(lrps) > > connrest.set_particles(prot_ps) > > m.add_restraint(connrest) > > > On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote: > > I think the problem is that the list of particles the connectivity restraint > ends up with is [p0,p1...p5]. You should just give it two particles, one for > each protein (with radius and center computed from a sphere cover, or with > the distance computed using a particle refiner). I doubt the code below ever > really did what you wanted (although it might have happened to agree:-) > > I can explain better once I'm back in the US in two days. > > > On Sep 21, 2009, at 2:30 PM, Friedrich Foerster foerster@biochem.mpg.de > wrote: > > hi all, > > i noticed that the connectivity restraint must have changed at some point: > > i want to impose a restraint on two proteins, each consisting of > > several particles. thus, i am interested in restraining the closest > > pair between the two proteins. whereas the following code did what i > > need previously it now calculates all against all distances (including > > intra-protein distances) - which is not what i want. > > i'd be grateful if anyone could tell me how i need to change my pseudo code: > > > prot1 = [part1,part2,part3] > > prot2 = [part4,part5,part6] > > ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) > > pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) > > connrest = IMP.core.ConnectivityRestraint(pairsc) > > for pps in [prot1,prot2]: > > connrest.add_particles(pps) > > to be explicit: the code now restrains distances in prot1 and prot2, > > which is what i do not want. i only want the inter-protein distances > > to be considered... > > thanks > > frido > > > -- > > Dr. Friedrich Foerster > > Max-Planck Institut fuer Biochemie > > Am Klopferspitz 18 > > D-82152 Martinsried > > Tel: +49 89 8578 2651 > > Fax: +49 89 8578 2641 > > foerster@biochem.mpg.de > > www.tomotronic.org > > _______________________________________________ > > 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 > >
In general you need to associate a particle which each feature you want to restrain since restraints generally act on a single set of equivalent particles. For the connectivity case you have a bunch of options, all of which do slightly different things.
- create a fragment in the molecular hierarchy which includes the other fragments (ie make this fragment the parent of the other fragments, the create_fragment function should help, but needs to be better documented) and then use a LowestRefinedPairScore
- create cover particles which cover the fragments in question and do as you did before with the connectivity restraint. You can use the helper::create_cover function to set this up and then pass the created particle to the connectivity restraint. I think this is closest to what you need. I think we should have a simpler helper function which creates the particle for you and hides the internal details. I'll add such over the next couple days. Then code will be something like
c0= IMP.helper.create_cover(IMP.Particles([f3,f5,f7])) c1= IMP.helper.create_cover(IMP.Particles([f0,f1,f2])
sd= IMP.core.SphereDistancePairScore(IMP.Harmonic(0,1)) cr= IMP.core.ConnectivityRestraint(sd) cr.add_particle(c0) cr.add_particle(c1)
On Sep 22, 2009, at 4:46 AM, Friedrich Foerster wrote:
> thanks. > but the functionality is not sufficient for my needs as it is: i do > not see any way to specify parts of a protein involved in an > interaction. > e.g., my proteins a and b each consist of 10 fragments. i have an > interaction between A and B that involves the first 3 fragments of > protein A and fragments 3,5,7 of protein B. how can i specify that > restraint currently (it used to work previously ...). so i am not > convinced why the old syntax had to go ... > > thanks > > frido > > On Mon, Sep 21, 2009 at 6:37 PM, Keren Lasker kerenl@salilab.org > wrote: >> one correlation - >> >> Frido - this is how it should look like: >> >> #create the two proteins >> prot_ps=IMP.Particles() >> prot_ps.append(IMP.Particle(m)) >> prot_ps.append(IMP.Particle(m)) >> prot1= >> IMP >> .atom.Hierarchy.setup_particle(prot_ps[0],IMP.atom.Hierarchy.PROTEIN) >> >> prot2= >> IMP >> .atom.Hierarchy.setup_particle(prot_ps[1],IMP.atom.Hierarchy.PROTEIN) >> >> #make the parts fragments and add to the molecules >> >> for e in [part1,part2,part3]: >> >> fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >> >> #also make sure the part has radius >> prot1.add_child(fh) >> >> for e in [part4,part5,part6]: >> >> fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >> >> #also make sure the part has radius >> prot2.add_child(fh) >> >> >> >> #create the restraint >> >> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >> >> cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) >> lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) >> connrest = IMP.core.ConnectivityRestraint(lrps) >> >> connrest.set_particles(prot_ps) >> >> m.add_restraint(connrest) >> >> >> On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote: >> >> I think the problem is that the list of particles the connectivity >> restraint >> ends up with is [p0,p1...p5]. You should just give it two >> particles, one for >> each protein (with radius and center computed from a sphere cover, >> or with >> the distance computed using a particle refiner). I doubt the code >> below ever >> really did what you wanted (although it might have happened to >> agree:-) >> >> I can explain better once I'm back in the US in two days. >> >> >> On Sep 21, 2009, at 2:30 PM, Friedrich Foerster <foerster@biochem.mpg.de >> > >> wrote: >> >> hi all, >> >> i noticed that the connectivity restraint must have changed at some >> point: >> >> i want to impose a restraint on two proteins, each consisting of >> >> several particles. thus, i am interested in restraining the closest >> >> pair between the two proteins. whereas the following code did what i >> >> need previously it now calculates all against all distances >> (including >> >> intra-protein distances) - which is not what i want. >> >> i'd be grateful if anyone could tell me how i need to change my >> pseudo code: >> >> >> prot1 = [part1,part2,part3] >> >> prot2 = [part4,part5,part6] >> >> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >> >> pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) >> >> connrest = IMP.core.ConnectivityRestraint(pairsc) >> >> for pps in [prot1,prot2]: >> >> connrest.add_particles(pps) >> >> to be explicit: the code now restrains distances in prot1 and prot2, >> >> which is what i do not want. i only want the inter-protein distances >> >> to be considered... >> >> thanks >> >> frido >> >> >> -- >> >> Dr. Friedrich Foerster >> >> Max-Planck Institut fuer Biochemie >> >> Am Klopferspitz 18 >> >> D-82152 Martinsried >> >> Tel: +49 89 8578 2651 >> >> Fax: +49 89 8578 2641 >> >> foerster@biochem.mpg.de >> >> www.tomotronic.org >> >> _______________________________________________ >> >> 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 >> >> > > > > -- > -- > > Dr. Friedrich Foerster > Max-Planck Institut fuer Biochemie > Am Klopferspitz 18 > D-82152 Martinsried > > Tel: +49 89 8578 2651 > Fax: +49 89 8578 2641 > > foerster@biochem.mpg.de > > www.tomotronic.org > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev
Daniel - 1. does this solution means that f3-f5-f7 (and f0-f1-f2) are simplified to a single sphere ? 2. if this is the case, I am not sure it answers Frido's request as he would like to have ( i am guessing) a more accurate scoring term 3. and so - would not it be better to wrap the 3 fragments in a hierarchy ( that will of course be a child of the protein) ? Keren. On Sep 22, 2009, at 3:45 PM, Daniel Russel wrote:
> In general you need to associate a particle which each feature you > want to restrain since restraints generally act on a single set of > equivalent particles. For the connectivity case you have a bunch of > options, all of which do slightly different things. > > - create a fragment in the molecular hierarchy which includes the > other fragments (ie make this fragment the parent of the other > fragments, the create_fragment function should help, but needs to be > better documented) and then use a LowestRefinedPairScore > > - create cover particles which cover the fragments in question and > do as you did before with the connectivity restraint. You can use > the helper::create_cover function to set this up and then pass the > created particle to the connectivity restraint. I think this is > closest to what you need. I think we should have a simpler helper > function which creates the particle for you and hides the internal > details. I'll add such over the next couple days. Then code will be > something like > > c0= IMP.helper.create_cover(IMP.Particles([f3,f5,f7])) > c1= IMP.helper.create_cover(IMP.Particles([f0,f1,f2]) > > sd= IMP.core.SphereDistancePairScore(IMP.Harmonic(0,1)) > cr= IMP.core.ConnectivityRestraint(sd) > cr.add_particle(c0) > cr.add_particle(c1) > > On Sep 22, 2009, at 4:46 AM, Friedrich Foerster wrote: > >> thanks. >> but the functionality is not sufficient for my needs as it is: i do >> not see any way to specify parts of a protein involved in an >> interaction. >> e.g., my proteins a and b each consist of 10 fragments. i have an >> interaction between A and B that involves the first 3 fragments of >> protein A and fragments 3,5,7 of protein B. how can i specify that >> restraint currently (it used to work previously ...). so i am not >> convinced why the old syntax had to go ... >> >> thanks >> >> frido >> >> On Mon, Sep 21, 2009 at 6:37 PM, Keren Lasker kerenl@salilab.org >> wrote: >>> one correlation - >>> >>> Frido - this is how it should look like: >>> >>> #create the two proteins >>> prot_ps=IMP.Particles() >>> prot_ps.append(IMP.Particle(m)) >>> prot_ps.append(IMP.Particle(m)) >>> prot1= >>> IMP >>> .atom >>> .Hierarchy.setup_particle(prot_ps[0],IMP.atom.Hierarchy.PROTEIN) >>> >>> prot2= >>> IMP >>> .atom >>> .Hierarchy.setup_particle(prot_ps[1],IMP.atom.Hierarchy.PROTEIN) >>> >>> #make the parts fragments and add to the molecules >>> >>> for e in [part1,part2,part3]: >>> >>> fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >>> >>> #also make sure the part has radius >>> prot1.add_child(fh) >>> >>> for e in [part4,part5,part6]: >>> >>> fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >>> >>> #also make sure the part has radius >>> prot2.add_child(fh) >>> >>> >>> >>> #create the restraint >>> >>> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >>> >>> cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) >>> lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) >>> connrest = IMP.core.ConnectivityRestraint(lrps) >>> >>> connrest.set_particles(prot_ps) >>> >>> m.add_restraint(connrest) >>> >>> >>> On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote: >>> >>> I think the problem is that the list of particles the connectivity >>> restraint >>> ends up with is [p0,p1...p5]. You should just give it two >>> particles, one for >>> each protein (with radius and center computed from a sphere cover, >>> or with >>> the distance computed using a particle refiner). I doubt the code >>> below ever >>> really did what you wanted (although it might have happened to >>> agree:-) >>> >>> I can explain better once I'm back in the US in two days. >>> >>> >>> On Sep 21, 2009, at 2:30 PM, Friedrich Foerster <foerster@biochem.mpg.de >>> > >>> wrote: >>> >>> hi all, >>> >>> i noticed that the connectivity restraint must have changed at >>> some point: >>> >>> i want to impose a restraint on two proteins, each consisting of >>> >>> several particles. thus, i am interested in restraining the closest >>> >>> pair between the two proteins. whereas the following code did what i >>> >>> need previously it now calculates all against all distances >>> (including >>> >>> intra-protein distances) - which is not what i want. >>> >>> i'd be grateful if anyone could tell me how i need to change my >>> pseudo code: >>> >>> >>> prot1 = [part1,part2,part3] >>> >>> prot2 = [part4,part5,part6] >>> >>> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >>> >>> pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) >>> >>> connrest = IMP.core.ConnectivityRestraint(pairsc) >>> >>> for pps in [prot1,prot2]: >>> >>> connrest.add_particles(pps) >>> >>> to be explicit: the code now restrains distances in prot1 and prot2, >>> >>> which is what i do not want. i only want the inter-protein distances >>> >>> to be considered... >>> >>> thanks >>> >>> frido >>> >>> >>> -- >>> >>> Dr. Friedrich Foerster >>> >>> Max-Planck Institut fuer Biochemie >>> >>> Am Klopferspitz 18 >>> >>> D-82152 Martinsried >>> >>> Tel: +49 89 8578 2651 >>> >>> Fax: +49 89 8578 2641 >>> >>> foerster@biochem.mpg.de >>> >>> www.tomotronic.org >>> >>> _______________________________________________ >>> >>> 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 >>> >>> >> >> >> >> -- >> -- >> >> Dr. Friedrich Foerster >> Max-Planck Institut fuer Biochemie >> Am Klopferspitz 18 >> D-82152 Martinsried >> >> Tel: +49 89 8578 2651 >> Fax: +49 89 8578 2641 >> >> foerster@biochem.mpg.de >> >> www.tomotronic.org >> _______________________________________________ >> 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
On Sep 22, 2009, at 6:55 PM, Keren Lasker wrote:
> Daniel - > 1. does this solution means that f3-f5-f7 (and f0-f1-f2) are > simplified to a single sphere ? For solution 2, the distance measure used in the distance between the two single spheres. For solution 1 it is the distance between the two closest sphere fragments. > 2. if this is the case, I am not sure it answers Frido's request as > he would like to have ( i am guessing) a more accurate scoring term It was not clear from his emails which distance metric he wanted.
> 3. and so - would not it be better to wrap the 3 fragments in a > hierarchy ( that will of course be a child of the protein) ? Yes, solution 1. It does require manipulating a hierarchy a bit more (and the create_fragment function is not well documented, I think it does what is needed, but I have to check).
> Keren. > On Sep 22, 2009, at 3:45 PM, Daniel Russel wrote: > >> In general you need to associate a particle which each feature you >> want to restrain since restraints generally act on a single set of >> equivalent particles. For the connectivity case you have a bunch of >> options, all of which do slightly different things. >> >> - create a fragment in the molecular hierarchy which includes the >> other fragments (ie make this fragment the parent of the other >> fragments, the create_fragment function should help, but needs to >> be better documented) and then use a LowestRefinedPairScore >> >> - create cover particles which cover the fragments in question and >> do as you did before with the connectivity restraint. You can use >> the helper::create_cover function to set this up and then pass the >> created particle to the connectivity restraint. I think this is >> closest to what you need. I think we should have a simpler helper >> function which creates the particle for you and hides the internal >> details. I'll add such over the next couple days. Then code will be >> something like >> >> c0= IMP.helper.create_cover(IMP.Particles([f3,f5,f7])) >> c1= IMP.helper.create_cover(IMP.Particles([f0,f1,f2]) >> >> sd= IMP.core.SphereDistancePairScore(IMP.Harmonic(0,1)) >> cr= IMP.core.ConnectivityRestraint(sd) >> cr.add_particle(c0) >> cr.add_particle(c1) >> >> On Sep 22, 2009, at 4:46 AM, Friedrich Foerster wrote: >> >>> thanks. >>> but the functionality is not sufficient for my needs as it is: i do >>> not see any way to specify parts of a protein involved in an >>> interaction. >>> e.g., my proteins a and b each consist of 10 fragments. i have an >>> interaction between A and B that involves the first 3 fragments of >>> protein A and fragments 3,5,7 of protein B. how can i specify that >>> restraint currently (it used to work previously ...). so i am not >>> convinced why the old syntax had to go ... >>> >>> thanks >>> >>> frido >>> >>> On Mon, Sep 21, 2009 at 6:37 PM, Keren Lasker kerenl@salilab.org >>> wrote: >>>> one correlation - >>>> >>>> Frido - this is how it should look like: >>>> >>>> #create the two proteins >>>> prot_ps=IMP.Particles() >>>> prot_ps.append(IMP.Particle(m)) >>>> prot_ps.append(IMP.Particle(m)) >>>> prot1= >>>> IMP >>>> .atom >>>> .Hierarchy.setup_particle(prot_ps[0],IMP.atom.Hierarchy.PROTEIN) >>>> >>>> prot2= >>>> IMP >>>> .atom >>>> .Hierarchy.setup_particle(prot_ps[1],IMP.atom.Hierarchy.PROTEIN) >>>> >>>> #make the parts fragments and add to the molecules >>>> >>>> for e in [part1,part2,part3]: >>>> >>>> fh= >>>> IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >>>> >>>> #also make sure the part has radius >>>> prot1.add_child(fh) >>>> >>>> for e in [part4,part5,part6]: >>>> >>>> fh= >>>> IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >>>> >>>> #also make sure the part has radius >>>> prot2.add_child(fh) >>>> >>>> >>>> >>>> #create the restraint >>>> >>>> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >>>> >>>> cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) >>>> lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) >>>> connrest = IMP.core.ConnectivityRestraint(lrps) >>>> >>>> connrest.set_particles(prot_ps) >>>> >>>> m.add_restraint(connrest) >>>> >>>> >>>> On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote: >>>> >>>> I think the problem is that the list of particles the >>>> connectivity restraint >>>> ends up with is [p0,p1...p5]. You should just give it two >>>> particles, one for >>>> each protein (with radius and center computed from a sphere >>>> cover, or with >>>> the distance computed using a particle refiner). I doubt the code >>>> below ever >>>> really did what you wanted (although it might have happened to >>>> agree:-) >>>> >>>> I can explain better once I'm back in the US in two days. >>>> >>>> >>>> On Sep 21, 2009, at 2:30 PM, Friedrich Foerster <foerster@biochem.mpg.de >>>> > >>>> wrote: >>>> >>>> hi all, >>>> >>>> i noticed that the connectivity restraint must have changed at >>>> some point: >>>> >>>> i want to impose a restraint on two proteins, each consisting of >>>> >>>> several particles. thus, i am interested in restraining the closest >>>> >>>> pair between the two proteins. whereas the following code did >>>> what i >>>> >>>> need previously it now calculates all against all distances >>>> (including >>>> >>>> intra-protein distances) - which is not what i want. >>>> >>>> i'd be grateful if anyone could tell me how i need to change my >>>> pseudo code: >>>> >>>> >>>> prot1 = [part1,part2,part3] >>>> >>>> prot2 = [part4,part5,part6] >>>> >>>> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >>>> >>>> pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) >>>> >>>> connrest = IMP.core.ConnectivityRestraint(pairsc) >>>> >>>> for pps in [prot1,prot2]: >>>> >>>> connrest.add_particles(pps) >>>> >>>> to be explicit: the code now restrains distances in prot1 and >>>> prot2, >>>> >>>> which is what i do not want. i only want the inter-protein >>>> distances >>>> >>>> to be considered... >>>> >>>> thanks >>>> >>>> frido >>>> >>>> >>>> -- >>>> >>>> Dr. Friedrich Foerster >>>> >>>> Max-Planck Institut fuer Biochemie >>>> >>>> Am Klopferspitz 18 >>>> >>>> D-82152 Martinsried >>>> >>>> Tel: +49 89 8578 2651 >>>> >>>> Fax: +49 89 8578 2641 >>>> >>>> foerster@biochem.mpg.de >>>> >>>> www.tomotronic.org >>>> >>>> _______________________________________________ >>>> >>>> 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 >>>> >>>> >>> >>> >>> >>> -- >>> -- >>> >>> Dr. Friedrich Foerster >>> Max-Planck Institut fuer Biochemie >>> Am Klopferspitz 18 >>> D-82152 Martinsried >>> >>> Tel: +49 89 8578 2651 >>> Fax: +49 89 8578 2641 >>> >>> foerster@biochem.mpg.de >>> >>> www.tomotronic.org >>> _______________________________________________ >>> 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
On Wed, Sep 23, 2009 at 5:14 AM, Daniel Russel drussel@gmail.com wrote: > > On Sep 22, 2009, at 6:55 PM, Keren Lasker wrote: > >> Daniel - >> 1. does this solution means that f3-f5-f7 (and f0-f1-f2) are simplified to >> a single sphere ?
so i implemented option 1, which seems to do what i want (the restraint acting closest two spheres). to check that the code actually does the right thing (score the single shortest distance between (f3,f5,f7) and (f0,f1,f2)) i tried to return the connected pairs (=ONE pair for my desired restraint, not FIVE restraints for the undesired behavior). sadly, connrest.get_connected_pairs() returns my newly generated particles, which specify the interacting fragments. is there any way to return the actually interacting LowestRefined particles? otherwise, i cannot check that the code does the right thing (and the information is useful for me)...
thanks
frido
> > For solution 2, the distance measure used in the distance between the two > single spheres. For solution 1 it is the distance between the two closest > sphere fragments. >> >> 2. if this is the case, I am not sure it answers Frido's request as he >> would like to have ( i am guessing) a more accurate scoring term > > It was not clear from his emails which distance metric he wanted. > >> 3. and so - would not it be better to wrap the 3 fragments in a hierarchy >> ( that will of course be a child of the protein) ? > > Yes, solution 1. It does require manipulating a hierarchy a bit more (and > the create_fragment function is not well documented, I think it does what is > needed, but I have to check). > >> Keren. >> On Sep 22, 2009, at 3:45 PM, Daniel Russel wrote: >> >>> In general you need to associate a particle which each feature you want >>> to restrain since restraints generally act on a single set of equivalent >>> particles. For the connectivity case you have a bunch of options, all of >>> which do slightly different things. >>> >>> - create a fragment in the molecular hierarchy which includes the other >>> fragments (ie make this fragment the parent of the other fragments, the >>> create_fragment function should help, but needs to be better documented) and >>> then use a LowestRefinedPairScore >>> >>> - create cover particles which cover the fragments in question and do as >>> you did before with the connectivity restraint. You can use the >>> helper::create_cover function to set this up and then pass the created >>> particle to the connectivity restraint. I think this is closest to what you >>> need. I think we should have a simpler helper function which creates the >>> particle for you and hides the internal details. I'll add such over the next >>> couple days. Then code will be something like >>> >>> c0= IMP.helper.create_cover(IMP.Particles([f3,f5,f7])) >>> c1= IMP.helper.create_cover(IMP.Particles([f0,f1,f2]) >>> >>> sd= IMP.core.SphereDistancePairScore(IMP.Harmonic(0,1)) >>> cr= IMP.core.ConnectivityRestraint(sd) >>> cr.add_particle(c0) >>> cr.add_particle(c1) >>> >>> On Sep 22, 2009, at 4:46 AM, Friedrich Foerster wrote: >>> >>>> thanks. >>>> but the functionality is not sufficient for my needs as it is: i do >>>> not see any way to specify parts of a protein involved in an >>>> interaction. >>>> e.g., my proteins a and b each consist of 10 fragments. i have an >>>> interaction between A and B that involves the first 3 fragments of >>>> protein A and fragments 3,5,7 of protein B. how can i specify that >>>> restraint currently (it used to work previously ...). so i am not >>>> convinced why the old syntax had to go ... >>>> >>>> thanks >>>> >>>> frido >>>> >>>> On Mon, Sep 21, 2009 at 6:37 PM, Keren Lasker kerenl@salilab.org >>>> wrote: >>>>> >>>>> one correlation - >>>>> >>>>> Frido - this is how it should look like: >>>>> >>>>> #create the two proteins >>>>> prot_ps=IMP.Particles() >>>>> prot_ps.append(IMP.Particle(m)) >>>>> prot_ps.append(IMP.Particle(m)) >>>>> prot1= >>>>> >>>>> IMP.atom.Hierarchy.setup_particle(prot_ps[0],IMP.atom.Hierarchy.PROTEIN) >>>>> >>>>> prot2= >>>>> >>>>> IMP.atom.Hierarchy.setup_particle(prot_ps[1],IMP.atom.Hierarchy.PROTEIN) >>>>> >>>>> #make the parts fragments and add to the molecules >>>>> >>>>> for e in [part1,part2,part3]: >>>>> >>>>> fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >>>>> >>>>> #also make sure the part has radius >>>>> prot1.add_child(fh) >>>>> >>>>> for e in [part4,part5,part6]: >>>>> >>>>> fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT) >>>>> >>>>> #also make sure the part has radius >>>>> prot2.add_child(fh) >>>>> >>>>> >>>>> >>>>> #create the restraint >>>>> >>>>> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >>>>> >>>>> cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) >>>>> lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) >>>>> connrest = IMP.core.ConnectivityRestraint(lrps) >>>>> >>>>> connrest.set_particles(prot_ps) >>>>> >>>>> m.add_restraint(connrest) >>>>> >>>>> >>>>> On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote: >>>>> >>>>> I think the problem is that the list of particles the connectivity >>>>> restraint >>>>> ends up with is [p0,p1...p5]. You should just give it two particles, >>>>> one for >>>>> each protein (with radius and center computed from a sphere cover, or >>>>> with >>>>> the distance computed using a particle refiner). I doubt the code below >>>>> ever >>>>> really did what you wanted (although it might have happened to agree:-) >>>>> >>>>> I can explain better once I'm back in the US in two days. >>>>> >>>>> >>>>> On Sep 21, 2009, at 2:30 PM, Friedrich Foerster >>>>> foerster@biochem.mpg.de >>>>> wrote: >>>>> >>>>> hi all, >>>>> >>>>> i noticed that the connectivity restraint must have changed at some >>>>> point: >>>>> >>>>> i want to impose a restraint on two proteins, each consisting of >>>>> >>>>> several particles. thus, i am interested in restraining the closest >>>>> >>>>> pair between the two proteins. whereas the following code did what i >>>>> >>>>> need previously it now calculates all against all distances (including >>>>> >>>>> intra-protein distances) - which is not what i want. >>>>> >>>>> i'd be grateful if anyone could tell me how i need to change my pseudo >>>>> code: >>>>> >>>>> >>>>> prot1 = [part1,part2,part3] >>>>> >>>>> prot2 = [part4,part5,part6] >>>>> >>>>> ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.) >>>>> >>>>> pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY) >>>>> >>>>> connrest = IMP.core.ConnectivityRestraint(pairsc) >>>>> >>>>> for pps in [prot1,prot2]: >>>>> >>>>> connrest.add_particles(pps) >>>>> >>>>> to be explicit: the code now restrains distances in prot1 and prot2, >>>>> >>>>> which is what i do not want. i only want the inter-protein distances >>>>> >>>>> to be considered... >>>>> >>>>> thanks >>>>> >>>>> frido >>>>> >>>>> >>>>> -- >>>>> >>>>> Dr. Friedrich Foerster >>>>> >>>>> Max-Planck Institut fuer Biochemie >>>>> >>>>> Am Klopferspitz 18 >>>>> >>>>> D-82152 Martinsried >>>>> >>>>> Tel: +49 89 8578 2651 >>>>> >>>>> Fax: +49 89 8578 2641 >>>>> >>>>> foerster@biochem.mpg.de >>>>> >>>>> www.tomotronic.org >>>>> >>>>> _______________________________________________ >>>>> >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> -- >>>> >>>> Dr. Friedrich Foerster >>>> Max-Planck Institut fuer Biochemie >>>> Am Klopferspitz 18 >>>> D-82152 Martinsried >>>> >>>> Tel: +49 89 8578 2651 >>>> Fax: +49 89 8578 2641 >>>> >>>> foerster@biochem.mpg.de >>>> >>>> www.tomotronic.org >>>> _______________________________________________ >>>> 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 > >
On Sep 23, 2009, at 7:31 AM, Friedrich Foerster wrote:
> On Wed, Sep 23, 2009 at 5:14 AM, Daniel Russel drussel@gmail.com > wrote: >> >> On Sep 22, 2009, at 6:55 PM, Keren Lasker wrote: >> >>> Daniel - >>> 1. does this solution means that f3-f5-f7 (and f0-f1-f2) are >>> simplified to >>> a single sphere ? > > so i implemented option 1, which seems to do what i want (the > restraint acting closest two spheres). > to check that the code actually does the right thing (score the single > shortest distance between (f3,f5,f7) and (f0,f1,f2)) i tried to return > the connected pairs (=ONE pair for my desired restraint, not FIVE > restraints for the undesired behavior). sadly, > connrest.get_connected_pairs() returns my newly generated particles, > which specify the interacting fragments. is there any way to return > the actually interacting LowestRefined particles? otherwise, i cannot > check that the code does the right thing (and the information is > useful for me)... Good point. The easiest way around is for me to add add a method to the LowestRefinedPairScore that returns the actual pair given an input pair. Makes the verification two steps, but it is just verification, so being slightly annoying seems fine to me. I'll do that later today.
BTW, if you really only have an interaction between two sets of particles, you might as well skip the connectivityrestraint and just use a pairrestraint.
On Wed, Sep 23, 2009 at 4:42 PM, Daniel Russel drussel@gmail.com wrote: > > On Sep 23, 2009, at 7:31 AM, Friedrich Foerster wrote: > >> On Wed, Sep 23, 2009 at 5:14 AM, Daniel Russel drussel@gmail.com wrote: >>> >>> On Sep 22, 2009, at 6:55 PM, Keren Lasker wrote: >>> >>>> Daniel - >>>> 1. does this solution means that f3-f5-f7 (and f0-f1-f2) are simplified >>>> to >>>> a single sphere ? >> >> so i implemented option 1, which seems to do what i want (the >> restraint acting closest two spheres). >> to check that the code actually does the right thing (score the single >> shortest distance between (f3,f5,f7) and (f0,f1,f2)) i tried to return >> the connected pairs (=ONE pair for my desired restraint, not FIVE >> restraints for the undesired behavior). sadly, >> connrest.get_connected_pairs() returns my newly generated particles, >> which specify the interacting fragments. is there any way to return >> the actually interacting LowestRefined particles? otherwise, i cannot >> check that the code does the right thing (and the information is >> useful for me)... > > Good point. The easiest way around is for me to add add a method to the > LowestRefinedPairScore that returns the actual pair given an input pair. > Makes the verification two steps, but it is just verification, so being > slightly annoying seems fine to me. I'll do that later today.
thanks. that'd be ver useful for me.
> > BTW, if you really only have an interaction between two sets of particles, > you might as well skip the connectivityrestraint and just use a > pairrestraint.
? I need the msp functionality, i.e., the restraint should only use the shortest inter-fragment distance for scoring. i thought the ConnectivityRestraint is the appropriate restraint type. if PairRestraint does the same i could also use that - however, i have sometimes >2 fragments involved, so anyways, i'll need the ConnectivityRestraint, i guess. i'd encourage another thing for the documentation: it'd be useful to have a somewhat more informative short description (one sentence) for each class/function in IMP. for example, if PairRestraint calculates the msp between input particles if they have children, it'd be nice to tell that explicitly. even better would be to link to ConnectivityRestraint and highlight similarities/differences.
thanks
frido
_______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev > >
Do you guys know frido is now a real group leader, the only one, in wolfgang's group? :)
Andrej (Sent from my iPhone)
On Sep 23, 2009, at 10:06 AM, Friedrich Foerster <foerster@biochem.mpg.de > wrote:
> On Wed, Sep 23, 2009 at 4:42 PM, Daniel Russel drussel@gmail.com > wrote: >> >> On Sep 23, 2009, at 7:31 AM, Friedrich Foerster wrote: >> >>> On Wed, Sep 23, 2009 at 5:14 AM, Daniel Russel drussel@gmail.com >>> wrote: >>>> >>>> On Sep 22, 2009, at 6:55 PM, Keren Lasker wrote: >>>> >>>>> Daniel - >>>>> 1. does this solution means that f3-f5-f7 (and f0-f1-f2) are >>>>> simplified >>>>> to >>>>> a single sphere ? >>> >>> so i implemented option 1, which seems to do what i want (the >>> restraint acting closest two spheres). >>> to check that the code actually does the right thing (score the >>> single >>> shortest distance between (f3,f5,f7) and (f0,f1,f2)) i tried to >>> return >>> the connected pairs (=ONE pair for my desired restraint, not FIVE >>> restraints for the undesired behavior). sadly, >>> connrest.get_connected_pairs() returns my newly generated particles, >>> which specify the interacting fragments. is there any way to return >>> the actually interacting LowestRefined particles? otherwise, i >>> cannot >>> check that the code does the right thing (and the information is >>> useful for me)... >> >> Good point. The easiest way around is for me to add add a method to >> the >> LowestRefinedPairScore that returns the actual pair given an input >> pair. >> Makes the verification two steps, but it is just verification, so >> being >> slightly annoying seems fine to me. I'll do that later today. > > thanks. that'd be ver useful for me. > >> >> BTW, if you really only have an interaction between two sets of >> particles, >> you might as well skip the connectivityrestraint and just use a >> pairrestraint. > > ? > I need the msp functionality, i.e., the restraint should only use the > shortest inter-fragment distance for scoring. i thought the > ConnectivityRestraint is the appropriate restraint type. if > PairRestraint does the same i could also use that - however, i have > sometimes >2 fragments involved, so anyways, i'll need the > ConnectivityRestraint, i guess. > i'd encourage another thing for the documentation: it'd be useful to > have a somewhat more informative short description (one sentence) for > each class/function in IMP. for example, if PairRestraint calculates > the msp between input particles if they have children, it'd be nice to > tell that explicitly. even better would be to link to > ConnectivityRestraint and highlight similarities/differences. > > thanks > > frido > > _______________________________________________ >> IMP-dev mailing list >> IMP-dev@salilab.org >> https://salilab.org/mailman/listinfo/imp-dev >> >> > > > > -- > -- > > Dr. Friedrich Foerster > Max-Planck Institut fuer Biochemie > Am Klopferspitz 18 > D-82152 Martinsried > > Tel: +49 89 8578 2651 > Fax: +49 89 8578 2641 > > foerster@biochem.mpg.de > > www.tomotronic.org > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev
still a small guy who needs to code himself ;) anyway, the website is fabulous: www.biochem.mpg.de/foerster
cheers
frido
On Wed, Sep 23, 2009 at 5:19 PM, Andrej Sali sali@salilab.org wrote: > Do you guys know frido is now a real group leader, the only one, in > wolfgang's group? :) > > Andrej (Sent from my iPhone) >
--
Dr. Friedrich Foerster Max-Planck Institut fuer Biochemie Am Klopferspitz 18 D-82152 Martinsried
Tel: +49 89 8578 2651 Fax: +49 89 8578 2641
foerster@biochem.mpg.de
www.biochem.mpg.de/foerster
be careful what you wish for :) do you prefer to code or to write grant proposals? how i wish to be in your shoes :)
andrej
On Sep 24, 2009, at 7:20 AM, Friedrich Foerster wrote:
> still a small guy who needs to code himself ;) > anyway, the website is fabulous: > www.biochem.mpg.de/foerster > > cheers > > frido > > On Wed, Sep 23, 2009 at 5:19 PM, Andrej Sali sali@salilab.org wrote: >> Do you guys know frido is now a real group leader, the only one, in >> wolfgang's group? :) >> >> Andrej (Sent from my iPhone) >> > > -- > > Dr. Friedrich Foerster > Max-Planck Institut fuer Biochemie > Am Klopferspitz 18 > D-82152 Martinsried > > Tel: +49 89 8578 2651 > Fax: +49 89 8578 2641 > > foerster@biochem.mpg.de > > www.biochem.mpg.de/foerster > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev
-- Andrej Sali, Ph.D. Professor, Department of Bioengineering and Therapeutic Sciences Director, California Institute for Quantitative Biosciences at UCSF Department of Pharmaceutical Chemistry University of California at San Francisco UCSF MC 2552 Byers Hall Room 503B 1700 4th Street San Francisco, CA 94158-2330, USA Tel +1 (415) 514-4227; Fax +1 (415) 514-4231 Assistant, Ms. Hilary Mahon, Tel +1 (415)514-4228; Lab +1 (415) 514-4233, 4258 Email sali@salilab.org; Web http://salilab.org
> ? > I need the msp functionality, i.e., the restraint should only use the > shortest inter-fragment distance for scoring. i thought the > ConnectivityRestraint is the appropriate restraint type. if > PairRestraint does the same i could also use that - however, i have > sometimes >2 fragments involved, so anyways, i'll need the > ConnectivityRestraint, i guess. In the 2 sets case then the MST never changes (since it is always a single edge between the two parent particles). All the interesting computation is in the LowestRefinedPairScore, which could be passed to a PairRestraint directly. That is all I meant. In Frank's figure, the ConnectivityRestraint just implements the MST level, the LowestRefinedPairScore implements the first level of selection.
>> >> so i implemented option 1, which seems to do what i want (the >> restraint acting closest two spheres). >> to check that the code actually does the right thing (score the single >> shortest distance between (f3,f5,f7) and (f0,f1,f2)) i tried to return >> the connected pairs (=ONE pair for my desired restraint, not FIVE >> restraints for the undesired behavior). sadly, >> connrest.get_connected_pairs() returns my newly generated particles, >> which specify the interacting fragments. is there any way to return >> the actually interacting LowestRefined particles? otherwise, i cannot >> check that the code does the right thing (and the information is >> useful for me)... > > Good point. The easiest way around is for me to add add a method to the > LowestRefinedPairScore that returns the actual pair given an input pair. > Makes the verification two steps, but it is just verification, so being > slightly annoying seems fine to me. I'll do that later today. >
i ran into another problem in my restraint generation: in my model i use the MolecularHierarchy (protein->fragment). to make the restraint work on parts of the protein i introduce 'pseudo-fragments', which are then parents of the respective fragments. however, i now want to access the protein that a specific fragment belongs to. now my code is in the dilemma that there are two parents. i'd like to access the protein particle with the get_parent() function, but i end up with the pseudo-fragment used for restraint generation. can anybody provide my with a solution for 'multiple parents'. i presume one can deal with multiple hierarchies in imp, but i just do not know how...
thanks
frido
--
Dr. Friedrich Foerster Max-Planck Institut fuer Biochemie Am Klopferspitz 18 D-82152 Martinsried
Tel: +49 89 8578 2651 Fax: +49 89 8578 2641
foerster@biochem.mpg.de
www.tomotronic.org
> i ran into another problem in my restraint generation: > in my model i use the MolecularHierarchy (protein->fragment). to make > the restraint work on parts of the protein i introduce > 'pseudo-fragments', which are then parents of the respective > fragments. > however, i now want to access the protein that a specific fragment > belongs to. now my code is in the dilemma that there are two parents. > i'd like to access the protein particle with the get_parent() > function, but i end up with the pseudo-fragment used for restraint > generation. > can anybody provide my with a solution for 'multiple parents'. i > presume one can deal with multiple hierarchies in imp, but i just do > not know how... Two comments: - I was going to post an email about introducing "groups" or some such name which would provide a set of functions for easily defining higher level features (such as a group involving 3 fragments). Each group would be defined by a particle and there would be a standard refined. You could call a function "create_group(Particles)" to create such a group and then pass the resulting particle to ConnectivityRestraint or any other thing which takes a refiner.
You would not easily have the ability to get the set of groups that a particle belongs in (although that could be added) and the group particles themselves would not be atom.Hierarchy particles.
- In your case it sounds like just have a tree like this Protein: - fragment a - fragment 0 - fragment 1 - fragment b - fragment 2 - fragment 3
Then to get the protein you just go up in the tree until you get to a hierarchy node of type atom.Hierarchy.PROTEIN.
participants (4)
-
Andrej Sali
-
Daniel Russel
-
Friedrich Foerster
-
Keren Lasker