From: Tereza Č. <ter...@na...> - 2022-04-27 12:33:46
|
Hello, I am trying to use the Pymol API to align some structures with the `cmd.align` command. It seems that it does not work correctly though. I have made a picture before running the `cmd.align` and after running it, the pictures look the same. Before alignment: https://pasteboard.co/1RtHTgy7iOKC.png/ [image: test_nonaligned.png] After alignment: https://pasteboard.co/ta0YVyaLbaE4.png [image: test_aligned.png] When I use the Pymol user interface on the same computer and I align the same structures, they align very well. Aligned: https://pasteboard.co/gr2hsa8whb47.png [image: aligned_structures.png] The version of Pymol I am using: pymol-2.3.4 Here is the script which I used: #!/bin/env python from pymol import cmd import os cmd.load('tps_structures/' + 'A0A140AZ69' + '.pdb') cmd.load('tps_structures/' + 'A0A140AZ72' + '.pdb') cmd.show_as('cartoon') cmd.spectrum( "resi", "rainbow", 'A0A140AZ69') cmd.spectrum( "resi", "rainbow", 'A0A140AZ72') cmd.png(os.path.join('test_nonaligned' + '.png'), 1200, 1200, 300, 1) reference = 'A0A140AZ69' cmd.align(reference, 'A0A140AZ72', cutoff=2.0, cycles=20, quiet=0) cmd.png(os.path.join('test_aligned' + '.png'), 1200, 1200, 300, 1) cmd.hide('cartoon', 'A0A140AZ69') cmd.hide('cartoon', 'A0A140AZ72') cmd.show_as('cartoon', 'A0A140AZ69') cmd.png(os.path.join('test_aligned_A0A140AZ69' + '.png'), 1200, 1200, 300, 1 ) cmd.hide('cartoon', 'A0A140AZ69') cmd.show_as('cartoon', 'A0A140AZ72') cmd.png(os.path.join('test_aligned_A0A140AZ72' + '.png'), 1200, 1200, 300, 1 ) cmd.hide('cartoon', 'A0A140AZ72') I appreciate any help on how to make the cmd.align work. Thank you Tereza -- Tereza Čalounová Charles University Faculty of Science Albertov 6, 128 43 Praha 2 www.natur.cuni.cz/en |