home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.6.1
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
version 2.6.1
pmi/ideal_helix.py
1
## \example pmi/ideal_helix.py
2
"""Short example demonstrating ideal helices in PMI
3
"""
4
5
import
IMP
6
import
RMF
7
import
IMP.atom
8
import
IMP.rmf
9
import
IMP.pmi
10
import
IMP.pmi.topology
11
import
IMP.pmi.dof
12
import
IMP.pmi.macros
13
import
IMP.pmi.restraints
14
15
# Create System and State
16
mdl =
IMP.Model
()
17
s =
IMP.pmi.topology.System
(mdl)
18
st = s.create_state()
19
20
# Create a molecule and add helix representation
21
# this makes a c-alpha chain in approximately the shape of a helix
22
mol = st.create_molecule(
"example_helix"
,sequence=
'A'
*20,chain_id=
'A'
)
23
mol.add_representation(mol,
24
resolutions=[1,10],
25
ideal_helix=
True
)
26
hier = s.build()
27
28
# write a single-frame RMF to view the helix
29
out =
IMP.pmi.output.Output
()
30
out.init_rmf(
"example_helix.rmf3"
,hierarchies=[hier])
31
out.write_rmf(
"example_helix.rmf3"
)