pytadbit.modelling.impmodel.load_impmodel_from_cmm(f_name, rand_init=None, radius=None)[source]

Loads an IMPmodel object using an cmm file of the form:

<marker_set name="1">
  <marker id="1" x="7347.50964739" y="-7743.92836303" z="-8283.39749204" r="0.00990099009901" g="0" b="0.990099009901" radius="500.0" note="1"/>
  <marker id="2" x="7647.90254377" y="-7308.1816344" z="-7387.75932893" r="0.019801980198" g="0" b="0.980198019802" radius="500.0" note="2"/>
  <link id1="1" id2="2" r="1" g="1" b="1" radius="250.0"/>
</marker_set>
Params f_name

path where to find the file

Params None rand_init

IMP random initial number used to generate the model

Parameters

radius (None) – radius of each particle

Returns

IMPmodel

pytadbit.modelling.impmodel.load_impmodel_from_xyz(f_name, rand_init=None, radius=None)[source]

Loads an IMPmodel object using an xyz file of the form:

# ID              : some identifier
# SPECIES         : None
# CELL TYPE       : None
# EXPERIMENT TYPE : Hi-C
# RESOLUTION      : 10000
# ASSEMBLY        : None
# CHROMOSOME      : 19
# START           : 1
# END             : 50
1  19:1-10000        44.847     412.828    -162.673
2  19:10001-20000   -55.574     396.869    -129.782
Params f_name

path where to find the file

Params None rand_init

IMP random initial number used to generate the model

Parameters

radius (None) – radius of each particle

Returns

IMPmodel

IMPmodel class

class pytadbit.modelling.impmodel.IMPmodel[source]

A container for the IMP modeling results. The container is a dictionary with the following keys:

  • log_objfun: The list of IMP objective function values

  • objfun: The final objective function value of the corresponding model

  • rand_init: Random number generator feed (needed for model reproducibility)

  • x, y, z: 3D coordinates of each particles. Each represented as a list

objective_function(log=False, smooth=True, axe=None, savefig=None)[source]

This function plots the objective function value per each Monte-Carlo step.

Parameters
  • log (False) – log plot

  • smooth (True) – curve smoothing

  • axe (None) – a matplotlib.axes.Axes object to define the plot appearance

  • savefig (None) – path to a file where to save the image generated; if None, the image will be shown using matplotlib GUI (the extension of the file name will determine the desired format).