Package generic_fns :: Module monte_carlo
[hide private]
[frames] | no frames]

Module monte_carlo

source code

Module for performing Monte Carlo simulations for error analysis.

Functions [hide private]
 
create_data(method=None)
Function for creating simulation data.
source code
 
error_analysis(prune=0.0)
Function for calculating errors from the Monte Carlo simulations.
source code
 
initial_values()
Set the initial simulation parameter values.
source code
 
off()
Turn simulations off.
source code
 
on()
Turn simulations on.
source code
 
select_all_sims(number=None, all_select_sim=None)
Set the select flag of all simulations of all models to one.
source code
 
setup(number=None, all_select_sim=None)
Function for setting up Monte Carlo simulations.
source code
Variables [hide private]
  __package__ = 'generic_fns'

Imports: deepcopy, sqrt, ndarray, gauss, exists_mol_res_spin_data, pipes, RelaxError, RelaxNoSequenceError, get_specific_fn


Function Details [hide private]

create_data(method=None)

source code 

Function for creating simulation data.

Parameters:
  • method (str) - The type of Monte Carlo simulation to perform.

error_analysis(prune=0.0)

source code 

Function for calculating errors from the Monte Carlo simulations.

The standard deviation formula used to calculate the errors is the square root of the bias-corrected variance, given by the formula:

              __________________________
             /   1
   sd  =    /  ----- * sum({Xi - Xav}^2)
          \/   n - 1

where

  • n is the total number of simulations.
  • Xi is the parameter value for simulation i.
  • Xav is the mean parameter value for all simulations.
Parameters:
  • prune (float) - The amount to prune the upper and lower tails the distribution. If set to 0.0, no simulations will be pruned. If set to 1.0, all simulations will be pruned. This argument should be set 0.0 to avoid meaningless statistics.

select_all_sims(number=None, all_select_sim=None)

source code 

Set the select flag of all simulations of all models to one.

Parameters:
  • number (int) - The number of Monte Carlo simulations to set up.
  • all_select_sim (list of lists of bool) - The selection status of the Monte Carlo simulations. The first dimension of this matrix corresponds to the simulation and the second corresponds to the models.

setup(number=None, all_select_sim=None)

source code 

Function for setting up Monte Carlo simulations.

Parameters:
  • number (int) - The number of Monte Carlo simulations to set up.
  • all_select_sim (list of lists of bool) - The selection status of the Monte Carlo simulations. The first dimension of this matrix corresponds to the simulation and the second corresponds to the instance.