15 def create_representation():
36 evr.set_maximum_score(.01)
41 def create_discrete_states(m, helices):
49 for dx
in range(0, 15):
55 pst.set_particle_states(
62 def create_sampler(m, rs, pst):
73 s.set_assignments_table(states)
74 s.set_subset_filter_tables(filters)
78 def display(m, helices, name):
81 for i, h
in enumerate(helices):
87 print "creating representation"
88 (m, helices) = create_representation()
90 print "creating score function"
93 print "creating discrete states"
94 pst = create_discrete_states(m, helices)
96 print "creating sampler"
97 s = create_sampler(m, rs, pst)
98 m.set_log_level(IMP.base.SILENT)
103 print "found ", cs.get_number_of_configurations(),
"solutions"
105 for i
in range(cs.get_number_of_configurations()):
106 cs.load_configuration(i)
107 ss = m.evaluate(
False)
109 print "** solution number:", i,
" is:", ss
110 display(m, helices,
"sol_" + str(i) +
".pym")
void set_log_level(LogLevel l)
Set the current global log level.
Sample best solutions using Domino.
A decorator for a particle that is part of a rigid body.
Filter a configuration of the subset using the kernel::Model thresholds.
Rotation3D get_rotation_about_axis(const Vector3D &axis, double angle)
Generate a Rotation3D object from a rotation around an axis.
Do not allow two particles to be in the same state.
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
Color get_display_color(unsigned int i)
container::ClosePairContainer * create_excluded_volume(const kernel::ParticlesTemp &ps, double k, std::string name)
See IMP.core for more information.
See IMP.algebra for more information.
IMP::core::RigidBody create_rigid_body(Hierarchy h)
Prevent a set of particles and rigid bodies from inter-penetrating.
Write a CGO file with the geometry.
Select all CA ATOM records.
See IMP.atom for more information.
void read_pdb(base::TextInput input, int model, Hierarchy h)
See IMP.domino for more information.
Display an IMP::atom::Hierarchy particle as balls.
Class for storing model, its restraints, constraints, and particles.