allpy
changeset 1025:b5a910f0980f
blocks_to_pymol(): hide all except involved chains, represented as cartoon
author | Boris Nagaev <bnagaev@gmail.com> |
---|---|
date | Thu, 15 Mar 2012 23:07:25 +0400 |
parents | b187b16c7532 |
children | ca2cf2377bed |
files | allpy/structure.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/allpy/structure.py Thu Mar 15 19:50:25 2012 +0400 1.2 +++ b/allpy/structure.py Thu Mar 15 23:07:25 2012 +0400 1.3 @@ -509,6 +509,7 @@ 1.4 1.5 TODO: Each block is shown in one pymol frame. 1.6 NOTE: Currently superimpose using first block 1.7 + NOTE: Hide everything except involved chains, represented as cartoon 1.8 """ 1.9 def sequence_to_pdb(s): 1.10 return pdb_id_parse(s.pdb_chain.get_parent().get_parent().get_id())['code'] 1.11 @@ -530,6 +531,9 @@ 1.12 file.write("pair_fit %(fit_to)s, %(fit_from)s\n" % 1.13 {'fit_to': block_line(block, fit_to), 1.14 'fit_from': block_line(block, fit_from)}) 1.15 + file.write("hide everything, all\n") 1.16 + for s in self.sequences: 1.17 + file.write("show cartoon, %(seq)s\n" % {'seq': sequence_line(s)}) 1.18 1.19 class BlockMixin(base.Block, AlignmentMixin): 1.20 """Mixin to add 3D properties to blocks.