6 from __future__
import print_function
10 use_rigid_bodies =
True
23 prb.set_name(
"rigid body")
28 print(
"initial frame", drb.get_reference_frame())
30 drb.set_coordinates_are_optimized(
True)
32 refiner.add_particle(prb, [p])
34 print([p.get_name()
for p
in refiner.get_refined(prb)])
39 d.set_coordinates_are_optimized(
True)
48 dheader.set_resolution(1)
50 dmap.set_particles([p])
69 m.set_log_level(IMP.base.SILENT)
74 def try_point(i, j, k):
75 print(
"trying", i, j, k)
77 to_move.set_coordinates(vc)
84 print(
"score and derivatives", v, to_move.get_derivatives())
88 print(
"after", d.get_coordinates())
89 mag = to_move.get_coordinates().get_magnitude()
94 sg.set_color(converge_color)
95 sg.set_name(
"converge")
98 try_point(-bd, -bd, -bd)
static RigidBody setup_particle(kernel::Model *m, ParticleIndex pi, kernel::ParticleIndexesAdaptor ps)
Object used to hold a set of restraints.
Simple conjugate gradients optimizer.
Color get_hot_color(double f)
Return the color for f from the hot color map.
void write_map(DensityMap *m, std::string filename)
Write a density map to a file.
Class for sampling a density map from particles.
static XYZR setup_particle(kernel::Model *m, ParticleIndex pi)
A lookup based particle refiner.
DensityHeader create_density_header(const algebra::BoundingBoxD< 3 > &bb, float spacing)
Create a header from a bounding box in 3D.
Basic utilities for handling cryo-electron microscopy 3D density maps.
Class to handle individual model particles.
static Mass setup_particle(kernel::Model *m, ParticleIndex pi, Float mass)
Calculate score based on fit to EM map.
Color get_gray_color(double f)
Return the a grayscale value for f.
Write a CGO file with the geometry.
Output IMP model data in various file formats.
Class for storing model, its restraints, constraints, and particles.