18def create_representation():
29def create_excluded_volume(m, helices):
38 evr.set_maximum_score(.01)
43def create_discrete_states(m, helices):
51 for dx
in range(0, 15):
57 pst.set_particle_states(
64def create_sampler(m, rs, pst):
76 s.set_assignments_table(states)
77 s.set_subset_filter_tables(filters)
81def display(m, helices, name):
84 for i, h
in enumerate(helices):
91print(
"creating representation")
92(m, helices) = create_representation()
94print(
"creating score function")
95rs = create_excluded_volume(m, helices)
97print(
"creating discrete states")
98pst = create_discrete_states(m, helices)
100print(
"creating sampler")
101s = create_sampler(m, rs, pst)
102m.set_log_level(IMP.SILENT)
105cs = s.create_sample()
107print(
"found ", cs.get_number_of_configurations(),
"solutions")
110for i
in range(cs.get_number_of_configurations()):
111 cs.load_configuration(i)
112 ss = sf.evaluate(
False)
114 print(
"** solution number:", i,
" is:", ss)
115 display(m, helices,
"sol_" + str(i) +
".pym")
Class for storing model, its restraints, constraints, and particles.
Select all CA ATOM records.
Display an IMP::atom::Hierarchy particle as balls.
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
Gather all the molecular particles of a certain level in the hierarchy.
Store a list of ParticleIndexes.
Prevent a set of particles and rigid bodies from inter-penetrating.
Create a scoring function on a list of restraints.
Write a CGO file with the geometry.
Sample best solutions using Domino.
Do not allow two particles to be in the same state.
Filter a configuration of the subset using the Model thresholds.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
Rotation3D get_rotation_about_axis(const Vector3D &axis, double angle)
Generate a Rotation3D object from a rotation around an axis.
Functionality for loading, creating, manipulating and scoring atomic structures.
IMP::core::RigidBody create_rigid_body(const Hierarchies &h, std::string name=std::string("created rigid body"))
Rigidify a molecule or collection of molecules.
Hierarchy read_pdb(TextInput input, Model *model, PDBSelector *selector=get_default_pdb_selector(), bool select_first_model=true)
Read all the molecules in the first model of the PDB file.
Basic functionality that is expected to be used by a wide variety of IMP users.
Color get_display_color(unsigned int i)
Divide-and-conquer inferential optimization in discrete space.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
void set_log_level(LogLevel l)
Set the current global log level.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.