IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
pmi/ideal_helix.py

Short example demonstrating ideal helices in PMI

## \example pmi/ideal_helix.py
"""Short example demonstrating ideal helices in PMI
"""
import IMP
import IMP.atom
import IMP.rmf
import IMP.pmi
import sys
IMP.setup_from_argv(sys.argv, "Demonstration of ideal helices")
# Create System and State
mdl = IMP.Model()
st = s.create_state()
# Create a molecule and add helix representation
# this makes a c-alpha chain in approximately the shape of a helix
mol = st.create_molecule("example_helix", sequence='A'*20, chain_id='A')
mol.add_representation(mol,
resolutions=[1, 10],
ideal_helix=True)
hier = s.build()
# write a single-frame RMF to view the helix
out.init_rmf("example_helix.rmf3", hierarchies=[hier])
out.write_rmf("example_helix.rmf3")
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
Class for easy writing of PDBs, RMFs, and stat files.
Definition output.py:199
Represent the root node of the global IMP.atom.Hierarchy.
Functionality for loading, creating, manipulating and scoring atomic structures.
Create movers and set up constraints for PMI objects.
Protocols for sampling structures and analyzing them.
Definition macros.py:1
Classes to handle different kinds of restraints.
Set of Python classes to create a multi-state, multi-resolution IMP hierarchy.
Python classes to represent, score, sample and analyze models.
Support for the RMF file format for storing hierarchical molecular data and markup.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.