19 def read(m, beyond_file):
22 for i
in range(0, beyond_file):
25 "ensemble/aligned-" + str(i) +
".pdb")
40 def add_markers(h, c, w):
41 """Add markers to a the passed conformation. The marker locations are chosen
42 pretty thoughtlessly and don't really illustrate the technique well."""
43 def add_marker(s, name):
60 return nm[nm.find(
'-') + 1:nm.rfind(
'.')]
63 def add_axis(h, c, w, chain_colors):
64 """Add a coordinate axis to show the relative orientation of the protein"""
68 g.set_name(get_nice_name(h) +
"_orient")
76 def add_skeleton(h, c, r, w, chain_colors):
77 """Show the connectivity skeleton of the conformation to give an idea of
78 how things are layed out"""
83 d = ps.evaluate((hc0, hc1),
None)
87 mp = .5 * (d0.get_coordinates() + d1.get_coordinates())
89 Cylinder(Segment(d0.get_coordinates(), mp), r))
94 g.set_name(get_nice_name(h) +
"_skel")
97 Cylinder(Segment(d1.get_coordinates(), mp), r))
102 g.set_name(get_nice_name(h) +
"_skel")
115 ps.set_log_level(IMP.base.SILENT)
118 print "creating rigid bodies"
122 base_chains[c.get_id()] = c
124 for i, h
in enumerate(hs):
135 hc, base_chains[c.get_id()])
142 for i, c
in enumerate(chains):
147 chain_colors[id] = color
157 residue_index=237).get_selected_particles(
160 residue_index=237).get_selected_particles()[0]).get_z()))
161 print "adding markers",
162 for i, h
in enumerate(hso):
170 for i, h
in enumerate(hs[1:]):
171 add_axis(h,
None, w, chain_colors)
176 print "adding skeleton",
177 for i, h
in enumerate(hs[1:]):
178 add_skeleton(h,
None, 1, w, chain_colors)
Return the hierarchy leaves under a particle.
Upper bound harmonic function (non-zero when feature > mean)
IMP::core::RigidBody create_compatible_rigid_body(Hierarchy h, Hierarchy reference)
Rigidify a molecule or collection of molecules.
void set_log_level(LogLevel l)
Set the current global log level.
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
A score on the distance between the surfaces of two spheres.
Color get_interpolated_rgb(const Color &a, const Color &b, double f)
Return a color interpolated between a and b in RGB space.
Display a reference frame.
static Hierarchy setup_particle(kernel::Model *m, kernel::ParticleIndex pi, kernel::ParticleIndexesAdaptor children=kernel::ParticleIndexesAdaptor())
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
Color get_display_color(unsigned int i)
A decorator for a particle with x,y,z coordinates.
Class to handle individual model particles.
static const IMP::core::HierarchyTraits & get_traits()
Get the molecular hierarchy HierararchyTraits.
void destroy(Hierarchy d)
Delete the Hierarchy.
Hierarchy create_simplified_along_backbone(Chain input, const IntRanges &residue_segments, bool keep_detailed=false)
IMP::core::RigidBody create_rigid_body(Hierarchy h)
Write a CGO file with the geometry.
Store info for a chain of a protein.
Select all CA ATOM records.
See IMP.display for more information.
See IMP.atom for more information.
void read_pdb(base::TextInput input, int model, Hierarchy h)
Hierarchies get_leaves(const Selection &h)
Class for storing model, its restraints, constraints, and particles.
Display an IMP::core::XYZR particle as a ball.