Re: [PyMOL] Algorithm to Rotate One Set of Vectors onto Another
Hi Buz, To my opinion, this is not the best place for your question. Pymol is a molecular viewer... But the question itself is basically trivial from the linear algebra point of view. If X is your source set of orthogonal vectors and Y is the target, then you should have some sort of matrix R to satisfy Y = RX But, since it should only be a rotation, you'll first have to transform X and Y to their orthonormal counterparts N and M: M = RN Then MN^-1=RNN^-1 such that R = MN^-1 If both sets are of equal dimensions (and full rank), there's an exact solution. Otherwise, there's a bit more trouble... So, taking your favourite language with the proper linear algebra package, it comes down to: normalize X - N normalize Y - M invert N multiply M with the inverse of N By the way, you're probably dealing with 3x3 matrices here (molecules in cartesian space), in which case the routines are simple enough to write down yourself (I believe these were even in the array.py I posted like two days ago). Hope it helps, Tsjerk On Jan 25, 2008 10:55 PM, Buz Barstow b...@mac.com wrote: Dear All, I'm looking for an algorithm that will allow me to derive a transformation matrix that superimposes one set of orthogonal vectors onto another set of orthogonal vectors, that I can then use to transform another set of orthogonal vectors. Thanks! and all the best, --Buz - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623
Re: [PyMOL] algorithm for alignment
Am Samstag, 26. Januar 2008 schrieb Lu Lin: Hi, Abhi, You mean save them separately? Is there some way to save them into one file? Thanks!! By default, the save command should save all (visible?) atoms. Should be in documentation of save. Any way you can also make a selection of your two molecules and save the selection to one file. Even if you have two files, cat will produce a single file quicker than loading them into pymol ;-) Best Martin
Re: [PyMOL] algorithm for alignment
Hi, 'save' will save all atoms by default, not only the visible ones. cat in Linux will surely be more efficient than loading in Pymol and saving, but the question related to alignment. cat doesn't do that for you. So the procedure would be: load A.pdb,A load B.pdb,B align A,B save AB-aligned.pdb Just one addition, Pymol may reorder the atoms. If this is okay (it won't matter for subsequent displaying), don't bother. Otherwise, before saving you might want to 'set retain_order,on' Cheers, Tsjerk On Jan 26, 2008 11:11 AM, Martin Höfling martin.hoefl...@gmx.de wrote: Am Samstag, 26. Januar 2008 schrieb Lu Lin: Hi, Abhi, You mean save them separately? Is there some way to save them into one file? Thanks!! By default, the save command should save all (visible?) atoms. Should be in documentation of save. Any way you can also make a selection of your two molecules and save the selection to one file. Even if you have two files, cat will produce a single file quicker than loading them into pymol ;-) Best Martin - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623