Package auto_analyses :: Module frame_order :: Class Frame_order_analysis
[hide private]
[frames] | no frames]

Class Frame_order_analysis

source code

The frame order auto-analysis protocol.

Instance Methods [hide private]
 
__init__(self, data_pipe_full=None, data_pipe_subset=None, pipe_bundle=None, results_dir=None, pre_run_dir=None, opt_rigid=None, opt_subset=None, opt_full=None, opt_mc=None, mc_sim_num=500, models=['rigid', 'rotor', 'free rotor', 'iso cone, torsionless', 'iso..., brownian_step_size=2.0, brownian_snapshot=10, brownian_total=1000, dist_total=1000, dist_max_rotations=1000000, results_compress_type=1, rigid_grid_split=False, store_intermediate=True, nested_params_ave_dom_pos=True)
Perform the full frame order analysis.
source code
 
axis_permutation_analysis(self, model=None)
Handle the two local minima in the pseudo-elliptic models.
source code
 
check_vars(self)
Check that the user has set the variables correctly.
source code
list of int and None
custom_grid_incs(self, model, inc=None, pivot_search=True)
Set up a customised grid search increment number for each model.
source code
 
nested_params_ave_dom_pos(self, model)
Copy the average domain parameters from simpler nested models for faster optimisation.
source code
 
nested_params_eigenframe(self, model)
Copy the eigenframe parameters from simpler nested models for faster optimisation.
source code
 
nested_params_order(self, model)
Copy the order parameters from simpler nested models for faster optimisation.
source code
 
nested_params_pivot(self, model)
Copy the pivot parameters from simpler nested models for faster optimisation.
source code
 
nested_models(self)
Protocol for the nested optimisation of the frame order models.
source code
 
optimisation(self, model=None, opt=None, pcs_text=None, intermediate_dir=None)
Perform the grid search and minimisation.
source code
 
optimise_rigid(self)
Optimise the rigid frame order model.
source code
 
print_results(self)
Print out the optimisation results for the current data pipe.
source code
bool
read_results(self, model=None, pipe_name=None, pre_run=False)
Attempt to read old results files.
source code
list of str
reorder_models(self, models=None)
Reorder the frame order models to enable the nested parameter copying protocol.
source code
 
results_output(self, dir=None, model=None, results_file=True, simulation=True)
Create visual representations of the frame order results for the given model.
source code
 
sobol_setup(self, info=None)
Correctly handle the frame_order.sobol_setup user function.
source code
Class Variables [hide private]
  _final_state = True
Method Details [hide private]

__init__(self, data_pipe_full=None, data_pipe_subset=None, pipe_bundle=None, results_dir=None, pre_run_dir=None, opt_rigid=None, opt_subset=None, opt_full=None, opt_mc=None, mc_sim_num=500, models=['rigid', 'rotor', 'free rotor', 'iso cone, torsionless', 'iso..., brownian_step_size=2.0, brownian_snapshot=10, brownian_total=1000, dist_total=1000, dist_max_rotations=1000000, results_compress_type=1, rigid_grid_split=False, store_intermediate=True, nested_params_ave_dom_pos=True)
(Constructor)

source code 

Perform the full frame order analysis.

Parameters:
  • data_pipe_full (str) - The name of the data pipe containing all of the RDC and PCS data.
  • data_pipe_subset (str or None) - The name of the data pipe containing all of the RDC data but only a small subset of ~5 PCS points. This optional argument is used to massively speed up the analysis.
  • pipe_bundle (str) - The data pipe bundle to associate all spawned data pipes with.
  • results_dir (str) - The directory where files are saved in.
  • pre_run_dir (None or str) - The optional directory containing the frame order auto-analysis results from a previous run. If supplied, then the 'data_pipe_full', 'data_pipe_subset', and 'opt_subset' arguments will be ignored. The results will be loaded from the results files in this directory, and then optimisation starts from there. The model nesting algorithm will also be deactivated.
  • opt_rigid (Optimisation_settings instance) - The grid search, zooming grid search and minimisation settings object for the rigid frame order model.
  • opt_subset (Optimisation_settings instance) - The grid search, zooming grid search and minimisation settings object for optimisation of all models, excluding the rigid model, for the PCS data subset.
  • opt_full (Optimisation_settings instance) - The grid search, zooming grid search and minimisation settings object for optimisation of all models, excluding the rigid model, for the full data set.
  • opt_mc (Optimisation_settings instance) - The grid search, zooming grid search and minimisation settings object for optimisation of the Monte Carlo simulations. Any grid search settings will be ignored, as only the minimise.execute user function is run for the simulations. And only the settings for the first iteration of the object will be accessed and used - iterative optimisation will be ignored.
  • mc_sim_num (int) - The number of Monte Carlo simulations to be used for error analysis at the end of the analysis.
  • models (list of str) - The frame order models to use in the analysis. The 'rigid' model must be included as this is essential for the analysis.
  • brownian_step_size (float) - The step_size argument for the pseudo-Brownian dynamics simulation frame_order.simulate user function.
  • brownian_snapshot (int) - The snapshot argument for the pseudo-Brownian dynamics simulation frame_order.simulate user function.
  • brownian_total (int) - The total argument for the pseudo-Brownian dynamics simulation frame_order.simulate user function.
  • dist_total (int) - The total argument for the uniform distribution frame_order.distribute user function.
  • dist_max_rotations (int) - The max_rotations argument for the uniform distribution frame_order.distribute user function.
  • results_compress_type (int) - The type of compression to use when creating the results files. See the results.write user function for details.
  • rigid_grid_split (bool) - A flag which if True will cause the grid search for the rigid model to be split so that the rotation is optimised first followed by the translation. When combined with grid zooming, this can save optimisation time. However it may result in the global minimum being missed.
  • store_intermediate (bool) - A flag which if True will cause all intermediate optimisation results to be stored in the 'intermediate_results' directory. These can then be used for studying the optimisation settings or loaded for subsequent analyses.
  • nested_params_ave_dom_pos (bool) - A flag which if True will cause the average domain position parameters to be taken from the rigid or free-rotor models. If False, then these parameters will be set to zero.

axis_permutation_analysis(self, model=None)

source code 

Handle the two local minima in the pseudo-elliptic models.

This involves creating a new data pipe for the pseudo-elliptic models, permuting the motional parameters, and performing an optimisation. This will explore the second minimum.

Parameters:
  • model (str) - The frame order model to visualise. This should match the model of the current data pipe, unless the special value of 'final' is used to indicate the visualisation of the final results.

custom_grid_incs(self, model, inc=None, pivot_search=True)

source code 

Set up a customised grid search increment number for each model.

Parameters:
  • model (str) - The frame order model.
  • inc (int) - The number of grid search increments to use for each dimension.
  • pivot_search (bool) - A flag which if False will prevent the pivot point from being included in the grid search.
Returns: list of int and None
The list of increment values.

nested_params_ave_dom_pos(self, model)

source code 

Copy the average domain parameters from simpler nested models for faster optimisation.

Parameters:
  • model (str) - The frame order model.

nested_params_eigenframe(self, model)

source code 

Copy the eigenframe parameters from simpler nested models for faster optimisation.

Parameters:
  • model (str) - The frame order model.

nested_params_order(self, model)

source code 

Copy the order parameters from simpler nested models for faster optimisation.

Parameters:
  • model (str) - The frame order model.

nested_params_pivot(self, model)

source code 

Copy the pivot parameters from simpler nested models for faster optimisation.

Parameters:
  • model (str) - The frame order model.

optimisation(self, model=None, opt=None, pcs_text=None, intermediate_dir=None)

source code 

Perform the grid search and minimisation.

Parameters:
  • model (str) - The frame order model to optimise.
  • opt (Optimisation_settings instance) - The grid search, zooming grid search and minimisation settings object for optimisation of all models.
  • pcs_text (str) - The text to use in the title. This is either about the PCS subset or full data set.
  • intermediate_dir (str) - The directory for this PCS data set for storing the intermediate results.

optimise_rigid(self)

source code 

Optimise the rigid frame order model.

The Sobol' integration is not used here, so the algorithm is different to the other frame order models.

read_results(self, model=None, pipe_name=None, pre_run=False)

source code 

Attempt to read old results files.

Parameters:
  • model (str) - The frame order model.
  • pipe_name (str) - The name of the data pipe to use for this model.
  • pre_run (bool) - A flag which if True will read the results file from the pre-run directory.
Returns: bool
True if the file exists and has been read, False otherwise.

reorder_models(self, models=None)

source code 

Reorder the frame order models to enable the nested parameter copying protocol.

Parameters:
  • models (list of str) - The frame order models to be used in the auto-analysis.
Returns: list of str
The reordered frame order models.

results_output(self, dir=None, model=None, results_file=True, simulation=True)

source code 

Create visual representations of the frame order results for the given model.

This will call the following user functions:

  • results.write to output a results file (turned off if the results_file argument is False).
  • rdc.corr_plot and pcs.corr_plot to visualise the quality of the data and fit as 2D Grace correlation plots.
  • frame_order.pdb_model to generate a PDB representation of the frame order motions.
  • frame_order.simulate to perform a pseudo-Brownian frame order dynamics simulation.

A relax script called 'pymol_display.py' will be created for easily visualising the PDB representation from the frame_order.pdb_model user function.

This includes a PDB representation of the motions (the 'cone.pdb' file located in each model directory) together with a relax script for displaying the average domain positions together with the cone/motion representation in PyMOL (the 'pymol_display.py' file, also created in the model directory).

Parameters:
  • dir (str) - The output directory.
  • model (str) - The frame order model. This should match the model of the current data pipe, unless the special value of 'final' is used to indicate the visualisation of the final results.
  • results_file (bool) - A flag which if True will cause a results file to be created via the results.write user function.
  • simulation (bool) - A flag which if True will allow the pseudo-Brownian frame order dynamics simulation to be run.

sobol_setup(self, info=None)

source code 

Correctly handle the frame_order.sobol_setup user function.

Parameters:
  • info (tuple of int or None) - The information from the Optimisation_settings.get_*_sobol_info() function.