Polymer scalings

A set of small utilities to analyze P(s), Rg(s)

polymerScalings.giveCpScaling(data, bins0, cutoff=1.1, integrate=False, ring=False, intContacts=False, verbose=False, maxContacts=300)[source]

Returns contact probability scaling for a given polymer conformation

Parameters:

data : 3xN array of ints/floats

Input polymer conformation

bins0 : list

Bins to calculate scaling.

cutoff : float, optional

Cutoff to calculate scaling

integrate : bool, optional

if True, will return cumulative probability

ring : bool, optional

If True, will calculate contacts for the ring

intContacts : bool, optional

If True, will speed up calculation of contacts for a cubit lattice case.

verbose : bool, optional

If True, print some information.

maxContacts : int

Maximum number of contacts per monomer. If total number of contacts exceeds maxContacts*N, program becomes uncontrollable.

Returns:

(bins, contact probabilities) where “bins” are centers of bins in the input bins0 array. :

polymerScalings.give_distance(data, bins=None, ring=False)[source]

Returns end-to-end distance scaling of a given polymer conformation. ..warning:: This method averages end-to-end scaling over bins to make better average

Parameters:data: 3xN array :
polymerScalings.give_radius_scaling(data, bins=None, ring=False)[source]

main working horse for radius of gyration

polymerScalings.subchainDensityFunction(filenames, bins, normalize='Rg', maxLength=3, Nbins=30, coverage=1.0, centerAt='mid', **kwargs)[source]

Calculates density function of subchains That is, for each bin size, it calculates an average density profile for subchains of the size within the bin. Density profile is how density of a subchain depends on a distance from the center.

filenames : str
Filenames to average density function
bins : iterable
List of positions of bins (lengthes at which to evaluate).
normalize : str, not implemented
How to normalize the subchain density function
lengthmult : int, optional
Calculate distribution to lengthmult*Rg distance only (default = 3)
Nbins : int, optional
Number of bins for each distribution (default = 30)
coverage : float, optional
Use each monomer ‘coverage’ times (on average) to calculate each distribution. Default = 1.

Previous topic

Analysis scripts

This Page