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

Re: [IMP-users] IMP-users Digest, Vol 10, Issue 2



On Mar 12, 2011, at 5:29 PM, Iain Moal wrote:

> Thank you for the reply Daniel.  I want to have something similar to the rigid body mover, except when the RigidBody object is moved, objects which are related to it by a Cn symmetry operation are moved in such as was as to preserve the symmetry, just as SymmetrySampler samples when using domino.
I think an easier way to do this is to set it up as a constraint. That is, let rb0 be your original rigid body and rb1 your symmetry related one (and tr the transform that relates them). Then one can implement a SingletonModifier (which, to be honest we should have already, but don't) called something like TransformedFrom that in its apply call does something like rb1.set_reference_frame(tr*rb0.get_reference_frame().get_transformation_to()) to force rb1 to be in the position defined by rb0. Then you would do
trfr= IMP.core.TransformedFrom(rb0, tr)
c= IMP.core.SingletonConstraint(trfr, None, rb1)
model.add_constraint(c)

See IMP.core.Transform for a class that is very similar to IMP.core.TransformedFrom (but not very useful).

Does that make sense?

> 
> I have tried this by adding an overloaded RigidBodyMover constructor which takes in a Particles*, and by creating a new 'SymmerticalRigidBodyMover' class in the core model.  However, after re-compiling, _IMP_core.so doesn't contain the new functions and crashes when I try to import IMP into python.  I've also tried creating a new module containg my desired Mover class, but it doesn't even compile.
There are three likely causes:
If "import IMP.core" works, but you can't use your new class, then probably you forgot to add the %include and IMP_SWIG_OBJECT lines to the swig.i-in in core/pyext (or didn't add the .cpp and .h to the SConscripts in core). 

If "import IMP.core" fails with an error about a missing symbol, then either, IMPCOREEXPORT is missing on the SymmerticalRigidBodyMover or one or more of the required functions for SymmerticalRigidBodyMover is not implemented in the .cpp file.

If you post error message, it might be clearer. There are an unfortunately large number of things that have to be in place to get a class working all the way through to python. I haven't been able to reduce the number much.


> 
> Thanks,
> Iain
> 
> ________________________________________
> From:  [] On Behalf Of  []
> Sent: 12 March 2011 20:00
> To: 
> Subject: IMP-users Digest, Vol 10, Issue 2
> 
> Send IMP-users mailing list submissions to
>        
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://salilab.org/mailman/listinfo/imp-users
> or, via email, send a message with subject or body 'help' to
>        
> 
> You can reach the person managing the list at
>        
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of IMP-users digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Symmetry (Daniel Russel)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 12 Mar 2011 11:58:04 -0800
> From: Daniel Russel <>
> Subject: Re: [IMP-users] Symmetry
> To: Help and discussion for users of IMP <>,
>        Keren Lasker <>
> Message-ID: <>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> On Mar 11, 2011, at 12:05 AM, Iain Moal wrote:
> 
>> Hi,
>> I am new to IMP so please fogive naievity!
>> Is it possible to use IMP::domino::SymmetrySampler as a Monte Carlo mover?  If not, how could I impliment it as a mover.  It isn't evident how I could impliment this using MoverBase, nor what the list of attributes are for.
> I'm unclear on exactly what you would want as your move set? Picking a random choice from a discrete set? Chances are that you want to use the X,Y,Z coordinate keys as the float attributes list when using the MoverBase (you can get those from IMP::core::XYZ::get_coordinate_keys()). If you then store a list of coordinate values in your Mover, you can pick one of those for each particle to be moved and do IMP::core::XYZ(p).set_coordinates(new_coordinates) to change them.
> 
> Does that help?
> 
> 
>> Also, when reconstructing em maps, such as in particles2density, I get this warning:
>> WARNING  could not find parameters for radius:8.16743
>> EM map is using default params
>> 
>> What does this mean, are the default params ok?
> Keren will have to answer this.
> 
>         Daniel
> 
> 
> ------------------------------
> 
> _______________________________________________
> IMP-users mailing list
> 
> https://salilab.org/mailman/listinfo/imp-users
> 
> 
> End of IMP-users Digest, Vol 10, Issue 2
> ****************************************
> 
> This communication is from Cancer Research UK. Our website is at www.cancerresearchuk.org. We are a registered charity in England and Wales (1089464) and in Scotland (SC041666) and a company limited by guarantee registered in England and Wales under number 4325234. Our registered address is Angel Building, 407 St John Street, London, EC1V 4AD. Our central telephone number is 020 7242 0200.
> 
> This communication and any attachments contain information which is confidential and may also be privileged.   It is for the exclusive use of the intended recipient(s).  If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful.  If you have received this communication in error, please notify the sender and delete the email and destroy any copies of it.
> 
> E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses.  We do not accept liability for any such matters or their consequences.  Anyone who communicates with us by e-mail is taken to accept the risks in doing so.
> 
> _______________________________________________
> IMP-users mailing list
> 
> https://salilab.org/mailman/listinfo/imp-users