5 from __future__
import print_function
18 "Use the IMP::misc::DecayPairContainerOptimizerState to gradually "
19 "break the bonds in a bd simulation")
39 for i
in range(0, np):
40 p = m.add_particle(
"p")
45 d.set_coordinates_are_optimized(
True)
53 for i
in range(0, nb):
54 pp = random.sample(ps, 2)
55 if pp
not in bds
and [pp[1], pp[0]]
not in bds:
60 dos.set_period(period)
61 dos.set_log_level(IMP.SILENT)
71 dos.get_output_container(),
78 bd.set_maximum_time_step(1000)
79 bd.set_scoring_function(rs + [ev])
80 bd.add_optimizer_state(dos)
84 rmf = RMF.create_rmf_file(fn)
85 print(
"setting up file")
91 os.set_period(max(steps / 100, 1))
92 bd.add_optimizer_state(os)
Applies a SingletonScore to each Singleton in a list.
A harmonic upper bound on the distance between two spheres.
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Various classes to hold sets of particles.
Upper bound harmonic function (non-zero when feature > mean)
static XYZR setup_particle(Model *m, ParticleIndex pi)
Miscellaneous functionality that is not expected to be used by many IMP users.
bool get_bool_flag(std::string name)
Maintain a pair container with a decaying list of pairs.
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
Get the particles from a list of indexes.
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.
Simple Brownian dynamics simulator.
Store a list of ParticleIndexes.
static Mass setup_particle(Model *m, ParticleIndex pi, Float mass)
Return true (1) with a fixed probability.
Color get_display_color(unsigned int i)
void add_hierarchies(RMF::NodeHandle fh, const atom::Hierarchies &hs)
static Colored setup_particle(Model *m, ParticleIndex pi, Color color)
void add_geometries(RMF::NodeHandle parent, const display::GeometriesTemp &r)
Add geometries to a given parent node.
void add_restraints(RMF::NodeHandle fh, const Restraints &hs)
void set_log_level(LogLevel l)
Set the current global log level.
Periodically dump the state of all associated objects into the RMF file.
static Diffusion setup_particle(Model *m, ParticleIndex pi, Float D)
Setup the particle with the specified diffusion coefficient.
Prevent a set of particles and rigid bodies from inter-penetrating.
Output IMP model data in various file formats.
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.
std::string create_temporary_file_name(std::string prefix="imp_temp", std::string suffix="")
Create a temporary file.