18 def create_representation():
35 all.extend(IMP.atom.get_by_type(h, IMP.atom.ATOM_TYPE))
38 evr.set_maximum_score(.01)
43 def create_discrete_states(m, helices):
51 for dx
in range(0, 15):
57 pst.set_particle_states(
64 def create_sampler(m, rs, pst):
76 s.set_assignments_table(states)
77 s.set_subset_filter_tables(filters)
81 def display(m, helices, name):
84 for i, h
in enumerate(helices):
90 print(
"creating representation")
91 (m, helices) = create_representation()
93 print(
"creating score function")
96 print(
"creating discrete states")
97 pst = create_discrete_states(m, helices)
99 print(
"creating sampler")
100 s = create_sampler(m, rs, pst)
101 m.set_log_level(IMP.SILENT)
104 cs = s.create_sample()
106 print(
"found ", cs.get_number_of_configurations(),
"solutions")
109 for i
in range(cs.get_number_of_configurations()):
110 cs.load_configuration(i)
111 ss = sf.evaluate(
False)
113 print(
"** solution number:", i,
" is:", ss)
114 display(m, helices,
"sol_" + str(i) +
".pym")
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Sample best solutions using Domino.
Filter a configuration of the subset using the Model thresholds.
Create a scoring function on a list of restraints.
void read_pdb(TextInput input, int model, Hierarchy h)
Restraint * create_excluded_volume(Model *m, const ParticleIndexes &ps, double k, std::string name)
Rotation3D get_rotation_about_axis(const Vector3D &axis, double angle)
Generate a Rotation3D object from a rotation around an axis.
Class for storing model, its restraints, constraints, and particles.
Do not allow two particles to be in the same state.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Store a list of ParticleIndexes.
Color get_display_color(unsigned int i)
void set_log_level(LogLevel l)
Set the current global log level.
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.
Divide-and-conquer inferential optimization in discrete space.
Display an IMP::atom::Hierarchy particle as balls.