> Python has a global dictionary called sys.modules which lists all modules that have been loaded. So once you've loaded a module, you can use it for the rest of the lifetime of the interpreter. While IMP.algebra isn't loaded in the script itself, it is loaded by one of the modules that the script loads. I agree it would be clearer if the script loaded the module itself though.
After a few tests I have a better understanding of the mechanism. In fact, there seem to be a special behavior when handling packages : once a packaged module is imported, it is accessible to other modules in that package without further importations. This seems not to be the case when dealing with unpackaged modules.
> Where are you seeing that in the documentation? According to > http://salilab.org/imp/1.0/doc/html/namespaceIMP_1_1em.html > it returns a FittingSolutions object. you are right, I was not reading the good manual : https://salilab.org/imp/doc/html/namespaceIMP_1_1em.html#d07d358082b943413d6... I think I landed here from the "documentation" link on the wiki pages : http://salilab.org/imp/wiki/
>> 4.) Is there a difference between prot_rb.set_transformation and IMP.core.transform ? > Yes, and this has been a constant source of confusion, so a way of simplifying it would be nice. The current orientation of a rigid body is defined by a transformation (equivalent to the x,y,z coordinates of a simple point). set_transformation() replaces this transformation with another one (equivalent to set_coordinates() on an IMP.core.XYZ). transform() transforms a rigid body, that is it composes the previous transformation with the supplied one and calls set_transformation() with that (equivalent to transforming the coordinates of an IMP.core.XYZ). With your explanations and after a few more tests I finally understand.
Thank you all for your very fast answers