sansPotTools
index
sansPotTools.py

 
Functions
       
absScattLength(atom)
return the abs values of the atom's scattering length
    
create_SANSPot(instanceName, aSelection='all', experiment=0, normalizeIndex=-2, preweighted=True, weightByExpt=False, globProtons=0, radiusScale=1, fractionD2O=1, exchangeFraction=0.90000000000000002, simulation=0)

    create a solnScatPot.SolnScatPot term appropriate for refining
    against solution neutron scattering data.
 
    For efficient refinement against scattering curves, the experimental SANS
    data should be extrapolated to q=0 and downsampled at constant spacing in
    q. 
 
    aSelection specifies the atoms which the SANS experiment measures.
 
    normalizeIndex specifies which grid point to use to normalize data.
    A value of -2 denotes average normalization
    Other values mean no normalization. 
 
    experiment is a string or filename which contains the lines of the form
    q I(q) w(q)
    the # symbol introduces a comment. If preweighted=False, the third
    entry is standard deviation instead of a weight, and the weight is computed
    as 1/sigma^2 if sigma!=0, else 0. If normalizeIndex>=0, sigma is also
    normalized.
 
    If weightByExpt is true, weights are multiplied by (I(0)/I(q))^2, where
    I(q) is the scattering intensity at scattering amplitude q.
 
    globProtons specifies whether or not to glob protons on to their bonded
    heavy atoms
 
    radiusScale specifies a radius correction factor
 
    fractionD2O specifies the fraction of D2O
 
    exchangeFraction specifies the percentage of exchangable protons which
    actually exchange.
 
 
    
exchangableName(atom)
return True if the atom is a proton exchangable with solvent
    
exp(...)
exp(x)
 
Return e raised to the power of x.
groupProtons(sel='known')
 return a list of heavy atom/proton groupings.
    
useGlobs(term, globTable=[], globRules={'ADE': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2'), ('N3', 'C4'), ('C5', 'C6', 'N6'), ('N7', 'C8', 'N9')], 'ALA': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'HB3')], 'ARG': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'HD1', 'HD2', 'NE', 'HE', 'CZ', 'NH1', 'NH2', 'HH11', 'HH12', 'HH21', 'HH22')], 'ASN': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'OD1', 'ND2', 'HD21', 'HD22')], 'ASP': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'OD1', 'OD2')], 'CYS': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'SG', 'HG')], 'CYT': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2', 'O2'), ('N3', 'C4', 'N4'), ('C5', 'C6')], 'GLN': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'OE1', 'NE2', 'HE21', 'HE22')], 'GLU': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'OE1', 'OE2')], 'GLY': [('C', 'O', 'N', 'HN'), ('CA', 'HA1', 'HA2')], ...}, verbose=0)
set up solnScatPot.SolnScatPot term to use the atom globbing
    approximation for solution X-ray scattering.
 
    globTable contains a list of list of atoms with in user-defined globs.
    Atoms not specified in globTable are glob'ed by the pre-residue definitions
    in the globRules dictionary.
 
    globRules is a dictionary whose keys are upper case residue names
    each entry containing a list of list of atoms to be globed.
 
    Atoms in term.selection() which are not specified by globTable or by
    globRules are placed into single-atom globs.
    
    

 
Data
        exchangableProtons = {'ALA': ['HN'], 'ARG': ['HN', 'HE', 'HH21', 'HH22', 'HH11', 'HH12'], 'ASN': ['HN', 'HD21', 'HD22'], 'ASP': ['HN'], 'CYS': ['HN', 'HG'], 'GLN': ['HN', 'HE21', 'HE22'], 'GLU': ['HN'], 'GLY': ['HN'], 'HIS': ['HN', 'HD1'], 'ILE': ['HN'], ...}
globRules = {'ADE': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2'), ('N3', 'C4'), ('C5', 'C6', 'N6'), ('N7', 'C8', 'N9')], 'ALA': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'HB3')], 'ARG': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'HD1', 'HD2', 'NE', 'HE', 'CZ', 'NH1', 'NH2', 'HH11', 'HH12', 'HH21', 'HH22')], 'ASN': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'OD1', 'ND2', 'HD21', 'HD22')], 'ASP': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'OD1', 'OD2')], 'CYS': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'SG', 'HG')], 'CYT': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2', 'O2'), ('N3', 'C4', 'N4'), ('C5', 'C6')], 'GLN': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'OE1', 'NE2', 'HE21', 'HE22')], 'GLU': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'OE1', 'OE2')], 'GLY': [('C', 'O', 'N', 'HN'), ('CA', 'HA1', 'HA2')], ...}
pi = 3.1415926535897931
scattLength = {'C': 0.66510000000000002, 'D': 0.66710000000000003, 'Fe': 0.95099999999999996, 'H': -0.37419999999999998, 'Mn': -0.35999999999999999, 'N': 0.93999999999999995, 'O': 0.58040000000000003, 'P': 0.51700000000000002, 'Pt': 0.94999999999999996, 'S': 0.28470000000000001}
solventVolume = {'C': 16.440000000000001, 'CH': 21.59, 'CH2': 26.739999999999998, 'CH3': 31.890000000000001, 'Ca': 31.890000000000001, 'Cu': 8.7799999999999994, 'Fe': 7.9900000000000002, 'H': 5.1500000000000004, 'MN': 9.1999999999999993, 'Mg': 17.16, ...}
solventVolumeSets = {'svergun': {'C': 16.440000000000001, 'CH': 21.59, 'CH2': 26.739999999999998, 'CH3': 31.890000000000001, 'Ca': 31.890000000000001, 'Cu': 8.7799999999999994, 'Fe': 7.9900000000000002, 'H': 5.1500000000000004, 'MN': 9.1999999999999993, 'Mg': 17.16, ...}, 'tiede': {'Br': 26.52, 'C': 9.0, 'CH': 20.0, 'CH2': 21.0, 'CH3': 33.0, 'Ca': 31.0, 'Cl': 22.449999999999999, 'Cu(2)': 9.1999999999999993, 'Fe(2)': 8.3000000000000007, 'Fe(3)': 8.3000000000000007, ...}, 'xiaobing': {'Br': 26.52, 'C': 16.440000000000001, 'CH': 21.59, 'CH2': 26.739999999999998, 'CH3': 31.890000000000001, 'Ca': 31.890000000000001, 'Cl': 22.449999999999999, 'Cu(2)': 9.1999999999999993, 'Fe(2)': 8.3000000000000007, 'Fe(3)': 8.3000000000000007, ...}}