sansPotTools
index


 

 
Functions
       
absScattLength(atom)
return the abs values of the atom's scattering length
create_SANSPot(instanceName, aSelection='all', experiment=0, normalizeIndex=-3, preweighted=True, numPoints=None, minQ=None, maxQ=None, weightByExpt=False, globProtons=0, radiusScale=1, volumeScale=None, cmpType='log', fractionD2O=1, exchangeFraction=0.9, fractionDeuterated=0, verbose=False, simulation=0, altDeuteratedSels=[])
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 invokes normalization based on the average (calculated 
and experimental) values. A value of -3 causes normalization to be chosen
such that the chi^2 is minimized. 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.
 
numPoints specifies the number of datapoints to sample. The experimental
I(q) and errors/weights are linearly interpolated and sampled uniformly
over the entire range. No smoothing is performed.
 
experimental value of q less than minQ will be ignored.
experimental value of q greater than maxQ will be ignored.
 
If the q values are evenly spaced or numPoints is specified,
calcType is set to 'uniform'.
 
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
 
If specified, volumeScale is a separate scale factor for the effective
volume. If it is not specified, this scale factor will be consistent with
radiusScale.
 
cmpType should be 'plain' or 'log' and corresponds to cmpType specified
for solnScatPot.SolnScatPot.
 
fractionD2O specifies the fraction of D2O in the solvent.
 
exchangeFraction specifies the percentage of exchangable protons which
actually exchange.
 
fractionDeuterated specifies the deuteration fraction of non-exchangable
protons. The altDeuteratedSels argument allows one to specify different
deuteration fractions for specified atomSel.AtomSels. This argument
should be a sequence of tuples (atom selection, value), where the value
is the deuteration fraction of non-exchangable protons.
exchangableName(atom)
return True if the atom is a proton exchangable with solvent
exp(x, /)
Return e raised to the power of x.
genFormFactors(qValues, aSelection, exchangeFraction, fractionDeuterated, fractionD2O, altDeuteratedSels)
groupProtons(sel='known')
return a list of heavy atom/proton groupings.
useGlobs(term, globTable=[], globRules={'GLY': [('C', 'O', 'N', 'HN'), ('CA', 'HA1', 'HA2')], 'ALA': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'HB3')], 'VAL': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB', 'CG1', 'HG11', 'HG12', 'HG13', 'CG2', 'HG21', 'HG22', 'HG23')], 'LEU': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'HG', 'CD1', 'HD11', 'HD12', 'HD13', 'CD2', 'HD21', 'HD22', 'HD23')], 'ILE': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB', 'CG2', 'HG21', 'HG22', 'HG23'), ('CG1', 'HG11', 'HG12', 'CD1', 'HD11', 'HD12', 'HD13')], 'PHE': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'CD1', 'HD1', 'CD2', 'HD2', 'CE1', 'HE1', 'CE2', 'HE2', 'CZ', 'HZ')], 'TYR': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'CD1', 'HD1', 'CD2', 'HD2', 'CE1', 'HE1', 'CE2', 'HE2', 'CZ', 'OH', 'HH')], 'TRP': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'CD1', 'HD1', 'CD2', 'NE1', 'HE1', 'CE2', 'CE3', 'HE3', 'CZ2', 'HZ2', 'CZ3', 'HZ3', 'CH2', 'HH2')], 'ASP': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'OD1', 'OD2')], 'GLU': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'OE1', 'OE2')], 'SER': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'OG', 'HG')], 'THR': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB', 'OG1', 'HG1', 'CG2', 'HG21', 'HG22', 'HG23')], 'ASN': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'OD1', 'ND2', 'HD21', 'HD22')], 'GLN': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'OE1', 'NE2', 'HE21', 'HE22')], 'LYS': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('CD', 'HD1', 'HD2', 'CE', 'HE1', 'HE2', 'NZ', 'HZ1', 'HZ2', 'HZ3')], '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')], 'HIS': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2'), ('CG', 'ND1', 'HD1', 'CD2', 'HD2', 'CE1', 'HE1', 'NE2', 'HE2')], 'MET': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2'), ('SD', 'CE', 'HE1', 'HE2', 'HE3')], 'CYS': [('C', 'O', 'N', 'HN'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'SG', 'HG')], 'PRO': [('C', 'O', 'N'), ('CA', 'HA', 'CB', 'HB1', 'HB2', 'CG', 'HG1', 'HG2', 'CD', 'HD1', 'HD2')], 'CYT': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2', 'O2'), ('N3', 'C4', 'N4'), ('C5', 'C6')], 'GUA': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2', 'N2'), ('N3', 'C4'), ('C5', 'C6', 'O6'), ('N7', 'C8', 'N9')], 'ADE': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2'), ('N3', 'C4'), ('C5', 'C6', 'N6'), ('N7', 'C8', 'N9')], 'THY': [('P', 'O1P', 'O2P'), ("O5'", "C5'"), ("O3'", "C3'"), ("O4'", "C4'"), ("C1'", "C2'"), ('N1', 'C2', 'O2'), ('N3', 'C4', 'O4'), ('C5', 'CM', 'C6')]}, 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')], ...}
metalAtoms = ['ZN', 'MN', 'MG']
pi = 3.141592653589793
scattLength = {'C': 0.6651, 'D': 0.6671, 'Fe': 0.951, 'H': -0.3742, 'MG': 0.5375, 'Mg': 0.5375, 'Mn': -0.36, 'N': 0.94, 'O': 0.5804, 'P': 0.517, ...}
solventVolume = {'C': (16.52189547022142, 1.58), 'CH': (21.688370252755973, 1.73), 'CH2': (26.521848780380633, 1.85), 'CH3': (32.02486353433834, 1.97), 'Ca': (32.02486353433834, 1.97), 'Cu': (8.78452975554819, 1.28), 'Fe': (7.986447935410647, 1.24), 'H': (5.131448118842135, 1.07), 'H2O': (19.3, 1.5133666759556506), 'MN': (9.2027720799157, 1.3), ...}
solventVolumeSets = {'svergun': {'C': (16.52189547022142, 1.58), 'CH': (21.688370252755973, 1.73), 'CH2': (26.521848780380633, 1.85), 'CH3': (32.02486353433834, 1.97), 'Ca': (32.02486353433834, 1.97), 'Cu': (8.78452975554819, 1.28), 'Fe': (7.986447935410647, 1.24), 'H': (5.131448118842135, 1.07), 'H2O': (19.3, 1.5133666759556506), 'MN': (9.2027720799157, 1.3), ...}, 'tiede': {'Br': (26.52, 1.6824786822618245), 'C': (9.0, 1.1735616258720787), 'CH': (20.0, 1.5314461446813734), 'CH2': (21.0, 1.556556282112301), 'CH3': (33.0, 1.8096574578554767), 'Ca': (31.0, 1.7723342420376789), 'Cl': (22.45, 1.5915874724077386), 'Cu(2)': (9.2, 1.1821910653824932), 'Fe(2)': (8.3, 1.1423111811746613), 'Fe(3)': (8.3, 1.1423111811746613), ...}, 'xiaobing': {'Br': (26.52, 1.6824786822618245), 'C': (16.44, 1.4345829602682996), 'CH': (21.59, 1.5709991296307175), 'CH2': (26.74, 1.6871182809580803), 'CH3': (31.89, 1.7891355151247366), 'Ca': (31.89, 1.7891355151247366), 'Cl': (22.45, 1.5915874724077386), 'Cu(2)': (9.2, 1.1821910653824932), 'Fe(2)': (8.3, 1.1423111811746613), 'Fe(3)': (8.3, 1.1423111811746613), ...}}