Welcome to the documentation for the polychrom package
Polychrom is a package for setting up, performing and analyzing polymer simulations of chromosomes. The simulation part is based around VJ Pande’s OpenMM library - a GPU-assisted framework for general molecular dynamics simulations. The analysis part is written by the mirnylab.
Installation
Polychrom requires OpenMM, which can be installed through conda: conda install -c omnia openmm
. See http://docs.openmm.org/latest/userguide/application.html#installing-openmm . In our experience, adding -c conda-forge
listed in the link above is optional.
CUDA is the fastest GPU-assisted backend to OpenMM. You would need to have the required version of CUDA, or install OpenMM compiled for your version of CUDA.
Other dependencies are simple, and are listed in requirements.txt. All but joblib are installable from either conda/pip, and joblib installs well with pip.
Installation errors and possible fixes
Error: After installation, importing openmm or running polychrom code leads to the error:
version GLIBCXX_3.4.30 not found
Fix:
conda install -c conda-forge libstdcxx-ng=12
Structure
Polychrom is an API, and each simulation has to be set up as a Python script. Simulations are done using a “simulation” module polychrom.simulation
. Forces that define the simulation are found in polychrom.forces
and polychrom.forcekits
modules. Contactmaps from simulated conformations can be generated using polychrom.contactmaps
module. Loading and saving individual conformations can be done using polychrom.polymerutils
, while loading/saving whole trajetories is done using polychrom.hdf5_format
. P(s), R(s), Rg(s) curves and other analyses can be done using polychrom.polymer_analyses
.
- polychrom.simulation module
- polychrom.polymerutils module
- polychrom.hdf5_format module
- polychrom.polymer_analyses module
- Analyses of polymer conformations
- Tools for calculating contacts
- Tools to calculate P(s) and R(s)
R2_scaling()
Rg2()
Rg2_matrix()
Rg2_scaling()
calculate_cistrans()
calculate_contacts()
contact_scaling()
generate_bins()
getLinkingNumber()
kabsch_msd()
kabsch_rmsd()
mutualSimplify()
ndarray_groupby_aggregate()
slope_contact_scaling()
smart_contacts()
streaming_ndarray_agg()
- polychrom.contactmaps module
- polychrom.forces module
- Detailed description of forces in polychrom
angle_force()
constant_force_bonds()
cylindrical_confinement()
grosberg_angle()
grosberg_polymer_bonds()
grosberg_repulsive_force()
harmonic_bonds()
heteropolymer_SSW()
polynomial_repulsive()
pull_force()
selective_SSW()
smooth_square_well()
spherical_confinement()
spherical_well()
tether_particles()