15 def create_representation():
35 evr.set_maximum_score(.01)
40 def create_discrete_states(m, helices):
48 for dx
in range(0, 15):
54 pst.set_particle_states(
61 def create_sampler(m, rs, pst):
72 s.set_assignments_table(states)
73 s.set_subset_filter_tables(filters)
77 def display(m, helices, name):
80 for i, h
in enumerate(helices):
86 print "creating representation"
87 (m, helices) = create_representation()
89 print "creating score function"
92 print "creating discrete states"
93 pst = create_discrete_states(m, helices)
95 print "creating sampler"
96 s = create_sampler(m, rs, pst)
97 m.set_log_level(IMP.base.SILENT)
100 cs = s.create_sample()
102 print "found ", cs.get_number_of_configurations(),
"solutions"
104 for i
in range(cs.get_number_of_configurations()):
105 cs.load_configuration(i)
106 ss = m.evaluate(
False)
108 print "** solution number:", i,
" is:", ss
109 display(m, helices,
"sol_" + str(i) +
".pym")
void set_log_level(LogLevel l)
Set the current global log level.
Sample best solutions using Domino.
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.
Store a kernel::ParticleIndexes.
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)
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
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.
Functionality for loading, creating, manipulating and scoring atomic structures.
void read_pdb(base::TextInput input, int model, Hierarchy h)
Divide-and-conquer inferential optimization in discrete space.
Display an IMP::atom::Hierarchy particle as balls.
Class for storing model, its restraints, constraints, and particles.