-
Notifications
You must be signed in to change notification settings - Fork 18
/
wtT4L.py
115 lines (96 loc) · 4.97 KB
/
wtT4L.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
from __future__ import print_function
# -*- coding: utf-8 -*-
"""
Copyright Notice
================
Copyright (C) 2016 Blaine Mooers
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
http://www.gnu.org/licenses/.
The source code in this file is copyrighted, but you can
freely use and copy it as long as you don't change or
remove any of the copyright notices.
Blaine Mooers, PhD
blaine-mooers@ouhsc.edu
975 NE 10th St, BRC 466
University of Oklahoma Health Sciences Center,
Oklahoma City, OK, USA 73104
"""
from pymol import cmd
__author__ = "Blaine Mooers"
__copyright__ = "Blaine Mooers, University of Oklahoma Health Sciences Center, Oklahoma City, OK, USA 73104"
__license__ = "GPL-3"
__version__ = "1.0.3"
__credits__ = ["William Beasley","Chiedza Kanyumbu"] # people who reported bug fixes, made suggestions, etc.
__date__ = "24 July 2016"
__maintainer__ = "Blaine Mooers"
__email__ = "blaine-mooers@ouhsc.edu"
__status__ = "Production"
print("Enter the name of the alias to the left of the semicolon.")
print(" ")
print("site11: the active side glutamate Glu11")
print(" ")
print("site31: the His31-Asp 70 salt bridge in which His31's pKa")
print(" is shifted by 3 orders of magnitude")
print(" ")
print("site96: the site of the Arg96-->His mutation that has a large loss in stability")
print(" that was hard to explain from the structure alone.")
print(" ")
print("site99: the Leu99-->Ala mutant protein has a large cavity")
print(" that can accomodate benzene.")
print(" ")
print("site145: poor H-bond geometery between Arg-145 and ")
print(" Glu-11 suggests that the pKa of Glu11 is shifted upwards ")
print(" by the unfavroable interactions.")
print(" ")
print("Type 'help wtT4L' for more information. ")
print(" ")
def wtT4L():
"""
DESCRIPTION
Creates aliases to compound commands or horizontal scripts. The compound commands
are executed in PyMOL by typing their name. The command
wtT4L.py only needs to be run once in a PyMOL session to
create the aliases. The aliases disappear upon ending
the PyMOL session. The names of the aliases and a short description
of each aliases is printed to the command history window.
LIMITATIONS
The site31 alias requires the additional script 'wtT4Llabels.pml' must
be present in the same directory as the wtT4L.py. You may have to
give the full path to site31labels.pml if it is not in the present
working directory.
After changing the molecule's orientation, run the program
'roundview.py' to obtained a short version of the viewport settings.
USAGE
run wtT4L.py
Then enter the name of an alias from the list above, for example:
site11
To reuse of parts or all of the above commands, copy and paste the commands
onto the command line or into a plain text file.
These commands are sufficient for most editing tasks:
To edit code, positon cursor on command line with left mouse button.
Control-e moves the cursor to the end of the line, even when it is out of view.
Control-a moves the cursor to the beginning of the line, even when it is out of view.
Up arrow key recalls last line of commands for editing.
These commands may not be available on all systems:
Shift-control-a selects everything from the right of the cursor to the end of the line.
Shift-control-e selects everything to the left of the cursor to the end of the line.
Command-f moves the cursor to the end of the current word.
Command-b moves the cursor to the begining of the current word.
Control-f moves the cursor to the right by one character.
Control-b moves the cursor to the left by one character.
"""
cmd.extend('wtT4L',wtT4L)
print(wtT4L.__doc__)
cmd.bg_color("white")
cmd.fetch(code="3fa0", name="wtT4L",state = 0,async='0')
cmd.alias('site11', 'zoom resi 11; preset.technical("wtT4L")')
cmd.alias('site31', 'preset.ball_and_stick("wtT4L");@S3_File.pml;set_view (0.31,-0.93,0.21,0.92,0.24,-0.29,0.22,0.28,0.93,-0.09,-0.05,-9.88,37.55,10.06,30.09,20.0,23.82,-20.0);')
cmd.alias('site96', 'preset.technical("wtT4L");set_view (-0.75,-0.65,0.11,0.62,-0.75,-0.22,0.22,-0.1,0.97,0.0,-0.0,-32.32,29.16,-1.45,6.77,27.32,37.32,-20.0);')
cmd.alias('site99', 'preset.ball_and_stick("wtT4L");color bluewhite, i. 99; set_view (-0.24,-0.95,-0.21,0.51,0.07,-0.85,0.83,-0.32,0.46,0.03,-0.5,-5.37,22.35,-18.6,18.83,29.89,37.68,-20.0);')
cmd.alias('site145', 'preset.technical("wtT4L");set_view (0.02,-0.63,-0.78,0.37,0.73,-0.56,0.93,-0.27,0.24,0.19,-0.3,-0.0,24.28,2 .24,13.53,15.23,21.26,-20.0);')