1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """The frame_order user function definitions."""
24
25
26 import dep_check
27 if dep_check.wx_module:
28 from wx import FD_SAVE
29 else:
30 FD_SAVE = -1
31
32
33 from specific_fns.setup import frame_order_obj
34 from graphics import WIZARD_IMAGE_PATH
35 from user_functions.data import Uf_info; uf_info = Uf_info()
36 from user_functions.objects import Desc_container
37
38
39
40 uf_class = uf_info.add_class('frame_order')
41 uf_class.title = "Class containing the user functions of the Frame Order theories."
42 uf_class.menu_text = "&frame_order"
43 uf_class.gui_icon = "relax.frame_order"
44
45
46
47 uf = uf_info.add_uf('frame_order.cone_pdb')
48 uf.title = "Create a PDB file representing the Frame Order cone models."
49 uf.title_short = "Cone model PDB creation."
50 uf.add_keyarg(
51 name = "size",
52 default = 30.0,
53 py_type = "num",
54 desc_short = "geometric object size",
55 desc = "The size of the geometric object in Angstroms."
56 )
57 uf.add_keyarg(
58 name = "inc",
59 default = 40,
60 py_type = "int",
61 desc_short = "increment number",
62 desc = "The number of increments used to create the geometric object.",
63 wiz_element_type = "spin"
64 )
65 uf.add_keyarg(
66 name = "file",
67 default = "cone.pdb",
68 py_type = "str",
69 arg_type = "file sel",
70 desc_short = "file name",
71 desc = "The name of the PDB file to create.",
72 wiz_filesel_wildcard = "PDB files (*.pdb)|*.pdb;*.PDB",
73 wiz_filesel_style = FD_SAVE
74 )
75 uf.add_keyarg(
76 name = "dir",
77 py_type = "str",
78 arg_type = "dir",
79 desc_short = "directory name",
80 desc = "The directory where the file is to be located.",
81 can_be_none = True
82 )
83 uf.add_keyarg(
84 name = "force",
85 default = False,
86 py_type = "bool",
87 desc_short = "force flag",
88 desc = "A flag which, if set to True, will overwrite the any pre-existing file."
89 )
90
91 uf.desc.append(Desc_container())
92 uf.desc[-1].add_paragraph("This function creates a PDB file containing an artificial geometric structure representing the Frame Order cone models.")
93 uf.desc[-1].add_paragraph("There are four different types of residue within the PDB. The pivot point is represented as as a single carbon atom of the residue 'PIV'. The cone consists of numerous H atoms of the residue 'CON'. The cone axis vector is presented as the residue 'AXE' with one carbon atom positioned at the pivot and the other x Angstroms away on the cone axis (set by the geometric object size). Finally, if Monte Carlo have been performed, there will be multiple 'MCC' residues representing the cone for each simulation, and multiple 'MCA' residues representing the multiple cone axes.")
94 uf.desc[-1].add_paragraph("To create the diffusion in a cone PDB representation, a uniform distribution of vectors on a sphere is generated using spherical coordinates with the polar angle defined by the cone axis. By incrementing the polar angle using an arccos distribution, a radial array of vectors representing latitude are created while incrementing the azimuthal angle evenly creates the longitudinal vectors. These are all placed into the PDB file as H atoms and are all connected using PDB CONECT records. Each H atom is connected to its two neighbours on the both the longitude and latitude. This creates a geometric PDB object with longitudinal and latitudinal lines representing the filled cone.")
95 uf.backend = frame_order_obj._cone_pdb
96 uf.menu_text = "&cone_pdb"
97 uf.gui_icon = "oxygen.actions.document-save"
98 uf.wizard_height_desc = 400
99 uf.wizard_size = (1000, 750)
100 uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'
101
102
103
104 uf = uf_info.add_uf('frame_order.domain_to_pdb')
105 uf.title = "Match the domains to PDB files."
106 uf.title_short = "Domains to PDB matching."
107 uf.add_keyarg(
108 name = "domain",
109 py_type = "str",
110 desc_short = "domain",
111 desc = "The domain to associate the PDB file to."
112 )
113 uf.add_keyarg(
114 name = "pdb",
115 py_type = "str",
116 desc_short = "PDB file",
117 desc = "The PDB file to associate the domain to."
118 )
119
120 uf.desc.append(Desc_container())
121 uf.desc[-1].add_paragraph("To display the frame order cone models within Pymol, the two domains need to be associated with PDB files. Then the reference domain will be fixed in the PDB frame, and the moving domain will be rotated to its average position.")
122
123 uf.desc.append(Desc_container("Prompt examples"))
124 uf.desc[-1].add_paragraph("To set the 'N' domain to the PDB file 'bax_N_1J7O_1st.pdb', type one of:")
125 uf.desc[-1].add_prompt("relax> frame_order.domain_to_pdb('N', 'bax_N_1J7O_1st.pdb')")
126 uf.desc[-1].add_prompt("relax> frame_order.domain_to_pdb(domain='N', pdb='bax_N_1J7O_1st.pdb')")
127 uf.backend = frame_order_obj._domain_to_pdb
128 uf.menu_text = "&domain_to_pdb"
129 uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'
130
131
132
133 uf = uf_info.add_uf('frame_order.pivot')
134 uf.title = "Set the pivot point for the two body motion in the structural coordinate system."
135 uf.title_short = "Pivot point setting."
136 uf.add_keyarg(
137 name = "pivot",
138 py_type = "num_list",
139 dim = 3,
140 desc_short = "pivot point",
141 desc = "The pivot point for the motion (e.g. the position between the 2 domains in PDB coordinates)."
142 )
143
144 uf.desc.append(Desc_container())
145 uf.desc[-1].add_paragraph("This will set the pivot point for the two domain system within the PDB coordinate system. This is required for interpreting PCS data as well as for the generation of cone or other PDB representations of the domain motions.")
146
147 uf.desc.append(Desc_container("Prompt examples"))
148 uf.desc[-1].add_paragraph("To set the pivot point, type one of:")
149 uf.desc[-1].add_prompt("relax> frame_order.pivot([12.067, 14.313, -3.2675])")
150 uf.desc[-1].add_prompt("relax> frame_order.pivot(pivot=[12.067, 14.313, -3.2675])")
151 uf.backend = frame_order_obj._pivot
152 uf.menu_text = "&pivot"
153 uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'
154
155
156
157 uf = uf_info.add_uf('frame_order.ref_domain')
158 uf.title = "Set the reference domain for the '2-domain' Frame Order theories."
159 uf.title_short = "Reference domain setting."
160 uf.add_keyarg(
161 name = "ref",
162 py_type = "str",
163 desc_short = "reference frame",
164 desc = "The domain which will act as the frame of reference. This is only valid for the '2-domain' Frame Order theories."
165 )
166
167 uf.desc.append(Desc_container())
168 uf.desc[-1].add_paragraph("Prior to optimisation of the '2-domain' Frame Order theories, which of the two domains will act as the frame of reference must be specified. This is important for the attachment of cones to domains, etc.")
169
170 uf.desc.append(Desc_container("Prompt examples"))
171 uf.desc[-1].add_paragraph("To set up the isotropic cone frame order model with 'centre' domain being the frame of reference, type:")
172 uf.desc[-1].add_prompt("relax> frame_order.ref_domain(ref='centre')")
173 uf.backend = frame_order_obj._ref_domain
174 uf.menu_text = "&ref_domain"
175 uf.gui_icon = "oxygen.actions.edit-rename"
176 uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'
177
178
179
180 uf = uf_info.add_uf('frame_order.select_model')
181 uf.title = "Select and set up the Frame Order model."
182 uf.title_short = "Model choice."
183 uf.add_keyarg(
184 name = "model",
185 py_type = "str",
186 desc_short = "Frame Order model",
187 desc = "The name of the preset Frame Order model.",
188 wiz_element_type = "combo",
189 wiz_combo_choices = [
190 "Free rotor model",
191 "Rigid model",
192 "Rotor model",
193 "Free rotor line model",
194 "Torsionless line model",
195 "Line model",
196 "Free rotor isotropic cone",
197 "Torsionless isotropic cone",
198 "Isotropic cone",
199 "Free rotor pseudo-ellipse",
200 "Torsionless pseudo-ellipse",
201 "Pseudo-ellipse"
202 ],
203 wiz_combo_data = [
204 "free rotor",
205 "rigid",
206 "rotor",
207 "line, free rotor",
208 "line, torsionless",
209 "line",
210 "iso cone, free rotor",
211 "iso cone, torsionless",
212 "iso cone",
213 "pseudo-ellipse, free rotor",
214 "pseudo-ellipse, torsionless",
215 "pseudo-ellipse"
216 ],
217 wiz_read_only = True,
218 )
219
220 uf.desc.append(Desc_container())
221 uf.desc[-1].add_paragraph("Prior to optimisation, the Frame Order model should be selected. These models consist of three parameter categories:")
222 uf.desc[-1].add_list_element("The average domain position. This includes the parameters ave_pos_alpha, ave_pos_beta, and ave_pos_gamma. These Euler angles rotate the tensors from the arbitrary PDB frame of the moving domain to the average domain position.")
223 uf.desc[-1].add_list_element("The frame order eigenframe. This includes the parameters eigen_alpha, eigen_beta, and eigen_gamma. These Euler angles define the major modes of motion. The cone central axis is defined as the z-axis. The pseudo-elliptic cone x and y-axes are defined as the x and y-axes of the eigenframe.")
224 uf.desc[-1].add_list_element("The cone parameters. These are defined as the tilt-torsion angles cone_theta_x, cone_theta_y, and cone_sigma_max. The cone_theta_x and cone_theta_y parameters define the two cone opening angles of the pseudo-ellipse. The amount of domain torsion is defined as the average domain position, plus and minus cone_sigma_max. The isotropic cones are defined by setting cone_theta_x = cone_theta_y and converting the single parameter into a 2nd rank order parameter.")
225 uf.desc[-1].add_paragraph("The list of available models are:")
226 uf.desc[-1].add_item_list_element("'pseudo-ellipse'", "The pseudo-elliptic cone model. This is the full model consisting of the parameters ave_pos_alpha, ave_pos_beta, ave_pos_gamma, eigen_alpha, eigen_beta, eigen_gamma, cone_theta_x, cone_theta_y, and cone_sigma_max.")
227 uf.desc[-1].add_item_list_element("'pseudo-ellipse, torsionless'", "The pseudo-elliptic cone with the torsion angle cone_sigma_max set to zero.")
228 uf.desc[-1].add_item_list_element("'pseudo-ellipse, free rotor'", "The pseudo-elliptic cone with no torsion angle restriction.")
229 uf.desc[-1].add_item_list_element("'iso cone'", "The isotropic cone model. The cone is defined by a single order parameter s1 which is related to the single cone opening angle cone_theta_x = cone_theta_y. Due to rotational symmetry about the cone axis, the average position alpha Euler angle ave_pos_alpha is dropped from the model. The symmetry also collapses the eigenframe to a single z-axis defined by the parameters axis_theta and axis_phi.")
230 uf.desc[-1].add_item_list_element("'iso cone, torsionless'", "The isotropic cone model with the torsion angle cone_sigma_max set to zero.")
231 uf.desc[-1].add_item_list_element("'iso cone, free rotor'", "The isotropic cone model with no torsion angle restriction.")
232 uf.desc[-1].add_item_list_element("'line'", "The line cone model. This is the pseudo-elliptic cone with one of the cone angles, cone_theta_y, assumed to be statistically negligible. I.e. the cone angle is so small that it cannot be distinguished from noise.")
233 uf.desc[-1].add_item_list_element("'line, torsionless'", "The line cone model with the torsion angle cone_sigma_max set to zero.")
234 uf.desc[-1].add_item_list_element("'line, free rotor'", "The line cone model with no torsion angle restriction.")
235 uf.desc[-1].add_item_list_element("'rotor'", "The only motion is a rotation about the cone axis restricted by the torsion angle cone_sigma_max.")
236 uf.desc[-1].add_item_list_element("'rigid'", "No domain motions.")
237 uf.desc[-1].add_item_list_element("'free rotor'", "The only motion is free rotation about the cone axis.")
238
239 uf.desc.append(Desc_container("Prompt examples"))
240 uf.desc[-1].add_paragraph("To select the isotropic cone model, type:")
241 uf.desc[-1].add_prompt("relax> frame_order.select_model(model='iso cone')")
242 uf.backend = frame_order_obj._select_model
243 uf.menu_text = "&select_model"
244 uf.gui_icon = "oxygen.actions.list-add"
245 uf.wizard_height_desc = 560
246 uf.wizard_size = (1000, 750)
247 uf.wizard_apply_button = False
248 uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'
249