## Re: [PyMOL] transformation matrix

 Re: [PyMOL] transformation matrix From: Lieven Buts - 2004-10-22 12:59:33 ```On Friday 22 October 2004 02:07, Milton H. Werner, Ph.D. wrote: > I assume there is a way in pymol to read a DALI rotation/transformation > matrix so that two dissimilar molecules can be intelligently aligned. > Can someone tell me how it is done? I have a simple Python script that extracts the transformation matrices from the Dali report file. If someone has a way to use this matrix in PyMol, we'd be set: #!/usr/bin/env python # Script to extract 3x4 transformation matrices from Dali report files # Lieven Buts, 22-Oct-2004 import re,sys dali = open(sys.argv[1],"r") pattern = re.compile(r'^## MATRICES') # Find section with matrices line = dali.readline() while not pattern.match(line): line = dali.readline() dummy = dali.readline() pattern = re.compile(r'^ *\$') line = dali.readline() while not pattern.match(line): # Read matrices until first empty line one = line.split() two = dali.readline().split() three = dali.readline().split() code = one[2] matrix = [ one[4],one[5],one[6],one[7], two[4],two[5],two[6],two[7], three[4],three[5],three[6],three[7] ] matrix = tuple(map(float,matrix)) print code print ("%8.3f %8.3f %8.3f %8.3f\n" * 3) % matrix print line = dali.readline() Cheers, -- Lieven Buts Department of Ultrastructure Vrije Universiteit Brussel ```

 [PyMOL] transformation matrix From: Milton H. Werner, Ph.D. - 2004-10-22 00:07:57 ```Hi, I assume there is a way in pymol to read a DALI rotation/transformation matrix so that two dissimilar molecules can be intelligently aligned. Can someone tell me how it is done? Thanks, Milton -- Associate Professor and Head, Laboratory of Molecular Biophysics The Rockefeller University 1230 York Avenue, Box 42 New York, NY 10021 212/327-7221 212/327-7222 FAX 917/494-0831 cell mwerner@... http://www.rockefeller.edu/labheads/werner/index.php ```
 Re: [PyMOL] transformation matrix From: Lieven Buts - 2004-10-22 12:59:33 ```On Friday 22 October 2004 02:07, Milton H. Werner, Ph.D. wrote: > I assume there is a way in pymol to read a DALI rotation/transformation > matrix so that two dissimilar molecules can be intelligently aligned. > Can someone tell me how it is done? I have a simple Python script that extracts the transformation matrices from the Dali report file. If someone has a way to use this matrix in PyMol, we'd be set: #!/usr/bin/env python # Script to extract 3x4 transformation matrices from Dali report files # Lieven Buts, 22-Oct-2004 import re,sys dali = open(sys.argv[1],"r") pattern = re.compile(r'^## MATRICES') # Find section with matrices line = dali.readline() while not pattern.match(line): line = dali.readline() dummy = dali.readline() pattern = re.compile(r'^ *\$') line = dali.readline() while not pattern.match(line): # Read matrices until first empty line one = line.split() two = dali.readline().split() three = dali.readline().split() code = one[2] matrix = [ one[4],one[5],one[6],one[7], two[4],two[5],two[6],two[7], three[4],three[5],three[6],three[7] ] matrix = tuple(map(float,matrix)) print code print ("%8.3f %8.3f %8.3f %8.3f\n" * 3) % matrix print line = dali.readline() Cheers, -- Lieven Buts Department of Ultrastructure Vrije Universiteit Brussel ```