6 from __future__
import print_function
23 m.set_log_level(IMP.SILENT)
39 chainr.set_name(
"The chain restraint")
40 restraints.append(chainr)
45 nbl.add_pair_filter(bpc)
52 (ps[0].get_particle_index(),
53 ps[-1].get_particle_index()))
54 tie.set_name(
"tie ends")
55 restraints.append(tie)
60 r.set_maximum_score(.1)
61 s.set_scoring_function(restraints)
62 s.set_number_of_attempts(10)
64 confs = s.create_sample()
65 print(
"Found", confs.get_number_of_configurations(),
"configurations")
66 fh = RMF.create_rmf_file(
"solutions.rmfz")
68 for i
in range(0, confs.get_number_of_configurations()):
69 confs.load_configuration(i)
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.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
A container which contains all consecutive particle pairs from an input list.
Return all close unordered pairs of particles taken from the SingletonContainer.
Class for storing model, its restraints, constraints, and particles.
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)
Store a list of ParticleIndexes.
static Mass setup_particle(Model *m, ParticleIndex pi, Float mass)
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.
Applies a PairScore to a Pair.
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.