rdcPotTools
index
rdcPotTools.py

tools to aid in setup/analysis of dipolar coupling potential term.
 
this module provides functions to simplify the creation, manipulation and
analysis of rdcPot.RDCPot potential terms.
 
Note on dipolar coupling normalization and sign convention:
 
  protein residual dipolars are usually normalized relative to
  measurements of N-HN - this is achieved by calling the function
  scale_toNH. This normalization involves the gamma_A * gamma_B /
  rAB^3 prefactor (see the docs for rdcPot). 15N has a negative
  gyromagnetic ration, but it was deemed simpler to treat as positive,
  so that if there is an experiment which doesn't include 15N, the
  dipolar coupling sign must be flipped. If you would rather not use
  this convention, call the function correctGyromagneticSigns() at the
  beginning of your script, and then the correct signs will be used
  for the Da prefactors.

 
Functions
       
DaMax(type, dist=0)
return scale factor to scale other experiments to the NNH norm
    convention.
    
DaScale(term, dist=0)
return scale factor to scale other experiments to the current
    convention, set by calling either scale_toNH or scale_toCH.
    
RDC_analyze(potList)
perform analysis of RDCPot terms and return nicely formatted summary
Rfactor(rdc)
R-factor (in percent).
    Eq. 5 from Clore+Garrett, JACS 121, 9008 (1999).
    Da is scaled using the current scaling convention.
    
Rfactor_infinite(rdc)
R-factor (in percent) for an infinite number of
    randomly distributed vectors.
    Eq. 3 from Clore+Garrett, JACS 121, 9008 (1999).
calcTensorSize(rdc, rdcType='NHN')

    NOTE: this needs to be updated and moved to the varTensorTools module.
 
    given a known structure, and experimental RDCs, and tensor orientation,
    determine the dipolar coupling Da, and rhombicity. These quantities are
    returned in a structure.
    
correctGyromagneticSigns()

    use the correct (negative) sign for 15N's gyromagnetic ratio.
 
    Call this function before any other in this module.
    
create_DaRatioPot(name, rdc1, rdc2, ratio)
NOTE: needs to be updated and transfered to varTensorTools.
 
       create a potential term which restrains the ratio of
         rdc1.Da/rdc2.Da to be ratio
         
create_RDCPot(name, file=0, oTensor=0, esim=0, restraints='')
create an rdcPot.RDCPot1 with given name, given orientational
    varTensor.VarTensor, the filename of an rdc assignment table and/or
    a string of assignments, and an ensemble simulation.
    
create_twoDaRatiosPot(name, rdc1, rdc2, rdc3, rdc4)
NOTE: needs to be updated and transfered to varTensorTools.
 
       create a potential term which restrains the ratio of
         rdc1.Da/rdc2.Da to be that of rdc3.Da/rdc4.Da
       For EnsembleSimulations, three terms are returned in a PotList. These
       are named 'inter', 'ratio1', and 'ratio2'. The first restrains the
       ensemble average of the two ratios to be the same. The 'ratio' terms
       restrain the ratio of each ensemble member to be the same. The terms
       can be weighted separately using the scale member.
deviation_percent(rdc)
deviation as a percent of total range of dipolar coupling values.
    Da is scaled using the current scaling convention.
    
getRDCType(rdc)
determine the atoms involved in the RDC experiment - from the
    atom selections.
    
makeTable(rdc)
given an rdcPot, generate the associated assignment 
    table. Return this as a string.
    
orderParameter(aSel, bSel, simulation=0)
calculate the order parameter S^2 given two atom selections defining
    a bond vector. The simulation parameter specifies an EnsembleSimulation
    and defaults to the current simulation. It is assumed that the atomSels
    correspond to single atoms: averaging is not performed
recalculatePrefactors()
recalculate gamma_A * gamma_B / rAB^3 prefactors.
 
    Call this function after changing gyromagnetic ratios or bond distance
    values. 
    
scale_toCH(rdc, type=0)
 scales the given expression for dipolar coupling such that
    given Da = scale * Da_CH
 
    Also, for proton 'HH' experiments, enables the rdc distance dependence.
 
    Valid types are:
         'NHN', 'NCO', 'HNCO', 'CACO', 'CAHA', 'HH', 'HP'
    
scale_toNH(rdc, type=0)
 scales the given expression for dipolar coupling such that
    given Da = scale * Da_NHN
 
    Also, for proton 'HH' experiments, enables the rdc distance dependence.
 
    Valid types are:
         'NHN', 'NCO', 'HNCO', 'CACO', 'CAHA', 'HH', 'HP'
    

 
Data
        Da_prefactor = {'CACO': 12764422.295081969, 'CAHA': 128460917.32662618, 'CAHN': 10728558.721184729, 'CC': 128460917.32662618, 'CH': 128460917.32662618, 'HH': 715668433.92040002, 'HNCO': 20322625.142604597, 'HP': 290018215.18000001, 'NCO': 7772415.8699920056, 'NH': 61821816.463438839, ...}
gamma_C = 6728.3000000000002
gamma_H = 26751.98
gamma_N = 2711.5999999999999
gamma_P = 10841.0
psfTemplate = '\nstructure\nPSF\n\n 2 !NTITLE\n REMARKS auto... 0 !NGRP\n 0 0 0\nend \n'
r_caco = 1.5249999999999999
r_caha = 1.119
r_cahn = 2.5600000000000001
r_cohn = 2.069
r_nco = 1.329
r_nh = 1.0547428700640902
r_nhn = 1.042