13 from __future__
import print_function
32 for i
in range(0, int(2.0 / resolution))]
38 p.set_radius(resolution / 2.0)
40 p.set_radius(.4 * resolution)
41 order = [eps[0]] + ps + [eps[1]]
44 for i, p
in enumerate(order):
54 r.set_maximum_score(0.01)
58 resolution, IMP.algebra.get_unit_bounding_box_3d())
60 vs = [g.get_center(i)
for i
in g.get_all_indexes()]
61 print(
"States are", vs)
65 pst.set_particle_states(p, states)
70 r.set_log_level(IMP.SILENT)
71 rc.add_restraints([r])
75 s.set_check_level(IMP.NONE)
80 s.set_subset_filter_tables([ef, rssft])
88 sts = s.get_sample_assignments(alls)
92 print(
"saving configurations to", rmf.get_name())
99 domino_restraints = rc.get_restraints()
101 for r
in domino_restraints:
106 print(
"found assignments", sts)
108 for i, s
in enumerate(sts):
112 for r
in domino_restraints:
113 rc.load_last_score(r, alls, s)
Grid3D< float, DenseGridStorage3D< float > > DenseFloatGrid3D
A harmonic upper bound on the distance between two spheres.
RMF::FrameID save_frame(RMF::FileHandle file, std::string name="")
Save the current state of the linked objects as a new RMF frame.
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Various classes to hold sets of particles.
static XYZR setup_particle(Model *m, ParticleIndex pi)
A container which contains all consecutive particle pairs from an input list.
Sample best solutions using Domino.
Filter a configuration of the subset using the Model thresholds.
Represent a subset of the particles being optimized.
Class for storing model, its restraints, constraints, and particles.
Do not allow two particles to be in the same state.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
void add_hierarchy(RMF::FileHandle fh, atom::Hierarchy hs)
static Mass setup_particle(Model *m, ParticleIndex pi, Float mass)
A class to change and restore log state.
static Colored setup_particle(Model *m, ParticleIndex pi, Color color)
void add_restraints(RMF::NodeHandle fh, const Restraints &hs)
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
void show_restraint_hierarchy(ScoringFunctionAdaptor rs, std::ostream &out=std::cout)
Print the hierarchy of restraints.
Class to handle individual model particles.
Color get_jet_color(double f)
Return the color for f from the jet color map.
void load_particle_states(const Subset &s, const Assignment &ss, const ParticleStatesTable *pst)
Load the appropriate state for each particle in a Subset.
Functionality for loading, creating, manipulating and scoring atomic structures.
Support for the RMF file format for storing hierarchical molecular data and markup.
Applies a PairScore to each Pair in a list.
Divide-and-conquer inferential optimization in discrete space.
std::string create_temporary_file_name(std::string prefix="imp_temp", std::string suffix="")
Create a temporary file.