IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
ideal_helix.py
1## \example pmi/ideal_helix.py
2"""Short example demonstrating ideal helices in PMI
3"""
4
5import IMP
6import IMP.atom
7import IMP.rmf
8import IMP.pmi
10import IMP.pmi.dof
11import IMP.pmi.macros
13import sys
14
15IMP.setup_from_argv(sys.argv, "Demonstration of ideal helices")
16
17# Create System and State
18mdl = IMP.Model()
20st = s.create_state()
21
22# Create a molecule and add helix representation
23# this makes a c-alpha chain in approximately the shape of a helix
24mol = st.create_molecule("example_helix", sequence='A'*20, chain_id='A')
25mol.add_representation(mol,
26 resolutions=[1, 10],
27 ideal_helix=True)
28hier = s.build()
29
30# write a single-frame RMF to view the helix
32out.init_rmf("example_helix.rmf3", hierarchies=[hier])
33out.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.